libpreludedb-1.0.0/0000775000076400007640000000000011347715767011202 500000000000000libpreludedb-1.0.0/config.rpath0000775000076400007640000004401211330611104013377 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2010 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no 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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # 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. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : 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 ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no 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 # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) 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 hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; 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. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) 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 ;; hpux10*) if test "$with_gnu_ld" = no; then 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 fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # 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*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # 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 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 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 # 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 tupples: *-*-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 ;; *: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'` exit ;; 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:*:[456]) 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/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` 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:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 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-gnu`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/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix 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="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${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-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu 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-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu 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-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu 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 ;; 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 case $UNAME_PROCESSOR in i386) eval $set_cc_for_build 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 UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac 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 ;; 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 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi 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: libpreludedb-1.0.0/configure.in0000664000076400007640000002411111345712131013406 00000000000000AC_INIT AC_CONFIG_SRCDIR([src]) AC_PREREQ(2.59) AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl ********************************************************** dnl * Version and release information dnl ********************************************************** libpreludedb_major=1 libpreludedb_minor=0 libpreludedb_micro=0 libpreludedb_patchlevel= libpreludedb_version=$libpreludedb_major.$libpreludedb_minor.$libpreludedb_micro$libpreludedb_patchlevel dnl ********************************************************** dnl * Library soname (http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91) dnl ********************************************************** libpreludedb_current=4 libpreludedb_revision=10 libpreludedb_age=4 LIBPRELUDEDB_SONAME=$libpreludedb_current:$libpreludedb_revision:$libpreludedb_age AM_INIT_AUTOMAKE(libpreludedb, $libpreludedb_version) AC_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl ********************************************************** dnl * Check required program. dnl ********************************************************** AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_CC BINDINGS_CC="$CC" dnl ********************************************************** dnl * Setup GnuLib, libtool and libltdl. dnl ********************************************************** gl_EARLY AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AM_DISABLE_STATIC AC_PROG_LIBTOOL dnl ************************************************** dnl * Setup custom compiler flags * dnl ************************************************** AC_MSG_CHECKING(for cpu-specific compiler flags) if test "$host_cpu" == "x86_64" && test $enable_static = "yes"; then AC_MSG_RESULT(x86_64/static: adding -fPIC) AX_C_CHECK_FLAG(-fPIC, , , CPPFLAGS="$CPPFLAGS -fPIC") else AC_MSG_RESULT(none needed) fi AC_MSG_CHECKING(for platform-specific compiler flags) case "$host_os" in darwin*) # It may be called "cc", but it's really a GCC derivative # with a problematic special precompiler and precompiled # headers; turn off the special precompiler, as some # apparently-legal code won't compile with its precompiled # headers. AC_MSG_RESULT(Darwin: adding -no-cpp-precomp) AX_C_CHECK_FLAG(-no-cpp-precomp, , , PCFLAGS="$PCFLAGS -no-cpp-precomp") libext=dylib ;; *) libext=so AC_MSG_RESULT(none needed) ;; esac AX_LD_CHECK_FLAG(-z relro, , , LDFLAGS="$LDFLAGS -z relro") AX_LD_CHECK_FLAG(-z now, , , LDFLAGS="$LDFLAGS -z now") for i in -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused \ -Wformat -Wformat-security; do AX_C_CHECK_FLAG($i, , , PCFLAGS="$PCFLAGS $i") done if test x$buggy_pthread_initializers = xyes; then AX_C_CHECK_FLAG(-Wno-missing-braces, , , PCFLAGS="$PCFLAGS -Wno-missing-braces") fi dnl ************************************************** dnl * Check for libprelude * dnl ************************************************** AM_PATH_LIBPRELUDE(0.9.9, , AC_MSG_ERROR(Cannot find libprelude: Is libprelude-config in the path?), no) dnl *************************************************** dnl * Check for the MySQL library (MySQL plugin * dnl *************************************************** AX_LIB_MYSQL() with_mysql="no" if test x$MYSQL_CONFIG != x; then with_mysql="yes" LIBS_bkp=$LIBS LIBS="$MYSQL_LDFLAGS" AC_CHECK_FUNC(mysql_real_escape_string, AC_DEFINE(HAVE_MYSQL_REAL_ESCAPE_STRING, , mysql_real_escape_string function present)) LIBS=$LIBS_bkp fi AM_CONDITIONAL(HAVE_MYSQL, test x$with_mysql = xyes) dnl ******************************************************** dnl * Check for the PostgreSQL library (PostgreSQL plugin) * dnl ******************************************************** AX_LIB_POSTGRESQL() with_pgsql="no" if test x$POSTGRESQL_VERSION != x; then with_pgsql="yes" LIBS_bkp=$LIBS LIBS="$POSTGRESQL_LDFLAGS" AC_CHECK_FUNC(PQserverVersion, AC_DEFINE(HAVE_PQSERVERVERSION, , [Define if PQserverVersion function is available])) LIBS=$LIBS_bkp; fi AM_CONDITIONAL(HAVE_PGSQL, test x$with_pgsql = xyes) dnl ******************************************************** dnl * Check for the SQLite3 library (SQLite3 plugin) * dnl ******************************************************** AX_LIB_SQLITE3("3.0.0") if test x$SQLITE3_VERSION != x; then with_sqlite3="yes" else with_sqlite3="no" fi AM_CONDITIONAL(HAVE_SQLITE3, test x$with_sqlite3 = xyes) dnl ************************************************** dnl * Swig support * dnl ************************************************** AC_ARG_WITH(swig, AC_HELP_STRING(--with-swig@<:@=PATH@:>@, Re-generate perl/python bindings sources @<:@default=auto@:>@), [swig_required=true; if test x$withval = xyes; then with_swig="swig"; fi], with_swig="swig") if test x$with_swig != xno; then AC_PATH_PROG(SWIG, `basename $with_swig`, no, `dirname $with_swig`:$PATH) if test x$SWIG = xno; then if test x$swig_required = xtrue; then AC_MSG_ERROR([Could not find $with_swig binary]) fi fi fi AM_CONDITIONAL(HAVE_SWIG, test x$SWIG != xno) dnl ************************************************** dnl * Perl support * dnl ************************************************** AC_ARG_WITH(perl, AC_HELP_STRING(--with-perl@<:@=PATH@:>@, Enable support for perl binding @<:@default=auto@:>@), [perl_required=true; if test x$withval = xyes; then with_perl="perl"; fi], with_perl="perl") if test x$with_perl != xno; then AC_PATH_PROG(PERL, `basename $with_perl`, no, `dirname $with_perl`:$PATH) if test x$PERL = xno; then if test x$perl_required = xtrue; then AC_MSG_ERROR([Could not find $with_perl binary]) fi with_perl=no else PERL_CFLAGS="-I`$PERL -e 'use Config; print $Config{archlib}'`/CORE" old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" AC_CHECK_HEADER(EXTERN.h, [AC_CHECK_HEADER(perl.h, with_perl=yes, with_perl=no, [#include ])], with_perl=no) CPPFLAGS="$old_CPPFLAGS" fi fi AM_CONDITIONAL(HAVE_PERL, test x$with_perl = xyes) PERL_INSTALLDIRS="site" AC_ARG_WITH(perl-installdirs, AC_HELP_STRING(--with-perl-installdirs=@<:@site|vendor@:>@, Specify where to install the Perl module @<:@default=site@:>@), PERL_INSTALLDIRS="$withval") if test x$PERL_INSTALLDIRS != xsite && test x$PERL_INSTALLDIRS != xvendor; then AC_MSG_ERROR(Invalid value for --with-perl-installdirs: only "site" or "vendor" supported.) fi PERL_EXTRA_PARAMS="INSTALLDIRS=$PERL_INSTALLDIRS" AC_SUBST(PERL_EXTRA_PARAMS) dnl ************************************************** dnl * Python support * dnl ************************************************** AC_ARG_WITH(python, AC_HELP_STRING(--with-python@<:@=PATH@:>@, Enable support for python binding @<:@default=auto@:>@), [python_required=true; if test x$withval = xyes; then with_python="python"; fi], with_python="python") if test x$with_python != xno; then AC_PATH_PROG(PYTHON, `basename $with_python`, no, `dirname $with_python`:$PATH) if test x$PYTHON = xno; then if test x$python_required = xtrue; then AC_MSG_ERROR([Could not find $with_python binary]) fi with_python=no else old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`" AC_CHECK_HEADER(Python.h, with_python=yes, with_python=no) CPPFLAGS="$old_CPPFLAGS" fi fi AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes) dnl ************************************************** dnl * Check for missing function replacement * dnl ************************************************** gl_SOURCE_BASE(libmissing) gl_M4_BASE(libmissing/m4) gl_INIT dnl ************************************************** dnl * Check for GTK-DOC * dnl ************************************************** GTK_DOC_CHECK(1.0) dnl ************************************************** dnl * Typedefs, structures, compiler characteristics.* dnl ************************************************** AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME dnl ************************************************** dnl * Check for GTK-DOC * dnl ************************************************** GTK_DOC_CHECK(1.0) dnl ************************************************** dnl * Setup build variable * dnl ************************************************** AC_SUBST(PCFLAGS) AC_SUBST(BINDINGS_CC) AC_SUBST(LIBPRELUDEDB_SONAME) AS_AC_EXPAND(LIBDIR, $libdir) AS_AC_EXPAND(DATADIR, $datadir) AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) db_plugin_dir=$LIBDIR/libpreludedb/plugins sql_plugin_dir=$db_plugin_dir/sql format_plugin_dir=$db_plugin_dir/formats format_schema_dir=$DATADIR/libpreludedb AC_SUBST(db_plugin_dir) AC_SUBST(sql_plugin_dir) AC_SUBST(format_plugin_dir) AC_SUBST(format_schema_dir) AC_CONFIG_FILES([ libpreludedb-config Makefile m4/Makefile libmissing/Makefile libmissing/tests/Makefile src/Makefile src/include/Makefile src/include/preludedb-version.h plugins/Makefile plugins/sql/Makefile plugins/sql/mysql/Makefile plugins/sql/pgsql/Makefile plugins/sql/sqlite3/Makefile plugins/format/Makefile plugins/format/classic/Makefile plugins/format/classic/include/Makefile docs/Makefile docs/api/Makefile docs/manpages/Makefile bindings/Makefile bindings/perl/Makefile.PL bindings/python/setup.py ]) AC_CONFIG_COMMANDS([default],[[ chmod +x libpreludedb-config ]],[[]]) AC_OUTPUT echo echo "*** Dumping configuration ***" echo " - Generate documentation : $enable_gtk_doc" echo " - Enable MySQL plugin : $with_mysql" echo " - Enable PostgreSQL plugin : $with_pgsql" echo " - Enable SQLite3 plugin : $with_sqlite3" echo " - Perl binding : $with_perl" echo " - Python binding : $with_python"; libpreludedb-1.0.0/missing0000755000076400007640000002623311347715642012515 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally 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 run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] 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 # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # 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: libpreludedb-1.0.0/install-sh0000755000076400007640000003253711347715642013126 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpreludedb-1.0.0/warn-on-use.h0000664000076400007640000000717711330611104013426 00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010 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 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 Lesser 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 . */ /* _GL_WARN_ON_USE(function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ extern int _gl_warn_on_use # endif #endif libpreludedb-1.0.0/LICENSE.README0000664000076400007640000000164111226653036013047 00000000000000This directory and its children contain LibPreludeDB, a library for using the Prelude database. Copyright (C) 2005 PreludeIDS Technologies SARL. All rights reserved. This library is made available under a dual licensing scheme. If you link LibPreludeDB against other code all of which is itself licensed under the terms of the GNU General Public License version 2 dated June 1991 ("GPL v2") or compatible, then you may use LibPreludeDB under the terms of the GPL v2,as appearing in the file COPYING. If the file COPYING is missing, you can obtain a copy of the GPL v2 from the Free Software Foundation Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. For any other uses of LibPreludeDB, you must first obtain a commercial license from PreludeIDS Technologies SARL. Please contact info@prelude-ids.com for information about commercial licensing. Please also read the information in the file HACKING.README. libpreludedb-1.0.0/depcomp0000755000076400007640000004426711347715644012504 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac 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" # 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 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## 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). ## - 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## 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. tr ' ' ' ' < "$tmpdepfile" | ## 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. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then : else 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 ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # 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.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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:: \1 \\:p' >> "$depfile" echo " " >> "$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: libpreludedb-1.0.0/docs/0000775000076400007640000000000011347715761012124 500000000000000libpreludedb-1.0.0/docs/api/0000775000076400007640000000000011347715761012675 500000000000000libpreludedb-1.0.0/docs/api/libpreludedb-sections.txt0000664000076400007640000001714411347715761017647 00000000000000
preludedb preludedb_t preludedb_result_idents_t preludedb_result_values_t preludedb_result_idents_order_t PRELUDEDB_ERRBUF_SIZE preludedb_init preludedb_deinit preludedb_new preludedb_destroy preludedb_get_format_name preludedb_get_format_version preludedb_set_format preludedb_get_sql preludedb_result_idents_destroy preludedb_result_idents_get_next preludedb_result_values_destroy preludedb_result_values_get_next preludedb_get_error preludedb_insert_message preludedb_get_alert_idents preludedb_get_heartbeat_idents preludedb_get_alert preludedb_get_heartbeat preludedb_delete_alert preludedb_delete_heartbeat preludedb_delete_alert_from_list preludedb_delete_alert_from_result_idents preludedb_delete_heartbeat_from_list preludedb_delete_heartbeat_from_result_idents preludedb_get_values preludedb_transaction_abort preludedb_transaction_end preludedb_transaction_start
preludedb-plugin-format preludedb_plugin_format preludedb_plugin_format_t preludedb_plugin_format_get_values_func_t preludedb_plugin_format_get_alert_idents_func_t preludedb_plugin_format_delete_alert_func_t preludedb_plugin_format_new preludedb_plugin_format_get_heartbeat_idents_func_t preludedb_plugin_format_get_message_ident_count_func_t preludedb_plugin_format_get_alert_func_t preludedb_plugin_format_get_next_values_func_t preludedb_plugin_format_get_heartbeat_func_t preludedb_plugin_format_get_next_message_ident_func_t preludedb_plugin_format_destroy_values_resource_func_t preludedb_plugin_format_insert_message_func_t preludedb_plugin_format_check_schema_version_func_t preludedb_plugin_format_destroy_message_idents_resource_func_t preludedb_plugin_format_delete_heartbeat_func_t preludedb_plugin_format_delete_alert_from_list_func_t preludedb_plugin_format_delete_alert_from_result_idents_func_t preludedb_plugin_format_delete_heartbeat_from_list_func_t preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t preludedb_plugin_format_set_delete_alert_from_list_func preludedb_plugin_format_set_delete_alert_from_result_idents_func preludedb_plugin_format_set_delete_heartbeat_from_list_func preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func preludedb_plugin_format_set_check_schema_version_func preludedb_plugin_format_set_get_alert_idents_func preludedb_plugin_format_set_get_heartbeat_idents_func preludedb_plugin_format_set_get_message_ident_count_func preludedb_plugin_format_set_get_next_message_ident_func preludedb_plugin_format_set_destroy_message_idents_resource_func preludedb_plugin_format_set_get_alert_func preludedb_plugin_format_set_get_heartbeat_func preludedb_plugin_format_set_delete_alert_func preludedb_plugin_format_set_delete_heartbeat_func preludedb_plugin_format_set_insert_message_func preludedb_plugin_format_set_get_values_func preludedb_plugin_format_set_get_next_values_func preludedb_plugin_format_set_destroy_values_resource_func
preludedb-version LIBPRELUDEDB_VERSION preludedb_check_version
preludedb-path-selection preludedb_selected_path_flags_t preludedb_path_selection_t preludedb_selected_path_t preludedb_selected_path_new preludedb_selected_path_new_string preludedb_selected_path_destroy preludedb_selected_path_get_path preludedb_selected_path_get_flags preludedb_path_selection_new preludedb_path_selection_destroy preludedb_path_selection_add preludedb_path_selection_get_next preludedb_path_selection_get_count
preludedb-error preludedb_error_code_t preludedb_error_t preludedb_strerror prelude_error_from_errno
preludedb-sql PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE preludedb_sql_time_constraint_type_t preludedb_sql_t preludedb_sql_table_t preludedb_sql_row_t preludedb_sql_field_t preludedb_sql_new preludedb_sql_destroy preludedb_sql_enable_query_logging preludedb_sql_disable_query_logging preludedb_sql_get_plugin_error preludedb_sql_query preludedb_sql_query_sprintf preludedb_sql_insert preludedb_sql_build_limit_offset_string preludedb_sql_transaction_start preludedb_sql_transaction_end preludedb_sql_transaction_abort preludedb_sql_escape_fast preludedb_sql_escape preludedb_sql_escape_binary preludedb_sql_unescape_binary preludedb_sql_table_destroy preludedb_sql_table_get_column_name preludedb_sql_table_get_column_num preludedb_sql_table_get_column_count preludedb_sql_table_get_row_count preludedb_sql_table_fetch_row preludedb_sql_row_fetch_field preludedb_sql_row_fetch_field_by_name preludedb_sql_field_get_value preludedb_sql_field_get_len preludedb_sql_field_to_int8 preludedb_sql_field_to_uint8 preludedb_sql_field_to_int16 preludedb_sql_field_to_uint16 preludedb_sql_field_to_int32 preludedb_sql_field_to_uint32 preludedb_sql_field_to_int64 preludedb_sql_field_to_uint64 preludedb_sql_field_to_float preludedb_sql_field_to_double preludedb_sql_field_to_string preludedb_sql_build_criterion_string preludedb_sql_time_from_timestamp preludedb_sql_time_to_timestamp
preludedb-plugin-sql preludedb_plugin_sql_t preludedb_plugin_sql_get_column_name_func_t preludedb_plugin_sql_get_operator_string_func_t preludedb_plugin_sql_build_constraint_string_func_t preludedb_plugin_sql_unescape_binary_func_t preludedb_plugin_sql_escape_binary_func_t preludedb_plugin_sql_query_func_t preludedb_plugin_sql_get_column_num_func_t preludedb_plugin_sql_resource_destroy_func_t preludedb_plugin_sql_build_timestamp_string_func_t preludedb_plugin_sql_build_limit_offset_string_func_t preludedb_plugin_sql_set_build_timestamp_string_func preludedb_plugin_sql_build_time_interval_string_func_t preludedb_plugin_sql_open_func_t preludedb_plugin_sql_fetch_field_func_t preludedb_plugin_sql_set_get_operator_string_func preludedb_plugin_sql_close_func_t preludedb_plugin_sql_build_time_constraint_string_func_t preludedb_plugin_sql_escape_func_t preludedb_plugin_sql_fetch_row_func_t preludedb_plugin_sql_new preludedb_plugin_sql_set_open_func preludedb_plugin_sql_set_close_func preludedb_plugin_sql_set_escape_func preludedb_plugin_sql_set_escape_binary_func preludedb_plugin_sql_set_unescape_binary_func preludedb_plugin_sql_set_query_func preludedb_plugin_sql_set_get_column_count_func preludedb_plugin_sql_set_get_row_count_func preludedb_plugin_sql_set_get_column_name_func preludedb_plugin_sql_set_get_column_num_func preludedb_plugin_sql_set_resource_destroy_func preludedb_plugin_sql_set_fetch_row_func preludedb_plugin_sql_set_fetch_field_func preludedb_plugin_sql_set_build_time_constraint_string_func preludedb_plugin_sql_set_build_time_interval_string_func preludedb_plugin_sql_set_build_limit_offset_string_func preludedb_plugin_sql_set_build_constraint_string_func
preludedb-sql-settings PRELUDEDB_SQL_SETTING_TYPE PRELUDEDB_SQL_SETTING_HOST PRELUDEDB_SQL_SETTING_PORT PRELUDEDB_SQL_SETTING_NAME PRELUDEDB_SQL_SETTING_USER PRELUDEDB_SQL_SETTING_PASS PRELUDEDB_SQL_SETTING_FILE PRELUDEDB_SQL_SETTING_LOG preludedb_sql_settings_t preludedb_sql_settings_new preludedb_sql_settings_new_from_string preludedb_sql_settings_destroy preludedb_sql_settings_set preludedb_sql_settings_set_from_string preludedb_sql_settings_get preludedb_sql_settings_set_type preludedb_sql_settings_get_type preludedb_sql_settings_set_host preludedb_sql_settings_get_host preludedb_sql_settings_set_port preludedb_sql_settings_get_port preludedb_sql_settings_set_name preludedb_sql_settings_get_name preludedb_sql_settings_set_user preludedb_sql_settings_get_user preludedb_sql_settings_set_pass preludedb_sql_settings_get_pass preludedb_sql_settings_set_log preludedb_sql_settings_get_log preludedb_sql_settings_set_file preludedb_sql_settings_get_file
libpreludedb-1.0.0/docs/api/libpreludedb-docs.sgml0000664000076400007640000000142611226653036017057 00000000000000 [Insert name here] Reference Manual [Insert title here] libpreludedb-1.0.0/docs/api/tmpl/0000775000076400007640000000000011347715761013651 500000000000000libpreludedb-1.0.0/docs/api/tmpl/preludedb-error.sgml0000664000076400007640000000256111347715761017556 00000000000000 preludedb-error @PRELUDEDB_ERROR_NO_ERROR: @PRELUDEDB_ERROR_GENERIC: @PRELUDEDB_ERROR_INVALID_SETTINGS_STRING: @PRELUDEDB_ERROR_CONNECTION: @PRELUDEDB_ERROR_QUERY: @PRELUDEDB_ERROR_INVALID_COLUMN_NUM: @PRELUDEDB_ERROR_INVALID_COLUMN_NAME: @PRELUDEDB_ERROR_INVALID_VALUE: @PRELUDEDB_ERROR_INVALID_VALUE_TYPE: @PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN: @PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN: @PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION: @PRELUDEDB_ERROR_NOT_IN_TRANSACTION: @PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT: @PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING: @PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION: @PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD: @PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT: @PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID: @PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN: @PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN: @error: @Returns: @Varargs: @Returns: libpreludedb-1.0.0/docs/api/tmpl/preludedb-sql.sgml0000664000076400007640000001262011347715761017221 00000000000000 preludedb-sql @PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: @PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: @PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY: @PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: @PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY: @PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: @PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: @PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: @new: @type: @settings: @Returns: @sql: @sql: @filename: @Returns: @sql: @sql: @Returns: @sql: @query: @table: @Returns: @sql: @table: @format: @Varargs: @Returns: @sql: @table: @fields: @format: @Varargs: @Returns: @sql: @limit: @offset: @output: @Returns: @sql: @Returns: @sql: @Returns: @sql: @Returns: @sql: @input: @input_size: @output: @Returns: @sql: @input: @output: @Returns: @sql: @input: @input_size: @output: @Returns: @sql: @input: @input_size: @output: @output_size: @Returns: @table: @table: @column_num: @Returns: @table: @column_name: @Returns: @table: @Returns: @table: @Returns: @table: @row: @Returns: @row: @column_num: @field: @Returns: @row: @column_name: @field: @Returns: @field: @Returns: @field: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @value: @Returns: @field: @output: @Returns: @sql: @output: @field: @operator: @value: @Returns: @time: @time_buf: @gmtoff: @usec: @Returns: @sql: @time: @time_buf: @time_buf_size: @gmtoff_buf: @gmtoff_buf_size: @usec_buf: @usec_buf_size: @Returns: libpreludedb-1.0.0/docs/api/tmpl/preludedb-path-selection.sgml0000664000076400007640000000363511347715761021347 00000000000000 preludedb-path-selection @PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN: @PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX: @PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG: @PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD: @PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT: @PRELUDEDB_SELECTED_OBJECT_GROUP_BY: @PRELUDEDB_SELECTED_OBJECT_ORDER_ASC: @PRELUDEDB_SELECTED_OBJECT_ORDER_DESC: @selected_path: @path: @flags: @Returns: @selected_path: @str: @Returns: @selected_path: @selected_path: @Returns: @selected_path: @Returns: @path_selection: @Returns: @path_selection: @path_selection: @selected_path: @path_selection: @selected_path: @Returns: @path_selection: @Returns: libpreludedb-1.0.0/docs/api/tmpl/libpreludedb-unused.sgml0000664000076400007640000000524111347715761020415 00000000000000 @Param1: @Param2: @Returns: @db: @Returns: @check_schema_version: @get_alert_idents: @get_heartbeat_idents: @get_message_ident_count: @get_next_message_ident: @destroy_message_idents_resource: @get_alert: @get_heartbeat: @delete_alert: @delete_alert_from_list: @delete_alert_from_result_idents: @delete_heartbeat: @delete_heartbeat_from_list: @delete_heartbeat_from_result_idents: @insert_message: @get_values: @get_next_values: @destroy_values_resource: @p: @p: @p: @p: @p: @p: @p: @p: @p: @p: @p: @p: @session: @Returns: @p: @p: @p: @p: @plugin: @func: @p: @operator: @Returns: @PRELUDEDB_SQL_STATUS_DISCONNECTED: @PRELUDEDB_SQL_STATUS_CONNECTED: @PRELUDEDB_SQL_STATUS_TRANSACTION: libpreludedb-1.0.0/docs/api/tmpl/preludedb.sgml0000664000076400007640000000717211347715761016432 00000000000000 preludedb @PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE: @PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC: @PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC: @Returns: @db: @sql: @format_name: @errbuf: @size: @Returns: @db: @db: @Returns: @db: @Returns: @db: @format_name: @Returns: @db: @Returns: @result: @result: @ident: @Returns: @result: @result: @values: @Returns: @db: @error: @errbuf: @size: @Returns: @db: @message: @Returns: @db: @criteria: @limit: @offset: @order: @result: @Returns: @db: @criteria: @limit: @offset: @order: @result: @Returns: @db: @ident: @message: @Returns: @db: @ident: @message: @Returns: @db: @ident: @Returns: @db: @ident: @Returns: @db: @idents: @size: @Returns: @db: @result: @Returns: @db: @idents: @size: @Returns: @db: @result: @Returns: @db: @path_selection: @criteria: @distinct: @limit: @offset: @result: @Returns: @db: @Returns: @db: @Returns: @db: @Returns: libpreludedb-1.0.0/docs/api/tmpl/preludedb-version.sgml0000664000076400007640000000066211347715761020112 00000000000000 preludedb-version @req_version: @Returns: libpreludedb-1.0.0/docs/api/tmpl/preludedb-sql-settings.sgml0000664000076400007640000000636011347715761021063 00000000000000 preludedb-sql-settings @settings: @Returns: @settings: @str: @Returns: @settings: @settings: @name: @value: @Returns: @settings: @str: @Returns: @settings: @name: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: @settings: @value: @Returns: @settings: @Returns: libpreludedb-1.0.0/docs/api/tmpl/preludedb-plugin-sql.sgml0000664000076400007640000001161011347715761020513 00000000000000 preludedb-plugin-sql @session: @resource: @column_num: @Returns: @operator: @Returns: @out: @field: @operator: @value: @Returns: @session: @input: @output: @output_size: @Returns: @session: @input: @input_size: @output: @Returns: @session: @query: @res: @Returns: @session: @resource: @column_name: @Returns: @session: @resource: @t: @out: @size: @Returns: @session: @limit: @offset: @output: @Returns: @plugin: @func: @type: @value: @buf: @size: @Returns: @settings: @session: @Returns: @session: @resource: @row: @column_num: @value: @len: @Returns: @plugin: @func: @session: @output: @field: @type: @operator: @value: @gmt_offset: @Returns: @session: @input: @input_size: @output: @Returns: @session: @resource: @row: @Returns: @plugin: @Returns: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: libpreludedb-1.0.0/docs/api/tmpl/preludedb-plugin-format.sgml0000664000076400007640000001203211347715761021203 00000000000000 preludedb-plugin-format @sql: @selection: @criteria: @distinct: @limit: @offset: @res: @Returns: @sql: @criteria: @limit: @offset: @order: @res: @Returns: @sql: @ident: @Returns: @ret: @Returns: @sql: @criteria: @limit: @offset: @order: @res: @Returns: @res: @Returns: @sql: @ident: @message: @Returns: @res: @selection: @values: @Returns: @sql: @ident: @message: @Returns: @res: @ident: @Returns: @res: @sql: @message: @Returns: @version: @Returns: @res: @sql: @ident: @Returns: @sql: @idents: @size: @Returns: @sql: @results: @Returns: @sql: @idents: @size: @Returns: @sql: @results: @Returns: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: @plugin: @func: libpreludedb-1.0.0/docs/api/libpreludedb-overrides.txt0000664000076400007640000000000011226653036017771 00000000000000libpreludedb-1.0.0/docs/api/Makefile.am0000664000076400007640000000442711226653036014650 00000000000000## Process this file with automake to produce Makefile.in # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libpreludedb # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR=$(top_srcdir)/src # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES= # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES= GTKDOC_LIBS= # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += -include $(top_srcdir)/git.mk libpreludedb-1.0.0/docs/api/Makefile.in0000664000076400007640000007454711347715642014701 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ 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@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/gtk-doc.make subdir = docs/api ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE = libpreludedb # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR = $(top_srcdir)/src # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES = # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files = # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES = GTKDOC_LIBS = @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = sh -c @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(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 docs/api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/api/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local 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 \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp @ENABLE_GTK_DOC_FALSE@all-local: docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/docs/api/xml/0000775000076400007640000000000011347715761013475 500000000000000libpreludedb-1.0.0/docs/api/xml/api-index-deprecated.xml0000664000076400007640000000062011347715761020111 00000000000000 P preludedb_sql_get_plugin_error libpreludedb-1.0.0/docs/api/xml/preludedb-sql-settings.xml0000664000076400007640000007564311347715761020557 00000000000000 preludedb-sql-settings 3 LIBPRELUDEDB Library preludedb-sql-settings Synopsis #define PRELUDEDB_SQL_SETTING_TYPE #define PRELUDEDB_SQL_SETTING_HOST #define PRELUDEDB_SQL_SETTING_PORT #define PRELUDEDB_SQL_SETTING_NAME #define PRELUDEDB_SQL_SETTING_USER #define PRELUDEDB_SQL_SETTING_PASS #define PRELUDEDB_SQL_SETTING_FILE #define PRELUDEDB_SQL_SETTING_LOG typedef preludedb_sql_settings_t; int preludedb_sql_settings_new (preludedb_sql_settings_t **settings); int preludedb_sql_settings_new_from_string (preludedb_sql_settings_t **settings, const char *str); void preludedb_sql_settings_destroy (preludedb_sql_settings_t *settings); int preludedb_sql_settings_set (preludedb_sql_settings_t *settings, const char *name, const char *value); int preludedb_sql_settings_set_from_string (preludedb_sql_settings_t *settings, const char *str); const char * preludedb_sql_settings_get (const preludedb_sql_settings_t *settings, const char *name); int preludedb_sql_settings_set_type (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_type (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_host (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_host (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_port (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_port (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_name (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_name (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_user (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_user (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_pass (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_pass (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_log (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_log (const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_file (preludedb_sql_settings_t *settings, const char *value); const char * preludedb_sql_settings_get_file (const preludedb_sql_settings_t *settings); Description Details PRELUDEDB_SQL_SETTING_TYPE PRELUDEDB_SQL_SETTING_TYPE#define PRELUDEDB_SQL_SETTING_TYPE "type" PRELUDEDB_SQL_SETTING_HOST PRELUDEDB_SQL_SETTING_HOST#define PRELUDEDB_SQL_SETTING_HOST "host" PRELUDEDB_SQL_SETTING_PORT PRELUDEDB_SQL_SETTING_PORT#define PRELUDEDB_SQL_SETTING_PORT "port" PRELUDEDB_SQL_SETTING_NAME PRELUDEDB_SQL_SETTING_NAME#define PRELUDEDB_SQL_SETTING_NAME "name" PRELUDEDB_SQL_SETTING_USER PRELUDEDB_SQL_SETTING_USER#define PRELUDEDB_SQL_SETTING_USER "user" PRELUDEDB_SQL_SETTING_PASS PRELUDEDB_SQL_SETTING_PASS#define PRELUDEDB_SQL_SETTING_PASS "pass" PRELUDEDB_SQL_SETTING_FILE PRELUDEDB_SQL_SETTING_FILE#define PRELUDEDB_SQL_SETTING_FILE "file" PRELUDEDB_SQL_SETTING_LOG PRELUDEDB_SQL_SETTING_LOG#define PRELUDEDB_SQL_SETTING_LOG "log" preludedb_sql_settings_t preludedb_sql_settings_ttypedef struct preludedb_sql_settings preludedb_sql_settings_t; preludedb_sql_settings_new () preludedb_sql_settings_newint preludedb_sql_settings_new (preludedb_sql_settings_t **settings); settings : Returns : preludedb_sql_settings_new_from_string () preludedb_sql_settings_new_from_stringint preludedb_sql_settings_new_from_string (preludedb_sql_settings_t **settings, const char *str); settings : str : Returns : preludedb_sql_settings_destroy () preludedb_sql_settings_destroyvoid preludedb_sql_settings_destroy (preludedb_sql_settings_t *settings); settings : preludedb_sql_settings_set () preludedb_sql_settings_setint preludedb_sql_settings_set (preludedb_sql_settings_t *settings, const char *name, const char *value); settings : name : value : Returns : preludedb_sql_settings_set_from_string () preludedb_sql_settings_set_from_stringint preludedb_sql_settings_set_from_string (preludedb_sql_settings_t *settings, const char *str); settings : str : Returns : preludedb_sql_settings_get () preludedb_sql_settings_getconst char * preludedb_sql_settings_get (const preludedb_sql_settings_t *settings, const char *name); settings : name : Returns : preludedb_sql_settings_set_type () preludedb_sql_settings_set_typeint preludedb_sql_settings_set_type (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_type () preludedb_sql_settings_get_typeconst char * preludedb_sql_settings_get_type (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_host () preludedb_sql_settings_set_hostint preludedb_sql_settings_set_host (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_host () preludedb_sql_settings_get_hostconst char * preludedb_sql_settings_get_host (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_port () preludedb_sql_settings_set_portint preludedb_sql_settings_set_port (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_port () preludedb_sql_settings_get_portconst char * preludedb_sql_settings_get_port (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_name () preludedb_sql_settings_set_nameint preludedb_sql_settings_set_name (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_name () preludedb_sql_settings_get_nameconst char * preludedb_sql_settings_get_name (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_user () preludedb_sql_settings_set_userint preludedb_sql_settings_set_user (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_user () preludedb_sql_settings_get_userconst char * preludedb_sql_settings_get_user (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_pass () preludedb_sql_settings_set_passint preludedb_sql_settings_set_pass (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_pass () preludedb_sql_settings_get_passconst char * preludedb_sql_settings_get_pass (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_log () preludedb_sql_settings_set_logint preludedb_sql_settings_set_log (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_log () preludedb_sql_settings_get_logconst char * preludedb_sql_settings_get_log (const preludedb_sql_settings_t *settings); settings : Returns : preludedb_sql_settings_set_file () preludedb_sql_settings_set_fileint preludedb_sql_settings_set_file (preludedb_sql_settings_t *settings, const char *value); settings : value : Returns : preludedb_sql_settings_get_file () preludedb_sql_settings_get_fileconst char * preludedb_sql_settings_get_file (const preludedb_sql_settings_t *settings); settings : Returns : libpreludedb-1.0.0/docs/api/xml/preludedb-sql.xml0000664000076400007640000020624411347715761016712 00000000000000 preludedb-sql 3 LIBPRELUDEDB Library preludedb-sql Synopsis #define PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE enum preludedb_sql_time_constraint_type_t; typedef preludedb_sql_t; typedef preludedb_sql_table_t; typedef preludedb_sql_row_t; typedef preludedb_sql_field_t; int preludedb_sql_new (preludedb_sql_t **new, const char *type, preludedb_sql_settings_t *settings); void preludedb_sql_destroy (preludedb_sql_t *sql); int preludedb_sql_enable_query_logging (preludedb_sql_t *sql, const char *filename); void preludedb_sql_disable_query_logging (preludedb_sql_t *sql); const char * preludedb_sql_get_plugin_error (preludedb_sql_t *sql); int preludedb_sql_query (preludedb_sql_t *sql, const char *query, preludedb_sql_table_t **table); int preludedb_sql_query_sprintf (preludedb_sql_t *sql, preludedb_sql_table_t **table, const char *format, ...); int preludedb_sql_insert (preludedb_sql_t *sql, const char *table, const char *fields, const char *format, ...); int preludedb_sql_build_limit_offset_string (preludedb_sql_t *sql, int limit, int offset, prelude_string_t *output); int preludedb_sql_transaction_start (preludedb_sql_t *sql); int preludedb_sql_transaction_end (preludedb_sql_t *sql); int preludedb_sql_transaction_abort (preludedb_sql_t *sql); int preludedb_sql_escape_fast (preludedb_sql_t *sql, const char *input, size_t input_size, char **output); int preludedb_sql_escape (preludedb_sql_t *sql, const char *input, char **output); int preludedb_sql_escape_binary (preludedb_sql_t *sql, unsigned char *input, size_t input_size, char **output); int preludedb_sql_unescape_binary (preludedb_sql_t *sql, const char *input, size_t input_size, unsigned char **output, size_t *output_size); void preludedb_sql_table_destroy (preludedb_sql_table_t *table); const char * preludedb_sql_table_get_column_name (preludedb_sql_table_t *table, unsigned int column_num); int preludedb_sql_table_get_column_num (preludedb_sql_table_t *table, const char *column_name); unsigned int preludedb_sql_table_get_column_count (preludedb_sql_table_t *table); unsigned int preludedb_sql_table_get_row_count (preludedb_sql_table_t *table); int preludedb_sql_table_fetch_row (preludedb_sql_table_t *table, preludedb_sql_row_t **row); int preludedb_sql_row_fetch_field (preludedb_sql_row_t *row, unsigned int column_num, preludedb_sql_field_t **field); int preludedb_sql_row_fetch_field_by_name (preludedb_sql_row_t *row, const char *column_name, preludedb_sql_field_t **field); const char * preludedb_sql_field_get_value (preludedb_sql_field_t *field); size_t preludedb_sql_field_get_len (preludedb_sql_field_t *field); int preludedb_sql_field_to_int8 (preludedb_sql_field_t *field, int8_t *value); int preludedb_sql_field_to_uint8 (preludedb_sql_field_t *field, uint8_t *value); int preludedb_sql_field_to_int16 (preludedb_sql_field_t *field, int16_t *value); int preludedb_sql_field_to_uint16 (preludedb_sql_field_t *field, uint16_t *value); int preludedb_sql_field_to_int32 (preludedb_sql_field_t *field, int32_t *value); int preludedb_sql_field_to_uint32 (preludedb_sql_field_t *field, uint32_t *value); int preludedb_sql_field_to_int64 (preludedb_sql_field_t *field, int64_t *value); int preludedb_sql_field_to_uint64 (preludedb_sql_field_t *field, uint64_t *value); int preludedb_sql_field_to_float (preludedb_sql_field_t *field, float *value); int preludedb_sql_field_to_double (preludedb_sql_field_t *field, double *value); int preludedb_sql_field_to_string (preludedb_sql_field_t *field, prelude_string_t *output); int preludedb_sql_build_criterion_string (preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t operator, idmef_criterion_value_t *value); int preludedb_sql_time_from_timestamp (idmef_time_t *time, const char *time_buf, int32_t gmtoff, uint32_t usec); int preludedb_sql_time_to_timestamp (preludedb_sql_t *sql, const idmef_time_t *time, char *time_buf, size_t time_buf_size, char *gmtoff_buf, size_t gmtoff_buf_size, char *usec_buf, size_t usec_buf_size); Description Details PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE#define PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE 128 enum preludedb_sql_time_constraint_type_t preludedb_sql_time_constraint_type_ttypedef enum { PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR, PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH, PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR, PRELUDEDB_SQL_TIME_CONSTRAINT_MIN, PRELUDEDB_SQL_TIME_CONSTRAINT_SEC } preludedb_sql_time_constraint_type_t; preludedb_sql_t preludedb_sql_ttypedef struct preludedb_sql preludedb_sql_t; preludedb_sql_table_t preludedb_sql_table_ttypedef struct preludedb_sql_table preludedb_sql_table_t; preludedb_sql_row_t preludedb_sql_row_ttypedef struct preludedb_sql_row preludedb_sql_row_t; preludedb_sql_field_t preludedb_sql_field_ttypedef struct preludedb_sql_field preludedb_sql_field_t; preludedb_sql_new () preludedb_sql_newint preludedb_sql_new (preludedb_sql_t **new, const char *type, preludedb_sql_settings_t *settings); This function initialize the new object, load and setup the plugin that handle the database named type with the configuration stored in settings. new : Pointer to a sql object to initialize. type : Type of the database. settings : Settings for the choosen database. Returns : 0 on success or a negative value if an error occur. preludedb_sql_destroy () preludedb_sql_destroyvoid preludedb_sql_destroy (preludedb_sql_t *sql); Destroy sql and the underlying plugin. sql : Pointer to a sql object. preludedb_sql_enable_query_logging () preludedb_sql_enable_query_loggingint preludedb_sql_enable_query_logging (preludedb_sql_t *sql, const char *filename); Log all queries in the specified file. sql : Pointer to a sql object. filename : Where the logs will be written. Returns : 0 on success, or a negative value if an error occur. preludedb_sql_disable_query_logging () preludedb_sql_disable_query_loggingvoid preludedb_sql_disable_query_logging (preludedb_sql_t *sql); Disable query logging. sql : Pointer to a sql object. preludedb_sql_get_plugin_error () preludedb_sql_get_plugin_errorconst char * preludedb_sql_get_plugin_error (preludedb_sql_t *sql); preludedb_sql_get_plugin_error is deprecated and should not be used in newly-written code. Use preludedb_strerror(). Get sql plugin specific error message. sql : Pointer to a sql object. Returns : a non NULL pointer or a NULL pointer if no error is available. preludedb_sql_query () preludedb_sql_queryint preludedb_sql_query (preludedb_sql_t *sql, const char *query, preludedb_sql_table_t **table); Execute a SQL query. sql : Pointer to a sql object. query : The SQL query to execute. table : Pointer to a table where the query result will be stored if the type of query return results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull. Returns : the number of result or a negative value if an error occured. preludedb_sql_query_sprintf () preludedb_sql_query_sprintfint preludedb_sql_query_sprintf (preludedb_sql_t *sql, preludedb_sql_table_t **table, const char *format, ...); Execute a SQL query. sql : Pointer to a sql object. table : Pointer to a table where the query result will be stored if the type of query return results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull. format : The SQL query to execute in a printf format string. ... : Arguments referenced in format. Returns : 1 if the query returns results, 0 if it does not, or negative value if an error occur. preludedb_sql_insert () preludedb_sql_insertint preludedb_sql_insert (preludedb_sql_t *sql, const char *table, const char *fields, const char *format, ...); Insert values in a table. sql : Pointer to a sql object. table : the name of the table where to insert values. fields : a list of comma separated field names where the values will be inserted. format : The values to insert in a printf format string. ... : Argument referenced throught format. Returns : 0 on success or a negative value if an error occur. preludedb_sql_build_limit_offset_string () preludedb_sql_build_limit_offset_stringint preludedb_sql_build_limit_offset_string (preludedb_sql_t *sql, int limit, int offset, prelude_string_t *output); Build a limit/offset string for a SQL query, depending on the underlying type of database. sql : Pointer to a sql object. limit : The limit value, a value inferior to zero will disable the limit. offset : The offset value, a value inferior to zero will disable the offset. output : Where the limit/offset built string will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_sql_transaction_start () preludedb_sql_transaction_startint preludedb_sql_transaction_start (preludedb_sql_t *sql); Begin a sql transaction. sql : Pointer to a sql object. Returns : 0 on success or a negative value if an error occur. preludedb_sql_transaction_end () preludedb_sql_transaction_endint preludedb_sql_transaction_end (preludedb_sql_t *sql); Finish a sql transaction (SQL COMMIT command). sql : Pointer to a sql object. Returns : 0 on success or a negative value if an error occur. preludedb_sql_transaction_abort () preludedb_sql_transaction_abortint preludedb_sql_transaction_abort (preludedb_sql_t *sql); Abort a sql transaction (SQL ROLLBACK command). sql : Pointer to a sql object. Returns : 0 on success or a negative value if an error occur. preludedb_sql_escape_fast () preludedb_sql_escape_fastint preludedb_sql_escape_fast (preludedb_sql_t *sql, const char *input, size_t input_size, char **output); Escape a string buffer. sql : Pointer to a sql object. input : Buffer to escape input_size : Buffer size. output : Where the new escaped buffer will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_sql_escape () preludedb_sql_escapeint preludedb_sql_escape (preludedb_sql_t *sql, const char *input, char **output); Escape a string buffer. sql : Pointer to a sql object. input : Buffer to escape. output : Where the new escaped buffer will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_sql_escape_binary () preludedb_sql_escape_binaryint preludedb_sql_escape_binary (preludedb_sql_t *sql, unsigned char *input, size_t input_size, char **output); Escape a binary buffer. sql : Pointer to a sql object. input : Buffer to escape. input_size : Buffer size. output : Where the new escaped buffer will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_sql_unescape_binary () preludedb_sql_unescape_binaryint preludedb_sql_unescape_binary (preludedb_sql_t *sql, const char *input, size_t input_size, unsigned char **output, size_t *output_size); Unescape to a binary buffer. sql : Pointer to a sql object. input : Buffer to unescape. input_size : Buffer size. output : Where the new unescaped buffer will be stored. output_size : Size of the new unescape buffer. Returns : 0 on success or a negative value if an error occur. preludedb_sql_table_destroy () preludedb_sql_table_destroyvoid preludedb_sql_table_destroy (preludedb_sql_table_t *table); Destroy the table object. table : Pointer to a table object. preludedb_sql_table_get_column_name () preludedb_sql_table_get_column_nameconst char * preludedb_sql_table_get_column_name (preludedb_sql_table_t *table, unsigned int column_num); Get the name of the column number column_num. table : Pointer to a table object. column_num : Column number. Returns : the name of the column or NULL if the column column_num could not be found. preludedb_sql_table_get_column_num () preludedb_sql_table_get_column_numint preludedb_sql_table_get_column_num (preludedb_sql_table_t *table, const char *column_name); Get the number of the column named column_name. table : Pointer to a table object. column_name : Column name. Returns : the number of the column or -1 if the column column_name could not be found. preludedb_sql_table_get_column_count () preludedb_sql_table_get_column_countunsigned int preludedb_sql_table_get_column_count (preludedb_sql_table_t *table); Get the the number of columns. table : Pointer to a table object. Returns : the number of columns. preludedb_sql_table_get_row_count () preludedb_sql_table_get_row_countunsigned int preludedb_sql_table_get_row_count (preludedb_sql_table_t *table); table : Returns : preludedb_sql_table_fetch_row () preludedb_sql_table_fetch_rowint preludedb_sql_table_fetch_row (preludedb_sql_table_t *table, preludedb_sql_row_t **row); Fetch the next table's row. table : Pointer to a table object. row : Pointer to the row object where the result will be stored. Returns : 1 if the table returns a new row, 0 if there is no more rows to fetch or a negative value if an error occur. preludedb_sql_row_fetch_field () preludedb_sql_row_fetch_fieldint preludedb_sql_row_fetch_field (preludedb_sql_row_t *row, unsigned int column_num, preludedb_sql_field_t **field); Fetch the field of column column_num row : Pointer to a row object. column_num : The column number of the field to be fetched. field : Pointer to the field object where the result will be stored. Returns : 1 if the row returns a non-empty field, 0 if it returns an empty field, or a negative value if an error occur. preludedb_sql_row_fetch_field_by_name () preludedb_sql_row_fetch_field_by_nameint preludedb_sql_row_fetch_field_by_name (preludedb_sql_row_t *row, const char *column_name, preludedb_sql_field_t **field); Fetch the field of column column_name row : Pointer to a row object. column_name : The column name of the field to be fetched. field : Pointer to the field object where the result will be stored. Returns : 1 if the row returns a non-empty field, 0 if it returns an empty field, or a negative value if an error occur. preludedb_sql_field_get_value () preludedb_sql_field_get_valueconst char * preludedb_sql_field_get_value (preludedb_sql_field_t *field); Get the raw value of the field. field : Pointer to a field object. Returns : field value. preludedb_sql_field_get_len () preludedb_sql_field_get_lensize_t preludedb_sql_field_get_len (preludedb_sql_field_t *field); Get the field value length. field : Pointer to a field object. Returns : field value length. preludedb_sql_field_to_int8 () preludedb_sql_field_to_int8int preludedb_sql_field_to_int8 (preludedb_sql_field_t *field, int8_t *value); field : value : Returns : preludedb_sql_field_to_uint8 () preludedb_sql_field_to_uint8int preludedb_sql_field_to_uint8 (preludedb_sql_field_t *field, uint8_t *value); field : value : Returns : preludedb_sql_field_to_int16 () preludedb_sql_field_to_int16int preludedb_sql_field_to_int16 (preludedb_sql_field_t *field, int16_t *value); field : value : Returns : preludedb_sql_field_to_uint16 () preludedb_sql_field_to_uint16int preludedb_sql_field_to_uint16 (preludedb_sql_field_t *field, uint16_t *value); field : value : Returns : preludedb_sql_field_to_int32 () preludedb_sql_field_to_int32int preludedb_sql_field_to_int32 (preludedb_sql_field_t *field, int32_t *value); field : value : Returns : preludedb_sql_field_to_uint32 () preludedb_sql_field_to_uint32int preludedb_sql_field_to_uint32 (preludedb_sql_field_t *field, uint32_t *value); field : value : Returns : preludedb_sql_field_to_int64 () preludedb_sql_field_to_int64int preludedb_sql_field_to_int64 (preludedb_sql_field_t *field, int64_t *value); field : value : Returns : preludedb_sql_field_to_uint64 () preludedb_sql_field_to_uint64int preludedb_sql_field_to_uint64 (preludedb_sql_field_t *field, uint64_t *value); field : value : Returns : preludedb_sql_field_to_float () preludedb_sql_field_to_floatint preludedb_sql_field_to_float (preludedb_sql_field_t *field, float *value); field : value : Returns : preludedb_sql_field_to_double () preludedb_sql_field_to_doubleint preludedb_sql_field_to_double (preludedb_sql_field_t *field, double *value); field : value : Returns : preludedb_sql_field_to_string () preludedb_sql_field_to_stringint preludedb_sql_field_to_string (preludedb_sql_field_t *field, prelude_string_t *output); Get the string value of field. field : Pointer to a field type. output : Pointer to a string object where the field value will be added. Returns : 0 on success, or a negative value if an error occur. preludedb_sql_build_criterion_string () preludedb_sql_build_criterion_stringint preludedb_sql_build_criterion_string (preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t operator, idmef_criterion_value_t *value); Build a sql "field operator value" string. sql : Pointer to a sql object. output : Pointer to a string object, where the result content will be stored. field : The sql field name. operator : The criterion operator. value : The criterion value. Returns : 0 on success, or a negative value if an error occur. preludedb_sql_time_from_timestamp () preludedb_sql_time_from_timestampint preludedb_sql_time_from_timestamp (idmef_time_t *time, const char *time_buf, int32_t gmtoff, uint32_t usec); Set an idmef time using the timestamp, GMT offset and microseconds given in input. time : Pointer to a time object. time_buf : SQL timestamp. gmtoff : GMT offset. usec : Microseconds. Returns : 0 on success, or a negative value if an error occur. preludedb_sql_time_to_timestamp () preludedb_sql_time_to_timestampint preludedb_sql_time_to_timestamp (preludedb_sql_t *sql, const idmef_time_t *time, char *time_buf, size_t time_buf_size, char *gmtoff_buf, size_t gmtoff_buf_size, char *usec_buf, size_t usec_buf_size); Set timestamp, GMT offset, and microseconds buffers with the idmef time object given in input. sql : time : Pointer to a time object. time_buf : SQL timestamp. time_buf_size : SQL timestamp buffer size. gmtoff_buf : GMT offset buffer. gmtoff_buf_size : GMT offset buffer size. usec_buf : Microseconds buffer. usec_buf_size : Microseconds buffer size. Returns : 0 on success, or a negative value if an error occur. libpreludedb-1.0.0/docs/api/xml/preludedb-plugin-format.xml0000664000076400007640000017714111347715761020702 00000000000000 preludedb-plugin-format 3 LIBPRELUDEDB Library preludedb-plugin-format Synopsis typedef preludedb_plugin_format_t; int (*preludedb_plugin_format_get_values_func_t) (preludedb_sql_t *sql, preludedb_path_selection_t *selection, idmef_criteria_t *criteria, int distinct, int limit, int offset, void **res); int (*preludedb_plugin_format_get_alert_idents_func_t) (preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); int (*preludedb_plugin_format_delete_alert_func_t) (preludedb_sql_t *sql, uint64_t ident); int preludedb_plugin_format_new (preludedb_plugin_format_t **ret); int (*preludedb_plugin_format_get_heartbeat_idents_func_t) (preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); size_t (*preludedb_plugin_format_get_message_ident_count_func_t) (void *res); int (*preludedb_plugin_format_get_alert_func_t) (preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); int (*preludedb_plugin_format_get_next_values_func_t) (void *res, preludedb_path_selection_t *selection, idmef_value_t ***values); int (*preludedb_plugin_format_get_heartbeat_func_t) (preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); int (*preludedb_plugin_format_get_next_message_ident_func_t) (void *res, uint64_t *ident); void (*preludedb_plugin_format_destroy_values_resource_func_t) (void *res); int (*preludedb_plugin_format_insert_message_func_t) (preludedb_sql_t *sql, idmef_message_t *message); int (*preludedb_plugin_format_check_schema_version_func_t) (const char *version); void (*preludedb_plugin_format_destroy_message_idents_resource_func_t) (void *res); int (*preludedb_plugin_format_delete_heartbeat_func_t) (preludedb_sql_t *sql, uint64_t ident); ssize_t (*preludedb_plugin_format_delete_alert_from_list_func_t) (preludedb_sql_t *sql, uint64_t *idents, size_t size); ssize_t (*preludedb_plugin_format_delete_alert_from_result_idents_func_t) (preludedb_sql_t *sql, preludedb_result_idents_t *results); ssize_t (*preludedb_plugin_format_delete_heartbeat_from_list_func_t) (preludedb_sql_t *sql, uint64_t *idents, size_t size); ssize_t (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t) (preludedb_sql_t *sql, preludedb_result_idents_t *results); void preludedb_plugin_format_set_delete_alert_from_list_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_list_func_t func); void preludedb_plugin_format_set_delete_alert_from_result_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_result_idents_func_t func); void preludedb_plugin_format_set_delete_heartbeat_from_list_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_list_func_t func); void preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func); void preludedb_plugin_format_set_check_schema_version_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_check_schema_version_func_t func); void preludedb_plugin_format_set_get_alert_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_idents_func_t func); void preludedb_plugin_format_set_get_heartbeat_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_idents_func_t func); void preludedb_plugin_format_set_get_message_ident_count_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_message_ident_count_func_t func); void preludedb_plugin_format_set_get_next_message_ident_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_message_ident_func_t func); void preludedb_plugin_format_set_destroy_message_idents_resource_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_message_idents_resource_func_t func); void preludedb_plugin_format_set_get_alert_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_func_t func); void preludedb_plugin_format_set_get_heartbeat_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_func_t func); void preludedb_plugin_format_set_delete_alert_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_func_t func); void preludedb_plugin_format_set_delete_heartbeat_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_func_t func); void preludedb_plugin_format_set_insert_message_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_insert_message_func_t func); void preludedb_plugin_format_set_get_values_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_values_func_t func); void preludedb_plugin_format_set_get_next_values_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_values_func_t func); void preludedb_plugin_format_set_destroy_values_resource_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_values_resource_func_t func); Description Details preludedb_plugin_format_t preludedb_plugin_format_ttypedef struct preludedb_plugin_format preludedb_plugin_format_t; preludedb_plugin_format_get_values_func_t () preludedb_plugin_format_get_values_func_tint (*preludedb_plugin_format_get_values_func_t) (preludedb_sql_t *sql, preludedb_path_selection_t *selection, idmef_criteria_t *criteria, int distinct, int limit, int offset, void **res); sql : selection : criteria : distinct : limit : offset : res : Returns : preludedb_plugin_format_get_alert_idents_func_t () preludedb_plugin_format_get_alert_idents_func_tint (*preludedb_plugin_format_get_alert_idents_func_t) (preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); sql : criteria : limit : offset : order : res : Returns : preludedb_plugin_format_delete_alert_func_t () preludedb_plugin_format_delete_alert_func_tint (*preludedb_plugin_format_delete_alert_func_t) (preludedb_sql_t *sql, uint64_t ident); sql : ident : Returns : preludedb_plugin_format_new () preludedb_plugin_format_newint preludedb_plugin_format_new (preludedb_plugin_format_t **ret); ret : Returns : preludedb_plugin_format_get_heartbeat_idents_func_t () preludedb_plugin_format_get_heartbeat_idents_func_tint (*preludedb_plugin_format_get_heartbeat_idents_func_t) (preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); sql : criteria : limit : offset : order : res : Returns : preludedb_plugin_format_get_message_ident_count_func_t () preludedb_plugin_format_get_message_ident_count_func_tsize_t (*preludedb_plugin_format_get_message_ident_count_func_t) (void *res); res : Returns : preludedb_plugin_format_get_alert_func_t () preludedb_plugin_format_get_alert_func_tint (*preludedb_plugin_format_get_alert_func_t) (preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); sql : ident : message : Returns : preludedb_plugin_format_get_next_values_func_t () preludedb_plugin_format_get_next_values_func_tint (*preludedb_plugin_format_get_next_values_func_t) (void *res, preludedb_path_selection_t *selection, idmef_value_t ***values); res : selection : values : Returns : preludedb_plugin_format_get_heartbeat_func_t () preludedb_plugin_format_get_heartbeat_func_tint (*preludedb_plugin_format_get_heartbeat_func_t) (preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); sql : ident : message : Returns : preludedb_plugin_format_get_next_message_ident_func_t () preludedb_plugin_format_get_next_message_ident_func_tint (*preludedb_plugin_format_get_next_message_ident_func_t) (void *res, uint64_t *ident); res : ident : Returns : preludedb_plugin_format_destroy_values_resource_func_t () preludedb_plugin_format_destroy_values_resource_func_tvoid (*preludedb_plugin_format_destroy_values_resource_func_t) (void *res); res : preludedb_plugin_format_insert_message_func_t () preludedb_plugin_format_insert_message_func_tint (*preludedb_plugin_format_insert_message_func_t) (preludedb_sql_t *sql, idmef_message_t *message); sql : message : Returns : preludedb_plugin_format_check_schema_version_func_t () preludedb_plugin_format_check_schema_version_func_tint (*preludedb_plugin_format_check_schema_version_func_t) (const char *version); version : Returns : preludedb_plugin_format_destroy_message_idents_resource_func_t () preludedb_plugin_format_destroy_message_idents_resource_func_tvoid (*preludedb_plugin_format_destroy_message_idents_resource_func_t) (void *res); res : preludedb_plugin_format_delete_heartbeat_func_t () preludedb_plugin_format_delete_heartbeat_func_tint (*preludedb_plugin_format_delete_heartbeat_func_t) (preludedb_sql_t *sql, uint64_t ident); sql : ident : Returns : preludedb_plugin_format_delete_alert_from_list_func_t () preludedb_plugin_format_delete_alert_from_list_func_tssize_t (*preludedb_plugin_format_delete_alert_from_list_func_t) (preludedb_sql_t *sql, uint64_t *idents, size_t size); sql : idents : size : Returns : preludedb_plugin_format_delete_alert_from_result_idents_func_t () preludedb_plugin_format_delete_alert_from_result_idents_func_tssize_t (*preludedb_plugin_format_delete_alert_from_result_idents_func_t) (preludedb_sql_t *sql, preludedb_result_idents_t *results); sql : results : Returns : preludedb_plugin_format_delete_heartbeat_from_list_func_t () preludedb_plugin_format_delete_heartbeat_from_list_func_tssize_t (*preludedb_plugin_format_delete_heartbeat_from_list_func_t) (preludedb_sql_t *sql, uint64_t *idents, size_t size); sql : idents : size : Returns : preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t () preludedb_plugin_format_delete_heartbeat_from_result_idents_func_tssize_t (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t) (preludedb_sql_t *sql, preludedb_result_idents_t *results); sql : results : Returns : preludedb_plugin_format_set_delete_alert_from_list_func () preludedb_plugin_format_set_delete_alert_from_list_funcvoid preludedb_plugin_format_set_delete_alert_from_list_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_list_func_t func); plugin : func : preludedb_plugin_format_set_delete_alert_from_result_idents_func () preludedb_plugin_format_set_delete_alert_from_result_idents_funcvoid preludedb_plugin_format_set_delete_alert_from_result_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_result_idents_func_t func); plugin : func : preludedb_plugin_format_set_delete_heartbeat_from_list_func () preludedb_plugin_format_set_delete_heartbeat_from_list_funcvoid preludedb_plugin_format_set_delete_heartbeat_from_list_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_list_func_t func); plugin : func : preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func () preludedb_plugin_format_set_delete_heartbeat_from_result_idents_funcvoid preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func); plugin : func : preludedb_plugin_format_set_check_schema_version_func () preludedb_plugin_format_set_check_schema_version_funcvoid preludedb_plugin_format_set_check_schema_version_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_check_schema_version_func_t func); plugin : func : preludedb_plugin_format_set_get_alert_idents_func () preludedb_plugin_format_set_get_alert_idents_funcvoid preludedb_plugin_format_set_get_alert_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_idents_func_t func); plugin : func : preludedb_plugin_format_set_get_heartbeat_idents_func () preludedb_plugin_format_set_get_heartbeat_idents_funcvoid preludedb_plugin_format_set_get_heartbeat_idents_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_idents_func_t func); plugin : func : preludedb_plugin_format_set_get_message_ident_count_func () preludedb_plugin_format_set_get_message_ident_count_funcvoid preludedb_plugin_format_set_get_message_ident_count_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_message_ident_count_func_t func); plugin : func : preludedb_plugin_format_set_get_next_message_ident_func () preludedb_plugin_format_set_get_next_message_ident_funcvoid preludedb_plugin_format_set_get_next_message_ident_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_message_ident_func_t func); plugin : func : preludedb_plugin_format_set_destroy_message_idents_resource_func () preludedb_plugin_format_set_destroy_message_idents_resource_funcvoid preludedb_plugin_format_set_destroy_message_idents_resource_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_message_idents_resource_func_t func); plugin : func : preludedb_plugin_format_set_get_alert_func () preludedb_plugin_format_set_get_alert_funcvoid preludedb_plugin_format_set_get_alert_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_func_t func); plugin : func : preludedb_plugin_format_set_get_heartbeat_func () preludedb_plugin_format_set_get_heartbeat_funcvoid preludedb_plugin_format_set_get_heartbeat_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_func_t func); plugin : func : preludedb_plugin_format_set_delete_alert_func () preludedb_plugin_format_set_delete_alert_funcvoid preludedb_plugin_format_set_delete_alert_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_func_t func); plugin : func : preludedb_plugin_format_set_delete_heartbeat_func () preludedb_plugin_format_set_delete_heartbeat_funcvoid preludedb_plugin_format_set_delete_heartbeat_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_func_t func); plugin : func : preludedb_plugin_format_set_insert_message_func () preludedb_plugin_format_set_insert_message_funcvoid preludedb_plugin_format_set_insert_message_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_insert_message_func_t func); plugin : func : preludedb_plugin_format_set_get_values_func () preludedb_plugin_format_set_get_values_funcvoid preludedb_plugin_format_set_get_values_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_values_func_t func); plugin : func : preludedb_plugin_format_set_get_next_values_func () preludedb_plugin_format_set_get_next_values_funcvoid preludedb_plugin_format_set_get_next_values_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_values_func_t func); plugin : func : preludedb_plugin_format_set_destroy_values_resource_func () preludedb_plugin_format_set_destroy_values_resource_funcvoid preludedb_plugin_format_set_destroy_values_resource_func (preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_values_resource_func_t func); plugin : func : libpreludedb-1.0.0/docs/api/xml/preludedb-version.xml0000664000076400007640000000435311347715761017575 00000000000000 preludedb-version 3 LIBPRELUDEDB Library preludedb-version Synopsis #define LIBPRELUDEDB_VERSION const char * preludedb_check_version (const char *req_version); Description Details LIBPRELUDEDB_VERSION LIBPRELUDEDB_VERSION#define LIBPRELUDEDB_VERSION "1.0.0rc1" preludedb_check_version () preludedb_check_versionconst char * preludedb_check_version (const char *req_version); req_version : Returns : libpreludedb-1.0.0/docs/api/xml/preludedb.xml0000664000076400007640000013576711347715761016130 00000000000000 preludedb 3 LIBPRELUDEDB Library preludedb Synopsis typedef preludedb_t; typedef preludedb_result_idents_t; typedef preludedb_result_values_t; enum preludedb_result_idents_order_t; #define PRELUDEDB_ERRBUF_SIZE int preludedb_init (void); void preludedb_deinit (void); int preludedb_new (preludedb_t **db, preludedb_sql_t *sql, const char *format_name, char *errbuf, size_t size); void preludedb_destroy (preludedb_t *db); const char * preludedb_get_format_name (preludedb_t *db); const char * preludedb_get_format_version (preludedb_t *db); int preludedb_set_format (preludedb_t *db, const char *format_name); preludedb_sql_t * preludedb_get_sql (preludedb_t *db); void preludedb_result_idents_destroy (preludedb_result_idents_t *result); int preludedb_result_idents_get_next (preludedb_result_idents_t *result, uint64_t *ident); void preludedb_result_values_destroy (preludedb_result_values_t *result); int preludedb_result_values_get_next (preludedb_result_values_t *result, idmef_value_t ***values); char * preludedb_get_error (preludedb_t *db, preludedb_error_t error, char *errbuf, size_t size); int preludedb_insert_message (preludedb_t *db, idmef_message_t *message); int preludedb_get_alert_idents (preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); int preludedb_get_heartbeat_idents (preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); int preludedb_get_alert (preludedb_t *db, uint64_t ident, idmef_message_t **message); int preludedb_get_heartbeat (preludedb_t *db, uint64_t ident, idmef_message_t **message); int preludedb_delete_alert (preludedb_t *db, uint64_t ident); int preludedb_delete_heartbeat (preludedb_t *db, uint64_t ident); ssize_t preludedb_delete_alert_from_list (preludedb_t *db, uint64_t *idents, size_t size); ssize_t preludedb_delete_alert_from_result_idents (preludedb_t *db, preludedb_result_idents_t *result); ssize_t preludedb_delete_heartbeat_from_list (preludedb_t *db, uint64_t *idents, size_t size); ssize_t preludedb_delete_heartbeat_from_result_idents (preludedb_t *db, preludedb_result_idents_t *result); int preludedb_get_values (preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result); int preludedb_transaction_abort (preludedb_t *db); int preludedb_transaction_end (preludedb_t *db); int preludedb_transaction_start (preludedb_t *db); Description Details preludedb_t preludedb_ttypedef struct preludedb preludedb_t; preludedb_result_idents_t preludedb_result_idents_ttypedef struct preludedb_result_idents preludedb_result_idents_t; preludedb_result_values_t preludedb_result_values_ttypedef struct preludedb_result_values preludedb_result_values_t; enum preludedb_result_idents_order_t preludedb_result_idents_order_ttypedef enum { PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE = 0, PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC = 1, PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC = 2 } preludedb_result_idents_order_t; PRELUDEDB_ERRBUF_SIZE PRELUDEDB_ERRBUF_SIZE#define PRELUDEDB_ERRBUF_SIZE 512 preludedb_init () preludedb_initint preludedb_init (void); Returns : preludedb_deinit () preludedb_deinitvoid preludedb_deinit (void); preludedb_new () preludedb_newint preludedb_new (preludedb_t **db, preludedb_sql_t *sql, const char *format_name, char *errbuf, size_t size); This function initialize the db object and detect the format of the underlying database if no format name is given. db : Pointer to a db object to initialize. sql : Pointer to a sql object. format_name : Format name of the underlying database, if NULL the format will be automatically detected errbuf : Buffer that will be set to an error message if an error occur. size : size of errbuf. Returns : 0 on success or a negative value if an error occur. preludedb_destroy () preludedb_destroyvoid preludedb_destroy (preludedb_t *db); Destroy db object and the underlying sql object given as argument to preludedb_new. db : Pointer to a db object. preludedb_get_format_name () preludedb_get_format_nameconst char * preludedb_get_format_name (preludedb_t *db); db : Pointer to a db object. Returns : the format name currently used by the db object. preludedb_get_format_version () preludedb_get_format_versionconst char * preludedb_get_format_version (preludedb_t *db); db : Pointer to a db object. Returns : the format version currently used by the db object. preludedb_set_format () preludedb_set_formatint preludedb_set_format (preludedb_t *db, const char *format_name); Change the current format plugin. db : Pointer to a db object. format_name : New format to use. Returns : 0 on success or negative value if an error occur. preludedb_get_sql () preludedb_get_sqlpreludedb_sql_t * preludedb_get_sql (preludedb_t *db); db : Pointer to a db object. Returns : a pointer to the underlying sql object. preludedb_result_idents_destroy () preludedb_result_idents_destroyvoid preludedb_result_idents_destroy (preludedb_result_idents_t *result); Destroy the result object. result : Pointer to an idents result object. preludedb_result_idents_get_next () preludedb_result_idents_get_nextint preludedb_result_idents_get_next (preludedb_result_idents_t *result, uint64_t *ident); Retrieve the next ident from the idents result object. result : Pointer to an idents result object. ident : Pointer to an ident where the next ident will be stored. Returns : 1 if an ident is available, 0 if there is no more idents available or a negative value if an error occur. preludedb_result_values_destroy () preludedb_result_values_destroyvoid preludedb_result_values_destroy (preludedb_result_values_t *result); Destroy the result object. result : Pointer to a result values object. preludedb_result_values_get_next () preludedb_result_values_get_nextint preludedb_result_values_get_next (preludedb_result_values_t *result, idmef_value_t ***values); Retrieve the next values row from the values result object. result : Pointer to a values result object. values : Pointer to a values array where the next row of values will be stored. Returns : the number of returned values, 0 if there are no values or a negative value if an error occur. preludedb_get_error () preludedb_get_errorchar * preludedb_get_error (preludedb_t *db, preludedb_error_t error, char *errbuf, size_t size); Build an error message from the error code given as argument and from the sql plugin error string (if any) if the error code is db related. db : Pointer to a db object. error : Error code to build the error string from. errbuf : Buffer where the error message will be stored, size : size of this buffer must be PRELUDEDB_ERRBUF_SIZE. Returns : a pointer to the error string or NULL if an error occured. preludedb_insert_message () preludedb_insert_messageint preludedb_insert_message (preludedb_t *db, idmef_message_t *message); Insert an IDMEF message into the database. db : Pointer to a db object. message : Pointer to an IDMEF message. Returns : 0 on success, or a negative value if an error occur. preludedb_get_alert_idents () preludedb_get_alert_identsint preludedb_get_alert_idents (preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); db : Pointer to a db object. criteria : Pointer to an idmef criteria. limit : Limit of results or -1 if no limit. offset : Offset in results or -1 if no offset. order : Result order. result : Idents result. Returns : the number of result or a negative value if an error occured. preludedb_get_heartbeat_idents () preludedb_get_heartbeat_identsint preludedb_get_heartbeat_idents (preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); db : Pointer to a db object. criteria : Pointer to an idmef criteria. limit : Limit of results or -1 if no limit. offset : Offset in results or -1 if no offset. order : Result order. result : Idents result. Returns : the number of result or a negative value if an error occured. preludedb_get_alert () preludedb_get_alertint preludedb_get_alert (preludedb_t *db, uint64_t ident, idmef_message_t **message); db : Pointer to a db object. ident : Internal database ident of the alert. message : Pointer to an idmef message object where the retrieved message will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_get_heartbeat () preludedb_get_heartbeatint preludedb_get_heartbeat (preludedb_t *db, uint64_t ident, idmef_message_t **message); db : Pointer to a db object. ident : Internal database ident of the heartbeat. message : Pointer to an idmef message object where the retrieved message will be stored. Returns : 0 on success or a negative value if an error occur. preludedb_delete_alert () preludedb_delete_alertint preludedb_delete_alert (preludedb_t *db, uint64_t ident); Delete an alert. db : Pointer to a db object. ident : Internal database ident of the alert. Returns : 0 on success, or a negative value if an error occur. preludedb_delete_heartbeat () preludedb_delete_heartbeatint preludedb_delete_heartbeat (preludedb_t *db, uint64_t ident); Delete an heartbeat. db : Pointer to a db object. ident : Internal database ident of the heartbeat. Returns : 0 on success, or a negative value if an error occur. preludedb_delete_alert_from_list () preludedb_delete_alert_from_listssize_t preludedb_delete_alert_from_list (preludedb_t *db, uint64_t *idents, size_t size); Delete all alerts from ident stored within idents. db : Pointer to a db object. idents : Pointer to an array of idents. size : Size of idents. Returns : the number of alert deleted on success, or a negative value if an error occur. preludedb_delete_alert_from_result_idents () preludedb_delete_alert_from_result_identsssize_t preludedb_delete_alert_from_result_idents (preludedb_t *db, preludedb_result_idents_t *result); Delete all alert from ident stored within result. db : Pointer to a db object. result : Pointer to an idents result object. Returns : the number of alert deleted on success, or a negative value if an error occur. preludedb_delete_heartbeat_from_list () preludedb_delete_heartbeat_from_listssize_t preludedb_delete_heartbeat_from_list (preludedb_t *db, uint64_t *idents, size_t size); Delete all heartbeat from ident stored within idents. db : Pointer to a db object. idents : Pointer to an array of idents. size : Size of idents. Returns : the number of heartbeat deleted on success, or a negative value if an error occur. preludedb_delete_heartbeat_from_result_idents () preludedb_delete_heartbeat_from_result_identsssize_t preludedb_delete_heartbeat_from_result_idents (preludedb_t *db, preludedb_result_idents_t *result); Delete all heartbeat from ident stored within result. db : Pointer to a db object. result : Pointer to an idents result object. Returns : the number of heartbeat deleted on success, or a negative value if an error occur. preludedb_get_values () preludedb_get_valuesint preludedb_get_values (preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result); db : Pointer to a db object. path_selection : Pointer to a path selection. criteria : Pointer to a criteria object. distinct : Get distinct or not distinct result rows. limit : Limit of results or -1 if no limit. offset : Offset in results or -1 if no offset. result : Values result. Returns : the number of result or a negative value if an error occured. preludedb_transaction_abort () preludedb_transaction_abortint preludedb_transaction_abort (preludedb_t *db); Abort a sql transaction (SQL ROLLBACK command) initiated with preludedb_transaction_start(). Internal transaction handling will be enabled again once this function return. db : Pointer to a preludedb_t object. Returns : 0 on success or a negative value if an error occur. preludedb_transaction_end () preludedb_transaction_endint preludedb_transaction_end (preludedb_t *db); Terminate a sql transaction (SQL COMMIT command) initiated with preludedb_transaction_start(). Internal transaction handling will be enabled again once this function return. db : Pointer to a preludedb_t object. Returns : 0 on success or a negative value if an error occur. preludedb_transaction_start () preludedb_transaction_startint preludedb_transaction_start (preludedb_t *db); Begin a transaction using db object. Internal transaction handling will be disabled until preludedb_transaction_end() or preludedb_transaction_abort() is called. db : Pointer to a preludedb_t object. Returns : 0 on success or a negative value if an error occur. libpreludedb-1.0.0/docs/api/xml/preludedb-error.xml0000664000076400007640000001050411347715761017234 00000000000000 preludedb-error 3 LIBPRELUDEDB Library preludedb-error Synopsis enum preludedb_error_code_t; typedef preludedb_error_t; const char * preludedb_strerror (preludedb_error_t error); return prelude_error_from_errno (...); Description Details enum preludedb_error_code_t preludedb_error_code_ttypedef enum { PRELUDEDB_ERROR_NO_ERROR = 0, PRELUDEDB_ERROR_GENERIC = 1, PRELUDEDB_ERROR_INVALID_SETTINGS_STRING = 2, PRELUDEDB_ERROR_CONNECTION = 3, PRELUDEDB_ERROR_QUERY = 4, PRELUDEDB_ERROR_INVALID_COLUMN_NUM = 5, PRELUDEDB_ERROR_INVALID_COLUMN_NAME = 6, PRELUDEDB_ERROR_INVALID_VALUE = 7, PRELUDEDB_ERROR_INVALID_VALUE_TYPE = 8, PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN = 9, PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN = 10, PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION = 11, PRELUDEDB_ERROR_NOT_IN_TRANSACTION = 12, PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT = 13, PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING = 14, PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION = 15, PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD = 16, PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT = 17, PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID = 18, PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN = 19, PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN = 20 } preludedb_error_code_t; preludedb_error_t preludedb_error_ttypedef prelude_error_t preludedb_error_t; preludedb_strerror () preludedb_strerrorconst char * preludedb_strerror (preludedb_error_t error); error : Returns : prelude_error_from_errno () prelude_error_from_errnoreturn prelude_error_from_errno (...); ... : Returns : libpreludedb-1.0.0/docs/api/xml/preludedb-plugin-sql.xml0000664000076400007640000017524511347715761020214 00000000000000 preludedb-plugin-sql 3 LIBPRELUDEDB Library preludedb-plugin-sql Synopsis typedef preludedb_plugin_sql_t; const char * (*preludedb_plugin_sql_get_column_name_func_t) (void *session, void *resource, unsigned int column_num); const char * (*preludedb_plugin_sql_get_operator_string_func_t) (idmef_criterion_operator_t operator); int (*preludedb_plugin_sql_build_constraint_string_func_t) (prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value); int (*preludedb_plugin_sql_unescape_binary_func_t) (void *session, const char *input, unsigned char **output, size_t *output_size); int (*preludedb_plugin_sql_escape_binary_func_t) (void *session, unsigned char *input, size_t input_size, char **output); int (*preludedb_plugin_sql_query_func_t) (void *session, const char *query, void **res); int (*preludedb_plugin_sql_get_column_num_func_t) (void *session, void *resource, const char *column_name); void (*preludedb_plugin_sql_resource_destroy_func_t) (void *session, void *resource); int (*preludedb_plugin_sql_build_timestamp_string_func_t) (const struct tm *t, char *out, size_t size); int (*preludedb_plugin_sql_build_limit_offset_string_func_t) (void *session, int limit, int offset, prelude_string_t *output); void preludedb_plugin_sql_set_build_timestamp_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_timestamp_string_func_t func); int (*preludedb_plugin_sql_build_time_interval_string_func_t) (preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size); int (*preludedb_plugin_sql_open_func_t) (preludedb_sql_settings_t *settings, void **session); int (*preludedb_plugin_sql_fetch_field_func_t) (void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len); void preludedb_plugin_sql_set_get_operator_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_operator_string_func_t func); void (*preludedb_plugin_sql_close_func_t) (void *session); int (*preludedb_plugin_sql_build_time_constraint_string_func_t) (prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset); int (*preludedb_plugin_sql_escape_func_t) (void *session, const char *input, size_t input_size, char **output); int (*preludedb_plugin_sql_fetch_row_func_t) (void *session, void *resource, void **row); int preludedb_plugin_sql_new (preludedb_plugin_sql_t **plugin); void preludedb_plugin_sql_set_open_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_open_func_t func); void preludedb_plugin_sql_set_close_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_close_func_t func); void preludedb_plugin_sql_set_escape_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_func_t func); void preludedb_plugin_sql_set_escape_binary_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_binary_func_t func); void preludedb_plugin_sql_set_unescape_binary_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_unescape_binary_func_t func); void preludedb_plugin_sql_set_query_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_query_func_t func); void preludedb_plugin_sql_set_get_column_count_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_count_func_t func); void preludedb_plugin_sql_set_get_row_count_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_row_count_func_t func); void preludedb_plugin_sql_set_get_column_name_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_name_func_t func); void preludedb_plugin_sql_set_get_column_num_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_num_func_t func); void preludedb_plugin_sql_set_resource_destroy_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_resource_destroy_func_t func); void preludedb_plugin_sql_set_fetch_row_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_row_func_t func); void preludedb_plugin_sql_set_fetch_field_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_field_func_t func); void preludedb_plugin_sql_set_build_time_constraint_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_constraint_string_func_t func); void preludedb_plugin_sql_set_build_time_interval_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_interval_string_func_t func); void preludedb_plugin_sql_set_build_limit_offset_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_limit_offset_string_func_t func); void preludedb_plugin_sql_set_build_constraint_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_constraint_string_func_t func); Description Details preludedb_plugin_sql_t preludedb_plugin_sql_ttypedef struct preludedb_plugin_sql preludedb_plugin_sql_t; preludedb_plugin_sql_get_column_name_func_t () preludedb_plugin_sql_get_column_name_func_tconst char * (*preludedb_plugin_sql_get_column_name_func_t) (void *session, void *resource, unsigned int column_num); session : resource : column_num : Returns : preludedb_plugin_sql_get_operator_string_func_t () preludedb_plugin_sql_get_operator_string_func_tconst char * (*preludedb_plugin_sql_get_operator_string_func_t) (idmef_criterion_operator_t operator); operator : Returns : preludedb_plugin_sql_build_constraint_string_func_t () preludedb_plugin_sql_build_constraint_string_func_tint (*preludedb_plugin_sql_build_constraint_string_func_t) (prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value); out : field : operator : value : Returns : preludedb_plugin_sql_unescape_binary_func_t () preludedb_plugin_sql_unescape_binary_func_tint (*preludedb_plugin_sql_unescape_binary_func_t) (void *session, const char *input, unsigned char **output, size_t *output_size); session : input : output : output_size : Returns : preludedb_plugin_sql_escape_binary_func_t () preludedb_plugin_sql_escape_binary_func_tint (*preludedb_plugin_sql_escape_binary_func_t) (void *session, unsigned char *input, size_t input_size, char **output); session : input : input_size : output : Returns : preludedb_plugin_sql_query_func_t () preludedb_plugin_sql_query_func_tint (*preludedb_plugin_sql_query_func_t) (void *session, const char *query, void **res); session : query : res : Returns : preludedb_plugin_sql_get_column_num_func_t () preludedb_plugin_sql_get_column_num_func_tint (*preludedb_plugin_sql_get_column_num_func_t) (void *session, void *resource, const char *column_name); session : resource : column_name : Returns : preludedb_plugin_sql_resource_destroy_func_t () preludedb_plugin_sql_resource_destroy_func_tvoid (*preludedb_plugin_sql_resource_destroy_func_t) (void *session, void *resource); session : resource : preludedb_plugin_sql_build_timestamp_string_func_t () preludedb_plugin_sql_build_timestamp_string_func_tint (*preludedb_plugin_sql_build_timestamp_string_func_t) (const struct tm *t, char *out, size_t size); t : out : size : Returns : preludedb_plugin_sql_build_limit_offset_string_func_t () preludedb_plugin_sql_build_limit_offset_string_func_tint (*preludedb_plugin_sql_build_limit_offset_string_func_t) (void *session, int limit, int offset, prelude_string_t *output); session : limit : offset : output : Returns : preludedb_plugin_sql_set_build_timestamp_string_func () preludedb_plugin_sql_set_build_timestamp_string_funcvoid preludedb_plugin_sql_set_build_timestamp_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_timestamp_string_func_t func); plugin : func : preludedb_plugin_sql_build_time_interval_string_func_t () preludedb_plugin_sql_build_time_interval_string_func_tint (*preludedb_plugin_sql_build_time_interval_string_func_t) (preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size); type : value : buf : size : Returns : preludedb_plugin_sql_open_func_t () preludedb_plugin_sql_open_func_tint (*preludedb_plugin_sql_open_func_t) (preludedb_sql_settings_t *settings, void **session); settings : session : Returns : preludedb_plugin_sql_fetch_field_func_t () preludedb_plugin_sql_fetch_field_func_tint (*preludedb_plugin_sql_fetch_field_func_t) (void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len); session : resource : row : column_num : value : len : Returns : preludedb_plugin_sql_set_get_operator_string_func () preludedb_plugin_sql_set_get_operator_string_funcvoid preludedb_plugin_sql_set_get_operator_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_operator_string_func_t func); plugin : func : preludedb_plugin_sql_close_func_t () preludedb_plugin_sql_close_func_tvoid (*preludedb_plugin_sql_close_func_t) (void *session); session : preludedb_plugin_sql_build_time_constraint_string_func_t () preludedb_plugin_sql_build_time_constraint_string_func_tint (*preludedb_plugin_sql_build_time_constraint_string_func_t) (prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset); output : field : type : operator : value : gmt_offset : Returns : preludedb_plugin_sql_escape_func_t () preludedb_plugin_sql_escape_func_tint (*preludedb_plugin_sql_escape_func_t) (void *session, const char *input, size_t input_size, char **output); session : input : input_size : output : Returns : preludedb_plugin_sql_fetch_row_func_t () preludedb_plugin_sql_fetch_row_func_tint (*preludedb_plugin_sql_fetch_row_func_t) (void *session, void *resource, void **row); session : resource : row : Returns : preludedb_plugin_sql_new () preludedb_plugin_sql_newint preludedb_plugin_sql_new (preludedb_plugin_sql_t **plugin); plugin : Returns : preludedb_plugin_sql_set_open_func () preludedb_plugin_sql_set_open_funcvoid preludedb_plugin_sql_set_open_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_open_func_t func); plugin : func : preludedb_plugin_sql_set_close_func () preludedb_plugin_sql_set_close_funcvoid preludedb_plugin_sql_set_close_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_close_func_t func); plugin : func : preludedb_plugin_sql_set_escape_func () preludedb_plugin_sql_set_escape_funcvoid preludedb_plugin_sql_set_escape_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_func_t func); plugin : func : preludedb_plugin_sql_set_escape_binary_func () preludedb_plugin_sql_set_escape_binary_funcvoid preludedb_plugin_sql_set_escape_binary_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_binary_func_t func); plugin : func : preludedb_plugin_sql_set_unescape_binary_func () preludedb_plugin_sql_set_unescape_binary_funcvoid preludedb_plugin_sql_set_unescape_binary_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_unescape_binary_func_t func); plugin : func : preludedb_plugin_sql_set_query_func () preludedb_plugin_sql_set_query_funcvoid preludedb_plugin_sql_set_query_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_query_func_t func); plugin : func : preludedb_plugin_sql_set_get_column_count_func () preludedb_plugin_sql_set_get_column_count_funcvoid preludedb_plugin_sql_set_get_column_count_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_count_func_t func); plugin : func : preludedb_plugin_sql_set_get_row_count_func () preludedb_plugin_sql_set_get_row_count_funcvoid preludedb_plugin_sql_set_get_row_count_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_row_count_func_t func); plugin : func : preludedb_plugin_sql_set_get_column_name_func () preludedb_plugin_sql_set_get_column_name_funcvoid preludedb_plugin_sql_set_get_column_name_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_name_func_t func); plugin : func : preludedb_plugin_sql_set_get_column_num_func () preludedb_plugin_sql_set_get_column_num_funcvoid preludedb_plugin_sql_set_get_column_num_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_num_func_t func); plugin : func : preludedb_plugin_sql_set_resource_destroy_func () preludedb_plugin_sql_set_resource_destroy_funcvoid preludedb_plugin_sql_set_resource_destroy_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_resource_destroy_func_t func); plugin : func : preludedb_plugin_sql_set_fetch_row_func () preludedb_plugin_sql_set_fetch_row_funcvoid preludedb_plugin_sql_set_fetch_row_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_row_func_t func); plugin : func : preludedb_plugin_sql_set_fetch_field_func () preludedb_plugin_sql_set_fetch_field_funcvoid preludedb_plugin_sql_set_fetch_field_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_field_func_t func); plugin : func : preludedb_plugin_sql_set_build_time_constraint_string_func () preludedb_plugin_sql_set_build_time_constraint_string_funcvoid preludedb_plugin_sql_set_build_time_constraint_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_constraint_string_func_t func); plugin : func : preludedb_plugin_sql_set_build_time_interval_string_func () preludedb_plugin_sql_set_build_time_interval_string_funcvoid preludedb_plugin_sql_set_build_time_interval_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_interval_string_func_t func); plugin : func : preludedb_plugin_sql_set_build_limit_offset_string_func () preludedb_plugin_sql_set_build_limit_offset_string_funcvoid preludedb_plugin_sql_set_build_limit_offset_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_limit_offset_string_func_t func); plugin : func : preludedb_plugin_sql_set_build_constraint_string_func () preludedb_plugin_sql_set_build_constraint_string_funcvoid preludedb_plugin_sql_set_build_constraint_string_func (preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_constraint_string_func_t func); plugin : func : libpreludedb-1.0.0/docs/api/xml/preludedb-path-selection.xml0000664000076400007640000003515011347715761021026 00000000000000 preludedb-path-selection 3 LIBPRELUDEDB Library preludedb-path-selection Synopsis enum preludedb_selected_path_flags_t; typedef preludedb_path_selection_t; typedef preludedb_selected_path_t; int preludedb_selected_path_new (preludedb_selected_path_t **selected_path, idmef_path_t *path, int flags); int preludedb_selected_path_new_string (preludedb_selected_path_t **selected_path, const char *str); void preludedb_selected_path_destroy (preludedb_selected_path_t *selected_path); idmef_path_t * preludedb_selected_path_get_path (preludedb_selected_path_t *selected_path); preludedb_selected_path_flags_t preludedb_selected_path_get_flags (preludedb_selected_path_t *selected_path); int preludedb_path_selection_new (preludedb_path_selection_t **path_selection); void preludedb_path_selection_destroy (preludedb_path_selection_t *path_selection); void preludedb_path_selection_add (preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); preludedb_selected_path_t * preludedb_path_selection_get_next (preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); size_t preludedb_path_selection_get_count (preludedb_path_selection_t *path_selection); Description Details enum preludedb_selected_path_flags_t preludedb_selected_path_flags_ttypedef enum { PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN = 0x01, PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX = 0x02, PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG = 0x04, PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD = 0x08, PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT = 0x10, PRELUDEDB_SELECTED_OBJECT_GROUP_BY = 0x20, PRELUDEDB_SELECTED_OBJECT_ORDER_ASC = 0x40, PRELUDEDB_SELECTED_OBJECT_ORDER_DESC = 0x80 } preludedb_selected_path_flags_t; preludedb_path_selection_t preludedb_path_selection_ttypedef struct preludedb_path_selection preludedb_path_selection_t; preludedb_selected_path_t preludedb_selected_path_ttypedef struct preludedb_selected_path preludedb_selected_path_t; preludedb_selected_path_new () preludedb_selected_path_newint preludedb_selected_path_new (preludedb_selected_path_t **selected_path, idmef_path_t *path, int flags); selected_path : path : flags : Returns : preludedb_selected_path_new_string () preludedb_selected_path_new_stringint preludedb_selected_path_new_string (preludedb_selected_path_t **selected_path, const char *str); selected_path : str : Returns : preludedb_selected_path_destroy () preludedb_selected_path_destroyvoid preludedb_selected_path_destroy (preludedb_selected_path_t *selected_path); selected_path : preludedb_selected_path_get_path () preludedb_selected_path_get_pathidmef_path_t * preludedb_selected_path_get_path (preludedb_selected_path_t *selected_path); selected_path : Returns : preludedb_selected_path_get_flags () preludedb_selected_path_get_flagspreludedb_selected_path_flags_t preludedb_selected_path_get_flags (preludedb_selected_path_t *selected_path); selected_path : Returns : preludedb_path_selection_new () preludedb_path_selection_newint preludedb_path_selection_new (preludedb_path_selection_t **path_selection); path_selection : Returns : preludedb_path_selection_destroy () preludedb_path_selection_destroyvoid preludedb_path_selection_destroy (preludedb_path_selection_t *path_selection); path_selection : preludedb_path_selection_add () preludedb_path_selection_addvoid preludedb_path_selection_add (preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); path_selection : selected_path : preludedb_path_selection_get_next () preludedb_path_selection_get_nextpreludedb_selected_path_t * preludedb_path_selection_get_next (preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); path_selection : selected_path : Returns : preludedb_path_selection_get_count () preludedb_path_selection_get_countsize_t preludedb_path_selection_get_count (preludedb_path_selection_t *path_selection); path_selection : Returns : libpreludedb-1.0.0/docs/api/xml/api-index-full.xml0000664000076400007640000011441511347715761016763 00000000000000 L LIBPRELUDEDB_VERSION P preludedb_check_version preludedb_deinit preludedb_delete_alert preludedb_delete_alert_from_list preludedb_delete_alert_from_result_idents preludedb_delete_heartbeat preludedb_delete_heartbeat_from_list preludedb_delete_heartbeat_from_result_idents preludedb_destroy PRELUDEDB_ERRBUF_SIZE preludedb_error_code_t preludedb_error_t preludedb_get_alert preludedb_get_alert_idents preludedb_get_error preludedb_get_format_name preludedb_get_format_version preludedb_get_heartbeat preludedb_get_heartbeat_idents preludedb_get_sql preludedb_get_values preludedb_init preludedb_insert_message preludedb_new preludedb_path_selection_add preludedb_path_selection_destroy preludedb_path_selection_get_count preludedb_path_selection_get_next preludedb_path_selection_new preludedb_path_selection_t preludedb_plugin_format_check_schema_version_func_t preludedb_plugin_format_delete_alert_from_list_func_t preludedb_plugin_format_delete_alert_from_result_idents_func_t preludedb_plugin_format_delete_alert_func_t preludedb_plugin_format_delete_heartbeat_from_list_func_t preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t preludedb_plugin_format_delete_heartbeat_func_t preludedb_plugin_format_destroy_message_idents_resource_func_t preludedb_plugin_format_destroy_values_resource_func_t preludedb_plugin_format_get_alert_func_t preludedb_plugin_format_get_alert_idents_func_t preludedb_plugin_format_get_heartbeat_func_t preludedb_plugin_format_get_heartbeat_idents_func_t preludedb_plugin_format_get_message_ident_count_func_t preludedb_plugin_format_get_next_message_ident_func_t preludedb_plugin_format_get_next_values_func_t preludedb_plugin_format_get_values_func_t preludedb_plugin_format_insert_message_func_t preludedb_plugin_format_new preludedb_plugin_format_set_check_schema_version_func preludedb_plugin_format_set_delete_alert_from_list_func preludedb_plugin_format_set_delete_alert_from_result_idents_func preludedb_plugin_format_set_delete_alert_func preludedb_plugin_format_set_delete_heartbeat_from_list_func preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func preludedb_plugin_format_set_delete_heartbeat_func preludedb_plugin_format_set_destroy_message_idents_resource_func preludedb_plugin_format_set_destroy_values_resource_func preludedb_plugin_format_set_get_alert_func preludedb_plugin_format_set_get_alert_idents_func preludedb_plugin_format_set_get_heartbeat_func preludedb_plugin_format_set_get_heartbeat_idents_func preludedb_plugin_format_set_get_message_ident_count_func preludedb_plugin_format_set_get_next_message_ident_func preludedb_plugin_format_set_get_next_values_func preludedb_plugin_format_set_get_values_func preludedb_plugin_format_set_insert_message_func preludedb_plugin_format_t preludedb_plugin_sql_build_constraint_string_func_t preludedb_plugin_sql_build_limit_offset_string_func_t preludedb_plugin_sql_build_timestamp_string_func_t preludedb_plugin_sql_build_time_constraint_string_func_t preludedb_plugin_sql_build_time_interval_string_func_t preludedb_plugin_sql_close_func_t preludedb_plugin_sql_escape_binary_func_t preludedb_plugin_sql_escape_func_t preludedb_plugin_sql_fetch_field_func_t preludedb_plugin_sql_fetch_row_func_t preludedb_plugin_sql_get_column_name_func_t preludedb_plugin_sql_get_column_num_func_t preludedb_plugin_sql_get_operator_string_func_t preludedb_plugin_sql_new preludedb_plugin_sql_open_func_t preludedb_plugin_sql_query_func_t preludedb_plugin_sql_resource_destroy_func_t preludedb_plugin_sql_set_build_constraint_string_func preludedb_plugin_sql_set_build_limit_offset_string_func preludedb_plugin_sql_set_build_timestamp_string_func preludedb_plugin_sql_set_build_time_constraint_string_func preludedb_plugin_sql_set_build_time_interval_string_func preludedb_plugin_sql_set_close_func preludedb_plugin_sql_set_escape_binary_func preludedb_plugin_sql_set_escape_func preludedb_plugin_sql_set_fetch_field_func preludedb_plugin_sql_set_fetch_row_func preludedb_plugin_sql_set_get_column_count_func preludedb_plugin_sql_set_get_column_name_func preludedb_plugin_sql_set_get_column_num_func preludedb_plugin_sql_set_get_operator_string_func preludedb_plugin_sql_set_get_row_count_func preludedb_plugin_sql_set_open_func preludedb_plugin_sql_set_query_func preludedb_plugin_sql_set_resource_destroy_func preludedb_plugin_sql_set_unescape_binary_func preludedb_plugin_sql_t preludedb_plugin_sql_unescape_binary_func_t preludedb_result_idents_destroy preludedb_result_idents_get_next preludedb_result_idents_order_t preludedb_result_idents_t preludedb_result_values_destroy preludedb_result_values_get_next preludedb_result_values_t preludedb_selected_path_destroy preludedb_selected_path_flags_t preludedb_selected_path_get_flags preludedb_selected_path_get_path preludedb_selected_path_new preludedb_selected_path_new_string preludedb_selected_path_t preludedb_set_format preludedb_sql_build_criterion_string preludedb_sql_build_limit_offset_string preludedb_sql_destroy preludedb_sql_disable_query_logging preludedb_sql_enable_query_logging preludedb_sql_escape preludedb_sql_escape_binary preludedb_sql_escape_fast preludedb_sql_field_get_len preludedb_sql_field_get_value preludedb_sql_field_t preludedb_sql_field_to_double preludedb_sql_field_to_float preludedb_sql_field_to_int16 preludedb_sql_field_to_int32 preludedb_sql_field_to_int64 preludedb_sql_field_to_int8 preludedb_sql_field_to_string preludedb_sql_field_to_uint16 preludedb_sql_field_to_uint32 preludedb_sql_field_to_uint64 preludedb_sql_field_to_uint8 preludedb_sql_get_plugin_error preludedb_sql_insert preludedb_sql_new preludedb_sql_query preludedb_sql_query_sprintf preludedb_sql_row_fetch_field preludedb_sql_row_fetch_field_by_name preludedb_sql_row_t preludedb_sql_settings_destroy preludedb_sql_settings_get preludedb_sql_settings_get_file preludedb_sql_settings_get_host preludedb_sql_settings_get_log preludedb_sql_settings_get_name preludedb_sql_settings_get_pass preludedb_sql_settings_get_port preludedb_sql_settings_get_type preludedb_sql_settings_get_user preludedb_sql_settings_new preludedb_sql_settings_new_from_string preludedb_sql_settings_set preludedb_sql_settings_set_file preludedb_sql_settings_set_from_string preludedb_sql_settings_set_host preludedb_sql_settings_set_log preludedb_sql_settings_set_name preludedb_sql_settings_set_pass preludedb_sql_settings_set_port preludedb_sql_settings_set_type preludedb_sql_settings_set_user preludedb_sql_settings_t PRELUDEDB_SQL_SETTING_FILE PRELUDEDB_SQL_SETTING_HOST PRELUDEDB_SQL_SETTING_LOG PRELUDEDB_SQL_SETTING_NAME PRELUDEDB_SQL_SETTING_PASS PRELUDEDB_SQL_SETTING_PORT PRELUDEDB_SQL_SETTING_TYPE PRELUDEDB_SQL_SETTING_USER preludedb_sql_t preludedb_sql_table_destroy preludedb_sql_table_fetch_row preludedb_sql_table_get_column_count preludedb_sql_table_get_column_name preludedb_sql_table_get_column_num preludedb_sql_table_get_row_count preludedb_sql_table_t PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE preludedb_sql_time_constraint_type_t preludedb_sql_time_from_timestamp preludedb_sql_time_to_timestamp preludedb_sql_transaction_abort preludedb_sql_transaction_end preludedb_sql_transaction_start preludedb_sql_unescape_binary preludedb_strerror preludedb_t preludedb_transaction_abort preludedb_transaction_end preludedb_transaction_start prelude_error_from_errno libpreludedb-1.0.0/docs/api/html/0000775000076400007640000000000011347715761013641 500000000000000libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-error.html0000664000076400007640000001403411347715761022201 00000000000000 preludedb-error

preludedb-error

preludedb-error

Synopsis

enum                preludedb_error_code_t;
typedef             preludedb_error_t;
const char *        preludedb_strerror                  (preludedb_error_t error);
return              prelude_error_from_errno            (...);

Description

Details

enum preludedb_error_code_t

typedef enum {
        PRELUDEDB_ERROR_NO_ERROR = 0,
        PRELUDEDB_ERROR_GENERIC = 1,
        PRELUDEDB_ERROR_INVALID_SETTINGS_STRING = 2,
        PRELUDEDB_ERROR_CONNECTION = 3,
        PRELUDEDB_ERROR_QUERY = 4,
        PRELUDEDB_ERROR_INVALID_COLUMN_NUM = 5,
        PRELUDEDB_ERROR_INVALID_COLUMN_NAME = 6,
        PRELUDEDB_ERROR_INVALID_VALUE = 7,
        PRELUDEDB_ERROR_INVALID_VALUE_TYPE = 8,
        PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN = 9,
        PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN = 10,
        PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION = 11,
        PRELUDEDB_ERROR_NOT_IN_TRANSACTION = 12,
	PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT = 13,
	PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING = 14,
	PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION = 15,
	PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD = 16,
	PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT = 17,
	PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID = 18,
	PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN = 19,
	PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN = 20
	
} preludedb_error_code_t;


preludedb_error_t

typedef prelude_error_t preludedb_error_t;


preludedb_strerror ()

const char *        preludedb_strerror                  (preludedb_error_t error);

error :

Returns :


prelude_error_from_errno ()

return              prelude_error_from_errno            (...);

... :

Returns :

libpreludedb-1.0.0/docs/api/html/home.png0000644000076400007640000000121611347715761015215 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ1õÚKvIDATxœÕ•±kqÅ?ßrC‡ßàpà ~C„np¼¡CAAJ .B-\'G‡]:Ü “‚ƒCÇ -(ˆ8´à Ô€!…fD°€…çÒ“klbRÛÁoyüxïûîËïwpðIJº<°of_®-@ÒððçRH•´ÏfÖŸtèÂü¤^¯×ÓÚÚš’$Q«ÕÒ|“ôpâ’¶€gív;X^^&Ïs¢(bww—Z­F£ÑÀ9Çææ&Þû3à¶™ Æ’^IRµZUE.0Z]]Uš¦ ÃPY–Mü8óHÒGIÚÙÙÑìììæeŸkqqñÒ€™!ó  $ÛÛÛ¬¯¯3Œn eýþ{-/seeeìÔÃŒãXóóóåO‡Í·$ý8==UÇS™—é½×ÑÑQòRR€¤'ã–9-sÚÛÛ+B^ éC·Û•sîŸÍËÂ+%À°<7³ŸWô˜¿ õâ:™2IEND®B`‚libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-sql-settings.html0000664000076400007640000010412411347715761023505 00000000000000 preludedb-sql-settings

preludedb-sql-settings

preludedb-sql-settings

Synopsis

#define             PRELUDEDB_SQL_SETTING_TYPE
#define             PRELUDEDB_SQL_SETTING_HOST
#define             PRELUDEDB_SQL_SETTING_PORT
#define             PRELUDEDB_SQL_SETTING_NAME
#define             PRELUDEDB_SQL_SETTING_USER
#define             PRELUDEDB_SQL_SETTING_PASS
#define             PRELUDEDB_SQL_SETTING_FILE
#define             PRELUDEDB_SQL_SETTING_LOG
typedef             preludedb_sql_settings_t;
int                 preludedb_sql_settings_new          (preludedb_sql_settings_t **settings);
int                 preludedb_sql_settings_new_from_string
                                                        (preludedb_sql_settings_t **settings,
                                                         const char *str);
void                preludedb_sql_settings_destroy      (preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set          (preludedb_sql_settings_t *settings,
                                                         const char *name,
                                                         const char *value);
int                 preludedb_sql_settings_set_from_string
                                                        (preludedb_sql_settings_t *settings,
                                                         const char *str);
const char *        preludedb_sql_settings_get          (const preludedb_sql_settings_t *settings,
                                                         const char *name);
int                 preludedb_sql_settings_set_type     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_type     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_host     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_host     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_port     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_port     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_name     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_name     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_user     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_user     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_pass     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_pass     (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_log      (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_log      (const preludedb_sql_settings_t *settings);
int                 preludedb_sql_settings_set_file     (preludedb_sql_settings_t *settings,
                                                         const char *value);
const char *        preludedb_sql_settings_get_file     (const preludedb_sql_settings_t *settings);

Description

Details

PRELUDEDB_SQL_SETTING_TYPE

#define PRELUDEDB_SQL_SETTING_TYPE "type"


PRELUDEDB_SQL_SETTING_HOST

#define PRELUDEDB_SQL_SETTING_HOST "host"


PRELUDEDB_SQL_SETTING_PORT

#define PRELUDEDB_SQL_SETTING_PORT "port"


PRELUDEDB_SQL_SETTING_NAME

#define PRELUDEDB_SQL_SETTING_NAME "name"


PRELUDEDB_SQL_SETTING_USER

#define PRELUDEDB_SQL_SETTING_USER "user"


PRELUDEDB_SQL_SETTING_PASS

#define PRELUDEDB_SQL_SETTING_PASS "pass"


PRELUDEDB_SQL_SETTING_FILE

#define PRELUDEDB_SQL_SETTING_FILE "file"


PRELUDEDB_SQL_SETTING_LOG

#define PRELUDEDB_SQL_SETTING_LOG "log"


preludedb_sql_settings_t

typedef struct preludedb_sql_settings preludedb_sql_settings_t;


preludedb_sql_settings_new ()

int                 preludedb_sql_settings_new          (preludedb_sql_settings_t **settings);

settings :

Returns :


preludedb_sql_settings_new_from_string ()

int                 preludedb_sql_settings_new_from_string
                                                        (preludedb_sql_settings_t **settings,
                                                         const char *str);

settings :

str :

Returns :


preludedb_sql_settings_destroy ()

void                preludedb_sql_settings_destroy      (preludedb_sql_settings_t *settings);

settings :


preludedb_sql_settings_set ()

int                 preludedb_sql_settings_set          (preludedb_sql_settings_t *settings,
                                                         const char *name,
                                                         const char *value);

settings :

name :

value :

Returns :


preludedb_sql_settings_set_from_string ()

int                 preludedb_sql_settings_set_from_string
                                                        (preludedb_sql_settings_t *settings,
                                                         const char *str);

settings :

str :

Returns :


preludedb_sql_settings_get ()

const char *        preludedb_sql_settings_get          (const preludedb_sql_settings_t *settings,
                                                         const char *name);

settings :

name :

Returns :


preludedb_sql_settings_set_type ()

int                 preludedb_sql_settings_set_type     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_type ()

const char *        preludedb_sql_settings_get_type     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_host ()

int                 preludedb_sql_settings_set_host     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_host ()

const char *        preludedb_sql_settings_get_host     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_port ()

int                 preludedb_sql_settings_set_port     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_port ()

const char *        preludedb_sql_settings_get_port     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_name ()

int                 preludedb_sql_settings_set_name     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_name ()

const char *        preludedb_sql_settings_get_name     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_user ()

int                 preludedb_sql_settings_set_user     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_user ()

const char *        preludedb_sql_settings_get_user     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_pass ()

int                 preludedb_sql_settings_set_pass     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_pass ()

const char *        preludedb_sql_settings_get_pass     (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_log ()

int                 preludedb_sql_settings_set_log      (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_log ()

const char *        preludedb_sql_settings_get_log      (const preludedb_sql_settings_t *settings);

settings :

Returns :


preludedb_sql_settings_set_file ()

int                 preludedb_sql_settings_set_file     (preludedb_sql_settings_t *settings,
                                                         const char *value);

settings :

value :

Returns :


preludedb_sql_settings_get_file ()

const char *        preludedb_sql_settings_get_file     (const preludedb_sql_settings_t *settings);

settings :

Returns :

libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-sql.html0000664000076400007640000021773211347715761021661 00000000000000 preludedb-sql

preludedb-sql

preludedb-sql

Synopsis

#define             PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE
enum                preludedb_sql_time_constraint_type_t;
typedef             preludedb_sql_t;
typedef             preludedb_sql_table_t;
typedef             preludedb_sql_row_t;
typedef             preludedb_sql_field_t;
int                 preludedb_sql_new                   (preludedb_sql_t **new,
                                                         const char *type,
                                                         preludedb_sql_settings_t *settings);
void                preludedb_sql_destroy               (preludedb_sql_t *sql);
int                 preludedb_sql_enable_query_logging  (preludedb_sql_t *sql,
                                                         const char *filename);
void                preludedb_sql_disable_query_logging (preludedb_sql_t *sql);
const char *        preludedb_sql_get_plugin_error      (preludedb_sql_t *sql);
int                 preludedb_sql_query                 (preludedb_sql_t *sql,
                                                         const char *query,
                                                         preludedb_sql_table_t **table);
int                 preludedb_sql_query_sprintf         (preludedb_sql_t *sql,
                                                         preludedb_sql_table_t **table,
                                                         const char *format,
                                                         ...);
int                 preludedb_sql_insert                (preludedb_sql_t *sql,
                                                         const char *table,
                                                         const char *fields,
                                                         const char *format,
                                                         ...);
int                 preludedb_sql_build_limit_offset_string
                                                        (preludedb_sql_t *sql,
                                                         int limit,
                                                         int offset,
                                                         prelude_string_t *output);
int                 preludedb_sql_transaction_start     (preludedb_sql_t *sql);
int                 preludedb_sql_transaction_end       (preludedb_sql_t *sql);
int                 preludedb_sql_transaction_abort     (preludedb_sql_t *sql);
int                 preludedb_sql_escape_fast           (preludedb_sql_t *sql,
                                                         const char *input,
                                                         size_t input_size,
                                                         char **output);
int                 preludedb_sql_escape                (preludedb_sql_t *sql,
                                                         const char *input,
                                                         char **output);
int                 preludedb_sql_escape_binary         (preludedb_sql_t *sql,
                                                         unsigned char *input,
                                                         size_t input_size,
                                                         char **output);
int                 preludedb_sql_unescape_binary       (preludedb_sql_t *sql,
                                                         const char *input,
                                                         size_t input_size,
                                                         unsigned char **output,
                                                         size_t *output_size);
void                preludedb_sql_table_destroy         (preludedb_sql_table_t *table);
const char *        preludedb_sql_table_get_column_name (preludedb_sql_table_t *table,
                                                         unsigned int column_num);
int                 preludedb_sql_table_get_column_num  (preludedb_sql_table_t *table,
                                                         const char *column_name);
unsigned int        preludedb_sql_table_get_column_count
                                                        (preludedb_sql_table_t *table);
unsigned int        preludedb_sql_table_get_row_count   (preludedb_sql_table_t *table);
int                 preludedb_sql_table_fetch_row       (preludedb_sql_table_t *table,
                                                         preludedb_sql_row_t **row);
int                 preludedb_sql_row_fetch_field       (preludedb_sql_row_t *row,
                                                         unsigned int column_num,
                                                         preludedb_sql_field_t **field);
int                 preludedb_sql_row_fetch_field_by_name
                                                        (preludedb_sql_row_t *row,
                                                         const char *column_name,
                                                         preludedb_sql_field_t **field);
const char *        preludedb_sql_field_get_value       (preludedb_sql_field_t *field);
size_t              preludedb_sql_field_get_len         (preludedb_sql_field_t *field);
int                 preludedb_sql_field_to_int8         (preludedb_sql_field_t *field,
                                                         int8_t *value);
int                 preludedb_sql_field_to_uint8        (preludedb_sql_field_t *field,
                                                         uint8_t *value);
int                 preludedb_sql_field_to_int16        (preludedb_sql_field_t *field,
                                                         int16_t *value);
int                 preludedb_sql_field_to_uint16       (preludedb_sql_field_t *field,
                                                         uint16_t *value);
int                 preludedb_sql_field_to_int32        (preludedb_sql_field_t *field,
                                                         int32_t *value);
int                 preludedb_sql_field_to_uint32       (preludedb_sql_field_t *field,
                                                         uint32_t *value);
int                 preludedb_sql_field_to_int64        (preludedb_sql_field_t *field,
                                                         int64_t *value);
int                 preludedb_sql_field_to_uint64       (preludedb_sql_field_t *field,
                                                         uint64_t *value);
int                 preludedb_sql_field_to_float        (preludedb_sql_field_t *field,
                                                         float *value);
int                 preludedb_sql_field_to_double       (preludedb_sql_field_t *field,
                                                         double *value);
int                 preludedb_sql_field_to_string       (preludedb_sql_field_t *field,
                                                         prelude_string_t *output);
int                 preludedb_sql_build_criterion_string
                                                        (preludedb_sql_t *sql,
                                                         prelude_string_t *output,
                                                         const char *field,
                                                         idmef_criterion_operator_t operator,
                                                         idmef_criterion_value_t *value);
int                 preludedb_sql_time_from_timestamp   (idmef_time_t *time,
                                                         const char *time_buf,
                                                         int32_t gmtoff,
                                                         uint32_t usec);
int                 preludedb_sql_time_to_timestamp     (preludedb_sql_t *sql,
                                                         const idmef_time_t *time,
                                                         char *time_buf,
                                                         size_t time_buf_size,
                                                         char *gmtoff_buf,
                                                         size_t gmtoff_buf_size,
                                                         char *usec_buf,
                                                         size_t usec_buf_size);

Description

Details

PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE

#define PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE 128


enum preludedb_sql_time_constraint_type_t

typedef enum {
	PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR,
	PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH,
	PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY,
	PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY,
	PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY,
	PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR,
	PRELUDEDB_SQL_TIME_CONSTRAINT_MIN,
	PRELUDEDB_SQL_TIME_CONSTRAINT_SEC
} preludedb_sql_time_constraint_type_t;


preludedb_sql_t

typedef struct preludedb_sql preludedb_sql_t;


preludedb_sql_table_t

typedef struct preludedb_sql_table preludedb_sql_table_t;


preludedb_sql_row_t

typedef struct preludedb_sql_row preludedb_sql_row_t;


preludedb_sql_field_t

typedef struct preludedb_sql_field preludedb_sql_field_t;


preludedb_sql_new ()

int                 preludedb_sql_new                   (preludedb_sql_t **new,
                                                         const char *type,
                                                         preludedb_sql_settings_t *settings);

This function initialize the new object, load and setup the plugin that handle the database named type with the configuration stored in settings.

new :

Pointer to a sql object to initialize.

type :

Type of the database.

settings :

Settings for the choosen database.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_destroy ()

void                preludedb_sql_destroy               (preludedb_sql_t *sql);

Destroy sql and the underlying plugin.

sql :

Pointer to a sql object.

preludedb_sql_enable_query_logging ()

int                 preludedb_sql_enable_query_logging  (preludedb_sql_t *sql,
                                                         const char *filename);

Log all queries in the specified file.

sql :

Pointer to a sql object.

filename :

Where the logs will be written.

Returns :

0 on success, or a negative value if an error occur.

preludedb_sql_disable_query_logging ()

void                preludedb_sql_disable_query_logging (preludedb_sql_t *sql);

Disable query logging.

sql :

Pointer to a sql object.

preludedb_sql_get_plugin_error ()

const char *        preludedb_sql_get_plugin_error      (preludedb_sql_t *sql);

Warning

preludedb_sql_get_plugin_error is deprecated and should not be used in newly-written code. Use preludedb_strerror().

Get sql plugin specific error message.

sql :

Pointer to a sql object.

Returns :

a non NULL pointer or a NULL pointer if no error is available.

preludedb_sql_query ()

int                 preludedb_sql_query                 (preludedb_sql_t *sql,
                                                         const char *query,
                                                         preludedb_sql_table_t **table);

Execute a SQL query.

sql :

Pointer to a sql object.

query :

The SQL query to execute.

table :

Pointer to a table where the query result will be stored if the type of query return results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull.

Returns :

the number of result or a negative value if an error occured.

preludedb_sql_query_sprintf ()

int                 preludedb_sql_query_sprintf         (preludedb_sql_t *sql,
                                                         preludedb_sql_table_t **table,
                                                         const char *format,
                                                         ...);

Execute a SQL query.

sql :

Pointer to a sql object.

table :

Pointer to a table where the query result will be stored if the type of query return results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull.

format :

The SQL query to execute in a printf format string.

... :

Arguments referenced in format.

Returns :

1 if the query returns results, 0 if it does not, or negative value if an error occur.

preludedb_sql_insert ()

int                 preludedb_sql_insert                (preludedb_sql_t *sql,
                                                         const char *table,
                                                         const char *fields,
                                                         const char *format,
                                                         ...);

Insert values in a table.

sql :

Pointer to a sql object.

table :

the name of the table where to insert values.

fields :

a list of comma separated field names where the values will be inserted.

format :

The values to insert in a printf format string.

... :

Argument referenced throught format.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_build_limit_offset_string ()

int                 preludedb_sql_build_limit_offset_string
                                                        (preludedb_sql_t *sql,
                                                         int limit,
                                                         int offset,
                                                         prelude_string_t *output);

Build a limit/offset string for a SQL query, depending on the underlying type of database.

sql :

Pointer to a sql object.

limit :

The limit value, a value inferior to zero will disable the limit.

offset :

The offset value, a value inferior to zero will disable the offset.

output :

Where the limit/offset built string will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_transaction_start ()

int                 preludedb_sql_transaction_start     (preludedb_sql_t *sql);

Begin a sql transaction.

sql :

Pointer to a sql object.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_transaction_end ()

int                 preludedb_sql_transaction_end       (preludedb_sql_t *sql);

Finish a sql transaction (SQL COMMIT command).

sql :

Pointer to a sql object.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_transaction_abort ()

int                 preludedb_sql_transaction_abort     (preludedb_sql_t *sql);

Abort a sql transaction (SQL ROLLBACK command).

sql :

Pointer to a sql object.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_escape_fast ()

int                 preludedb_sql_escape_fast           (preludedb_sql_t *sql,
                                                         const char *input,
                                                         size_t input_size,
                                                         char **output);

Escape a string buffer.

sql :

Pointer to a sql object.

input :

Buffer to escape

input_size :

Buffer size.

output :

Where the new escaped buffer will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_escape ()

int                 preludedb_sql_escape                (preludedb_sql_t *sql,
                                                         const char *input,
                                                         char **output);

Escape a string buffer.

sql :

Pointer to a sql object.

input :

Buffer to escape.

output :

Where the new escaped buffer will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_escape_binary ()

int                 preludedb_sql_escape_binary         (preludedb_sql_t *sql,
                                                         unsigned char *input,
                                                         size_t input_size,
                                                         char **output);

Escape a binary buffer.

sql :

Pointer to a sql object.

input :

Buffer to escape.

input_size :

Buffer size.

output :

Where the new escaped buffer will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_unescape_binary ()

int                 preludedb_sql_unescape_binary       (preludedb_sql_t *sql,
                                                         const char *input,
                                                         size_t input_size,
                                                         unsigned char **output,
                                                         size_t *output_size);

Unescape to a binary buffer.

sql :

Pointer to a sql object.

input :

Buffer to unescape.

input_size :

Buffer size.

output :

Where the new unescaped buffer will be stored.

output_size :

Size of the new unescape buffer.

Returns :

0 on success or a negative value if an error occur.

preludedb_sql_table_destroy ()

void                preludedb_sql_table_destroy         (preludedb_sql_table_t *table);

Destroy the table object.

table :

Pointer to a table object.

preludedb_sql_table_get_column_name ()

const char *        preludedb_sql_table_get_column_name (preludedb_sql_table_t *table,
                                                         unsigned int column_num);

Get the name of the column number column_num.

table :

Pointer to a table object.

column_num :

Column number.

Returns :

the name of the column or NULL if the column column_num could not be found.

preludedb_sql_table_get_column_num ()

int                 preludedb_sql_table_get_column_num  (preludedb_sql_table_t *table,
                                                         const char *column_name);

Get the number of the column named column_name.

table :

Pointer to a table object.

column_name :

Column name.

Returns :

the number of the column or -1 if the column column_name could not be found.

preludedb_sql_table_get_column_count ()

unsigned int        preludedb_sql_table_get_column_count
                                                        (preludedb_sql_table_t *table);

Get the the number of columns.

table :

Pointer to a table object.

Returns :

the number of columns.

preludedb_sql_table_get_row_count ()

unsigned int        preludedb_sql_table_get_row_count   (preludedb_sql_table_t *table);

table :

Returns :


preludedb_sql_table_fetch_row ()

int                 preludedb_sql_table_fetch_row       (preludedb_sql_table_t *table,
                                                         preludedb_sql_row_t **row);

Fetch the next table's row.

table :

Pointer to a table object.

row :

Pointer to the row object where the result will be stored.

Returns :

1 if the table returns a new row, 0 if there is no more rows to fetch or a negative value if an error occur.

preludedb_sql_row_fetch_field ()

int                 preludedb_sql_row_fetch_field       (preludedb_sql_row_t *row,
                                                         unsigned int column_num,
                                                         preludedb_sql_field_t **field);

Fetch the field of column column_num

row :

Pointer to a row object.

column_num :

The column number of the field to be fetched.

field :

Pointer to the field object where the result will be stored.

Returns :

1 if the row returns a non-empty field, 0 if it returns an empty field, or a negative value if an error occur.

preludedb_sql_row_fetch_field_by_name ()

int                 preludedb_sql_row_fetch_field_by_name
                                                        (preludedb_sql_row_t *row,
                                                         const char *column_name,
                                                         preludedb_sql_field_t **field);

Fetch the field of column column_name

row :

Pointer to a row object.

column_name :

The column name of the field to be fetched.

field :

Pointer to the field object where the result will be stored.

Returns :

1 if the row returns a non-empty field, 0 if it returns an empty field, or a negative value if an error occur.

preludedb_sql_field_get_value ()

const char *        preludedb_sql_field_get_value       (preludedb_sql_field_t *field);

Get the raw value of the field.

field :

Pointer to a field object.

Returns :

field value.

preludedb_sql_field_get_len ()

size_t              preludedb_sql_field_get_len         (preludedb_sql_field_t *field);

Get the field value length.

field :

Pointer to a field object.

Returns :

field value length.

preludedb_sql_field_to_int8 ()

int                 preludedb_sql_field_to_int8         (preludedb_sql_field_t *field,
                                                         int8_t *value);

field :

value :

Returns :


preludedb_sql_field_to_uint8 ()

int                 preludedb_sql_field_to_uint8        (preludedb_sql_field_t *field,
                                                         uint8_t *value);

field :

value :

Returns :


preludedb_sql_field_to_int16 ()

int                 preludedb_sql_field_to_int16        (preludedb_sql_field_t *field,
                                                         int16_t *value);

field :

value :

Returns :


preludedb_sql_field_to_uint16 ()

int                 preludedb_sql_field_to_uint16       (preludedb_sql_field_t *field,
                                                         uint16_t *value);

field :

value :

Returns :


preludedb_sql_field_to_int32 ()

int                 preludedb_sql_field_to_int32        (preludedb_sql_field_t *field,
                                                         int32_t *value);

field :

value :

Returns :


preludedb_sql_field_to_uint32 ()

int                 preludedb_sql_field_to_uint32       (preludedb_sql_field_t *field,
                                                         uint32_t *value);

field :

value :

Returns :


preludedb_sql_field_to_int64 ()

int                 preludedb_sql_field_to_int64        (preludedb_sql_field_t *field,
                                                         int64_t *value);

field :

value :

Returns :


preludedb_sql_field_to_uint64 ()

int                 preludedb_sql_field_to_uint64       (preludedb_sql_field_t *field,
                                                         uint64_t *value);

field :

value :

Returns :


preludedb_sql_field_to_float ()

int                 preludedb_sql_field_to_float        (preludedb_sql_field_t *field,
                                                         float *value);

field :

value :

Returns :


preludedb_sql_field_to_double ()

int                 preludedb_sql_field_to_double       (preludedb_sql_field_t *field,
                                                         double *value);

field :

value :

Returns :


preludedb_sql_field_to_string ()

int                 preludedb_sql_field_to_string       (preludedb_sql_field_t *field,
                                                         prelude_string_t *output);

Get the string value of field.

field :

Pointer to a field type.

output :

Pointer to a string object where the field value will be added.

Returns :

0 on success, or a negative value if an error occur.

preludedb_sql_build_criterion_string ()

int                 preludedb_sql_build_criterion_string
                                                        (preludedb_sql_t *sql,
                                                         prelude_string_t *output,
                                                         const char *field,
                                                         idmef_criterion_operator_t operator,
                                                         idmef_criterion_value_t *value);

Build a sql "field operator value" string.

sql :

Pointer to a sql object.

output :

Pointer to a string object, where the result content will be stored.

field :

The sql field name.

operator :

The criterion operator.

value :

The criterion value.

Returns :

0 on success, or a negative value if an error occur.

preludedb_sql_time_from_timestamp ()

int                 preludedb_sql_time_from_timestamp   (idmef_time_t *time,
                                                         const char *time_buf,
                                                         int32_t gmtoff,
                                                         uint32_t usec);

Set an idmef time using the timestamp, GMT offset and microseconds given in input.

time :

Pointer to a time object.

time_buf :

SQL timestamp.

gmtoff :

GMT offset.

usec :

Microseconds.

Returns :

0 on success, or a negative value if an error occur.

preludedb_sql_time_to_timestamp ()

int                 preludedb_sql_time_to_timestamp     (preludedb_sql_t *sql,
                                                         const idmef_time_t *time,
                                                         char *time_buf,
                                                         size_t time_buf_size,
                                                         char *gmtoff_buf,
                                                         size_t gmtoff_buf_size,
                                                         char *usec_buf,
                                                         size_t usec_buf_size);

Set timestamp, GMT offset, and microseconds buffers with the idmef time object given in input.

sql :

time :

Pointer to a time object.

time_buf :

SQL timestamp.

time_buf_size :

SQL timestamp buffer size.

gmtoff_buf :

GMT offset buffer.

gmtoff_buf_size :

GMT offset buffer size.

usec_buf :

Microseconds buffer.

usec_buf_size :

Microseconds buffer size.

Returns :

0 on success, or a negative value if an error occur.
libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-version.html0000664000076400007640000000753411347715761022544 00000000000000 preludedb-version

preludedb-version

preludedb-version

Synopsis

#define             LIBPRELUDEDB_VERSION
const char *        preludedb_check_version             (const char *req_version);

Description

Details

LIBPRELUDEDB_VERSION

#define LIBPRELUDEDB_VERSION "1.0.0rc1"


preludedb_check_version ()

const char *        preludedb_check_version             (const char *req_version);

req_version :

Returns :

libpreludedb-1.0.0/docs/api/html/libpreludedb.devhelp20000664000076400007640000010043611347715761017655 00000000000000 libpreludedb-1.0.0/docs/api/html/libpreludedb.devhelp0000664000076400007640000007243111347715761017576 00000000000000 libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb.html0000664000076400007640000015052011347715761021053 00000000000000 preludedb

preludedb

preludedb

Synopsis

typedef             preludedb_t;
typedef             preludedb_result_idents_t;
typedef             preludedb_result_values_t;
enum                preludedb_result_idents_order_t;
#define             PRELUDEDB_ERRBUF_SIZE
int                 preludedb_init                      (void);
void                preludedb_deinit                    (void);
int                 preludedb_new                       (preludedb_t **db,
                                                         preludedb_sql_t *sql,
                                                         const char *format_name,
                                                         char *errbuf,
                                                         size_t size);
void                preludedb_destroy                   (preludedb_t *db);
const char *        preludedb_get_format_name           (preludedb_t *db);
const char *        preludedb_get_format_version        (preludedb_t *db);
int                 preludedb_set_format                (preludedb_t *db,
                                                         const char *format_name);
preludedb_sql_t *   preludedb_get_sql                   (preludedb_t *db);
void                preludedb_result_idents_destroy     (preludedb_result_idents_t *result);
int                 preludedb_result_idents_get_next    (preludedb_result_idents_t *result,
                                                         uint64_t *ident);
void                preludedb_result_values_destroy     (preludedb_result_values_t *result);
int                 preludedb_result_values_get_next    (preludedb_result_values_t *result,
                                                         idmef_value_t ***values);
char *              preludedb_get_error                 (preludedb_t *db,
                                                         preludedb_error_t error,
                                                         char *errbuf,
                                                         size_t size);
int                 preludedb_insert_message            (preludedb_t *db,
                                                         idmef_message_t *message);
int                 preludedb_get_alert_idents          (preludedb_t *db,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         preludedb_result_idents_t **result);
int                 preludedb_get_heartbeat_idents      (preludedb_t *db,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         preludedb_result_idents_t **result);
int                 preludedb_get_alert                 (preludedb_t *db,
                                                         uint64_t ident,
                                                         idmef_message_t **message);
int                 preludedb_get_heartbeat             (preludedb_t *db,
                                                         uint64_t ident,
                                                         idmef_message_t **message);
int                 preludedb_delete_alert              (preludedb_t *db,
                                                         uint64_t ident);
int                 preludedb_delete_heartbeat          (preludedb_t *db,
                                                         uint64_t ident);
ssize_t             preludedb_delete_alert_from_list    (preludedb_t *db,
                                                         uint64_t *idents,
                                                         size_t size);
ssize_t             preludedb_delete_alert_from_result_idents
                                                        (preludedb_t *db,
                                                         preludedb_result_idents_t *result);
ssize_t             preludedb_delete_heartbeat_from_list
                                                        (preludedb_t *db,
                                                         uint64_t *idents,
                                                         size_t size);
ssize_t             preludedb_delete_heartbeat_from_result_idents
                                                        (preludedb_t *db,
                                                         preludedb_result_idents_t *result);
int                 preludedb_get_values                (preludedb_t *db,
                                                         preludedb_path_selection_t *path_selection,
                                                         idmef_criteria_t *criteria,
                                                         prelude_bool_t distinct,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_values_t **result);
int                 preludedb_transaction_abort         (preludedb_t *db);
int                 preludedb_transaction_end           (preludedb_t *db);
int                 preludedb_transaction_start         (preludedb_t *db);

Description

Details

preludedb_t

typedef struct preludedb preludedb_t;


preludedb_result_idents_t

typedef struct preludedb_result_idents preludedb_result_idents_t;


preludedb_result_values_t

typedef struct preludedb_result_values preludedb_result_values_t;


enum preludedb_result_idents_order_t

typedef enum {
        PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE = 0,
        PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC = 1,
        PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC = 2
} preludedb_result_idents_order_t;


PRELUDEDB_ERRBUF_SIZE

#define PRELUDEDB_ERRBUF_SIZE 512


preludedb_init ()

int                 preludedb_init                      (void);

Returns :


preludedb_deinit ()

void                preludedb_deinit                    (void);


preludedb_new ()

int                 preludedb_new                       (preludedb_t **db,
                                                         preludedb_sql_t *sql,
                                                         const char *format_name,
                                                         char *errbuf,
                                                         size_t size);

This function initialize the db object and detect the format of the underlying database if no format name is given.

db :

Pointer to a db object to initialize.

sql :

Pointer to a sql object.

format_name :

Format name of the underlying database, if NULL the format will be automatically detected

errbuf :

Buffer that will be set to an error message if an error occur.

size :

size of errbuf.

Returns :

0 on success or a negative value if an error occur.

preludedb_destroy ()

void                preludedb_destroy                   (preludedb_t *db);

Destroy db object and the underlying sql object given as argument to preludedb_new.

db :

Pointer to a db object.

preludedb_get_format_name ()

const char *        preludedb_get_format_name           (preludedb_t *db);

db :

Pointer to a db object.

Returns :

the format name currently used by the db object.

preludedb_get_format_version ()

const char *        preludedb_get_format_version        (preludedb_t *db);

db :

Pointer to a db object.

Returns :

the format version currently used by the db object.

preludedb_set_format ()

int                 preludedb_set_format                (preludedb_t *db,
                                                         const char *format_name);

Change the current format plugin.

db :

Pointer to a db object.

format_name :

New format to use.

Returns :

0 on success or negative value if an error occur.

preludedb_get_sql ()

preludedb_sql_t *   preludedb_get_sql                   (preludedb_t *db);

db :

Pointer to a db object.

Returns :

a pointer to the underlying sql object.

preludedb_result_idents_destroy ()

void                preludedb_result_idents_destroy     (preludedb_result_idents_t *result);

Destroy the result object.

result :

Pointer to an idents result object.

preludedb_result_idents_get_next ()

int                 preludedb_result_idents_get_next    (preludedb_result_idents_t *result,
                                                         uint64_t *ident);

Retrieve the next ident from the idents result object.

result :

Pointer to an idents result object.

ident :

Pointer to an ident where the next ident will be stored.

Returns :

1 if an ident is available, 0 if there is no more idents available or a negative value if an error occur.

preludedb_result_values_destroy ()

void                preludedb_result_values_destroy     (preludedb_result_values_t *result);

Destroy the result object.

result :

Pointer to a result values object.

preludedb_result_values_get_next ()

int                 preludedb_result_values_get_next    (preludedb_result_values_t *result,
                                                         idmef_value_t ***values);

Retrieve the next values row from the values result object.

result :

Pointer to a values result object.

values :

Pointer to a values array where the next row of values will be stored.

Returns :

the number of returned values, 0 if there are no values or a negative value if an error occur.

preludedb_get_error ()

char *              preludedb_get_error                 (preludedb_t *db,
                                                         preludedb_error_t error,
                                                         char *errbuf,
                                                         size_t size);

Build an error message from the error code given as argument and from the sql plugin error string (if any) if the error code is db related.

db :

Pointer to a db object.

error :

Error code to build the error string from.

errbuf :

Buffer where the error message will be stored,

size :

size of this buffer must be PRELUDEDB_ERRBUF_SIZE.

Returns :

a pointer to the error string or NULL if an error occured.

preludedb_insert_message ()

int                 preludedb_insert_message            (preludedb_t *db,
                                                         idmef_message_t *message);

Insert an IDMEF message into the database.

db :

Pointer to a db object.

message :

Pointer to an IDMEF message.

Returns :

0 on success, or a negative value if an error occur.

preludedb_get_alert_idents ()

int                 preludedb_get_alert_idents          (preludedb_t *db,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         preludedb_result_idents_t **result);

db :

Pointer to a db object.

criteria :

Pointer to an idmef criteria.

limit :

Limit of results or -1 if no limit.

offset :

Offset in results or -1 if no offset.

order :

Result order.

result :

Idents result.

Returns :

the number of result or a negative value if an error occured.

preludedb_get_heartbeat_idents ()

int                 preludedb_get_heartbeat_idents      (preludedb_t *db,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         preludedb_result_idents_t **result);

db :

Pointer to a db object.

criteria :

Pointer to an idmef criteria.

limit :

Limit of results or -1 if no limit.

offset :

Offset in results or -1 if no offset.

order :

Result order.

result :

Idents result.

Returns :

the number of result or a negative value if an error occured.

preludedb_get_alert ()

int                 preludedb_get_alert                 (preludedb_t *db,
                                                         uint64_t ident,
                                                         idmef_message_t **message);

db :

Pointer to a db object.

ident :

Internal database ident of the alert.

message :

Pointer to an idmef message object where the retrieved message will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_get_heartbeat ()

int                 preludedb_get_heartbeat             (preludedb_t *db,
                                                         uint64_t ident,
                                                         idmef_message_t **message);

db :

Pointer to a db object.

ident :

Internal database ident of the heartbeat.

message :

Pointer to an idmef message object where the retrieved message will be stored.

Returns :

0 on success or a negative value if an error occur.

preludedb_delete_alert ()

int                 preludedb_delete_alert              (preludedb_t *db,
                                                         uint64_t ident);

Delete an alert.

db :

Pointer to a db object.

ident :

Internal database ident of the alert.

Returns :

0 on success, or a negative value if an error occur.

preludedb_delete_heartbeat ()

int                 preludedb_delete_heartbeat          (preludedb_t *db,
                                                         uint64_t ident);

Delete an heartbeat.

db :

Pointer to a db object.

ident :

Internal database ident of the heartbeat.

Returns :

0 on success, or a negative value if an error occur.

preludedb_delete_alert_from_list ()

ssize_t             preludedb_delete_alert_from_list    (preludedb_t *db,
                                                         uint64_t *idents,
                                                         size_t size);

Delete all alerts from ident stored within idents.

db :

Pointer to a db object.

idents :

Pointer to an array of idents.

size :

Size of idents.

Returns :

the number of alert deleted on success, or a negative value if an error occur.

preludedb_delete_alert_from_result_idents ()

ssize_t             preludedb_delete_alert_from_result_idents
                                                        (preludedb_t *db,
                                                         preludedb_result_idents_t *result);

Delete all alert from ident stored within result.

db :

Pointer to a db object.

result :

Pointer to an idents result object.

Returns :

the number of alert deleted on success, or a negative value if an error occur.

preludedb_delete_heartbeat_from_list ()

ssize_t             preludedb_delete_heartbeat_from_list
                                                        (preludedb_t *db,
                                                         uint64_t *idents,
                                                         size_t size);

Delete all heartbeat from ident stored within idents.

db :

Pointer to a db object.

idents :

Pointer to an array of idents.

size :

Size of idents.

Returns :

the number of heartbeat deleted on success, or a negative value if an error occur.

preludedb_delete_heartbeat_from_result_idents ()

ssize_t             preludedb_delete_heartbeat_from_result_idents
                                                        (preludedb_t *db,
                                                         preludedb_result_idents_t *result);

Delete all heartbeat from ident stored within result.

db :

Pointer to a db object.

result :

Pointer to an idents result object.

Returns :

the number of heartbeat deleted on success, or a negative value if an error occur.

preludedb_get_values ()

int                 preludedb_get_values                (preludedb_t *db,
                                                         preludedb_path_selection_t *path_selection,
                                                         idmef_criteria_t *criteria,
                                                         prelude_bool_t distinct,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_values_t **result);

db :

Pointer to a db object.

path_selection :

Pointer to a path selection.

criteria :

Pointer to a criteria object.

distinct :

Get distinct or not distinct result rows.

limit :

Limit of results or -1 if no limit.

offset :

Offset in results or -1 if no offset.

result :

Values result.

Returns :

the number of result or a negative value if an error occured.

preludedb_transaction_abort ()

int                 preludedb_transaction_abort         (preludedb_t *db);

Abort a sql transaction (SQL ROLLBACK command) initiated with preludedb_transaction_start(). Internal transaction handling will be enabled again once this function return.

db :

Pointer to a preludedb_t object.

Returns :

0 on success or a negative value if an error occur.

preludedb_transaction_end ()

int                 preludedb_transaction_end           (preludedb_t *db);

Terminate a sql transaction (SQL COMMIT command) initiated with preludedb_transaction_start(). Internal transaction handling will be enabled again once this function return.

db :

Pointer to a preludedb_t object.

Returns :

0 on success or a negative value if an error occur.

preludedb_transaction_start ()

int                 preludedb_transaction_start         (preludedb_t *db);

Begin a transaction using db object. Internal transaction handling will be disabled until preludedb_transaction_end() or preludedb_transaction_abort() is called.

db :

Pointer to a preludedb_t object.

Returns :

0 on success or a negative value if an error occur.
libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-plugin-format.html0000664000076400007640000022056611347715761023645 00000000000000 preludedb-plugin-format

preludedb-plugin-format

preludedb-plugin-format

Synopsis

typedef             preludedb_plugin_format_t;
int                 (*preludedb_plugin_format_get_values_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_path_selection_t *selection,
                                                         idmef_criteria_t *criteria,
                                                         int distinct,
                                                         int limit,
                                                         int offset,
                                                         void **res);
int                 (*preludedb_plugin_format_get_alert_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         void **res);
int                 (*preludedb_plugin_format_delete_alert_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident);
int                 preludedb_plugin_format_new         (preludedb_plugin_format_t **ret);
int                 (*preludedb_plugin_format_get_heartbeat_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         void **res);
size_t              (*preludedb_plugin_format_get_message_ident_count_func_t)
                                                        (void *res);
int                 (*preludedb_plugin_format_get_alert_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident,
                                                         idmef_message_t **message);
int                 (*preludedb_plugin_format_get_next_values_func_t)
                                                        (void *res,
                                                         preludedb_path_selection_t *selection,
                                                         idmef_value_t ***values);
int                 (*preludedb_plugin_format_get_heartbeat_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident,
                                                         idmef_message_t **message);
int                 (*preludedb_plugin_format_get_next_message_ident_func_t)
                                                        (void *res,
                                                         uint64_t *ident);
void                (*preludedb_plugin_format_destroy_values_resource_func_t)
                                                        (void *res);
int                 (*preludedb_plugin_format_insert_message_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_message_t *message);
int                 (*preludedb_plugin_format_check_schema_version_func_t)
                                                        (const char *version);
void                (*preludedb_plugin_format_destroy_message_idents_resource_func_t)
                                                        (void *res);
int                 (*preludedb_plugin_format_delete_heartbeat_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident);
ssize_t             (*preludedb_plugin_format_delete_alert_from_list_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t *idents,
                                                         size_t size);
ssize_t             (*preludedb_plugin_format_delete_alert_from_result_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_result_idents_t *results);
ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_list_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t *idents,
                                                         size_t size);
ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_result_idents_t *results);
void                preludedb_plugin_format_set_delete_alert_from_list_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_from_list_func_t func);
void                preludedb_plugin_format_set_delete_alert_from_result_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_from_result_idents_func_t func);
void                preludedb_plugin_format_set_delete_heartbeat_from_list_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_from_list_func_t func);
void                preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func);
void                preludedb_plugin_format_set_check_schema_version_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_check_schema_version_func_t func);
void                preludedb_plugin_format_set_get_alert_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_alert_idents_func_t func);
void                preludedb_plugin_format_set_get_heartbeat_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_heartbeat_idents_func_t func);
void                preludedb_plugin_format_set_get_message_ident_count_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_message_ident_count_func_t func);
void                preludedb_plugin_format_set_get_next_message_ident_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_next_message_ident_func_t func);
void                preludedb_plugin_format_set_destroy_message_idents_resource_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_destroy_message_idents_resource_func_t func);
void                preludedb_plugin_format_set_get_alert_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_alert_func_t func);
void                preludedb_plugin_format_set_get_heartbeat_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_heartbeat_func_t func);
void                preludedb_plugin_format_set_delete_alert_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_func_t func);
void                preludedb_plugin_format_set_delete_heartbeat_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_func_t func);
void                preludedb_plugin_format_set_insert_message_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_insert_message_func_t func);
void                preludedb_plugin_format_set_get_values_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_values_func_t func);
void                preludedb_plugin_format_set_get_next_values_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_next_values_func_t func);
void                preludedb_plugin_format_set_destroy_values_resource_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_destroy_values_resource_func_t func);

Description

Details

preludedb_plugin_format_t

typedef struct preludedb_plugin_format preludedb_plugin_format_t;


preludedb_plugin_format_get_values_func_t ()

int                 (*preludedb_plugin_format_get_values_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_path_selection_t *selection,
                                                         idmef_criteria_t *criteria,
                                                         int distinct,
                                                         int limit,
                                                         int offset,
                                                         void **res);

sql :

selection :

criteria :

distinct :

limit :

offset :

res :

Returns :


preludedb_plugin_format_get_alert_idents_func_t ()

int                 (*preludedb_plugin_format_get_alert_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         void **res);

sql :

criteria :

limit :

offset :

order :

res :

Returns :


preludedb_plugin_format_delete_alert_func_t ()

int                 (*preludedb_plugin_format_delete_alert_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident);

sql :

ident :

Returns :


preludedb_plugin_format_new ()

int                 preludedb_plugin_format_new         (preludedb_plugin_format_t **ret);

ret :

Returns :


preludedb_plugin_format_get_heartbeat_idents_func_t ()

int                 (*preludedb_plugin_format_get_heartbeat_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_criteria_t *criteria,
                                                         int limit,
                                                         int offset,
                                                         preludedb_result_idents_order_t order,
                                                         void **res);

sql :

criteria :

limit :

offset :

order :

res :

Returns :


preludedb_plugin_format_get_message_ident_count_func_t ()

size_t              (*preludedb_plugin_format_get_message_ident_count_func_t)
                                                        (void *res);

res :

Returns :


preludedb_plugin_format_get_alert_func_t ()

int                 (*preludedb_plugin_format_get_alert_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident,
                                                         idmef_message_t **message);

sql :

ident :

message :

Returns :


preludedb_plugin_format_get_next_values_func_t ()

int                 (*preludedb_plugin_format_get_next_values_func_t)
                                                        (void *res,
                                                         preludedb_path_selection_t *selection,
                                                         idmef_value_t ***values);

res :

selection :

values :

Returns :


preludedb_plugin_format_get_heartbeat_func_t ()

int                 (*preludedb_plugin_format_get_heartbeat_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident,
                                                         idmef_message_t **message);

sql :

ident :

message :

Returns :


preludedb_plugin_format_get_next_message_ident_func_t ()

int                 (*preludedb_plugin_format_get_next_message_ident_func_t)
                                                        (void *res,
                                                         uint64_t *ident);

res :

ident :

Returns :


preludedb_plugin_format_destroy_values_resource_func_t ()

void                (*preludedb_plugin_format_destroy_values_resource_func_t)
                                                        (void *res);

res :


preludedb_plugin_format_insert_message_func_t ()

int                 (*preludedb_plugin_format_insert_message_func_t)
                                                        (preludedb_sql_t *sql,
                                                         idmef_message_t *message);

sql :

message :

Returns :


preludedb_plugin_format_check_schema_version_func_t ()

int                 (*preludedb_plugin_format_check_schema_version_func_t)
                                                        (const char *version);

version :

Returns :


preludedb_plugin_format_destroy_message_idents_resource_func_t ()

void                (*preludedb_plugin_format_destroy_message_idents_resource_func_t)
                                                        (void *res);

res :


preludedb_plugin_format_delete_heartbeat_func_t ()

int                 (*preludedb_plugin_format_delete_heartbeat_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t ident);

sql :

ident :

Returns :


preludedb_plugin_format_delete_alert_from_list_func_t ()

ssize_t             (*preludedb_plugin_format_delete_alert_from_list_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t *idents,
                                                         size_t size);

sql :

idents :

size :

Returns :


preludedb_plugin_format_delete_alert_from_result_idents_func_t ()

ssize_t             (*preludedb_plugin_format_delete_alert_from_result_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_result_idents_t *results);

sql :

results :

Returns :


preludedb_plugin_format_delete_heartbeat_from_list_func_t ()

ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_list_func_t)
                                                        (preludedb_sql_t *sql,
                                                         uint64_t *idents,
                                                         size_t size);

sql :

idents :

size :

Returns :


preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t ()

ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t)
                                                        (preludedb_sql_t *sql,
                                                         preludedb_result_idents_t *results);

sql :

results :

Returns :


preludedb_plugin_format_set_delete_alert_from_list_func ()

void                preludedb_plugin_format_set_delete_alert_from_list_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_from_list_func_t func);

plugin :

func :


preludedb_plugin_format_set_delete_alert_from_result_idents_func ()

void                preludedb_plugin_format_set_delete_alert_from_result_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_from_result_idents_func_t func);

plugin :

func :


preludedb_plugin_format_set_delete_heartbeat_from_list_func ()

void                preludedb_plugin_format_set_delete_heartbeat_from_list_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_from_list_func_t func);

plugin :

func :


preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func ()

void                preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func);

plugin :

func :


preludedb_plugin_format_set_check_schema_version_func ()

void                preludedb_plugin_format_set_check_schema_version_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_check_schema_version_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_alert_idents_func ()

void                preludedb_plugin_format_set_get_alert_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_alert_idents_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_heartbeat_idents_func ()

void                preludedb_plugin_format_set_get_heartbeat_idents_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_heartbeat_idents_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_message_ident_count_func ()

void                preludedb_plugin_format_set_get_message_ident_count_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_message_ident_count_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_next_message_ident_func ()

void                preludedb_plugin_format_set_get_next_message_ident_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_next_message_ident_func_t func);

plugin :

func :


preludedb_plugin_format_set_destroy_message_idents_resource_func ()

void                preludedb_plugin_format_set_destroy_message_idents_resource_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_destroy_message_idents_resource_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_alert_func ()

void                preludedb_plugin_format_set_get_alert_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_alert_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_heartbeat_func ()

void                preludedb_plugin_format_set_get_heartbeat_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_heartbeat_func_t func);

plugin :

func :


preludedb_plugin_format_set_delete_alert_func ()

void                preludedb_plugin_format_set_delete_alert_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_alert_func_t func);

plugin :

func :


preludedb_plugin_format_set_delete_heartbeat_func ()

void                preludedb_plugin_format_set_delete_heartbeat_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_delete_heartbeat_func_t func);

plugin :

func :


preludedb_plugin_format_set_insert_message_func ()

void                preludedb_plugin_format_set_insert_message_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_insert_message_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_values_func ()

void                preludedb_plugin_format_set_get_values_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_values_func_t func);

plugin :

func :


preludedb_plugin_format_set_get_next_values_func ()

void                preludedb_plugin_format_set_get_next_values_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_get_next_values_func_t func);

plugin :

func :


preludedb_plugin_format_set_destroy_values_resource_func ()

void                preludedb_plugin_format_set_destroy_values_resource_func
                                                        (preludedb_plugin_format_t *plugin,
                                                         preludedb_plugin_format_destroy_values_resource_func_t func);

plugin :

func :

libpreludedb-1.0.0/docs/api/html/ch01.html0000664000076400007640000000551511347715761015210 00000000000000 [Insert title here] libpreludedb-1.0.0/docs/api/html/index.html0000664000076400007640000000452511347715761015564 00000000000000 [Insert name here] Reference Manual libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-path-selection.html0000664000076400007640000004460111347715761023772 00000000000000 preludedb-path-selection

preludedb-path-selection

preludedb-path-selection

Description

Details

enum preludedb_selected_path_flags_t

typedef enum {
	PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN = 0x01,
	PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX = 0x02,
	PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG = 0x04,
	PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD = 0x08,
	PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT = 0x10,

	PRELUDEDB_SELECTED_OBJECT_GROUP_BY = 0x20,

	PRELUDEDB_SELECTED_OBJECT_ORDER_ASC = 0x40,
	PRELUDEDB_SELECTED_OBJECT_ORDER_DESC = 0x80
} preludedb_selected_path_flags_t;


preludedb_path_selection_t

typedef struct preludedb_path_selection preludedb_path_selection_t;


preludedb_selected_path_t

typedef struct preludedb_selected_path preludedb_selected_path_t;


preludedb_selected_path_new ()

int                 preludedb_selected_path_new         (preludedb_selected_path_t **selected_path,
                                                         idmef_path_t *path,
                                                         int flags);

selected_path :

path :

flags :

Returns :


preludedb_selected_path_new_string ()

int                 preludedb_selected_path_new_string  (preludedb_selected_path_t **selected_path,
                                                         const char *str);

selected_path :

str :

Returns :


preludedb_selected_path_destroy ()

void                preludedb_selected_path_destroy     (preludedb_selected_path_t *selected_path);

selected_path :


preludedb_selected_path_get_path ()

idmef_path_t *      preludedb_selected_path_get_path    (preludedb_selected_path_t *selected_path);

selected_path :

Returns :


preludedb_selected_path_get_flags ()

preludedb_selected_path_flags_t  preludedb_selected_path_get_flags
                                                        (preludedb_selected_path_t *selected_path);

selected_path :

Returns :


preludedb_path_selection_new ()

int                 preludedb_path_selection_new        (preludedb_path_selection_t **path_selection);

path_selection :

Returns :


preludedb_path_selection_destroy ()

void                preludedb_path_selection_destroy    (preludedb_path_selection_t *path_selection);

path_selection :


preludedb_path_selection_add ()

void                preludedb_path_selection_add        (preludedb_path_selection_t *path_selection,
                                                         preludedb_selected_path_t *selected_path);

path_selection :

selected_path :


preludedb_path_selection_get_next ()

preludedb_selected_path_t * preludedb_path_selection_get_next
                                                        (preludedb_path_selection_t *path_selection,
                                                         preludedb_selected_path_t *selected_path);

path_selection :

selected_path :

Returns :


preludedb_path_selection_get_count ()

size_t              preludedb_path_selection_get_count  (preludedb_path_selection_t *path_selection);

path_selection :

Returns :

libpreludedb-1.0.0/docs/api/html/up.png0000644000076400007640000000062611347715761014715 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ2.œE€Ù#IDATxœí“=JÄ@F¿o‰] !+¤œ2…Å[ZÌ<@/á<€¥…XÛ Ú­20v±³ˆÂ…Ïj0»lþvV°ðA`˜ ïÍ ð—t*iùâHÒ­~xR~'IUUÉ9ç#OÁ‘my–eJÓTeY†GvÉ@x¤O#ß;2E>9²|t$DÞ9nnBäíÈjµò‘BRIsIªë:HîŸ8ŽU…œùëùPÖÚN™1fc­sNÎ95Mã§–ɵ¤ ׿ŸØŒ1~¸pEòe$ïIž°€Ç î7nrDòf!;Ã`¨çÝ'äykíÎI’øáû䲤sI_]ÿÇy—‡‘€ÅÀ^^I>O>Á¡ø­§²š?YBIEND®B`‚libpreludedb-1.0.0/docs/api/html/right.png0000644000076400007640000000073011347715761015402 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ2 I%Á=eIDATxœ­”!oÂ@†Ÿ.'**M0$ÄÁ$¿?1~¢vIeEuLlÉ&–Ô4‚ä Í¶B»Ý›œ¹|÷>ï—ûî …$ݶ©oc<”´ÑA©¤×€X’òŸW¶lC'?“tk;|/t*I»ÝN«ÕÊZø^`Œy•4ë÷ûšN§r]×® çJÒÌó<«’½À“Út»Ýú€à`±Xàºî1@p´ä€¸d½÷ŽZ')høÖÚK¬ ª$V?%Å]€­+³L’sgUKà"ÿw5â3O·•ÜòIEND®B`‚libpreludedb-1.0.0/docs/api/html/index.sgml0000664000076400007640000010176511347715761015566 00000000000000 libpreludedb-1.0.0/docs/api/html/style.css0000644000076400007640000000460111347715761015432 00000000000000.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } /* this is needed so that the local anchors are displayed below the naviagtion */ @media screen { sup a.footnote { position: relative; top: 0em ! important; } div.refnamediv a[name], div.refsect1 a[name] { position: relative; top: -4.5em; } table.navigation#top { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; position: fixed; top: 0; left: 0; height: 2em; z-index: 1; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } td.shortcuts { color: #770000; font-size: 80%; white-space: nowrap; } div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface { position: relative; top: 3em; z-index: 0; } div.glossary, div.index { position: relative; top: 2em; z-index: 0; } div.refnamediv { margin-top: 2em; } body { padding-bottom: 20em; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 2em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; border-color: #777777; border-width: 1px; } div.table table td, div.table table th { border-style: solid; border-color: #777777; border-width: 1px; padding: 3px; vertical-align: top; } div.table table th { background-color: #eeeeee; } hr { color: #777777; background: #777777; border: 0; height: 1px; clear: both; } .footer { padding-top: 3.5em; color: #777777; text-align: center; font-size: 80%; } libpreludedb-1.0.0/docs/api/html/libpreludedb-preludedb-plugin-sql.html0000664000076400007640000020516411347715761023151 00000000000000 preludedb-plugin-sql

preludedb-plugin-sql

preludedb-plugin-sql

Synopsis

typedef             preludedb_plugin_sql_t;
const char *        (*preludedb_plugin_sql_get_column_name_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         unsigned int column_num);
const char *        (*preludedb_plugin_sql_get_operator_string_func_t)
                                                        (idmef_criterion_operator_t operator);
int                 (*preludedb_plugin_sql_build_constraint_string_func_t)
                                                        (prelude_string_t *out,
                                                         const char *field,
                                                         idmef_criterion_operator_t operator,
                                                         const char *value);
int                 (*preludedb_plugin_sql_unescape_binary_func_t)
                                                        (void *session,
                                                         const char *input,
                                                         unsigned char **output,
                                                         size_t *output_size);
int                 (*preludedb_plugin_sql_escape_binary_func_t)
                                                        (void *session,
                                                         unsigned char *input,
                                                         size_t input_size,
                                                         char **output);
int                 (*preludedb_plugin_sql_query_func_t)
                                                        (void *session,
                                                         const char *query,
                                                         void **res);
int                 (*preludedb_plugin_sql_get_column_num_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         const char *column_name);
void                (*preludedb_plugin_sql_resource_destroy_func_t)
                                                        (void *session,
                                                         void *resource);
int                 (*preludedb_plugin_sql_build_timestamp_string_func_t)
                                                        (const struct tm *t,
                                                         char *out,
                                                         size_t size);
int                 (*preludedb_plugin_sql_build_limit_offset_string_func_t)
                                                        (void *session,
                                                         int limit,
                                                         int offset,
                                                         prelude_string_t *output);
void                preludedb_plugin_sql_set_build_timestamp_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_timestamp_string_func_t func);
int                 (*preludedb_plugin_sql_build_time_interval_string_func_t)
                                                        (preludedb_sql_time_constraint_type_t type,
                                                         int value,
                                                         char *buf,
                                                         size_t size);
int                 (*preludedb_plugin_sql_open_func_t) (preludedb_sql_settings_t *settings,
                                                         void **session);
int                 (*preludedb_plugin_sql_fetch_field_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         void *row,
                                                         unsigned int column_num,
                                                         const char **value,
                                                         size_t *len);
void                preludedb_plugin_sql_set_get_operator_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_operator_string_func_t func);
void                (*preludedb_plugin_sql_close_func_t)
                                                        (void *session);
int                 (*preludedb_plugin_sql_build_time_constraint_string_func_t)
                                                        (prelude_string_t *output,
                                                         const char *field,
                                                         preludedb_sql_time_constraint_type_t type,
                                                         idmef_criterion_operator_t operator,
                                                         int value,
                                                         int gmt_offset);
int                 (*preludedb_plugin_sql_escape_func_t)
                                                        (void *session,
                                                         const char *input,
                                                         size_t input_size,
                                                         char **output);
int                 (*preludedb_plugin_sql_fetch_row_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         void **row);
int                 preludedb_plugin_sql_new            (preludedb_plugin_sql_t **plugin);
void                preludedb_plugin_sql_set_open_func  (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_open_func_t func);
void                preludedb_plugin_sql_set_close_func (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_close_func_t func);
void                preludedb_plugin_sql_set_escape_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_escape_func_t func);
void                preludedb_plugin_sql_set_escape_binary_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_escape_binary_func_t func);
void                preludedb_plugin_sql_set_unescape_binary_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_unescape_binary_func_t func);
void                preludedb_plugin_sql_set_query_func (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_query_func_t func);
void                preludedb_plugin_sql_set_get_column_count_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_count_func_t func);
void                preludedb_plugin_sql_set_get_row_count_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_row_count_func_t func);
void                preludedb_plugin_sql_set_get_column_name_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_name_func_t func);
void                preludedb_plugin_sql_set_get_column_num_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_num_func_t func);
void                preludedb_plugin_sql_set_resource_destroy_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_resource_destroy_func_t func);
void                preludedb_plugin_sql_set_fetch_row_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_fetch_row_func_t func);
void                preludedb_plugin_sql_set_fetch_field_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_fetch_field_func_t func);
void                preludedb_plugin_sql_set_build_time_constraint_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_time_constraint_string_func_t func);
void                preludedb_plugin_sql_set_build_time_interval_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_time_interval_string_func_t func);
void                preludedb_plugin_sql_set_build_limit_offset_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_limit_offset_string_func_t func);
void                preludedb_plugin_sql_set_build_constraint_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_constraint_string_func_t func);

Description

Details

preludedb_plugin_sql_t

typedef struct preludedb_plugin_sql preludedb_plugin_sql_t;


preludedb_plugin_sql_get_column_name_func_t ()

const char *        (*preludedb_plugin_sql_get_column_name_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         unsigned int column_num);

session :

resource :

column_num :

Returns :


preludedb_plugin_sql_get_operator_string_func_t ()

const char *        (*preludedb_plugin_sql_get_operator_string_func_t)
                                                        (idmef_criterion_operator_t operator);

operator :

Returns :


preludedb_plugin_sql_build_constraint_string_func_t ()

int                 (*preludedb_plugin_sql_build_constraint_string_func_t)
                                                        (prelude_string_t *out,
                                                         const char *field,
                                                         idmef_criterion_operator_t operator,
                                                         const char *value);

out :

field :

operator :

value :

Returns :


preludedb_plugin_sql_unescape_binary_func_t ()

int                 (*preludedb_plugin_sql_unescape_binary_func_t)
                                                        (void *session,
                                                         const char *input,
                                                         unsigned char **output,
                                                         size_t *output_size);

session :

input :

output :

output_size :

Returns :


preludedb_plugin_sql_escape_binary_func_t ()

int                 (*preludedb_plugin_sql_escape_binary_func_t)
                                                        (void *session,
                                                         unsigned char *input,
                                                         size_t input_size,
                                                         char **output);

session :

input :

input_size :

output :

Returns :


preludedb_plugin_sql_query_func_t ()

int                 (*preludedb_plugin_sql_query_func_t)
                                                        (void *session,
                                                         const char *query,
                                                         void **res);

session :

query :

res :

Returns :


preludedb_plugin_sql_get_column_num_func_t ()

int                 (*preludedb_plugin_sql_get_column_num_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         const char *column_name);

session :

resource :

column_name :

Returns :


preludedb_plugin_sql_resource_destroy_func_t ()

void                (*preludedb_plugin_sql_resource_destroy_func_t)
                                                        (void *session,
                                                         void *resource);

session :

resource :


preludedb_plugin_sql_build_timestamp_string_func_t ()

int                 (*preludedb_plugin_sql_build_timestamp_string_func_t)
                                                        (const struct tm *t,
                                                         char *out,
                                                         size_t size);

t :

out :

size :

Returns :


preludedb_plugin_sql_build_limit_offset_string_func_t ()

int                 (*preludedb_plugin_sql_build_limit_offset_string_func_t)
                                                        (void *session,
                                                         int limit,
                                                         int offset,
                                                         prelude_string_t *output);

session :

limit :

offset :

output :

Returns :


preludedb_plugin_sql_set_build_timestamp_string_func ()

void                preludedb_plugin_sql_set_build_timestamp_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_timestamp_string_func_t func);

plugin :

func :


preludedb_plugin_sql_build_time_interval_string_func_t ()

int                 (*preludedb_plugin_sql_build_time_interval_string_func_t)
                                                        (preludedb_sql_time_constraint_type_t type,
                                                         int value,
                                                         char *buf,
                                                         size_t size);

type :

value :

buf :

size :

Returns :


preludedb_plugin_sql_open_func_t ()

int                 (*preludedb_plugin_sql_open_func_t) (preludedb_sql_settings_t *settings,
                                                         void **session);

settings :

session :

Returns :


preludedb_plugin_sql_fetch_field_func_t ()

int                 (*preludedb_plugin_sql_fetch_field_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         void *row,
                                                         unsigned int column_num,
                                                         const char **value,
                                                         size_t *len);

session :

resource :

row :

column_num :

value :

len :

Returns :


preludedb_plugin_sql_set_get_operator_string_func ()

void                preludedb_plugin_sql_set_get_operator_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_operator_string_func_t func);

plugin :

func :


preludedb_plugin_sql_close_func_t ()

void                (*preludedb_plugin_sql_close_func_t)
                                                        (void *session);

session :


preludedb_plugin_sql_build_time_constraint_string_func_t ()

int                 (*preludedb_plugin_sql_build_time_constraint_string_func_t)
                                                        (prelude_string_t *output,
                                                         const char *field,
                                                         preludedb_sql_time_constraint_type_t type,
                                                         idmef_criterion_operator_t operator,
                                                         int value,
                                                         int gmt_offset);

output :

field :

type :

operator :

value :

gmt_offset :

Returns :


preludedb_plugin_sql_escape_func_t ()

int                 (*preludedb_plugin_sql_escape_func_t)
                                                        (void *session,
                                                         const char *input,
                                                         size_t input_size,
                                                         char **output);

session :

input :

input_size :

output :

Returns :


preludedb_plugin_sql_fetch_row_func_t ()

int                 (*preludedb_plugin_sql_fetch_row_func_t)
                                                        (void *session,
                                                         void *resource,
                                                         void **row);

session :

resource :

row :

Returns :


preludedb_plugin_sql_new ()

int                 preludedb_plugin_sql_new            (preludedb_plugin_sql_t **plugin);

plugin :

Returns :


preludedb_plugin_sql_set_open_func ()

void                preludedb_plugin_sql_set_open_func  (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_open_func_t func);

plugin :

func :


preludedb_plugin_sql_set_close_func ()

void                preludedb_plugin_sql_set_close_func (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_close_func_t func);

plugin :

func :


preludedb_plugin_sql_set_escape_func ()

void                preludedb_plugin_sql_set_escape_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_escape_func_t func);

plugin :

func :


preludedb_plugin_sql_set_escape_binary_func ()

void                preludedb_plugin_sql_set_escape_binary_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_escape_binary_func_t func);

plugin :

func :


preludedb_plugin_sql_set_unescape_binary_func ()

void                preludedb_plugin_sql_set_unescape_binary_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_unescape_binary_func_t func);

plugin :

func :


preludedb_plugin_sql_set_query_func ()

void                preludedb_plugin_sql_set_query_func (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_query_func_t func);

plugin :

func :


preludedb_plugin_sql_set_get_column_count_func ()

void                preludedb_plugin_sql_set_get_column_count_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_count_func_t func);

plugin :

func :


preludedb_plugin_sql_set_get_row_count_func ()

void                preludedb_plugin_sql_set_get_row_count_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_row_count_func_t func);

plugin :

func :


preludedb_plugin_sql_set_get_column_name_func ()

void                preludedb_plugin_sql_set_get_column_name_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_name_func_t func);

plugin :

func :


preludedb_plugin_sql_set_get_column_num_func ()

void                preludedb_plugin_sql_set_get_column_num_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_get_column_num_func_t func);

plugin :

func :


preludedb_plugin_sql_set_resource_destroy_func ()

void                preludedb_plugin_sql_set_resource_destroy_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_resource_destroy_func_t func);

plugin :

func :


preludedb_plugin_sql_set_fetch_row_func ()

void                preludedb_plugin_sql_set_fetch_row_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_fetch_row_func_t func);

plugin :

func :


preludedb_plugin_sql_set_fetch_field_func ()

void                preludedb_plugin_sql_set_fetch_field_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_fetch_field_func_t func);

plugin :

func :


preludedb_plugin_sql_set_build_time_constraint_string_func ()

void                preludedb_plugin_sql_set_build_time_constraint_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_time_constraint_string_func_t func);

plugin :

func :


preludedb_plugin_sql_set_build_time_interval_string_func ()

void                preludedb_plugin_sql_set_build_time_interval_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_time_interval_string_func_t func);

plugin :

func :


preludedb_plugin_sql_set_build_limit_offset_string_func ()

void                preludedb_plugin_sql_set_build_limit_offset_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_limit_offset_string_func_t func);

plugin :

func :


preludedb_plugin_sql_set_build_constraint_string_func ()

void                preludedb_plugin_sql_set_build_constraint_string_func
                                                        (preludedb_plugin_sql_t *plugin,
                                                         preludedb_plugin_sql_build_constraint_string_func_t func);

plugin :

func :

libpreludedb-1.0.0/docs/Makefile.am0000664000076400007640000000006611226653036014072 00000000000000SUBDIRS = api manpages -include $(top_srcdir)/git.mk libpreludedb-1.0.0/docs/Makefile.in0000664000076400007640000007145211347715642014120 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = api manpages all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/docs/manpages/0000775000076400007640000000000011347715761013717 500000000000000libpreludedb-1.0.0/docs/manpages/Makefile.am0000664000076400007640000000010111226653036015653 00000000000000dist_man_MANS = preludedb-admin.1 -include $(top_srcdir)/git.mk libpreludedb-1.0.0/docs/manpages/Makefile.in0000664000076400007640000006237311347715642015715 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = docs/manpages DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = preludedb-admin.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/manpages/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/manpages/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | 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,^[^1][0-9a-z]*$$,1,;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)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$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)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @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)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-man1 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-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/docs/manpages/preludedb-admin.10000664000076400007640000000571611226653036016756 00000000000000.TH Prelude "1" "June 2007" "preludedb-admin" "User Commands" .SH NAME preludedb-admin \- tool to copy, move, delete, save or restore a prelude database .SH SYNOPSIS .B preludedb-admin \fIcopy|move|delete|load|save\fR \fIarguments\fR .SH DESCRIPTION .\" Add any additional description here .PP preludedb-admin can be used to copy, move, delete, save or restore a prelude database, partly or in whole, while preserving IDMEF data consistency. .PP Mandatory arguments .TP \fBcopy\fR Make a copy of a Prelude database to another database. .TP \fBdelete\fR Delete content of a Prelude database. .TP \fBload\fR Load a Prelude database from a file. .TP \fBmove\fR Move content of a Prelude database to another database. .TP \fBsave\fR Save a Prelude database to a file. .PP Running a command without providing arguments will display a detailed help. .SH EXAMPLES Obtaining help on a specific command: .RS .nf # preludedb-admin save Usage : save [options] Example: preludedb-admin save alert "type=mysql name=dbname user=prelude" outputfile Save messages from into [filename]. If no filename argument is provided, data will be written to standard output. Database arguments: type : Type of database (mysql/pgsql). name : Name of the database. user : User to access the database. pass : Password to access the database. Valid options: --offset : Skip processing until 'offset' events. --count : Process at most count events. --query-logging [filename] : Log SQL query to the specified file. --criteria : Only process events matching criteria. --events-per-transaction : Maximum number of event to process per transaction (default 1000). .fi .RE Preludedb-admin can be useful to delete events from a prelude database : .RS .nf preludedb-admin delete alert --criteria "type= name= user= pass=" .fi .RE where \fIcriteria\fR is an IDMEF criteria : .RS .nf preludedb-admin delete alert --criteria "alert.classification.text == 'UDP packet dropped'" "type=mysql name=prelude user=prelude-user pass=prelude-pass" .fi .RE This will delete all event with the classification text "UDP packet dropped" from the database. .SH SEE ALSO The Prelude Handbook: \fIhttps://trac.prelude-ids.org/wiki/PreludeHandbook\fR .P Prelude homepage: \fIhttp://www.prelude-ids.com/\fR .P Creating filter using IDMEF Criteria: \fIhttps://trac.prelude-ids.org/wiki/IDMEFCriteria\fR .P Prelude IDMEF Path: \fIhttps://trac.prelude-ids.org/wiki/IDMEFPath\fR .SH BUGS To report a bug, please visit \fIhttps://trac.prelude-ids.org/\fR .SH AUTHOR This manpage was Written by Pierre Chifflier. .SH COPYRIGHT Copyright \(co 2006 PreludeIDS Technologies. .br This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. libpreludedb-1.0.0/bindings/0000775000076400007640000000000011347715761012771 500000000000000libpreludedb-1.0.0/bindings/perl/0000775000076400007640000000000011347715761013733 500000000000000libpreludedb-1.0.0/bindings/perl/Makefile.PL.in0000664000076400007640000000273211226653036016226 00000000000000use Config; use ExtUtils::MakeMaker; use ExtUtils::MM_Unix; use File::Copy; use Cwd "abs_path"; my %attributs = (NAME => 'PreludeDB', INC => '-I@top_srcdir@/src/include @LIBPRELUDE_CFLAGS@ @LIBPRELUDE_PTHREAD_CFLAGS@', LIBS => ["-L@top_builddir@/src/.libs -lpreludedb", "-L$ENV{LIBDIR} -lpreludedb @LIBPRELUDE_LIBS@" ], LDDLFLAGS => "@LIBPRELUDE_LDFLAGS@ @LIBPRELUDE_PTHREAD_CFLAGS@ $Config{lddlflags}"); if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) { foreach my $filename ( qw/PreludeDB.c PreludeDB.pm/ ) { my $src = "@top_srcdir@/bindings/perl/$filename"; my $dst = "@top_builddir@/bindings/perl/$filename"; copy($src, $dst) if ( ! -e $dst ); } $attributs{"clean"} = {FILES => join(" ", map { "@top_builddir@/bindings/perl/$_" } qw/PreludeDB.c PreludeDB.pm Makefile/)}; } if ( -w $Config{"sitelib"} ) { $attributs{"INSTALLDIRS"} = "site"; } else { $attributs{"PREFIX"} = "@prefix@"; } WriteMakefile(%attributs); my($atime, $mtime) = (stat "Makefile.PL")[8,9]; utime($atime + 1, $mtime + 1, "Makefile"); package MY; sub install { my $str = shift->SUPER::install(@_); my @files = ((map { "\$(INSTALLSITEARCH)/$_" } qw/perllocal.pod PreludeDB.pm/), (map { "\$(INSTALLSITEARCH)/auto/PreludeDB/$_" } qw/PreludeDB.bs PreludeDB.so .packlist/), '$(INSTALLMAN3DIR)/PreludeDB.$(MAN3EXT)'); $str =~ s/(uninstall_from_sitedirs.+)\n.+\n/"$1\n\t\$(RM_F) " . join(" ", @files) . "\n"/e; return $str; } libpreludedb-1.0.0/bindings/perl/PreludeDB.pm0000644000076400007640000000161610610524746016012 00000000000000# Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the libpreludedb program. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. require XSLoader; XSLoader::load('PreludeDB'); libpreludedb-1.0.0/bindings/perl/PreludeDB.c0000664000076400007640000066742411326011532015626 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPERL #define SWIG_CASTRANK_MODE /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #ifdef __cplusplus /* Needed on some windows machines---since MS plays funny games with the header files under C++ */ #include #include extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ #ifndef PERL_REVISION # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) # define PERL_PATCHLEVEL_H_IMPLICIT # include # endif # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) # include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION # endif #endif #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) #define PerlIO_exportFILE(fh,fl) (FILE*)(fh) #endif #ifndef SvIOK_UV # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) #endif #ifndef SvUOK # define SvUOK(sv) SvIOK_UV(sv) #endif #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) # define PL_sv_undef sv_undef # define PL_na na # define PL_errgv errgv # define PL_sv_no sv_no # define PL_sv_yes sv_yes # define PL_markstack_ptr markstack_ptr #endif #ifndef IVSIZE # ifdef LONGSIZE # define IVSIZE LONGSIZE # else # define IVSIZE 4 /* A bold guess, but the best we can make. */ # endif #endif #ifndef INT2PTR # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) # else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) # endif # define NUM2PTR(any,d) (any)(PTRV)(d) # define PTR2IV(p) INT2PTR(IV,p) # define PTR2UV(p) INT2PTR(UV,p) # define PTR2NV(p) NUM2PTR(NV,p) # if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif #endif /* !INT2PTR */ #ifndef SvPV_nolen # define SvPV_nolen(x) SvPV(x,PL_na) #endif #ifndef get_sv # define get_sv perl_get_sv #endif #ifndef ERRSV # define ERRSV get_sv("@",FALSE) #endif #ifndef pTHX_ #define pTHX_ #endif #include #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGINTERN const char* SWIG_Perl_ErrorType(int code) { const char* type = 0; switch(code) { case SWIG_MemoryError: type = "MemoryError"; break; case SWIG_IOError: type = "IOError"; break; case SWIG_RuntimeError: type = "RuntimeError"; break; case SWIG_IndexError: type = "IndexError"; break; case SWIG_TypeError: type = "TypeError"; break; case SWIG_DivisionByZero: type = "ZeroDivisionError"; break; case SWIG_OverflowError: type = "OverflowError"; break; case SWIG_SyntaxError: type = "SyntaxError"; break; case SWIG_ValueError: type = "ValueError"; break; case SWIG_SystemError: type = "SystemError"; break; case SWIG_AttributeError: type = "AttributeError"; break; default: type = "RuntimeError"; } return type; } /* ----------------------------------------------------------------------------- * perlrun.swg * * This file contains the runtime support for Perl modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ #ifdef PERL_OBJECT #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), #define SWIG_PERL_OBJECT_CALL pPerl, #else #define SWIG_PERL_OBJECT_DECL #define SWIG_PERL_OBJECT_CALL #endif /* Common SWIG API */ /* for raw pointers */ #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) /* for raw packed data */ #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Perl-specific SWIG API */ #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #ifdef __cplusplus extern "C" { #endif #define SWIG_OWNER SWIG_POINTER_OWN #define SWIG_SHADOW SWIG_OWNER << 1 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL /* SWIG Perl macros */ /* Macro to declare an XS function */ #ifndef XSPROTO # define XSPROTO(name) void name(pTHX_ CV* cv) #endif /* Macro to call an XS function */ #ifdef PERL_OBJECT # define SWIG_CALLXS(_name) _name(cv,pPerl) #else # ifndef MULTIPLICITY # define SWIG_CALLXS(_name) _name(cv) # else # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) # endif #endif #ifdef PERL_OBJECT #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; #ifdef __cplusplus extern "C" { #endif typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #define SWIGCLASS_STATIC #else /* PERL_OBJECT */ #define MAGIC_PPERL #define SWIGCLASS_STATIC static SWIGUNUSED #ifndef MULTIPLICITY #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #ifdef __cplusplus extern "C" { #endif typedef int (*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif #else /* MULTIPLICITY */ #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) #ifdef __cplusplus extern "C" { #endif typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); #ifdef __cplusplus } #endif #endif /* MULTIPLICITY */ #endif /* PERL_OBJECT */ /* Workaround for bug in perl 5.6.x croak and earlier */ #if (PERL_VERSION < 8) # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) static void SWIG_Perl_croak_null(CPerlObj *pPerl) # else static void SWIG_croak_null() # endif { SV *err=ERRSV; # if (PERL_VERSION < 6) croak("%_", err); # else if (SvOK(err) && !SvROK(err)) croak("%_", err); croak(Nullch); # endif } #else # define SWIG_croak_null() croak(Nullch) #endif /* Define how strict is the cast between strings and integers/doubles when overloading between these types occurs. The default is making it as strict as possible by using SWIG_AddCast when needed. You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to disable the SWIG_AddCast, making the casting between string and numbers less strict. In the end, we try to solve the overloading between strings and numerical types in the more natural way, but if you can avoid it, well, avoid it using %rename, for example. */ #ifndef SWIG_PERL_NO_STRICT_STR2NUM # ifndef SWIG_PERL_STRICT_STR2NUM # define SWIG_PERL_STRICT_STR2NUM # endif #endif #ifdef SWIG_PERL_STRICT_STR2NUM /* string takes precedence */ #define SWIG_Str2NumCast(x) SWIG_AddCast(x) #else /* number takes precedence */ #define SWIG_Str2NumCast(x) x #endif #include SWIGRUNTIME const char * SWIG_Perl_TypeProxyName(const swig_type_info *type) { if (!type) return NULL; if (type->clientdata != NULL) { return (const char*) type->clientdata; } else { return type->name; } } /* Identical to SWIG_TypeCheck, except for strcmp comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Function for getting a pointer value */ SWIGRUNTIME int SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { swig_cast_info *tc; void *voidptr = (void *)0; SV *tsv = 0; if (own) *own = 0; /* If magical, apply more magic */ if (SvGMAGICAL(sv)) mg_get(sv); /* Check to see if this is an object */ if (sv_isobject(sv)) { IV tmp = 0; tsv = (SV*) SvRV(sv); if ((SvTYPE(tsv) == SVt_PVHV)) { MAGIC *mg; if (SvMAGICAL(tsv)) { mg = mg_find(tsv,'P'); if (mg) { sv = mg->mg_obj; if (sv_isobject(sv)) { tsv = (SV*)SvRV(sv); tmp = SvIV(tsv); } } } else { return SWIG_ERROR; } } else { tmp = SvIV(tsv); } voidptr = INT2PTR(void *,tmp); } else if (! SvOK(sv)) { /* Check for undef */ *(ptr) = (void *) 0; return SWIG_OK; } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ if (!SvROK(sv)) { *(ptr) = (void *) 0; return SWIG_OK; } else { return SWIG_ERROR; } } else { /* Don't know what it is */ return SWIG_ERROR; } if (_t) { /* Now see if the types match */ char *_c = HvNAME(SvSTASH(SvRV(sv))); tc = SWIG_TypeProxyCheck(_c,_t); if (!tc) { return SWIG_ERROR; } { int newmemory = 0; *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } } else { *ptr = voidptr; } /* * DISOWN implementation: we need a perl guru to check this one. */ if (tsv && (flags & SWIG_POINTER_DISOWN)) { /* * almost copy paste code from below SWIG_POINTER_OWN setting */ SV *obj = sv; HV *stash = SvSTASH(SvRV(obj)); GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); if (isGV(gv)) { HV *hv = GvHVn(gv); /* * To set ownership (see below), a newSViv(1) entry is added. * Hence, to remove ownership, we delete the entry. */ if (hv_exists_ent(hv, obj, 0)) { hv_delete_ent(hv, obj, 0, 0); } } } return SWIG_OK; } SWIGRUNTIME int SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); } SWIGRUNTIME void SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { SV *self; SV *obj=newSV(0); HV *hash=newHV(); HV *stash; sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); stash=SvSTASH(SvRV(obj)); if (flags & SWIG_POINTER_OWN) { HV *hv; GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); if (!isGV(gv)) gv_init(gv, stash, "OWNER", 5, FALSE); hv=GvHVn(gv); hv_store_ent(hv, obj, newSViv(1), 0); } sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); SvREFCNT_dec(obj); self=newRV_noinc((SV *)hash); sv_setsv(sv, self); SvREFCNT_dec((SV *)self); sv_bless(sv, stash); } else { sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); } } SWIGRUNTIMEINLINE SV * SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { SV *result = sv_newmortal(); SWIG_MakePtr(result, ptr, t, flags); return result; } SWIGRUNTIME void SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); strcpy(r,SWIG_Perl_TypeProxyName(type)); sv_setpv(sv, result); } SWIGRUNTIME SV * SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { SV *result = sv_newmortal(); SWIG_Perl_MakePackedObj(result, ptr, sz, type); return result; } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c = 0; if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; c = SvPV_nolen(obj); /* Pointer values must start with leading underscore */ if (*c != '_') return SWIG_ERROR; c++; c = SWIG_UnpackData(c,ptr,sz); if (ty) { tc = SWIG_TypeCheck(c,ty); if (!tc) return SWIG_ERROR; } return SWIG_OK; } /* Macros for low-level exception handling */ #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } typedef XSPROTO(SwigPerlWrapper); typedef SwigPerlWrapper *SwigPerlWrapperPtr; /* Structure for command table */ typedef struct { const char *name; SwigPerlWrapperPtr wrapper; } swig_command_info; /* Information for constant table */ #define SWIG_INT 1 #define SWIG_FLOAT 2 #define SWIG_STRING 3 #define SWIG_POINTER 4 #define SWIG_BINARY 5 /* Constant information structure */ typedef struct swig_constant_info { int type; const char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_constant_info; /* Structure for variable table */ typedef struct { const char *name; SwigMagicFunc set; SwigMagicFunc get; swig_type_info **type; } swig_variable_info; /* Magic variable code */ #ifndef PERL_OBJECT #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) #ifndef MULTIPLICITY SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) #else SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) #endif #else # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) #endif { MAGIC *mg; sv_magic(sv,sv,'U',(char *) name,strlen(name)); mg = mg_find(sv,'U'); mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); mg->mg_virtual->svt_get = (SwigMagicFunc) get; mg->mg_virtual->svt_set = (SwigMagicFunc) set; mg->mg_virtual->svt_len = 0; mg->mg_virtual->svt_clear = 0; mg->mg_virtual->svt_free = 0; } SWIGRUNTIME swig_module_info * SWIG_Perl_GetModule(void) { static void *type_pointer = (void *)0; SV *pointer; /* first check if pointer already created */ if (!type_pointer) { pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); if (pointer && SvOK(pointer)) { type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); } } return (swig_module_info *) type_pointer; } SWIGRUNTIME void SWIG_Perl_SetModule(swig_module_info *module) { SV *pointer; /* create a new pointer */ pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); sv_setiv(pointer, PTR2IV(module)); } #ifdef __cplusplus } #endif /* Workaround perl5 global namespace pollution. Note that undefining library * functions like fopen will not solve the problem on all platforms as fopen * might be a macro on Windows but not necessarily on other operating systems. */ #ifdef do_open #undef do_open #endif #ifdef do_close #undef do_close #endif #ifdef do_exec #undef do_exec #endif #ifdef scalar #undef scalar #endif #ifdef list #undef list #endif #ifdef apply #undef apply #endif #ifdef convert #undef convert #endif #ifdef Error #undef Error #endif #ifdef form #undef form #endif #ifdef vform #undef vform #endif #ifdef LABEL #undef LABEL #endif #ifdef METHOD #undef METHOD #endif #ifdef Move #undef Move #endif #ifdef yylex #undef yylex #endif #ifdef yyparse #undef yyparse #endif #ifdef yyerror #undef yyerror #endif #ifdef invert #undef invert #endif #ifdef ref #undef ref #endif #ifdef read #undef read #endif #ifdef write #undef write #endif #ifdef eof #undef eof #endif #ifdef bool #undef bool #endif #ifdef close #undef close #endif #ifdef rewind #undef rewind #endif #ifdef free #undef free #endif #ifdef malloc #undef malloc #endif #ifdef calloc #undef calloc #endif #ifdef Stat #undef Stat #endif #ifdef check #undef check #endif #ifdef seekdir #undef seekdir #endif #ifdef open #undef open #endif #ifdef readdir #undef readdir #endif #ifdef bind #undef bind #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_double swig_types[1] #define SWIGTYPE_p_float swig_types[2] #define SWIGTYPE_p_idmef_criteria swig_types[3] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[4] #define SWIGTYPE_p_idmef_criterion_value swig_types[5] #define SWIGTYPE_p_idmef_message swig_types[6] #define SWIGTYPE_p_idmef_path swig_types[7] #define SWIGTYPE_p_idmef_time swig_types[8] #define SWIGTYPE_p_idmef_value swig_types[9] #define SWIGTYPE_p_int swig_types[10] #define SWIGTYPE_p_int16_t swig_types[11] #define SWIGTYPE_p_int8_t swig_types[12] #define SWIGTYPE_p_long_long swig_types[13] #define SWIGTYPE_p_p_char swig_types[14] #define SWIGTYPE_p_p_idmef_message swig_types[15] #define SWIGTYPE_p_p_p_idmef_value swig_types[16] #define SWIGTYPE_p_p_preludedb swig_types[17] #define SWIGTYPE_p_p_preludedb_path_selection swig_types[18] #define SWIGTYPE_p_p_preludedb_result_idents swig_types[19] #define SWIGTYPE_p_p_preludedb_result_values swig_types[20] #define SWIGTYPE_p_p_preludedb_selected_path swig_types[21] #define SWIGTYPE_p_p_preludedb_sql swig_types[22] #define SWIGTYPE_p_p_preludedb_sql_field swig_types[23] #define SWIGTYPE_p_p_preludedb_sql_row swig_types[24] #define SWIGTYPE_p_p_preludedb_sql_settings swig_types[25] #define SWIGTYPE_p_p_preludedb_sql_table swig_types[26] #define SWIGTYPE_p_p_unsigned_char swig_types[27] #define SWIGTYPE_p_prelude_bool_t swig_types[28] #define SWIGTYPE_p_prelude_string swig_types[29] #define SWIGTYPE_p_preludedb swig_types[30] #define SWIGTYPE_p_preludedb_error_code_t swig_types[31] #define SWIGTYPE_p_preludedb_path_selection swig_types[32] #define SWIGTYPE_p_preludedb_result_idents swig_types[33] #define SWIGTYPE_p_preludedb_result_idents_order_t swig_types[34] #define SWIGTYPE_p_preludedb_result_values swig_types[35] #define SWIGTYPE_p_preludedb_selected_path swig_types[36] #define SWIGTYPE_p_preludedb_selected_path_flags_t swig_types[37] #define SWIGTYPE_p_preludedb_sql swig_types[38] #define SWIGTYPE_p_preludedb_sql_field swig_types[39] #define SWIGTYPE_p_preludedb_sql_row swig_types[40] #define SWIGTYPE_p_preludedb_sql_settings swig_types[41] #define SWIGTYPE_p_preludedb_sql_table swig_types[42] #define SWIGTYPE_p_preludedb_sql_time_constraint_type_t swig_types[43] #define SWIGTYPE_p_size_t swig_types[44] #define SWIGTYPE_p_ssize_t swig_types[45] #define SWIGTYPE_p_uint16_t swig_types[46] #define SWIGTYPE_p_uint8_t swig_types[47] #define SWIGTYPE_p_unsigned_char swig_types[48] #define SWIGTYPE_p_unsigned_int swig_types[49] #define SWIGTYPE_p_unsigned_long_long swig_types[50] static swig_type_info *swig_types[52]; static swig_module_info swig_module = {swig_types, 51, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init boot_PreludeDB #define SWIG_name "PreludeDB::boot_PreludeDB" #define SWIG_prefix "PreludeDB::" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #ifdef __cplusplus extern "C" #endif #ifndef PERL_OBJECT #ifndef MULTIPLICITY SWIGEXPORT void SWIG_init (CV* cv); #else SWIGEXPORT void SWIG_init (pTHXo_ CV* cv); #endif #else SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); #endif #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #include "preludedb-version.h" #include SWIGINTERNINLINE SV * SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) { SV *obj = sv_newmortal(); sv_setiv(obj, (IV) value); return obj; } SWIGINTERNINLINE SV * SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) { return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { SV *obj = sv_newmortal(); if (carray) { sv_setpvn(obj, carray, size); } else { sv_setsv(obj, &PL_sv_undef); } return obj; } SWIGINTERNINLINE SV * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc) { if (SvMAGICAL(obj)) { SV *tmp = sv_newmortal(); SvSetSV(tmp, obj); obj = tmp; } if (SvPOK(obj)) { STRLEN len = 0; char *cstr = SvPV(obj, len); size_t size = len + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } } if (psize) *psize = size; return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { char* vptr = 0; if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = vptr; if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) { if (SvNIOK(obj)) { if (val) *val = SvNV(obj); return SWIG_OK; } else if (SvIOK(obj)) { if (val) *val = (double) SvIV(obj); return SWIG_AddCast(SWIG_OK); } else { const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; double v = strtod(nptr, &endptr); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } } return SWIG_TypeError; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) { if (SvIOK(obj)) { if (val) *val = SvIV(obj); return SWIG_OK; } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; long v; errno = 0; v = strtol(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val) { long v; int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (int)(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) { if (SvUOK(obj)) { if (val) *val = SvUV(obj); return SWIG_OK; } else if (SvIOK(obj)) { long v = SvIV(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; unsigned long v; errno = 0; v = strtoul(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = (size_t)(v); return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned int)(v); } } return res; } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) { SV *obj = sv_newmortal(); sv_setuv(obj, (UV) value); return obj; } SWIGINTERNINLINE SV * SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERNINLINE SV * SWIG_From_size_t SWIG_PERL_DECL_ARGS_1(size_t value) { return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long)(value)); } #include #ifdef _MSC_VER # ifndef strtoull # define strtoull _strtoui64 # endif # ifndef strtoll # define strtoll _strtoi64 # endif #endif SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val) { if (SvUOK(obj)) { if (val) *val = SvUV(obj); return SWIG_OK; } else if (SvIOK(obj)) { long v = SvIV(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; unsigned long long v; errno = 0; v = strtoull(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; return SWIG_Str2NumCast(SWIG_OK); } } } if (!dispatch) { const double mant_max = 1LL << DBL_MANT_DIG; double d; int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return res; } } } return SWIG_TypeError; } #ifdef __cplusplus extern "C" { #endif #ifdef PERL_OBJECT #define MAGIC_CLASS _wrap_PreludeDB_var:: class _wrap_PreludeDB_var : public CPerlObj { public: #else #define MAGIC_CLASS #endif SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) { MAGIC_PPERL croak("Value is read-only."); return 0; } #ifdef PERL_OBJECT }; #endif #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif XS(_wrap_preludedb_sql_settings_new) { { preludedb_sql_settings_t **arg1 = (preludedb_sql_settings_t **) 0 ; preludedb_sql_settings_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_new(settings);"); } { arg1 = (preludedb_sql_settings_t **) &tmp1; } _saved[0] = ST(0); result = (int)preludedb_sql_settings_new(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql_settings, 0)); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_new_from_string) { { preludedb_sql_settings_t **arg1 = (preludedb_sql_settings_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_settings_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_new_from_string(settings,str);"); } { arg1 = (preludedb_sql_settings_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_new_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)preludedb_sql_settings_new_from_string(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql_settings, 0)); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_destroy) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_destroy(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } preludedb_sql_settings_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_settings_set(settings,name,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_settings_set" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); result = (int)preludedb_sql_settings_set(arg1,(char const *)arg2,(char const *)arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_from_string) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_from_string(settings,str);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_from_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_from_string(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_get(settings,name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_get" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (char *)preludedb_sql_settings_get((struct preludedb_sql_settings const *)arg1,(char const *)arg2); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_host) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_host(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_host" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_host(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_host) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_host(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_host((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_port) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_port(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_port" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_port(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_port) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_port(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_port((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_name) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_name(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_name" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_name(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_name) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_name(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_name((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_user) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_user(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_user" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_user(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_user) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_user(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_user((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_pass) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_pass(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_pass" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_pass(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_pass) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_pass(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_pass((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_log) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_log(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_log" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_log(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_log) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_log(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_log((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_type) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_type(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_type" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_type(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_type) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_type(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_type((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_set_file) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_settings_set_file(settings,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_settings_set_file" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_settings_set_file(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_settings_get_file) { { preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_settings_get_file(settings);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } result = (char *)preludedb_sql_settings_get_file((struct preludedb_sql_settings const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_new) { { preludedb_sql_t **arg1 = (preludedb_sql_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_settings_t *arg3 = (preludedb_sql_settings_t *) 0 ; preludedb_sql_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_new(new,type,settings);"); } { arg1 = (preludedb_sql_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_new" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { if ( ! SvROK(ST(2)) ) { croak("Argument 3 is null."); return; } if ( SWIG_ConvertPtr(ST(2), (void **)&arg3, SWIGTYPE_p_preludedb_sql_settings, 0) ) return; } _saved[0] = ST(0); result = (int)preludedb_sql_new(arg1,(char const *)arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql, 0)); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_destroy) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_destroy(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } preludedb_sql_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_enable_query_logging) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_enable_query_logging(sql,filename);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_enable_query_logging" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_enable_query_logging(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_disable_query_logging) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_disable_query_logging(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } preludedb_sql_disable_query_logging(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_query) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_table_t **arg3 = (preludedb_sql_table_t **) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; preludedb_sql_table_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_query(sql,query,table);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_query" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { arg3 = (preludedb_sql_table_t **) &tmp3; } _saved[0] = ST(2); result = (int)preludedb_sql_query(arg1,(char const *)arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_table, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_query_sprintf) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; preludedb_sql_table_t **arg2 = (preludedb_sql_table_t **) 0 ; char *arg3 = (char *) 0 ; void *arg4 = 0 ; preludedb_sql_table_t *tmp2 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if (items < 3) { SWIG_croak("Usage: preludedb_sql_query_sprintf(sql,table,format,...);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } { arg2 = (preludedb_sql_table_t **) &tmp2; } res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_query_sprintf" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); _saved[0] = ST(1); result = (int)preludedb_sql_query_sprintf(arg1,arg2,(char const *)arg3,arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_preludedb_sql_table, 0)); } } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_insert) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; void *arg5 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; int result; dXSARGS; if (items < 4) { SWIG_croak("Usage: preludedb_sql_insert(sql,table,fields,format,...);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_insert" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_insert" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_sql_insert" "', argument " "4"" of type '" "char const *""'"); } arg4 = (char *)(buf4); result = (int)preludedb_sql_insert(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_build_limit_offset_string) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int arg2 ; int arg3 ; prelude_string_t *arg4 = (prelude_string_t *) 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: preludedb_sql_build_limit_offset_string(sql,limit,offset,output);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_build_limit_offset_string" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_build_limit_offset_string" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { int ret; ret = prelude_string_new(&(arg4)); if ( ret < 0 ) croak("%s", prelude_strerror(ret)); } _saved[0] = ST(3); result = (int)preludedb_sql_build_limit_offset_string(arg1,arg2,arg3,arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { sv_setsv(SvRV(_saved[0]), newSVpv(prelude_string_get_string(arg4), 0)); prelude_string_destroy(arg4); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_transaction_start) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_transaction_start(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } result = (int)preludedb_sql_transaction_start(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_transaction_end) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_transaction_end(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } result = (int)preludedb_sql_transaction_end(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_transaction_abort) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_transaction_abort(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } result = (int)preludedb_sql_transaction_abort(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_escape_fast) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; char **arg4 = (char **) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; char *tmp4 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: preludedb_sql_escape_fast(sql,input,input_size,output);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_escape_fast" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_escape_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { arg4 = &tmp4; } _saved[0] = ST(3); result = (int)preludedb_sql_escape_fast(arg1,(char const *)arg2,arg3,arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi)) < 0 ) croak("%s", prelude_strerror(SvIV(ST(argvi)))); sv_setsv(SvRV(_saved[0]), sv_2mortal(newSVpv(*arg4, 0))); free(*arg4); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_escape) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; char **arg3 = (char **) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; char *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_escape(sql,input,output);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_escape" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { arg3 = &tmp3; } _saved[0] = ST(2); result = (int)preludedb_sql_escape(arg1,(char const *)arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi)) < 0 ) croak("%s", prelude_strerror(SvIV(ST(argvi)))); sv_setsv(SvRV(_saved[0]), sv_2mortal(newSVpv(*arg3, 0))); free(*arg3); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_escape_binary) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; char **arg4 = (char **) 0 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; char *tmp4 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: preludedb_sql_escape_binary(sql,input,input_size,output);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_escape_binary" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_escape_binary" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { arg4 = &tmp4; } _saved[0] = ST(3); result = (int)preludedb_sql_escape_binary(arg1,(unsigned char const *)arg2,arg3,arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi)) < 0 ) croak("%s", prelude_strerror(SvIV(ST(argvi)))); sv_setsv(SvRV(_saved[0]), sv_2mortal(newSVpv(*arg4, 0))); free(*arg4); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_unescape_binary) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; unsigned char **arg4 = (unsigned char **) 0 ; size_t *arg5 = (size_t *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; size_t val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 5) || (items > 5)) { SWIG_croak("Usage: preludedb_sql_unescape_binary(sql,input,input_size,output,output_size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_unescape_binary" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_unescape_binary" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_sql_unescape_binary" "', argument " "4"" of type '" "unsigned char **""'"); } arg4 = (unsigned char **)(argp4); res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_size_t, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_unescape_binary" "', argument " "5"" of type '" "size_t *""'"); } arg5 = (size_t *)(argp5); result = (int)preludedb_sql_unescape_binary(arg1,(char const *)arg2,arg3,arg4,arg5); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_destroy) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_table_destroy(table);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } preludedb_sql_table_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_get_column_name) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_table_get_column_name(table,column_num);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_table_get_column_name" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); result = (char *)preludedb_sql_table_get_column_name(arg1,arg2); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_get_column_num) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_table_get_column_num(table,column_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_table_get_column_num" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_sql_table_get_column_num(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_get_column_count) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; int argvi = 0; unsigned int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_table_get_column_count(table);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } result = (unsigned int)preludedb_sql_table_get_column_count(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_get_row_count) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; int argvi = 0; unsigned int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_table_get_row_count(table);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } result = (unsigned int)preludedb_sql_table_get_row_count(arg1); ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_table_fetch_row) { { preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; preludedb_sql_row_t **arg2 = (preludedb_sql_row_t **) 0 ; preludedb_sql_row_t *tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_table_fetch_row(table,row);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, 0) ) return; } { arg2 = (preludedb_sql_row_t **) &tmp2; } _saved[0] = ST(1); result = (int)preludedb_sql_table_fetch_row(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_preludedb_sql_row, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_row_fetch_field) { { preludedb_sql_row_t *arg1 = (preludedb_sql_row_t *) 0 ; unsigned int arg2 ; preludedb_sql_field_t **arg3 = (preludedb_sql_field_t **) 0 ; unsigned int val2 ; int ecode2 = 0 ; preludedb_sql_field_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_row_fetch_field(row,column_num,field);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_row, 0) ) return; } ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_row_fetch_field" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { arg3 = (preludedb_sql_field_t **) &tmp3; } _saved[0] = ST(2); result = (int)preludedb_sql_row_fetch_field(arg1,arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_field, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_row_fetch_field_by_name) { { preludedb_sql_row_t *arg1 = (preludedb_sql_row_t *) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_field_t **arg3 = (preludedb_sql_field_t **) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; preludedb_sql_field_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_sql_row_fetch_field_by_name(row,column_name,field);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_row, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_row_fetch_field_by_name" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { arg3 = (preludedb_sql_field_t **) &tmp3; } _saved[0] = ST(2); result = (int)preludedb_sql_row_fetch_field_by_name(arg1,(char const *)arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_field, 0)); } } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_get_value) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_field_get_value(field);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } result = (char *)preludedb_sql_field_get_value(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_get_len) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int argvi = 0; size_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_field_get_len(field);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } result = preludedb_sql_field_get_len(arg1); ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_int8) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int8_t *arg2 = (int8_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_int8(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_int8_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int8" "', argument " "2"" of type '" "int8_t *""'"); } arg2 = (int8_t *)(argp2); result = (int)preludedb_sql_field_to_int8(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_uint8) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint8_t *arg2 = (uint8_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_uint8(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_uint8_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint8" "', argument " "2"" of type '" "uint8_t *""'"); } arg2 = (uint8_t *)(argp2); result = (int)preludedb_sql_field_to_uint8(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_int16) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int16_t *arg2 = (int16_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_int16(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_int16_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int16" "', argument " "2"" of type '" "int16_t *""'"); } arg2 = (int16_t *)(argp2); result = (int)preludedb_sql_field_to_int16(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_uint16) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint16_t *arg2 = (uint16_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_uint16(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_uint16_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint16" "', argument " "2"" of type '" "uint16_t *""'"); } arg2 = (uint16_t *)(argp2); result = (int)preludedb_sql_field_to_uint16(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_int32) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int32_t *arg2 = (int32_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_int32(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int32" "', argument " "2"" of type '" "int32_t *""'"); } arg2 = (int32_t *)(argp2); result = (int)preludedb_sql_field_to_int32(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_uint32) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint32_t *arg2 = (uint32_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_uint32(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint32" "', argument " "2"" of type '" "uint32_t *""'"); } arg2 = (uint32_t *)(argp2); result = (int)preludedb_sql_field_to_uint32(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_int64) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int64_t *arg2 = (int64_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_int64(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int64" "', argument " "2"" of type '" "int64_t *""'"); } arg2 = (int64_t *)(argp2); result = (int)preludedb_sql_field_to_int64(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_uint64) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_uint64(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint64" "', argument " "2"" of type '" "uint64_t *""'"); } arg2 = (uint64_t *)(argp2); result = (int)preludedb_sql_field_to_uint64(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_float) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; float *arg2 = (float *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_float(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_float, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_float" "', argument " "2"" of type '" "float *""'"); } arg2 = (float *)(argp2); result = (int)preludedb_sql_field_to_float(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_double) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; double *arg2 = (double *) 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_double(field,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_double, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_double" "', argument " "2"" of type '" "double *""'"); } arg2 = (double *)(argp2); result = (int)preludedb_sql_field_to_double(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_field_to_string) { { preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_sql_field_to_string(field,output);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, 0) ) return; } { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) croak("%s", prelude_strerror(ret)); } _saved[0] = ST(1); result = (int)preludedb_sql_field_to_string(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { sv_setsv(SvRV(_saved[0]), newSVpv(prelude_string_get_string(arg2), 0)); prelude_string_destroy(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_sql_build_criterion_string) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; char *arg3 = (char *) 0 ; idmef_criterion_operator_t arg4 ; idmef_criterion_value_t *arg5 = (idmef_criterion_value_t *) 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; void *argp4 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 5) || (items > 5)) { SWIG_croak("Usage: preludedb_sql_build_criterion_string(sql,output,field,operator,value);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) croak("%s", prelude_strerror(ret)); } res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_build_criterion_string" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); { res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_idmef_criterion_operator_t, 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_sql_build_criterion_string" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "preludedb_sql_build_criterion_string" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } else { arg4 = *((idmef_criterion_operator_t *)(argp4)); } } res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_idmef_criterion_value, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_build_criterion_string" "', argument " "5"" of type '" "idmef_criterion_value_t *""'"); } arg5 = (idmef_criterion_value_t *)(argp5); _saved[0] = ST(1); result = (int)preludedb_sql_build_criterion_string(arg1,arg2,(char const *)arg3,arg4,arg5); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { sv_setsv(SvRV(_saved[0]), newSVpv(prelude_string_get_string(arg2), 0)); prelude_string_destroy(arg2); } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_time_from_timestamp) { { idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; int32_t arg3 ; uint32_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; unsigned int val4 ; int ecode4 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: preludedb_sql_time_from_timestamp(time,time_buf,gmtoff,usec);"); } res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "1"" of type '" "idmef_time_t *""'"); } arg1 = (idmef_time_t *)(argp1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "3"" of type '" "int32_t""'"); } arg3 = (int32_t)(val3); ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "4"" of type '" "uint32_t""'"); } arg4 = (uint32_t)(val4); result = (int)preludedb_sql_time_from_timestamp(arg1,(char const *)arg2,arg3,arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_time_to_timestamp) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; char *arg3 = (char *) 0 ; size_t arg4 ; char *arg5 = (char *) 0 ; size_t arg6 ; char *arg7 = (char *) 0 ; size_t arg8 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; size_t val4 ; int ecode4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; size_t val6 ; int ecode6 = 0 ; int res7 ; char *buf7 = 0 ; int alloc7 = 0 ; size_t val8 ; int ecode8 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 8) || (items > 8)) { SWIG_croak("Usage: preludedb_sql_time_to_timestamp(sql,time,time_buf,time_buf_size,gmtoff_buf,gmtoff_buf_size,usec_buf,usec_buf_size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "2"" of type '" "idmef_time_t const *""'"); } arg2 = (idmef_time_t *)(argp2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "3"" of type '" "char *""'"); } arg3 = (char *)(buf3); ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "5"" of type '" "char *""'"); } arg5 = (char *)(buf5); ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "6"" of type '" "size_t""'"); } arg6 = (size_t)(val6); res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7); if (!SWIG_IsOK(res7)) { SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "7"" of type '" "char *""'"); } arg7 = (char *)(buf7); ecode8 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "8"" of type '" "size_t""'"); } arg8 = (size_t)(val8); result = (int)preludedb_sql_time_to_timestamp(arg1,(struct idmef_time const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc7 == SWIG_NEWOBJ) free((char*)buf7); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc7 == SWIG_NEWOBJ) free((char*)buf7); SWIG_croak_null(); } } XS(_wrap_preludedb_sql_get_plugin_error) { { preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_sql_get_plugin_error(sql);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_sql, 0) ) return; } result = (char *)preludedb_sql_get_plugin_error(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_init) { { int argvi = 0; int result; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: preludedb_init();"); } result = (int)preludedb_init(); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_deinit) { { int argvi = 0; dXSARGS; if ((items < 0) || (items > 0)) { SWIG_croak("Usage: preludedb_deinit();"); } preludedb_deinit(); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_new) { { preludedb_t **arg1 = (preludedb_t **) 0 ; preludedb_sql_t *arg2 = (preludedb_sql_t *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; size_t arg5 ; preludedb_t *tmp1 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; size_t val5 ; int ecode5 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 5) || (items > 5)) { SWIG_croak("Usage: preludedb_new(db,sql,format_name,errbuf,size);"); } { arg1 = (preludedb_t **) &tmp1; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_sql, 0) ) return; } res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_new" "', argument " "3"" of type '" "char const *""'"); } arg3 = (char *)(buf3); res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_new" "', argument " "4"" of type '" "char *""'"); } arg4 = (char *)(buf4); ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_new" "', argument " "5"" of type '" "size_t""'"); } arg5 = (size_t)(val5); _saved[0] = ST(0); result = (int)preludedb_new(arg1,arg2,(char const *)arg3,arg4,arg5); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb, 0)); } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); SWIG_croak_null(); } } XS(_wrap_preludedb_destroy) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_destroy(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } preludedb_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_format_name) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_get_format_name(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (char *)preludedb_get_format_name(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_format_version) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_get_format_version(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (char *)preludedb_get_format_version(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_set_format) { { preludedb_t *arg1 = (preludedb_t *) 0 ; char *arg2 = (char *) 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_set_format(db,format_name);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_set_format" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (int)preludedb_set_format(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_get_sql) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; preludedb_sql_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_get_sql(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (preludedb_sql_t *)preludedb_get_sql(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_preludedb_sql, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_result_idents_destroy) { { preludedb_result_idents_t *arg1 = (preludedb_result_idents_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_result_idents_destroy(result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_result_idents, 0) ) return; } preludedb_result_idents_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_result_idents_get_next) { { preludedb_result_idents_t *arg1 = (preludedb_result_idents_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; uint64_t tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_result_idents_get_next(result,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_result_idents, 0) ) return; } { arg2 = &tmp2; } _saved[0] = ST(1); result = (int)preludedb_result_idents_get_next(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi)) == 0 ) sv_setsv(SvRV(_saved[0]), &PL_sv_undef); else { sv_setsv(SvRV(_saved[0]), sv_2mortal(newSVpvf("%" PRELUDE_PRIu64, *arg2))); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_result_values_destroy) { { preludedb_result_values_t *arg1 = (preludedb_result_values_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_result_values_destroy(result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_result_values, 0) ) return; } preludedb_result_values_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_result_values_get_next) { { preludedb_result_values_t *arg1 = (preludedb_result_values_t *) 0 ; idmef_value_t ***arg2 = (idmef_value_t ***) 0 ; idmef_value_t **tmp2 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_result_values_get_next(result,values);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_result_values, 0) ) return; } { arg2 = &tmp2; } _saved[0] = ST(1); result = (int)preludedb_result_values_get_next(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { I32 len; unsigned int cnt; AV *av; if ( SvTYPE(SvRV(_saved[0])) != SVt_PVAV ) croak("want a reference to an array"); av = (AV *) SvRV(_saved[0]); len = av_len(av); for ( cnt = 0; cnt < len; cnt++ ) { av_push(av, SWIG_NewPointerObj((void *) (*arg2)[cnt], SWIGTYPE_p_idmef_value, 0)); } free(arg2); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_error) { { preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_error_t arg2 ; char *arg3 = (char *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; size_t val4 ; int ecode4 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 4) || (items > 4)) { SWIG_croak("Usage: preludedb_get_error(db,error,errbuf,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_get_error" "', argument " "2"" of type '" "preludedb_error_t""'"); } arg2 = (preludedb_error_t)(val2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_get_error" "', argument " "3"" of type '" "char *""'"); } arg3 = (char *)(buf3); ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_error" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); result = (char *)preludedb_get_error(arg1,arg2,arg3,arg4); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); XSRETURN(argvi); fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); SWIG_croak_null(); } } XS(_wrap_preludedb_insert_message) { { preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_insert_message(db,message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_idmef_message, 0) ) return; } result = (int)preludedb_insert_message(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_alert_idents) { { preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 6) || (items > 6)) { SWIG_croak("Usage: preludedb_get_alert_idents(db,criteria,limit,offset,order,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_alert_idents" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_alert_idents" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_alert_idents" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_alert_idents" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { arg6 = (preludedb_result_idents_t **) &tmp6; } _saved[0] = ST(5); result = (int)preludedb_get_alert_idents(arg1,arg2,arg3,arg4,arg5,arg6); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_heartbeat_idents) { { preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 6) || (items > 6)) { SWIG_croak("Usage: preludedb_get_heartbeat_idents(db,criteria,limit,offset,order,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_heartbeat_idents" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_heartbeat_idents" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_heartbeat_idents" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_heartbeat_idents" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { arg6 = (preludedb_result_idents_t **) &tmp6; } _saved[0] = ST(5); result = (int)preludedb_get_heartbeat_idents(arg1,arg2,arg3,arg4,arg5,arg6); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_alert) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; idmef_message_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_get_alert(db,ident,message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( SvIOK(ST(1)) ) { arg2 = (uint64_t) SvIV(ST(1)); } else { if ( sscanf(SvPV_nolen(ST(1)), "%" PRELUDE_PRIu64, &(arg2)) < 1 ) { croak("Argument %s is not an unsigned 64 bits integer\n", SvPV_nolen(ST(1))); } } } { arg3 = (idmef_message_t **) &tmp3; } _saved[0] = ST(2); result = (int)preludedb_get_alert(arg1,arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0)); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_heartbeat) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; idmef_message_t *tmp3 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_get_heartbeat(db,ident,message);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( SvIOK(ST(1)) ) { arg2 = (uint64_t) SvIV(ST(1)); } else { if ( sscanf(SvPV_nolen(ST(1)), "%" PRELUDE_PRIu64, &(arg2)) < 1 ) { croak("Argument %s is not an unsigned 64 bits integer\n", SvPV_nolen(ST(1))); } } } { arg3 = (idmef_message_t **) &tmp3; } _saved[0] = ST(2); result = (int)preludedb_get_heartbeat(arg1,arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0)); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_alert) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_delete_alert(db,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( SvIOK(ST(1)) ) { arg2 = (uint64_t) SvIV(ST(1)); } else { if ( sscanf(SvPV_nolen(ST(1)), "%" PRELUDE_PRIu64, &(arg2)) < 1 ) { croak("Argument %s is not an unsigned 64 bits integer\n", SvPV_nolen(ST(1))); } } } result = (int)preludedb_delete_alert(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_alert_from_list) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; ssize_t result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_delete_alert_from_list(db,idents,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_delete_alert_from_list" "', argument " "2"" of type '" "uint64_t *""'"); } arg2 = (uint64_t *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_delete_alert_from_list" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = preludedb_delete_alert_from_list(arg1,arg2,arg3); ST(argvi) = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_alert_from_result_idents) { { preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_result_idents_t *arg2 = (preludedb_result_idents_t *) 0 ; int argvi = 0; ssize_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_delete_alert_from_result_idents(db,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_result_idents, 0) ) return; } result = preludedb_delete_alert_from_result_idents(arg1,arg2); ST(argvi) = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_heartbeat) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; int argvi = 0; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_delete_heartbeat(db,ident);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( SvIOK(ST(1)) ) { arg2 = (uint64_t) SvIV(ST(1)); } else { if ( sscanf(SvPV_nolen(ST(1)), "%" PRELUDE_PRIu64, &(arg2)) < 1 ) { croak("Argument %s is not an unsigned 64 bits integer\n", SvPV_nolen(ST(1))); } } } result = (int)preludedb_delete_heartbeat(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_heartbeat_from_list) { { preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; size_t arg3 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; int argvi = 0; ssize_t result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_delete_heartbeat_from_list(db,idents,size);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_delete_heartbeat_from_list" "', argument " "2"" of type '" "uint64_t *""'"); } arg2 = (uint64_t *)(argp2); ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_delete_heartbeat_from_list" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); result = preludedb_delete_heartbeat_from_list(arg1,arg2,arg3); ST(argvi) = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_delete_heartbeat_from_result_idents) { { preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_result_idents_t *arg2 = (preludedb_result_idents_t *) 0 ; int argvi = 0; ssize_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_delete_heartbeat_from_result_idents(db,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_result_idents, 0) ) return; } result = preludedb_delete_heartbeat_from_result_idents(arg1,arg2); ST(argvi) = SWIG_NewPointerObj((ssize_t *)memcpy((ssize_t *)malloc(sizeof(ssize_t)),&result,sizeof(ssize_t)), SWIGTYPE_p_ssize_t, SWIG_POINTER_OWN | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_get_values) { { preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_path_selection_t *arg2 = (preludedb_path_selection_t *) 0 ; idmef_criteria_t *arg3 = (idmef_criteria_t *) 0 ; prelude_bool_t arg4 ; int arg5 ; int arg6 ; preludedb_result_values_t **arg7 = (preludedb_result_values_t **) 0 ; void *argp3 = 0 ; int res3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; preludedb_result_values_t *tmp7 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 7) || (items > 7)) { SWIG_croak("Usage: preludedb_get_values(db,path_selection,criteria,distinct,limit,offset,result);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_path_selection, 0) ) return; } res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_get_values" "', argument " "3"" of type '" "idmef_criteria_t *""'"); } arg3 = (idmef_criteria_t *)(argp3); ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_values" "', argument " "4"" of type '" "prelude_bool_t""'"); } arg4 = (prelude_bool_t)(val4); ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_values" "', argument " "5"" of type '" "int""'"); } arg5 = (int)(val5); ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "preludedb_get_values" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); { arg7 = (preludedb_result_values_t **) &tmp7; } _saved[0] = ST(6); result = (int)preludedb_get_values(arg1,arg2,arg3,arg4,arg5,arg6,arg7); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg7, SWIGTYPE_p_preludedb_result_values, 0)); } } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_transaction_start) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_transaction_start(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (int)preludedb_transaction_start(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_transaction_end) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_transaction_end(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (int)preludedb_transaction_end(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_transaction_abort) { { preludedb_t *arg1 = (preludedb_t *) 0 ; int argvi = 0; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_transaction_abort(db);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb, 0) ) return; } result = (int)preludedb_transaction_abort(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_error) { { preludedb_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; preludedb_error_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_error(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error" "', argument " "1"" of type '" "preludedb_error_code_t""'"); } arg1 = (preludedb_error_code_t)(val1); result = (preludedb_error_t)preludedb_error(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_error_verbose) { { preludedb_error_code_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; preludedb_error_t result; dXSARGS; if (items < 2) { SWIG_croak("Usage: preludedb_error_verbose(error,fmt,...);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_verbose" "', argument " "1"" of type '" "preludedb_error_code_t""'"); } arg1 = (preludedb_error_code_t)(val1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_error_verbose" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); result = (preludedb_error_t)preludedb_error_verbose(arg1,(char const *)arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_error_check) { { preludedb_error_t arg1 ; preludedb_error_code_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; prelude_bool_t result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_error_check(error,code);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_check" "', argument " "1"" of type '" "preludedb_error_t""'"); } arg1 = (preludedb_error_t)(val1); ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_error_check" "', argument " "2"" of type '" "preludedb_error_code_t""'"); } arg2 = (preludedb_error_code_t)(val2); result = (prelude_bool_t)preludedb_error_check(arg1,arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_error_from_errno) { { int arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; preludedb_error_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_error_from_errno(err);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); result = (preludedb_error_t)preludedb_error_from_errno(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_strerror) { { preludedb_error_t arg1 ; int val1 ; int ecode1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_strerror(error);"); } ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_strerror" "', argument " "1"" of type '" "preludedb_error_t""'"); } arg1 = (preludedb_error_t)(val1); result = (char *)preludedb_strerror(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_check_version) { { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int argvi = 0; char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_check_version(req_version);"); } res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_check_version" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); result = (char *)preludedb_check_version((char const *)arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); SWIG_croak_null(); } } XS(_wrap_preludedb_selected_path_new) { { preludedb_selected_path_t **arg1 = (preludedb_selected_path_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; int arg3 ; preludedb_selected_path_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 3) || (items > 3)) { SWIG_croak("Usage: preludedb_selected_path_new(selected_path,path,flags);"); } { arg1 = (preludedb_selected_path_t **) &tmp1; } res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_idmef_path, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_selected_path_new" "', argument " "2"" of type '" "idmef_path_t *""'"); } arg2 = (idmef_path_t *)(argp2); ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_selected_path_new" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); _saved[0] = ST(0); result = (int)preludedb_selected_path_new(arg1,arg2,arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_selected_path, 0)); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_selected_path_new_string) { { preludedb_selected_path_t **arg1 = (preludedb_selected_path_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_selected_path_t *tmp1 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_selected_path_new_string(selected_path,str);"); } { arg1 = (preludedb_selected_path_t **) &tmp1; } res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_selected_path_new_string" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); _saved[0] = ST(0); result = (int)preludedb_selected_path_new_string(arg1,(char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_selected_path, 0)); } if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); XSRETURN(argvi); fail: if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); SWIG_croak_null(); } } XS(_wrap_preludedb_selected_path_destroy) { { preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_selected_path_destroy(selected_path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, 0) ) return; } preludedb_selected_path_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_selected_path_get_path) { { preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; int argvi = 0; idmef_path_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_selected_path_get_path(selected_path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, 0) ) return; } result = (idmef_path_t *)preludedb_selected_path_get_path(arg1); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_selected_path_get_flags) { { preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; int argvi = 0; preludedb_selected_path_flags_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_selected_path_get_flags(selected_path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, 0) ) return; } result = (preludedb_selected_path_flags_t)preludedb_selected_path_get_flags(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_path_selection_new) { { preludedb_path_selection_t **arg1 = (preludedb_path_selection_t **) 0 ; preludedb_path_selection_t *tmp1 ; int argvi = 0; SV * _saved[1] ; int result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_path_selection_new(path_selection);"); } { arg1 = (preludedb_path_selection_t **) &tmp1; } _saved[0] = ST(0); result = (int)preludedb_path_selection_new(arg1); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ; { SV *sv; sv = SvRV(_saved[0]); sv_setsv(sv, SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_path_selection, 0)); } XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_path_selection_destroy) { { preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_path_selection_destroy(path_selection);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, 0) ) return; } preludedb_path_selection_destroy(arg1); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_path_selection_add) { { preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; preludedb_selected_path_t *arg2 = (preludedb_selected_path_t *) 0 ; int argvi = 0; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_path_selection_add(path_selection,selected_path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_selected_path, 0) ) return; } preludedb_path_selection_add(arg1,arg2); ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_path_selection_get_next) { { preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; preludedb_selected_path_t *arg2 = (preludedb_selected_path_t *) 0 ; int argvi = 0; preludedb_selected_path_t *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { SWIG_croak("Usage: preludedb_path_selection_get_next(path_selection,selected_path);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, 0) ) return; } { if ( ! SvROK(ST(1)) ) { croak("Argument 2 is null."); return; } if ( SWIG_ConvertPtr(ST(1), (void **)&arg2, SWIGTYPE_p_preludedb_selected_path, 0) ) return; } result = (preludedb_selected_path_t *)preludedb_path_selection_get_next(arg1,arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_preludedb_selected_path, 0 | 0); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } XS(_wrap_preludedb_path_selection_get_count) { { preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; int argvi = 0; size_t result; dXSARGS; if ((items < 1) || (items > 1)) { SWIG_croak("Usage: preludedb_path_selection_get_count(path_selection);"); } { if ( ! SvROK(ST(0)) ) { croak("Argument 1 is null."); return; } if ( SWIG_ConvertPtr(ST(0), (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, 0) ) return; } result = preludedb_path_selection_get_count(arg1); ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ; XSRETURN(argvi); fail: SWIG_croak_null(); } } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria = {"_p_idmef_criteria", "idmef_criteria_t *|struct idmef_criteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_value = {"_p_idmef_criterion_value", "struct idmef_criterion_value *|idmef_criterion_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message = {"_p_idmef_message", "struct idmef_message *|idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path = {"_p_idmef_path", "idmef_path_t *|struct idmef_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time = {"_p_idmef_time", "struct idmef_time *|idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value = {"_p_idmef_value", "struct idmef_value *|idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int8_t = {"_p_int8_t", "int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_message = {"_p_p_idmef_message", "idmef_message_t **|struct idmef_message **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_p_idmef_value = {"_p_p_p_idmef_value", "struct idmef_value ***|idmef_value_t ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb = {"_p_p_preludedb", "preludedb_t **|struct preludedb **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_path_selection = {"_p_p_preludedb_path_selection", "struct preludedb_path_selection **|preludedb_path_selection_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_result_idents = {"_p_p_preludedb_result_idents", "preludedb_result_idents_t **|struct preludedb_result_idents **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_result_values = {"_p_p_preludedb_result_values", "struct preludedb_result_values **|preludedb_result_values_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_selected_path = {"_p_p_preludedb_selected_path", "preludedb_selected_path_t **|struct preludedb_selected_path **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql = {"_p_p_preludedb_sql", "preludedb_sql_t **|struct preludedb_sql **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_field = {"_p_p_preludedb_sql_field", "preludedb_sql_field_t **|struct preludedb_sql_field **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_row = {"_p_p_preludedb_sql_row", "preludedb_sql_row_t **|struct preludedb_sql_row **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_settings = {"_p_p_preludedb_sql_settings", "struct preludedb_sql_settings **|preludedb_sql_settings_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_table = {"_p_p_preludedb_sql_table", "preludedb_sql_table_t **|struct preludedb_sql_table **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "unsigned char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_bool_t = {"_p_prelude_bool_t", "enum prelude_bool_t *|prelude_bool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_string = {"_p_prelude_string", "struct prelude_string *|prelude_string_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb = {"_p_preludedb", "preludedb_t *|struct preludedb *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_error_code_t = {"_p_preludedb_error_code_t", "enum preludedb_error_code_t *|preludedb_error_code_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_path_selection = {"_p_preludedb_path_selection", "preludedb_path_selection_t *|struct preludedb_path_selection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_idents = {"_p_preludedb_result_idents", "struct preludedb_result_idents *|preludedb_result_idents_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_idents_order_t = {"_p_preludedb_result_idents_order_t", "enum preludedb_result_idents_order_t *|preludedb_result_idents_order_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_values = {"_p_preludedb_result_values", "preludedb_result_values_t *|struct preludedb_result_values *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_selected_path = {"_p_preludedb_selected_path", "preludedb_selected_path_t *|struct preludedb_selected_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_selected_path_flags_t = {"_p_preludedb_selected_path_flags_t", "enum preludedb_selected_path_flags_t *|preludedb_selected_path_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql = {"_p_preludedb_sql", "preludedb_sql_t *|struct preludedb_sql *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_field = {"_p_preludedb_sql_field", "preludedb_sql_field_t *|struct preludedb_sql_field *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_row = {"_p_preludedb_sql_row", "struct preludedb_sql_row *|preludedb_sql_row_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_settings = {"_p_preludedb_sql_settings", "struct preludedb_sql_settings *|preludedb_sql_settings_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_table = {"_p_preludedb_sql_table", "struct preludedb_sql_table *|preludedb_sql_table_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_time_constraint_type_t = {"_p_preludedb_sql_time_constraint_type_t", "enum preludedb_sql_time_constraint_type_t *|preludedb_sql_time_constraint_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ssize_t = {"_p_ssize_t", "ssize_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_double, &_swigt__p_float, &_swigt__p_idmef_criteria, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_criterion_value, &_swigt__p_idmef_message, &_swigt__p_idmef_path, &_swigt__p_idmef_time, &_swigt__p_idmef_value, &_swigt__p_int, &_swigt__p_int16_t, &_swigt__p_int8_t, &_swigt__p_long_long, &_swigt__p_p_char, &_swigt__p_p_idmef_message, &_swigt__p_p_p_idmef_value, &_swigt__p_p_preludedb, &_swigt__p_p_preludedb_path_selection, &_swigt__p_p_preludedb_result_idents, &_swigt__p_p_preludedb_result_values, &_swigt__p_p_preludedb_selected_path, &_swigt__p_p_preludedb_sql, &_swigt__p_p_preludedb_sql_field, &_swigt__p_p_preludedb_sql_row, &_swigt__p_p_preludedb_sql_settings, &_swigt__p_p_preludedb_sql_table, &_swigt__p_p_unsigned_char, &_swigt__p_prelude_bool_t, &_swigt__p_prelude_string, &_swigt__p_preludedb, &_swigt__p_preludedb_error_code_t, &_swigt__p_preludedb_path_selection, &_swigt__p_preludedb_result_idents, &_swigt__p_preludedb_result_idents_order_t, &_swigt__p_preludedb_result_values, &_swigt__p_preludedb_selected_path, &_swigt__p_preludedb_selected_path_flags_t, &_swigt__p_preludedb_sql, &_swigt__p_preludedb_sql_field, &_swigt__p_preludedb_sql_row, &_swigt__p_preludedb_sql_settings, &_swigt__p_preludedb_sql_table, &_swigt__p_preludedb_sql_time_constraint_type_t, &_swigt__p_size_t, &_swigt__p_ssize_t, &_swigt__p_uint16_t, &_swigt__p_uint8_t, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria[] = { {&_swigt__p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_value[] = { {&_swigt__p_idmef_criterion_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message[] = { {&_swigt__p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path[] = { {&_swigt__p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time[] = { {&_swigt__p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value[] = { {&_swigt__p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int8_t[] = { {&_swigt__p_int8_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_message[] = { {&_swigt__p_p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_idmef_value[] = { {&_swigt__p_p_p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb[] = { {&_swigt__p_p_preludedb, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_path_selection[] = { {&_swigt__p_p_preludedb_path_selection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_result_idents[] = { {&_swigt__p_p_preludedb_result_idents, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_result_values[] = { {&_swigt__p_p_preludedb_result_values, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_selected_path[] = { {&_swigt__p_p_preludedb_selected_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql[] = { {&_swigt__p_p_preludedb_sql, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_field[] = { {&_swigt__p_p_preludedb_sql_field, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_row[] = { {&_swigt__p_p_preludedb_sql_row, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_settings[] = { {&_swigt__p_p_preludedb_sql_settings, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_table[] = { {&_swigt__p_p_preludedb_sql_table, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_char[] = { {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_bool_t[] = { {&_swigt__p_prelude_bool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_string[] = { {&_swigt__p_prelude_string, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb[] = { {&_swigt__p_preludedb, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_error_code_t[] = { {&_swigt__p_preludedb_error_code_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_path_selection[] = { {&_swigt__p_preludedb_path_selection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_idents[] = { {&_swigt__p_preludedb_result_idents, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_idents_order_t[] = { {&_swigt__p_preludedb_result_idents_order_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_values[] = { {&_swigt__p_preludedb_result_values, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_selected_path[] = { {&_swigt__p_preludedb_selected_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_selected_path_flags_t[] = { {&_swigt__p_preludedb_selected_path_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql[] = { {&_swigt__p_preludedb_sql, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_field[] = { {&_swigt__p_preludedb_sql_field, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_row[] = { {&_swigt__p_preludedb_sql_row, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_settings[] = { {&_swigt__p_preludedb_sql_settings, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_table[] = { {&_swigt__p_preludedb_sql_table, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_time_constraint_type_t[] = { {&_swigt__p_preludedb_sql_time_constraint_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ssize_t[] = { {&_swigt__p_ssize_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_uint8_t[] = { {&_swigt__p_uint8_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, _swigc__p_double, _swigc__p_float, _swigc__p_idmef_criteria, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_criterion_value, _swigc__p_idmef_message, _swigc__p_idmef_path, _swigc__p_idmef_time, _swigc__p_idmef_value, _swigc__p_int, _swigc__p_int16_t, _swigc__p_int8_t, _swigc__p_long_long, _swigc__p_p_char, _swigc__p_p_idmef_message, _swigc__p_p_p_idmef_value, _swigc__p_p_preludedb, _swigc__p_p_preludedb_path_selection, _swigc__p_p_preludedb_result_idents, _swigc__p_p_preludedb_result_values, _swigc__p_p_preludedb_selected_path, _swigc__p_p_preludedb_sql, _swigc__p_p_preludedb_sql_field, _swigc__p_p_preludedb_sql_row, _swigc__p_p_preludedb_sql_settings, _swigc__p_p_preludedb_sql_table, _swigc__p_p_unsigned_char, _swigc__p_prelude_bool_t, _swigc__p_prelude_string, _swigc__p_preludedb, _swigc__p_preludedb_error_code_t, _swigc__p_preludedb_path_selection, _swigc__p_preludedb_result_idents, _swigc__p_preludedb_result_idents_order_t, _swigc__p_preludedb_result_values, _swigc__p_preludedb_selected_path, _swigc__p_preludedb_selected_path_flags_t, _swigc__p_preludedb_sql, _swigc__p_preludedb_sql_field, _swigc__p_preludedb_sql_row, _swigc__p_preludedb_sql_settings, _swigc__p_preludedb_sql_table, _swigc__p_preludedb_sql_time_constraint_type_t, _swigc__p_size_t, _swigc__p_ssize_t, _swigc__p_uint16_t, _swigc__p_uint8_t, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_constant_info swig_constants[] = { {0,0,0,0,0,0} }; #ifdef __cplusplus } #endif static swig_variable_info swig_variables[] = { {0,0,0,0} }; static swig_command_info swig_commands[] = { {"PreludeDB::preludedb_sql_settings_new", _wrap_preludedb_sql_settings_new}, {"PreludeDB::preludedb_sql_settings_new_from_string", _wrap_preludedb_sql_settings_new_from_string}, {"PreludeDB::preludedb_sql_settings_destroy", _wrap_preludedb_sql_settings_destroy}, {"PreludeDB::preludedb_sql_settings_set", _wrap_preludedb_sql_settings_set}, {"PreludeDB::preludedb_sql_settings_set_from_string", _wrap_preludedb_sql_settings_set_from_string}, {"PreludeDB::preludedb_sql_settings_get", _wrap_preludedb_sql_settings_get}, {"PreludeDB::preludedb_sql_settings_set_host", _wrap_preludedb_sql_settings_set_host}, {"PreludeDB::preludedb_sql_settings_get_host", _wrap_preludedb_sql_settings_get_host}, {"PreludeDB::preludedb_sql_settings_set_port", _wrap_preludedb_sql_settings_set_port}, {"PreludeDB::preludedb_sql_settings_get_port", _wrap_preludedb_sql_settings_get_port}, {"PreludeDB::preludedb_sql_settings_set_name", _wrap_preludedb_sql_settings_set_name}, {"PreludeDB::preludedb_sql_settings_get_name", _wrap_preludedb_sql_settings_get_name}, {"PreludeDB::preludedb_sql_settings_set_user", _wrap_preludedb_sql_settings_set_user}, {"PreludeDB::preludedb_sql_settings_get_user", _wrap_preludedb_sql_settings_get_user}, {"PreludeDB::preludedb_sql_settings_set_pass", _wrap_preludedb_sql_settings_set_pass}, {"PreludeDB::preludedb_sql_settings_get_pass", _wrap_preludedb_sql_settings_get_pass}, {"PreludeDB::preludedb_sql_settings_set_log", _wrap_preludedb_sql_settings_set_log}, {"PreludeDB::preludedb_sql_settings_get_log", _wrap_preludedb_sql_settings_get_log}, {"PreludeDB::preludedb_sql_settings_set_type", _wrap_preludedb_sql_settings_set_type}, {"PreludeDB::preludedb_sql_settings_get_type", _wrap_preludedb_sql_settings_get_type}, {"PreludeDB::preludedb_sql_settings_set_file", _wrap_preludedb_sql_settings_set_file}, {"PreludeDB::preludedb_sql_settings_get_file", _wrap_preludedb_sql_settings_get_file}, {"PreludeDB::preludedb_sql_new", _wrap_preludedb_sql_new}, {"PreludeDB::preludedb_sql_destroy", _wrap_preludedb_sql_destroy}, {"PreludeDB::preludedb_sql_enable_query_logging", _wrap_preludedb_sql_enable_query_logging}, {"PreludeDB::preludedb_sql_disable_query_logging", _wrap_preludedb_sql_disable_query_logging}, {"PreludeDB::preludedb_sql_query", _wrap_preludedb_sql_query}, {"PreludeDB::preludedb_sql_query_sprintf", _wrap_preludedb_sql_query_sprintf}, {"PreludeDB::preludedb_sql_insert", _wrap_preludedb_sql_insert}, {"PreludeDB::preludedb_sql_build_limit_offset_string", _wrap_preludedb_sql_build_limit_offset_string}, {"PreludeDB::preludedb_sql_transaction_start", _wrap_preludedb_sql_transaction_start}, {"PreludeDB::preludedb_sql_transaction_end", _wrap_preludedb_sql_transaction_end}, {"PreludeDB::preludedb_sql_transaction_abort", _wrap_preludedb_sql_transaction_abort}, {"PreludeDB::preludedb_sql_escape_fast", _wrap_preludedb_sql_escape_fast}, {"PreludeDB::preludedb_sql_escape", _wrap_preludedb_sql_escape}, {"PreludeDB::preludedb_sql_escape_binary", _wrap_preludedb_sql_escape_binary}, {"PreludeDB::preludedb_sql_unescape_binary", _wrap_preludedb_sql_unescape_binary}, {"PreludeDB::preludedb_sql_table_destroy", _wrap_preludedb_sql_table_destroy}, {"PreludeDB::preludedb_sql_table_get_column_name", _wrap_preludedb_sql_table_get_column_name}, {"PreludeDB::preludedb_sql_table_get_column_num", _wrap_preludedb_sql_table_get_column_num}, {"PreludeDB::preludedb_sql_table_get_column_count", _wrap_preludedb_sql_table_get_column_count}, {"PreludeDB::preludedb_sql_table_get_row_count", _wrap_preludedb_sql_table_get_row_count}, {"PreludeDB::preludedb_sql_table_fetch_row", _wrap_preludedb_sql_table_fetch_row}, {"PreludeDB::preludedb_sql_row_fetch_field", _wrap_preludedb_sql_row_fetch_field}, {"PreludeDB::preludedb_sql_row_fetch_field_by_name", _wrap_preludedb_sql_row_fetch_field_by_name}, {"PreludeDB::preludedb_sql_field_get_value", _wrap_preludedb_sql_field_get_value}, {"PreludeDB::preludedb_sql_field_get_len", _wrap_preludedb_sql_field_get_len}, {"PreludeDB::preludedb_sql_field_to_int8", _wrap_preludedb_sql_field_to_int8}, {"PreludeDB::preludedb_sql_field_to_uint8", _wrap_preludedb_sql_field_to_uint8}, {"PreludeDB::preludedb_sql_field_to_int16", _wrap_preludedb_sql_field_to_int16}, {"PreludeDB::preludedb_sql_field_to_uint16", _wrap_preludedb_sql_field_to_uint16}, {"PreludeDB::preludedb_sql_field_to_int32", _wrap_preludedb_sql_field_to_int32}, {"PreludeDB::preludedb_sql_field_to_uint32", _wrap_preludedb_sql_field_to_uint32}, {"PreludeDB::preludedb_sql_field_to_int64", _wrap_preludedb_sql_field_to_int64}, {"PreludeDB::preludedb_sql_field_to_uint64", _wrap_preludedb_sql_field_to_uint64}, {"PreludeDB::preludedb_sql_field_to_float", _wrap_preludedb_sql_field_to_float}, {"PreludeDB::preludedb_sql_field_to_double", _wrap_preludedb_sql_field_to_double}, {"PreludeDB::preludedb_sql_field_to_string", _wrap_preludedb_sql_field_to_string}, {"PreludeDB::preludedb_sql_build_criterion_string", _wrap_preludedb_sql_build_criterion_string}, {"PreludeDB::preludedb_sql_time_from_timestamp", _wrap_preludedb_sql_time_from_timestamp}, {"PreludeDB::preludedb_sql_time_to_timestamp", _wrap_preludedb_sql_time_to_timestamp}, {"PreludeDB::preludedb_sql_get_plugin_error", _wrap_preludedb_sql_get_plugin_error}, {"PreludeDB::preludedb_init", _wrap_preludedb_init}, {"PreludeDB::preludedb_deinit", _wrap_preludedb_deinit}, {"PreludeDB::preludedb_new", _wrap_preludedb_new}, {"PreludeDB::preludedb_destroy", _wrap_preludedb_destroy}, {"PreludeDB::preludedb_get_format_name", _wrap_preludedb_get_format_name}, {"PreludeDB::preludedb_get_format_version", _wrap_preludedb_get_format_version}, {"PreludeDB::preludedb_set_format", _wrap_preludedb_set_format}, {"PreludeDB::preludedb_get_sql", _wrap_preludedb_get_sql}, {"PreludeDB::preludedb_result_idents_destroy", _wrap_preludedb_result_idents_destroy}, {"PreludeDB::preludedb_result_idents_get_next", _wrap_preludedb_result_idents_get_next}, {"PreludeDB::preludedb_result_values_destroy", _wrap_preludedb_result_values_destroy}, {"PreludeDB::preludedb_result_values_get_next", _wrap_preludedb_result_values_get_next}, {"PreludeDB::preludedb_get_error", _wrap_preludedb_get_error}, {"PreludeDB::preludedb_insert_message", _wrap_preludedb_insert_message}, {"PreludeDB::preludedb_get_alert_idents", _wrap_preludedb_get_alert_idents}, {"PreludeDB::preludedb_get_heartbeat_idents", _wrap_preludedb_get_heartbeat_idents}, {"PreludeDB::preludedb_get_alert", _wrap_preludedb_get_alert}, {"PreludeDB::preludedb_get_heartbeat", _wrap_preludedb_get_heartbeat}, {"PreludeDB::preludedb_delete_alert", _wrap_preludedb_delete_alert}, {"PreludeDB::preludedb_delete_alert_from_list", _wrap_preludedb_delete_alert_from_list}, {"PreludeDB::preludedb_delete_alert_from_result_idents", _wrap_preludedb_delete_alert_from_result_idents}, {"PreludeDB::preludedb_delete_heartbeat", _wrap_preludedb_delete_heartbeat}, {"PreludeDB::preludedb_delete_heartbeat_from_list", _wrap_preludedb_delete_heartbeat_from_list}, {"PreludeDB::preludedb_delete_heartbeat_from_result_idents", _wrap_preludedb_delete_heartbeat_from_result_idents}, {"PreludeDB::preludedb_get_values", _wrap_preludedb_get_values}, {"PreludeDB::preludedb_transaction_start", _wrap_preludedb_transaction_start}, {"PreludeDB::preludedb_transaction_end", _wrap_preludedb_transaction_end}, {"PreludeDB::preludedb_transaction_abort", _wrap_preludedb_transaction_abort}, {"PreludeDB::preludedb_error", _wrap_preludedb_error}, {"PreludeDB::preludedb_error_verbose", _wrap_preludedb_error_verbose}, {"PreludeDB::preludedb_error_check", _wrap_preludedb_error_check}, {"PreludeDB::preludedb_error_from_errno", _wrap_preludedb_error_from_errno}, {"PreludeDB::preludedb_strerror", _wrap_preludedb_strerror}, {"PreludeDB::preludedb_check_version", _wrap_preludedb_check_version}, {"PreludeDB::preludedb_selected_path_new", _wrap_preludedb_selected_path_new}, {"PreludeDB::preludedb_selected_path_new_string", _wrap_preludedb_selected_path_new_string}, {"PreludeDB::preludedb_selected_path_destroy", _wrap_preludedb_selected_path_destroy}, {"PreludeDB::preludedb_selected_path_get_path", _wrap_preludedb_selected_path_get_path}, {"PreludeDB::preludedb_selected_path_get_flags", _wrap_preludedb_selected_path_get_flags}, {"PreludeDB::preludedb_path_selection_new", _wrap_preludedb_path_selection_new}, {"PreludeDB::preludedb_path_selection_destroy", _wrap_preludedb_path_selection_destroy}, {"PreludeDB::preludedb_path_selection_add", _wrap_preludedb_path_selection_add}, {"PreludeDB::preludedb_path_selection_get_next", _wrap_preludedb_path_selection_get_next}, {"PreludeDB::preludedb_path_selection_get_count", _wrap_preludedb_path_selection_get_count}, {0,0} }; /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" #endif XS(SWIG_init) { dXSARGS; int i; SWIG_InitializeModule(0); /* Install commands */ for (i = 0; swig_commands[i].name; i++) { newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); } /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); } else { sv_setiv(sv,(IV) 0); } swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); } /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue); break; case SWIG_FLOAT: sv_setnv(sv, (double) swig_constants[i].dvalue); break; case SWIG_STRING: sv_setpv(sv, (char *) swig_constants[i].pvalue); break; case SWIG_POINTER: SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); break; case SWIG_BINARY: SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); break; default: break; } SvREADONLY_on(sv); } /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_BOOL_TRUE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_BOOL_TRUE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDE_BOOL_FALSE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDE_BOOL_FALSE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_HOST", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("host")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_PORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("port")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_NAME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("name")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_USER", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("user")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_PASS", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("pass")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("type")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_FILE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("file")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_SETTING_LOG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("log")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(128))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_MIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SQL_TIME_CONSTRAINT_SEC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_SEC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERRBUF_SIZE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(512))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_NO_ERROR", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_NO_ERROR))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_GENERIC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_GENERIC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_SETTINGS_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_SETTINGS_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_CONNECTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_CONNECTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_QUERY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_QUERY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_COLUMN_NUM", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_COLUMN_NUM))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_COLUMN_NAME", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_COLUMN_NAME))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_VALUE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_VALUE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_VALUE_TYPE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_VALUE_TYPE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_NOT_IN_TRANSACTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_NOT_IN_TRANSACTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "LIBPRELUDEDB_VERSION", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_FromCharPtr("0.9.15.3")); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_GROUP_BY", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_GROUP_BY))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_ORDER_ASC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_ORDER_ASC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; /*@SWIG:/usr/share/swig/1.3.40/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "PRELUDEDB_SELECTED_OBJECT_ORDER_DESC", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(PRELUDEDB_SELECTED_OBJECT_ORDER_DESC))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; ST(0) = &PL_sv_yes; XSRETURN(1); } libpreludedb-1.0.0/bindings/python/0000775000076400007640000000000011347715761014312 500000000000000libpreludedb-1.0.0/bindings/python/preludedb.py0000644000076400007640000000033010610524746016535 00000000000000import prelude from _preludedb import * class PreludeDBError(prelude.PreludeError): def __str__(self): if self._strerror: return self._strerror return preludedb_strerror(self.errno) libpreludedb-1.0.0/bindings/python/setup.py.in0000664000076400007640000000443311226653036016345 00000000000000import sys, os from os.path import abspath, exists import shutil from distutils.sysconfig import get_python_lib from distutils.core import setup, Extension FILES_TO_BE_COPIED = ("_preludedb.c", "preludedb.py") def split_args(s): import re return re.split("\s+", s.strip()) def get_root(): try: return sys.argv[sys.argv.index("--root") + 1] except ValueError: return "" def is_system_wide_install(): return os.access(get_python_lib(), os.W_OK) def builddir_is_srcdir(): return abspath("@top_srcdir@") == abspath("@top_builddir@") def pre_install(): if not is_system_wide_install(): sys.argv.extend(["--prefix", "@prefix@"]) def pre_build(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: src = "@top_srcdir@/bindings/python/" + file dst = "@top_builddir@/bindings/python/" + file if not exists(dst): shutil.copy(src, dst) def pre_clean(): if not builddir_is_srcdir(): for file in FILES_TO_BE_COPIED: exists(file) and os.remove(file) def uninstall(): if is_system_wide_install(): prefix = None else: prefix = "@prefix@" for f in "preludedb.py", "preludedb.pyc", "_preludedb.so": file = get_root() + "/" + get_python_lib(prefix=prefix) + "/" + f exists(file) and os.remove(file) file = get_root() + "/" + get_python_lib(plat_specific=True, prefix=prefix) + "/" + f exists(file) and os.remove(file) sys.exit(0) commands = { "install": pre_install, "build": pre_build, "clean": pre_clean, "uninstall": uninstall, } if len(sys.argv) > 1 and commands.has_key(sys.argv[1]): commands[sys.argv[1]]() setup(name="preludedb", package_dir={'preludedb': '@top_srcdir@/bindings/python'}, py_modules=["preludedb"], ext_modules=[Extension("_preludedb", ["_preludedb.c"], extra_compile_args=split_args("-I@top_srcdir@/src/include @LIBPRELUDE_CFLAGS@ @LIBPRELUDE_PTHREAD_CFLAGS@"), library_dirs=[ "@top_builddir@/src/.libs/" ], extra_link_args=split_args("@LIBPRELUDE_LDFLAGS@ @LIBPRELUDE_PTHREAD_CFLAGS@ -lpreludedb @LIBPRELUDE_LIBS@"))]) libpreludedb-1.0.0/bindings/python/_preludedb.c0000664000076400007640000106440611326011532016474 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) { #if PY_VERSION_HEX >= 0x03000000 return PyInstanceMethod_New(func); #else return NULL; #endif } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, (char *) msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char*) name, obj); Py_DECREF(obj); } /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData* data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", name, v); if (v->next) { #ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); #else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); #endif #if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; #else PyString_ConcatAndDel(&repr,nrep); #endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) res = Py_True; else res = Py_False; Py_INCREF(res); return res; } SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); return type; } SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* _PySwigObject_type(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpyobject_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == _PySwigPacked_type()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpypacked_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } SWIGRUNTIME PyObject * SWIG_This(void) { static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { if (SwigPyObject_Check(pyobj)) { return (SwigPyObject *) pyobj; } else { PyObject *obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; } } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } else { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } return SWIG_OK; } else { int res = SWIG_ERROR; if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } return res; } } } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst; PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { if (!ptr) { return SWIG_Py_Void(); } else { int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; PyObject *robj = SwigPyObject_New(ptr, type, own); SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); if (inst) { Py_DECREF(robj); robj = inst; } } return robj; } } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr) { swig_module_info *swig_module = (swig_module_info *) vptr; swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); } else { swig_module_info *swig_module = SWIG_Python_GetModule(); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { obj = PyCObject_FromVoidPtr(descriptor, NULL); PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : (char*)""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_double swig_types[1] #define SWIGTYPE_p_float swig_types[2] #define SWIGTYPE_p_idmef_criteria swig_types[3] #define SWIGTYPE_p_idmef_criterion_operator_t swig_types[4] #define SWIGTYPE_p_idmef_criterion_value swig_types[5] #define SWIGTYPE_p_idmef_message swig_types[6] #define SWIGTYPE_p_idmef_path swig_types[7] #define SWIGTYPE_p_idmef_time swig_types[8] #define SWIGTYPE_p_idmef_value swig_types[9] #define SWIGTYPE_p_int swig_types[10] #define SWIGTYPE_p_int16_t swig_types[11] #define SWIGTYPE_p_int8_t swig_types[12] #define SWIGTYPE_p_long_long swig_types[13] #define SWIGTYPE_p_p_char swig_types[14] #define SWIGTYPE_p_p_idmef_message swig_types[15] #define SWIGTYPE_p_p_p_idmef_value swig_types[16] #define SWIGTYPE_p_p_preludedb swig_types[17] #define SWIGTYPE_p_p_preludedb_path_selection swig_types[18] #define SWIGTYPE_p_p_preludedb_result_idents swig_types[19] #define SWIGTYPE_p_p_preludedb_result_values swig_types[20] #define SWIGTYPE_p_p_preludedb_selected_path swig_types[21] #define SWIGTYPE_p_p_preludedb_sql swig_types[22] #define SWIGTYPE_p_p_preludedb_sql_field swig_types[23] #define SWIGTYPE_p_p_preludedb_sql_row swig_types[24] #define SWIGTYPE_p_p_preludedb_sql_settings swig_types[25] #define SWIGTYPE_p_p_preludedb_sql_table swig_types[26] #define SWIGTYPE_p_p_unsigned_char swig_types[27] #define SWIGTYPE_p_prelude_bool_t swig_types[28] #define SWIGTYPE_p_prelude_string swig_types[29] #define SWIGTYPE_p_preludedb swig_types[30] #define SWIGTYPE_p_preludedb_error_code_t swig_types[31] #define SWIGTYPE_p_preludedb_path_selection swig_types[32] #define SWIGTYPE_p_preludedb_result_idents swig_types[33] #define SWIGTYPE_p_preludedb_result_idents_order_t swig_types[34] #define SWIGTYPE_p_preludedb_result_values swig_types[35] #define SWIGTYPE_p_preludedb_selected_path swig_types[36] #define SWIGTYPE_p_preludedb_selected_path_flags_t swig_types[37] #define SWIGTYPE_p_preludedb_sql swig_types[38] #define SWIGTYPE_p_preludedb_sql_field swig_types[39] #define SWIGTYPE_p_preludedb_sql_row swig_types[40] #define SWIGTYPE_p_preludedb_sql_settings swig_types[41] #define SWIGTYPE_p_preludedb_sql_table swig_types[42] #define SWIGTYPE_p_preludedb_sql_time_constraint_type_t swig_types[43] #define SWIGTYPE_p_size_t swig_types[44] #define SWIGTYPE_p_uint16_t swig_types[45] #define SWIGTYPE_p_uint8_t swig_types[46] #define SWIGTYPE_p_unsigned_char swig_types[47] #define SWIGTYPE_p_unsigned_int swig_types[48] #define SWIGTYPE_p_unsigned_long_long swig_types[49] static swig_type_info *swig_types[51]; static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__preludedb #else # define SWIG_init init_preludedb #endif #define SWIG_name "_preludedb" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #include "preludedb-version.h" #include #define SWIG_From_long PyInt_FromLong SWIGINTERNINLINE PyObject * SWIG_From_int (int value) { return SWIG_From_long (value); } void swig_python_raise_exception(int error, const char *strerror) { PyObject *module; PyObject *exception_class; PyObject *exception; module = PyImport_ImportModule("preludedb"); exception_class = PyObject_GetAttrString(module, "PreludeDBError"); exception = PyObject_CallFunction(exception_class, "is", error, strerror); if ( exception ) { PyErr_SetObject(exception_class, exception); Py_DECREF(exception); } Py_DECREF(module); Py_DECREF(exception_class); } int preludedb_get_values2(preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result2) { return preludedb_get_values(db, path_selection, criteria, distinct, limit, offset, result2); } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (int)(v); } } return res; } int preludedb_get_alert_idents2(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result2) { return preludedb_get_alert_idents(db, criteria, limit, offset, order, result2); } int preludedb_get_heartbeat_idents2(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result2) { return preludedb_get_heartbeat_idents(db, criteria, limit, offset, order, result2); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromStringAndSize(carray, (int)(size)); #else return PyString_FromStringAndSize(carray, (int)(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = (size_t)(v); return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = (unsigned int)(v); } } return res; } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_int (unsigned int value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_size_t (size_t value) { return SWIG_From_unsigned_SS_long ((unsigned long)(value)); } SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { unsigned long long v = PyLong_AsUnsignedLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_preludedb_get_values2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_path_selection_t *arg2 = (preludedb_path_selection_t *) 0 ; idmef_criteria_t *arg3 = (idmef_criteria_t *) 0 ; prelude_bool_t arg4 ; int arg5 ; int arg6 ; preludedb_result_values_t **arg7 = (preludedb_result_values_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; preludedb_result_values_t *tmp7 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; int result; { arg7 = (preludedb_result_values_t **) &tmp7; } if (!PyArg_ParseTuple(args,(char *)"OOOOOO:preludedb_get_values2",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_preludedb, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_get_values2" "', argument " "1"" of type '" "preludedb_t *""'"); } arg1 = (preludedb_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_preludedb_path_selection, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_values2" "', argument " "2"" of type '" "preludedb_path_selection_t *""'"); } arg2 = (preludedb_path_selection_t *)(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_get_values2" "', argument " "3"" of type '" "idmef_criteria_t *""'"); } arg3 = (idmef_criteria_t *)(argp3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_values2" "', argument " "4"" of type '" "prelude_bool_t""'"); } arg4 = (prelude_bool_t)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_values2" "', argument " "5"" of type '" "int""'"); } arg5 = (int)(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "preludedb_get_values2" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_values2(arg1,arg2,arg3,arg4,arg5,arg6,arg7); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); { long size; size = PyInt_AsLong(resultobj); if ( size < 0 ) { swig_python_raise_exception(size, NULL); resultobj = NULL; } else if ( size == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else { PyObject *s = SWIG_NewPointerObj((void *) * arg7, SWIGTYPE_p_preludedb_result_values, 0); resultobj = PyTuple_New(2); PyTuple_SetItem(resultobj, 0, s); PyTuple_SetItem(resultobj, 1, PyInt_FromLong(size)); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_alert_idents2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; { arg6 = (preludedb_result_idents_t **) &tmp6; } if (!PyArg_ParseTuple(args,(char *)"OOOOO:preludedb_get_alert_idents2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_preludedb, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_get_alert_idents2" "', argument " "1"" of type '" "preludedb_t *""'"); } arg1 = (preludedb_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_alert_idents2" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_alert_idents2" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_alert_idents2" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_alert_idents2" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_alert_idents2(arg1,arg2,arg3,arg4,arg5,arg6); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); { long size; size = PyInt_AsLong(resultobj); if ( size < 0 ) { swig_python_raise_exception(size, NULL); resultobj = NULL; } else if ( size == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else { PyObject *s = SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0); resultobj = PyTuple_New(2); PyTuple_SetItem(resultobj, 0, s); PyTuple_SetItem(resultobj, 1, PyInt_FromLong(size)); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_heartbeat_idents2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; { arg6 = (preludedb_result_idents_t **) &tmp6; } if (!PyArg_ParseTuple(args,(char *)"OOOOO:preludedb_get_heartbeat_idents2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_preludedb, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_get_heartbeat_idents2" "', argument " "1"" of type '" "preludedb_t *""'"); } arg1 = (preludedb_t *)(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_heartbeat_idents2" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_heartbeat_idents2" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_heartbeat_idents2" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_heartbeat_idents2" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_heartbeat_idents2(arg1,arg2,arg3,arg4,arg5,arg6); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); { long size; size = PyInt_AsLong(resultobj); if ( size < 0 ) { swig_python_raise_exception(size, NULL); resultobj = NULL; } else if ( size == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else { PyObject *s = SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0); resultobj = PyTuple_New(2); PyTuple_SetItem(resultobj, 0, s); PyTuple_SetItem(resultobj, 1, PyInt_FromLong(size)); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t **arg1 = (preludedb_sql_settings_t **) 0 ; preludedb_sql_settings_t *tmp1 ; int result; { arg1 = (preludedb_sql_settings_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":preludedb_sql_settings_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql_settings, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_new_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t **arg1 = (preludedb_sql_settings_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_settings_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (preludedb_sql_settings_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_new_from_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_new_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql_settings, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_sql_settings_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOO:preludedb_sql_settings_set",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set(arg1,(char const *)arg2,(char const *)arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_from_string",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_from_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_get",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get((struct preludedb_sql_settings const *)arg1,(char const *)arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_host(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_host",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_host(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_host(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_host",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_host((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_port",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_port(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_port(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_port",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_port((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_name(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_name((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_user",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_user(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_user",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_user((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_pass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_pass",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_pass(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_pass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_pass",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_pass((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_log",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_log(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_log",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_log((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_type",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_type(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_type",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_type((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_set_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_settings_set_file",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_settings_set_file(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_settings_get_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_settings_t *arg1 = (preludedb_sql_settings_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_settings_get_file",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_settings_get_file((struct preludedb_sql_settings const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t **arg1 = (preludedb_sql_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_settings_t *arg3 = (preludedb_sql_settings_t *) 0 ; preludedb_sql_t *tmp1 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (preludedb_sql_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_new",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg3, SWIGTYPE_p_preludedb_sql_settings, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_new(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_sql, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_sql_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_enable_query_logging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_enable_query_logging",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_enable_query_logging(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_disable_query_logging(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_disable_query_logging",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_sql_disable_query_logging(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_query(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_table_t **arg3 = (preludedb_sql_table_t **) 0 ; preludedb_sql_table_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (preludedb_sql_table_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_query",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_query(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_table, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_query_sprintf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; preludedb_sql_table_t **arg2 = (preludedb_sql_table_t **) 0 ; char *arg3 = (char *) 0 ; void *arg4 = 0 ; preludedb_sql_table_t *tmp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg2 = (preludedb_sql_table_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_query_sprintf",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_query_sprintf(arg1,arg2,(char const *)arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_preludedb_sql_table, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_query_sprintf(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_preludedb_sql_query_sprintf__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_preludedb_sql_insert__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; void *arg5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:preludedb_sql_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { if ( obj2 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj2) ) arg3 = PyString_AsString(obj2); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj2->ob_type->tp_name); return NULL; } } { if ( obj3 == Py_None ) arg4 = NULL; else if ( PyString_Check(obj3) ) arg4 = PyString_AsString(obj3); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj3->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_insert(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_insert(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,4); varargs = PyTuple_GetSlice(args,4,PyTuple_Size(args)+1); resultobj = _wrap_preludedb_sql_insert__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_preludedb_sql_build_limit_offset_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; int arg2 ; int arg3 ; prelude_string_t *arg4 = (prelude_string_t *) 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg4)); if ( ret < 0 ) { swig_python_raise_exception(ret, NULL); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"OOO:preludedb_sql_build_limit_offset_string",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_build_limit_offset_string" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_build_limit_offset_string" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_build_limit_offset_string(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg4), prelude_string_get_len(arg4)); prelude_string_destroy(arg4); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_transaction_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_transaction_start",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_transaction_start(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_transaction_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_transaction_end",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_transaction_end(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_transaction_abort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_transaction_abort",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_transaction_abort(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_escape_fast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; char **arg4 = (char **) 0 ; size_t val3 ; int ecode3 = 0 ; char *tmp4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { arg4 = &tmp4; } if (!PyArg_ParseTuple(args,(char *)"OOO:preludedb_sql_escape_fast",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_escape_fast" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_escape_fast(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) < 0 ) { swig_python_raise_exception(PyInt_AsLong(resultobj), NULL); return NULL; } resultobj = PyString_FromString(*arg4); free(*arg4); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_escape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; char **arg3 = (char **) 0 ; char *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_escape",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_escape(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) < 0 ) { swig_python_raise_exception(PyInt_AsLong(resultobj), NULL); return NULL; } resultobj = PyString_FromString(*arg3); free(*arg3); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_escape_binary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; unsigned char *arg2 = (unsigned char *) 0 ; size_t arg3 ; char **arg4 = (char **) 0 ; void *argp2 = 0 ; int res2 = 0 ; size_t val3 ; int ecode3 = 0 ; char *tmp4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; int result; { arg4 = &tmp4; } if (!PyArg_ParseTuple(args,(char *)"OOO:preludedb_sql_escape_binary",&obj0,&obj1,&obj2)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_escape_binary" "', argument " "2"" of type '" "unsigned char const *""'"); } arg2 = (unsigned char *)(argp2); ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_escape_binary" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_escape_binary(arg1,(unsigned char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) < 0 ) { swig_python_raise_exception(PyInt_AsLong(resultobj), NULL); return NULL; } resultobj = PyString_FromString(*arg4); free(*arg4); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_unescape_binary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; char *arg2 = (char *) 0 ; size_t arg3 ; unsigned char **arg4 = (unsigned char **) 0 ; size_t *arg5 = (size_t *) 0 ; size_t val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOOO:preludedb_sql_unescape_binary",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_unescape_binary" "', argument " "3"" of type '" "size_t""'"); } arg3 = (size_t)(val3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_sql_unescape_binary" "', argument " "4"" of type '" "unsigned char **""'"); } arg4 = (unsigned char **)(argp4); res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_size_t, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_unescape_binary" "', argument " "5"" of type '" "size_t *""'"); } arg5 = (size_t *)(argp5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_unescape_binary(arg1,(char const *)arg2,arg3,arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_table_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_sql_table_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_get_column_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; unsigned int arg2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_table_get_column_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_table_get_column_name" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_table_get_column_name(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_get_column_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_table_get_column_num",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_table_get_column_num(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_get_column_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_table_get_column_count",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned int)preludedb_sql_table_get_column_count(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_get_row_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; PyObject * obj0 = 0 ; unsigned int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_table_get_row_count",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (unsigned int)preludedb_sql_table_get_row_count(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_table_fetch_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_table_t *arg1 = (preludedb_sql_table_t *) 0 ; preludedb_sql_row_t **arg2 = (preludedb_sql_row_t **) 0 ; preludedb_sql_row_t *tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = (preludedb_sql_row_t **) &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_table_fetch_row",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_table, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_table_fetch_row(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg2, SWIGTYPE_p_preludedb_sql_row, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_row_fetch_field(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_row_t *arg1 = (preludedb_sql_row_t *) 0 ; unsigned int arg2 ; preludedb_sql_field_t **arg3 = (preludedb_sql_field_t **) 0 ; unsigned int val2 ; int ecode2 = 0 ; preludedb_sql_field_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (preludedb_sql_field_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_row_fetch_field",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_row, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_sql_row_fetch_field" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = (unsigned int)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_row_fetch_field(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_field, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_row_fetch_field_by_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_row_t *arg1 = (preludedb_sql_row_t *) 0 ; char *arg2 = (char *) 0 ; preludedb_sql_field_t **arg3 = (preludedb_sql_field_t **) 0 ; preludedb_sql_field_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (preludedb_sql_field_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_row_fetch_field_by_name",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_row, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_row_fetch_field_by_name(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_preludedb_sql_field, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_field_get_value",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_field_get_value(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_get_len(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; PyObject * obj0 = 0 ; size_t result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_field_get_len",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = preludedb_sql_field_get_len(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_int8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int8_t *arg2 = (int8_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_int8",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int8_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int8" "', argument " "2"" of type '" "int8_t *""'"); } arg2 = (int8_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_int8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint8_t *arg2 = (uint8_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_uint8",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint8_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint8" "', argument " "2"" of type '" "uint8_t *""'"); } arg2 = (uint8_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_uint8(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_int16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int16_t *arg2 = (int16_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_int16",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int16_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int16" "', argument " "2"" of type '" "int16_t *""'"); } arg2 = (int16_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_int16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint16_t *arg2 = (uint16_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_uint16",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint16_t, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint16" "', argument " "2"" of type '" "uint16_t *""'"); } arg2 = (uint16_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_uint16(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_int32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int32_t *arg2 = (int32_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_int32",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int32" "', argument " "2"" of type '" "int32_t *""'"); } arg2 = (int32_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_int32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint32_t *arg2 = (uint32_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_uint32",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint32" "', argument " "2"" of type '" "uint32_t *""'"); } arg2 = (uint32_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_uint32(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_int64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; int64_t *arg2 = (int64_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_int64",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_int64" "', argument " "2"" of type '" "int64_t *""'"); } arg2 = (int64_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_int64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_uint64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_uint64",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long_long, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_uint64" "', argument " "2"" of type '" "uint64_t *""'"); } arg2 = (uint64_t *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_uint64(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; float *arg2 = (float *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_float",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_float" "', argument " "2"" of type '" "float *""'"); } arg2 = (float *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_float(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; double *arg2 = (double *) 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_sql_field_to_double",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_field_to_double" "', argument " "2"" of type '" "double *""'"); } arg2 = (double *)(argp2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_double(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_field_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_field_t *arg1 = (preludedb_sql_field_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; PyObject * obj0 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret, NULL); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_field_to_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql_field, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_field_to_string(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_build_criterion_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; prelude_string_t *arg2 = (prelude_string_t *) 0 ; char *arg3 = (char *) 0 ; idmef_criterion_operator_t arg4 ; idmef_criterion_value_t *arg5 = (idmef_criterion_value_t *) 0 ; void *argp4 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; { int ret; ret = prelude_string_new(&(arg2)); if ( ret < 0 ) { swig_python_raise_exception(ret, NULL); return NULL; } } if (!PyArg_ParseTuple(args,(char *)"OOOO:preludedb_sql_build_criterion_string",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_idmef_criterion_operator_t, 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "preludedb_sql_build_criterion_string" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "preludedb_sql_build_criterion_string" "', argument " "4"" of type '" "idmef_criterion_operator_t""'"); } else { arg4 = *((idmef_criterion_operator_t *)(argp4)); } } res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_idmef_criterion_value, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_build_criterion_string" "', argument " "5"" of type '" "idmef_criterion_value_t *""'"); } arg5 = (idmef_criterion_value_t *)(argp5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_build_criterion_string(arg1,arg2,(char const *)arg3,arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = PyString_FromStringAndSize(prelude_string_get_string(arg2), prelude_string_get_len(arg2)); prelude_string_destroy(arg2); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_time_from_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; idmef_time_t *arg1 = (idmef_time_t *) 0 ; char *arg2 = (char *) 0 ; int32_t arg3 ; uint32_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; unsigned int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOO:preludedb_sql_time_from_timestamp",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "1"" of type '" "idmef_time_t *""'"); } arg1 = (idmef_time_t *)(argp1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "3"" of type '" "int32_t""'"); } arg3 = (int32_t)(val3); ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_sql_time_from_timestamp" "', argument " "4"" of type '" "uint32_t""'"); } arg4 = (uint32_t)(val4); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_time_from_timestamp(arg1,(char const *)arg2,arg3,arg4); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_time_to_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; idmef_time_t *arg2 = (idmef_time_t *) 0 ; char *arg3 = (char *) 0 ; size_t arg4 ; char *arg5 = (char *) 0 ; size_t arg6 ; char *arg7 = (char *) 0 ; size_t arg8 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; size_t val4 ; int ecode4 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; size_t val6 ; int ecode6 = 0 ; int res7 ; char *buf7 = 0 ; int alloc7 = 0 ; size_t val8 ; int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:preludedb_sql_time_to_timestamp",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_time, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "2"" of type '" "idmef_time_t const *""'"); } arg2 = (idmef_time_t *)(argp2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "3"" of type '" "char *""'"); } arg3 = (char *)(buf3); ecode4 = SWIG_AsVal_size_t(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "4"" of type '" "size_t""'"); } arg4 = (size_t)(val4); res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "5"" of type '" "char *""'"); } arg5 = (char *)(buf5); ecode6 = SWIG_AsVal_size_t(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "6"" of type '" "size_t""'"); } arg6 = (size_t)(val6); res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7); if (!SWIG_IsOK(res7)) { SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "7"" of type '" "char *""'"); } arg7 = (char *)(buf7); ecode8 = SWIG_AsVal_size_t(obj7, &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "preludedb_sql_time_to_timestamp" "', argument " "8"" of type '" "size_t""'"); } arg8 = (size_t)(val8); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_sql_time_to_timestamp(arg1,(struct idmef_time const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc7 == SWIG_NEWOBJ) free((char*)buf7); return resultobj; fail: if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); if (alloc7 == SWIG_NEWOBJ) free((char*)buf7); return NULL; } SWIGINTERN PyObject *_wrap_preludedb_sql_get_plugin_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_sql_t *arg1 = (preludedb_sql_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_sql_get_plugin_error",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_sql_get_plugin_error(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if (!PyArg_ParseTuple(args,(char *)":preludedb_init")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_init(); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_deinit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if (!PyArg_ParseTuple(args,(char *)":preludedb_deinit")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS preludedb_deinit(); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t **arg1 = (preludedb_t **) 0 ; preludedb_sql_t *arg2 = (preludedb_sql_t *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; size_t arg5 ; preludedb_t *tmp1 ; char tmp4[PRELUDEDB_ERRBUF_SIZE] ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (preludedb_t **) &tmp1; } { arg4 = tmp4; arg5 = sizeof(tmp4); } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_new",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg2, SWIGTYPE_p_preludedb_sql, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg3 = NULL; else if ( PyString_Check(obj1) ) arg3 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_new(arg1,arg2,(char const *)arg3,arg4,arg5); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_format_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_get_format_name",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_get_format_name(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_format_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_get_format_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_get_format_version(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_set_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; char *arg2 = (char *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_set_format",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_set_format(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_sql(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; preludedb_sql_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_get_sql",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (preludedb_sql_t *)preludedb_get_sql(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_preludedb_sql, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_result_idents_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_result_idents_t *arg1 = (preludedb_result_idents_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_result_idents_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_result_idents, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_result_idents_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_result_idents_get_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_result_idents_t *arg1 = (preludedb_result_idents_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; uint64_t tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_result_idents_get_next",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_result_idents, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_result_idents_get_next(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = PyLong_FromUnsignedLongLong(*(arg2)); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_result_values_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_result_values_t *arg1 = (preludedb_result_values_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_result_values_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_result_values, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_result_values_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_result_values_get_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_result_values_t *arg1 = (preludedb_result_values_t *) 0 ; idmef_value_t ***arg2 = (idmef_value_t ***) 0 ; idmef_value_t **tmp2 ; PyObject * obj0 = 0 ; int result; { arg2 = &tmp2; } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_result_values_get_next",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_result_values, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_result_values_get_next(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { long size; size = PyInt_AsLong(resultobj); if ( size < 0 ) { swig_python_raise_exception(size, NULL); resultobj = NULL; } else if ( size == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else { idmef_value_t **values = *(arg2); int cnt; resultobj = PyList_New(0); for ( cnt = 0; cnt < size; cnt++ ) { PyObject *s = SWIG_NewPointerObj((void *) values[cnt], SWIGTYPE_p_idmef_value, 0); PyList_Append(resultobj, s); Py_XDECREF(s); } free(values); } } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_error_t arg2 ; char *arg3 = (char *) 0 ; size_t arg4 ; int val2 ; int ecode2 = 0 ; char tmp3[PRELUDEDB_ERRBUF_SIZE] ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *result = 0 ; { arg3 = tmp3; arg4 = sizeof(tmp3); } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_get_error",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_get_error" "', argument " "2"" of type '" "preludedb_error_t""'"); } arg2 = (preludedb_error_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_get_error(arg1,arg2,arg3,arg4); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_insert_message(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_message_t *arg2 = (idmef_message_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_insert_message",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_idmef_message, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_insert_message(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_alert_idents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; { arg6 = (preludedb_result_idents_t **) &tmp6; } if (!PyArg_ParseTuple(args,(char *)"OOOOO:preludedb_get_alert_idents",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_alert_idents" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_alert_idents" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_alert_idents" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_alert_idents" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_alert_idents(arg1,arg2,arg3,arg4,arg5,arg6); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_heartbeat_idents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; idmef_criteria_t *arg2 = (idmef_criteria_t *) 0 ; int arg3 ; int arg4 ; preludedb_result_idents_order_t arg5 ; preludedb_result_idents_t **arg6 = (preludedb_result_idents_t **) 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; preludedb_result_idents_t *tmp6 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; int result; { arg6 = (preludedb_result_idents_t **) &tmp6; } if (!PyArg_ParseTuple(args,(char *)"OOOOO:preludedb_get_heartbeat_idents",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_get_heartbeat_idents" "', argument " "2"" of type '" "idmef_criteria_t *""'"); } arg2 = (idmef_criteria_t *)(argp2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_get_heartbeat_idents" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_heartbeat_idents" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_heartbeat_idents" "', argument " "5"" of type '" "preludedb_result_idents_order_t""'"); } arg5 = (preludedb_result_idents_order_t)(val5); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_heartbeat_idents(arg1,arg2,arg3,arg4,arg5,arg6); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg6, SWIGTYPE_p_preludedb_result_idents, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; unsigned long long val2 ; int ecode2 = 0 ; idmef_message_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (idmef_message_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_get_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_get_alert" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_alert(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_heartbeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; idmef_message_t **arg3 = (idmef_message_t **) 0 ; unsigned long long val2 ; int ecode2 = 0 ; idmef_message_t *tmp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg3 = (idmef_message_t **) &tmp3; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_get_heartbeat",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_get_heartbeat" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_heartbeat(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg3, SWIGTYPE_p_idmef_message, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_alert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_alert",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_delete_alert" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_delete_alert(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_alert_from_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ssize_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_alert_from_list",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int i = 0; if ( ! PyList_Check(obj1) ) { PyErr_SetString(PyExc_TypeError,"not a list"); return NULL; } arg3 = PyList_Size(obj1); arg2 = malloc(arg3 * sizeof(uint64_t)); if ( !arg2 ) return NULL; for ( i = 0; i < arg3; i++ ) arg2[i] = (uint64_t) PyLong_AsUnsignedLongLong(PyList_GetItem(obj1, i)); } { Py_BEGIN_ALLOW_THREADS result = preludedb_delete_alert_from_list(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyLong_FromLongLong(result); } { free(arg2); } return resultobj; fail: { free(arg2); } return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_alert_from_result_idents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_result_idents_t *arg2 = (preludedb_result_idents_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ssize_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_alert_from_result_idents",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_preludedb_result_idents, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = preludedb_delete_alert_from_result_idents(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyLong_FromLongLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_heartbeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t arg2 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_heartbeat",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_delete_heartbeat" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = (uint64_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_delete_heartbeat(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_heartbeat_from_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; uint64_t *arg2 = (uint64_t *) 0 ; size_t arg3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ssize_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_heartbeat_from_list",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { int i = 0; if ( ! PyList_Check(obj1) ) { PyErr_SetString(PyExc_TypeError,"not a list"); return NULL; } arg3 = PyList_Size(obj1); arg2 = malloc(arg3 * sizeof(uint64_t)); if ( !arg2 ) return NULL; for ( i = 0; i < arg3; i++ ) arg2[i] = (uint64_t) PyLong_AsUnsignedLongLong(PyList_GetItem(obj1, i)); } { Py_BEGIN_ALLOW_THREADS result = preludedb_delete_heartbeat_from_list(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyLong_FromLongLong(result); } { free(arg2); } return resultobj; fail: { free(arg2); } return NULL; } SWIGINTERN PyObject *_wrap_preludedb_delete_heartbeat_from_result_idents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_result_idents_t *arg2 = (preludedb_result_idents_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ssize_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_delete_heartbeat_from_result_idents",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_preludedb_result_idents, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = preludedb_delete_heartbeat_from_result_idents(arg1,arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyLong_FromLongLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_get_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; preludedb_path_selection_t *arg2 = (preludedb_path_selection_t *) 0 ; idmef_criteria_t *arg3 = (idmef_criteria_t *) 0 ; prelude_bool_t arg4 ; int arg5 ; int arg6 ; preludedb_result_values_t **arg7 = (preludedb_result_values_t **) 0 ; void *argp3 = 0 ; int res3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; int val6 ; int ecode6 = 0 ; preludedb_result_values_t *tmp7 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; int result; { arg7 = (preludedb_result_values_t **) &tmp7; } if (!PyArg_ParseTuple(args,(char *)"OOOOOO:preludedb_get_values",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_preludedb_path_selection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_idmef_criteria, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "preludedb_get_values" "', argument " "3"" of type '" "idmef_criteria_t *""'"); } arg3 = (idmef_criteria_t *)(argp3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "preludedb_get_values" "', argument " "4"" of type '" "prelude_bool_t""'"); } arg4 = (prelude_bool_t)(val4); ecode5 = SWIG_AsVal_int(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "preludedb_get_values" "', argument " "5"" of type '" "int""'"); } arg5 = (int)(val5); ecode6 = SWIG_AsVal_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "preludedb_get_values" "', argument " "6"" of type '" "int""'"); } arg6 = (int)(val6); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_get_values(arg1,arg2,arg3,arg4,arg5,arg6,arg7); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { if ( PyInt_AsLong(resultobj) == 0 ) { resultobj = Py_None; Py_INCREF(Py_None); } else resultobj = SWIG_NewPointerObj((void *) * arg7, SWIGTYPE_p_preludedb_result_values, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_transaction_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_transaction_start",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_transaction_start(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_transaction_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_transaction_end",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_transaction_end(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_transaction_abort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_t *arg1 = (preludedb_t *) 0 ; PyObject * obj0 = 0 ; int result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_transaction_abort",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_transaction_abort(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_error_code_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; preludedb_error_t result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_error",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error" "', argument " "1"" of type '" "preludedb_error_code_t""'"); } arg1 = (preludedb_error_code_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (preludedb_error_t)preludedb_error(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_error_verbose__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) { PyObject *resultobj = 0; preludedb_error_code_t arg1 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; preludedb_error_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_error_verbose",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_verbose" "', argument " "1"" of type '" "preludedb_error_code_t""'"); } arg1 = (preludedb_error_code_t)(val1); { if ( obj1 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj1) ) arg2 = PyString_AsString(obj1); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj1->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (preludedb_error_t)preludedb_error_verbose(arg1,(char const *)arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_error_verbose(PyObject *self, PyObject *args) { PyObject *resultobj; PyObject *varargs; PyObject *newargs; newargs = PyTuple_GetSlice(args,0,2); varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1); resultobj = _wrap_preludedb_error_verbose__varargs__(self,newargs,varargs); Py_XDECREF(newargs); Py_XDECREF(varargs); return resultobj; } SWIGINTERN PyObject *_wrap_preludedb_error_check(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_error_t arg1 ; preludedb_error_code_t arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; prelude_bool_t result; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_error_check",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_check" "', argument " "1"" of type '" "preludedb_error_t""'"); } arg1 = (preludedb_error_t)(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "preludedb_error_check" "', argument " "2"" of type '" "preludedb_error_code_t""'"); } arg2 = (preludedb_error_code_t)(val2); { Py_BEGIN_ALLOW_THREADS result = (prelude_bool_t)preludedb_error_check(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_error_from_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; preludedb_error_t result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_error_from_errno",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_error_from_errno" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); { Py_BEGIN_ALLOW_THREADS result = (preludedb_error_t)preludedb_error_from_errno(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_error_t arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_strerror",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "preludedb_strerror" "', argument " "1"" of type '" "preludedb_error_t""'"); } arg1 = (preludedb_error_t)(val1); { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_strerror(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_check_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_check_version",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg1 = NULL; else if ( PyString_Check(obj0) ) arg1 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (char *)preludedb_check_version((char const *)arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_selected_path_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_selected_path_t **arg1 = (preludedb_selected_path_t **) 0 ; idmef_path_t *arg2 = (idmef_path_t *) 0 ; int arg3 ; preludedb_selected_path_t *tmp1 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; { arg1 = (preludedb_selected_path_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_selected_path_new",&obj0,&obj1)) SWIG_fail; res2 = SWIG_ConvertPtr(obj0, &argp2,SWIGTYPE_p_idmef_path, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "preludedb_selected_path_new" "', argument " "2"" of type '" "idmef_path_t *""'"); } arg2 = (idmef_path_t *)(argp2); ecode3 = SWIG_AsVal_int(obj1, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "preludedb_selected_path_new" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_selected_path_new(arg1,arg2,arg3); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_selected_path, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_selected_path_new_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_selected_path_t **arg1 = (preludedb_selected_path_t **) 0 ; char *arg2 = (char *) 0 ; preludedb_selected_path_t *tmp1 ; PyObject * obj0 = 0 ; int result; { arg1 = (preludedb_selected_path_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)"O:preludedb_selected_path_new_string",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) arg2 = NULL; else if ( PyString_Check(obj0) ) arg2 = PyString_AsString(obj0); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", obj0->ob_type->tp_name); return NULL; } } { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_selected_path_new_string(arg1,(char const *)arg2); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_selected_path, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_selected_path_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_selected_path_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_selected_path_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_selected_path_get_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; PyObject * obj0 = 0 ; idmef_path_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_selected_path_get_path",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (idmef_path_t *)preludedb_selected_path_get_path(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_idmef_path, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_selected_path_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_selected_path_t *arg1 = (preludedb_selected_path_t *) 0 ; PyObject * obj0 = 0 ; preludedb_selected_path_flags_t result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_selected_path_get_flags",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_selected_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (preludedb_selected_path_flags_t)preludedb_selected_path_get_flags(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_path_selection_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_path_selection_t **arg1 = (preludedb_path_selection_t **) 0 ; preludedb_path_selection_t *tmp1 ; int result; { arg1 = (preludedb_path_selection_t **) &tmp1; } if (!PyArg_ParseTuple(args,(char *)":preludedb_path_selection_new")) SWIG_fail; { Py_BEGIN_ALLOW_THREADS result = (int)preludedb_path_selection_new(arg1); Py_END_ALLOW_THREADS } { if ( result < 0 ) { swig_python_raise_exception(result, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ resultobj = PyInt_FromLong(result); } { resultobj = SWIG_NewPointerObj((void *) * arg1, SWIGTYPE_p_preludedb_path_selection, 0); } return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_path_selection_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_path_selection_destroy",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_path_selection_destroy(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_path_selection_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; preludedb_selected_path_t *arg2 = (preludedb_selected_path_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_path_selection_add",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_preludedb_selected_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS preludedb_path_selection_add(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_path_selection_get_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; preludedb_selected_path_t *arg2 = (preludedb_selected_path_t *) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; preludedb_selected_path_t *result = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:preludedb_path_selection_get_next",&obj0,&obj1)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { if ( obj1 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_preludedb_selected_path, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = (preludedb_selected_path_t *)preludedb_path_selection_get_next(arg1,arg2); Py_END_ALLOW_THREADS } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_preludedb_selected_path, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_preludedb_path_selection_get_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; preludedb_path_selection_t *arg1 = (preludedb_path_selection_t *) 0 ; PyObject * obj0 = 0 ; size_t result; if (!PyArg_ParseTuple(args,(char *)"O:preludedb_path_selection_get_count",&obj0)) SWIG_fail; { if ( obj0 == Py_None ) return NULL; if ( SWIG_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_preludedb_path_selection, SWIG_POINTER_EXCEPTION|0) ) return NULL; } { Py_BEGIN_ALLOW_THREADS result = preludedb_path_selection_get_count(arg1); Py_END_ALLOW_THREADS } resultobj = SWIG_From_size_t((size_t)(result)); return resultobj; fail: return NULL; } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"preludedb_get_values2", _wrap_preludedb_get_values2, METH_VARARGS, NULL}, { (char *)"preludedb_get_alert_idents2", _wrap_preludedb_get_alert_idents2, METH_VARARGS, NULL}, { (char *)"preludedb_get_heartbeat_idents2", _wrap_preludedb_get_heartbeat_idents2, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_new", _wrap_preludedb_sql_settings_new, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_new_from_string", _wrap_preludedb_sql_settings_new_from_string, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_destroy", _wrap_preludedb_sql_settings_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set", _wrap_preludedb_sql_settings_set, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_from_string", _wrap_preludedb_sql_settings_set_from_string, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get", _wrap_preludedb_sql_settings_get, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_host", _wrap_preludedb_sql_settings_set_host, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_host", _wrap_preludedb_sql_settings_get_host, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_port", _wrap_preludedb_sql_settings_set_port, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_port", _wrap_preludedb_sql_settings_get_port, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_name", _wrap_preludedb_sql_settings_set_name, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_name", _wrap_preludedb_sql_settings_get_name, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_user", _wrap_preludedb_sql_settings_set_user, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_user", _wrap_preludedb_sql_settings_get_user, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_pass", _wrap_preludedb_sql_settings_set_pass, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_pass", _wrap_preludedb_sql_settings_get_pass, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_log", _wrap_preludedb_sql_settings_set_log, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_log", _wrap_preludedb_sql_settings_get_log, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_type", _wrap_preludedb_sql_settings_set_type, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_type", _wrap_preludedb_sql_settings_get_type, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_set_file", _wrap_preludedb_sql_settings_set_file, METH_VARARGS, NULL}, { (char *)"preludedb_sql_settings_get_file", _wrap_preludedb_sql_settings_get_file, METH_VARARGS, NULL}, { (char *)"preludedb_sql_new", _wrap_preludedb_sql_new, METH_VARARGS, NULL}, { (char *)"preludedb_sql_destroy", _wrap_preludedb_sql_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_sql_enable_query_logging", _wrap_preludedb_sql_enable_query_logging, METH_VARARGS, NULL}, { (char *)"preludedb_sql_disable_query_logging", _wrap_preludedb_sql_disable_query_logging, METH_VARARGS, NULL}, { (char *)"preludedb_sql_query", _wrap_preludedb_sql_query, METH_VARARGS, NULL}, { (char *)"preludedb_sql_query_sprintf", _wrap_preludedb_sql_query_sprintf, METH_VARARGS, NULL}, { (char *)"preludedb_sql_insert", _wrap_preludedb_sql_insert, METH_VARARGS, NULL}, { (char *)"preludedb_sql_build_limit_offset_string", _wrap_preludedb_sql_build_limit_offset_string, METH_VARARGS, NULL}, { (char *)"preludedb_sql_transaction_start", _wrap_preludedb_sql_transaction_start, METH_VARARGS, NULL}, { (char *)"preludedb_sql_transaction_end", _wrap_preludedb_sql_transaction_end, METH_VARARGS, NULL}, { (char *)"preludedb_sql_transaction_abort", _wrap_preludedb_sql_transaction_abort, METH_VARARGS, NULL}, { (char *)"preludedb_sql_escape_fast", _wrap_preludedb_sql_escape_fast, METH_VARARGS, NULL}, { (char *)"preludedb_sql_escape", _wrap_preludedb_sql_escape, METH_VARARGS, NULL}, { (char *)"preludedb_sql_escape_binary", _wrap_preludedb_sql_escape_binary, METH_VARARGS, NULL}, { (char *)"preludedb_sql_unescape_binary", _wrap_preludedb_sql_unescape_binary, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_destroy", _wrap_preludedb_sql_table_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_get_column_name", _wrap_preludedb_sql_table_get_column_name, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_get_column_num", _wrap_preludedb_sql_table_get_column_num, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_get_column_count", _wrap_preludedb_sql_table_get_column_count, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_get_row_count", _wrap_preludedb_sql_table_get_row_count, METH_VARARGS, NULL}, { (char *)"preludedb_sql_table_fetch_row", _wrap_preludedb_sql_table_fetch_row, METH_VARARGS, NULL}, { (char *)"preludedb_sql_row_fetch_field", _wrap_preludedb_sql_row_fetch_field, METH_VARARGS, NULL}, { (char *)"preludedb_sql_row_fetch_field_by_name", _wrap_preludedb_sql_row_fetch_field_by_name, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_get_value", _wrap_preludedb_sql_field_get_value, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_get_len", _wrap_preludedb_sql_field_get_len, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_int8", _wrap_preludedb_sql_field_to_int8, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_uint8", _wrap_preludedb_sql_field_to_uint8, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_int16", _wrap_preludedb_sql_field_to_int16, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_uint16", _wrap_preludedb_sql_field_to_uint16, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_int32", _wrap_preludedb_sql_field_to_int32, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_uint32", _wrap_preludedb_sql_field_to_uint32, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_int64", _wrap_preludedb_sql_field_to_int64, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_uint64", _wrap_preludedb_sql_field_to_uint64, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_float", _wrap_preludedb_sql_field_to_float, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_double", _wrap_preludedb_sql_field_to_double, METH_VARARGS, NULL}, { (char *)"preludedb_sql_field_to_string", _wrap_preludedb_sql_field_to_string, METH_VARARGS, NULL}, { (char *)"preludedb_sql_build_criterion_string", _wrap_preludedb_sql_build_criterion_string, METH_VARARGS, NULL}, { (char *)"preludedb_sql_time_from_timestamp", _wrap_preludedb_sql_time_from_timestamp, METH_VARARGS, NULL}, { (char *)"preludedb_sql_time_to_timestamp", _wrap_preludedb_sql_time_to_timestamp, METH_VARARGS, NULL}, { (char *)"preludedb_sql_get_plugin_error", _wrap_preludedb_sql_get_plugin_error, METH_VARARGS, NULL}, { (char *)"preludedb_init", _wrap_preludedb_init, METH_VARARGS, NULL}, { (char *)"preludedb_deinit", _wrap_preludedb_deinit, METH_VARARGS, NULL}, { (char *)"preludedb_new", _wrap_preludedb_new, METH_VARARGS, NULL}, { (char *)"preludedb_destroy", _wrap_preludedb_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_get_format_name", _wrap_preludedb_get_format_name, METH_VARARGS, NULL}, { (char *)"preludedb_get_format_version", _wrap_preludedb_get_format_version, METH_VARARGS, NULL}, { (char *)"preludedb_set_format", _wrap_preludedb_set_format, METH_VARARGS, NULL}, { (char *)"preludedb_get_sql", _wrap_preludedb_get_sql, METH_VARARGS, NULL}, { (char *)"preludedb_result_idents_destroy", _wrap_preludedb_result_idents_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_result_idents_get_next", _wrap_preludedb_result_idents_get_next, METH_VARARGS, NULL}, { (char *)"preludedb_result_values_destroy", _wrap_preludedb_result_values_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_result_values_get_next", _wrap_preludedb_result_values_get_next, METH_VARARGS, NULL}, { (char *)"preludedb_get_error", _wrap_preludedb_get_error, METH_VARARGS, NULL}, { (char *)"preludedb_insert_message", _wrap_preludedb_insert_message, METH_VARARGS, NULL}, { (char *)"preludedb_get_alert_idents", _wrap_preludedb_get_alert_idents, METH_VARARGS, NULL}, { (char *)"preludedb_get_heartbeat_idents", _wrap_preludedb_get_heartbeat_idents, METH_VARARGS, NULL}, { (char *)"preludedb_get_alert", _wrap_preludedb_get_alert, METH_VARARGS, NULL}, { (char *)"preludedb_get_heartbeat", _wrap_preludedb_get_heartbeat, METH_VARARGS, NULL}, { (char *)"preludedb_delete_alert", _wrap_preludedb_delete_alert, METH_VARARGS, NULL}, { (char *)"preludedb_delete_alert_from_list", _wrap_preludedb_delete_alert_from_list, METH_VARARGS, NULL}, { (char *)"preludedb_delete_alert_from_result_idents", _wrap_preludedb_delete_alert_from_result_idents, METH_VARARGS, NULL}, { (char *)"preludedb_delete_heartbeat", _wrap_preludedb_delete_heartbeat, METH_VARARGS, NULL}, { (char *)"preludedb_delete_heartbeat_from_list", _wrap_preludedb_delete_heartbeat_from_list, METH_VARARGS, NULL}, { (char *)"preludedb_delete_heartbeat_from_result_idents", _wrap_preludedb_delete_heartbeat_from_result_idents, METH_VARARGS, NULL}, { (char *)"preludedb_get_values", _wrap_preludedb_get_values, METH_VARARGS, NULL}, { (char *)"preludedb_transaction_start", _wrap_preludedb_transaction_start, METH_VARARGS, NULL}, { (char *)"preludedb_transaction_end", _wrap_preludedb_transaction_end, METH_VARARGS, NULL}, { (char *)"preludedb_transaction_abort", _wrap_preludedb_transaction_abort, METH_VARARGS, NULL}, { (char *)"preludedb_error", _wrap_preludedb_error, METH_VARARGS, NULL}, { (char *)"preludedb_error_verbose", _wrap_preludedb_error_verbose, METH_VARARGS, NULL}, { (char *)"preludedb_error_check", _wrap_preludedb_error_check, METH_VARARGS, NULL}, { (char *)"preludedb_error_from_errno", _wrap_preludedb_error_from_errno, METH_VARARGS, NULL}, { (char *)"preludedb_strerror", _wrap_preludedb_strerror, METH_VARARGS, NULL}, { (char *)"preludedb_check_version", _wrap_preludedb_check_version, METH_VARARGS, NULL}, { (char *)"preludedb_selected_path_new", _wrap_preludedb_selected_path_new, METH_VARARGS, NULL}, { (char *)"preludedb_selected_path_new_string", _wrap_preludedb_selected_path_new_string, METH_VARARGS, NULL}, { (char *)"preludedb_selected_path_destroy", _wrap_preludedb_selected_path_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_selected_path_get_path", _wrap_preludedb_selected_path_get_path, METH_VARARGS, NULL}, { (char *)"preludedb_selected_path_get_flags", _wrap_preludedb_selected_path_get_flags, METH_VARARGS, NULL}, { (char *)"preludedb_path_selection_new", _wrap_preludedb_path_selection_new, METH_VARARGS, NULL}, { (char *)"preludedb_path_selection_destroy", _wrap_preludedb_path_selection_destroy, METH_VARARGS, NULL}, { (char *)"preludedb_path_selection_add", _wrap_preludedb_path_selection_add, METH_VARARGS, NULL}, { (char *)"preludedb_path_selection_get_next", _wrap_preludedb_path_selection_get_next, METH_VARARGS, NULL}, { (char *)"preludedb_path_selection_get_count", _wrap_preludedb_path_selection_get_count, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criteria = {"_p_idmef_criteria", "idmef_criteria_t *|struct idmef_criteria *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_criterion_value = {"_p_idmef_criterion_value", "struct idmef_criterion_value *|idmef_criterion_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_message = {"_p_idmef_message", "struct idmef_message *|idmef_message_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_path = {"_p_idmef_path", "idmef_path_t *|struct idmef_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_time = {"_p_idmef_time", "struct idmef_time *|idmef_time_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_idmef_value = {"_p_idmef_value", "struct idmef_value *|idmef_value_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int8_t = {"_p_int8_t", "int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_idmef_message = {"_p_p_idmef_message", "idmef_message_t **|struct idmef_message **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_p_idmef_value = {"_p_p_p_idmef_value", "struct idmef_value ***|idmef_value_t ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb = {"_p_p_preludedb", "preludedb_t **|struct preludedb **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_path_selection = {"_p_p_preludedb_path_selection", "struct preludedb_path_selection **|preludedb_path_selection_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_result_idents = {"_p_p_preludedb_result_idents", "preludedb_result_idents_t **|struct preludedb_result_idents **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_result_values = {"_p_p_preludedb_result_values", "struct preludedb_result_values **|preludedb_result_values_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_selected_path = {"_p_p_preludedb_selected_path", "preludedb_selected_path_t **|struct preludedb_selected_path **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql = {"_p_p_preludedb_sql", "preludedb_sql_t **|struct preludedb_sql **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_field = {"_p_p_preludedb_sql_field", "preludedb_sql_field_t **|struct preludedb_sql_field **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_row = {"_p_p_preludedb_sql_row", "preludedb_sql_row_t **|struct preludedb_sql_row **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_settings = {"_p_p_preludedb_sql_settings", "struct preludedb_sql_settings **|preludedb_sql_settings_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_preludedb_sql_table = {"_p_p_preludedb_sql_table", "preludedb_sql_table_t **|struct preludedb_sql_table **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "unsigned char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_bool_t = {"_p_prelude_bool_t", "enum prelude_bool_t *|prelude_bool_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_prelude_string = {"_p_prelude_string", "struct prelude_string *|prelude_string_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb = {"_p_preludedb", "preludedb_t *|struct preludedb *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_error_code_t = {"_p_preludedb_error_code_t", "enum preludedb_error_code_t *|preludedb_error_code_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_path_selection = {"_p_preludedb_path_selection", "preludedb_path_selection_t *|struct preludedb_path_selection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_idents = {"_p_preludedb_result_idents", "struct preludedb_result_idents *|preludedb_result_idents_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_idents_order_t = {"_p_preludedb_result_idents_order_t", "enum preludedb_result_idents_order_t *|preludedb_result_idents_order_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_result_values = {"_p_preludedb_result_values", "preludedb_result_values_t *|struct preludedb_result_values *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_selected_path = {"_p_preludedb_selected_path", "preludedb_selected_path_t *|struct preludedb_selected_path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_selected_path_flags_t = {"_p_preludedb_selected_path_flags_t", "enum preludedb_selected_path_flags_t *|preludedb_selected_path_flags_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql = {"_p_preludedb_sql", "preludedb_sql_t *|struct preludedb_sql *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_field = {"_p_preludedb_sql_field", "preludedb_sql_field_t *|struct preludedb_sql_field *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_row = {"_p_preludedb_sql_row", "struct preludedb_sql_row *|preludedb_sql_row_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_settings = {"_p_preludedb_sql_settings", "struct preludedb_sql_settings *|preludedb_sql_settings_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_table = {"_p_preludedb_sql_table", "struct preludedb_sql_table *|preludedb_sql_table_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_preludedb_sql_time_constraint_type_t = {"_p_preludedb_sql_time_constraint_type_t", "enum preludedb_sql_time_constraint_type_t *|preludedb_sql_time_constraint_type_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_double, &_swigt__p_float, &_swigt__p_idmef_criteria, &_swigt__p_idmef_criterion_operator_t, &_swigt__p_idmef_criterion_value, &_swigt__p_idmef_message, &_swigt__p_idmef_path, &_swigt__p_idmef_time, &_swigt__p_idmef_value, &_swigt__p_int, &_swigt__p_int16_t, &_swigt__p_int8_t, &_swigt__p_long_long, &_swigt__p_p_char, &_swigt__p_p_idmef_message, &_swigt__p_p_p_idmef_value, &_swigt__p_p_preludedb, &_swigt__p_p_preludedb_path_selection, &_swigt__p_p_preludedb_result_idents, &_swigt__p_p_preludedb_result_values, &_swigt__p_p_preludedb_selected_path, &_swigt__p_p_preludedb_sql, &_swigt__p_p_preludedb_sql_field, &_swigt__p_p_preludedb_sql_row, &_swigt__p_p_preludedb_sql_settings, &_swigt__p_p_preludedb_sql_table, &_swigt__p_p_unsigned_char, &_swigt__p_prelude_bool_t, &_swigt__p_prelude_string, &_swigt__p_preludedb, &_swigt__p_preludedb_error_code_t, &_swigt__p_preludedb_path_selection, &_swigt__p_preludedb_result_idents, &_swigt__p_preludedb_result_idents_order_t, &_swigt__p_preludedb_result_values, &_swigt__p_preludedb_selected_path, &_swigt__p_preludedb_selected_path_flags_t, &_swigt__p_preludedb_sql, &_swigt__p_preludedb_sql_field, &_swigt__p_preludedb_sql_row, &_swigt__p_preludedb_sql_settings, &_swigt__p_preludedb_sql_table, &_swigt__p_preludedb_sql_time_constraint_type_t, &_swigt__p_size_t, &_swigt__p_uint16_t, &_swigt__p_uint8_t, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criteria[] = { {&_swigt__p_idmef_criteria, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = { {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_criterion_value[] = { {&_swigt__p_idmef_criterion_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_message[] = { {&_swigt__p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_path[] = { {&_swigt__p_idmef_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_time[] = { {&_swigt__p_idmef_time, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_idmef_value[] = { {&_swigt__p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int16_t[] = { {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int8_t[] = { {&_swigt__p_int8_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_idmef_message[] = { {&_swigt__p_p_idmef_message, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_idmef_value[] = { {&_swigt__p_p_p_idmef_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb[] = { {&_swigt__p_p_preludedb, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_path_selection[] = { {&_swigt__p_p_preludedb_path_selection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_result_idents[] = { {&_swigt__p_p_preludedb_result_idents, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_result_values[] = { {&_swigt__p_p_preludedb_result_values, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_selected_path[] = { {&_swigt__p_p_preludedb_selected_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql[] = { {&_swigt__p_p_preludedb_sql, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_field[] = { {&_swigt__p_p_preludedb_sql_field, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_row[] = { {&_swigt__p_p_preludedb_sql_row, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_settings[] = { {&_swigt__p_p_preludedb_sql_settings, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_preludedb_sql_table[] = { {&_swigt__p_p_preludedb_sql_table, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_char[] = { {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_bool_t[] = { {&_swigt__p_prelude_bool_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_prelude_string[] = { {&_swigt__p_prelude_string, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb[] = { {&_swigt__p_preludedb, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_error_code_t[] = { {&_swigt__p_preludedb_error_code_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_path_selection[] = { {&_swigt__p_preludedb_path_selection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_idents[] = { {&_swigt__p_preludedb_result_idents, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_idents_order_t[] = { {&_swigt__p_preludedb_result_idents_order_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_result_values[] = { {&_swigt__p_preludedb_result_values, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_selected_path[] = { {&_swigt__p_preludedb_selected_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_selected_path_flags_t[] = { {&_swigt__p_preludedb_selected_path_flags_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql[] = { {&_swigt__p_preludedb_sql, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_field[] = { {&_swigt__p_preludedb_sql_field, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_row[] = { {&_swigt__p_preludedb_sql_row, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_settings[] = { {&_swigt__p_preludedb_sql_settings, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_table[] = { {&_swigt__p_preludedb_sql_table, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_preludedb_sql_time_constraint_type_t[] = { {&_swigt__p_preludedb_sql_time_constraint_type_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_uint8_t[] = { {&_swigt__p_uint8_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, _swigc__p_double, _swigc__p_float, _swigc__p_idmef_criteria, _swigc__p_idmef_criterion_operator_t, _swigc__p_idmef_criterion_value, _swigc__p_idmef_message, _swigc__p_idmef_path, _swigc__p_idmef_time, _swigc__p_idmef_value, _swigc__p_int, _swigc__p_int16_t, _swigc__p_int8_t, _swigc__p_long_long, _swigc__p_p_char, _swigc__p_p_idmef_message, _swigc__p_p_p_idmef_value, _swigc__p_p_preludedb, _swigc__p_p_preludedb_path_selection, _swigc__p_p_preludedb_result_idents, _swigc__p_p_preludedb_result_values, _swigc__p_p_preludedb_selected_path, _swigc__p_p_preludedb_sql, _swigc__p_p_preludedb_sql_field, _swigc__p_p_preludedb_sql_row, _swigc__p_p_preludedb_sql_settings, _swigc__p_p_preludedb_sql_table, _swigc__p_p_unsigned_char, _swigc__p_prelude_bool_t, _swigc__p_prelude_string, _swigc__p_preludedb, _swigc__p_preludedb_error_code_t, _swigc__p_preludedb_path_selection, _swigc__p_preludedb_result_idents, _swigc__p_preludedb_result_idents_order_t, _swigc__p_preludedb_result_values, _swigc__p_preludedb_selected_path, _swigc__p_preludedb_selected_path_flags_t, _swigc__p_preludedb_sql, _swigc__p_preludedb_sql_field, _swigc__p_preludedb_sql_row, _swigc__p_preludedb_sql_settings, _swigc__p_preludedb_sql_table, _swigc__p_preludedb_sql_time_constraint_type_t, _swigc__p_size_t, _swigc__p_uint16_t, _swigc__p_uint8_t, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* Number of items in variable part (ob_size) */ #endif (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif type_init = 1; } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif d = PyModule_GetDict(m); SWIG_InitializeModule(0); SWIG_InstallConstants(d,swig_const_table); SWIG_Python_SetConstant(d, "PRELUDE_BOOL_TRUE",SWIG_From_int((int)(PRELUDE_BOOL_TRUE))); SWIG_Python_SetConstant(d, "PRELUDE_BOOL_FALSE",SWIG_From_int((int)(PRELUDE_BOOL_FALSE))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_HOST",SWIG_FromCharPtr("host")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_PORT",SWIG_FromCharPtr("port")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_NAME",SWIG_FromCharPtr("name")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_USER",SWIG_FromCharPtr("user")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_PASS",SWIG_FromCharPtr("pass")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_TYPE",SWIG_FromCharPtr("type")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_FILE",SWIG_FromCharPtr("file")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_SETTING_LOG",SWIG_FromCharPtr("log")); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE",SWIG_From_int((int)(128))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_MIN",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_MIN))); SWIG_Python_SetConstant(d, "PRELUDEDB_SQL_TIME_CONSTRAINT_SEC",SWIG_From_int((int)(PRELUDEDB_SQL_TIME_CONSTRAINT_SEC))); SWIG_Python_SetConstant(d, "PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE",SWIG_From_int((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE))); SWIG_Python_SetConstant(d, "PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC",SWIG_From_int((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC))); SWIG_Python_SetConstant(d, "PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC",SWIG_From_int((int)(PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERRBUF_SIZE",SWIG_From_int((int)(512))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_NO_ERROR",SWIG_From_int((int)(PRELUDEDB_ERROR_NO_ERROR))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_GENERIC",SWIG_From_int((int)(PRELUDEDB_ERROR_GENERIC))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_SETTINGS_STRING",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_SETTINGS_STRING))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_CONNECTION",SWIG_From_int((int)(PRELUDEDB_ERROR_CONNECTION))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_QUERY",SWIG_From_int((int)(PRELUDEDB_ERROR_QUERY))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_COLUMN_NUM",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_COLUMN_NUM))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_COLUMN_NAME",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_COLUMN_NAME))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_VALUE",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_VALUE))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_VALUE_TYPE",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_VALUE_TYPE))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN",SWIG_From_int((int)(PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN",SWIG_From_int((int)(PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION",SWIG_From_int((int)(PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_NOT_IN_TRANSACTION",SWIG_From_int((int)(PRELUDEDB_ERROR_NOT_IN_TRANSACTION))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION",SWIG_From_int((int)(PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD",SWIG_From_int((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT",SWIG_From_int((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID",SWIG_From_int((int)(PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN",SWIG_From_int((int)(PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN))); SWIG_Python_SetConstant(d, "PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN",SWIG_From_int((int)(PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN))); SWIG_Python_SetConstant(d, "LIBPRELUDEDB_VERSION",SWIG_FromCharPtr("0.9.15.3")); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_GROUP_BY",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_GROUP_BY))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_ORDER_ASC",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_ORDER_ASC))); SWIG_Python_SetConstant(d, "PRELUDEDB_SELECTED_OBJECT_ORDER_DESC",SWIG_From_int((int)(PRELUDEDB_SELECTED_OBJECT_ORDER_DESC))); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } libpreludedb-1.0.0/bindings/Makefile.am0000664000076400007640000000510511227302347014733 00000000000000BINDING_DEPENDS=libpreludedb.i libpreludedb_perl.i libpreludedb_python.i \ $(top_srcdir)/src/include/preludedb-error.h \ $(top_srcdir)/src/include/preludedb.h \ $(top_srcdir)/src/include/preludedb-path-selection.h \ $(top_srcdir)/src/include/preludedb-plugin-format.h \ $(top_srcdir)/src/include/preludedb-plugin-sql.h \ $(top_srcdir)/src/include/preludedb-sql.h \ $(top_srcdir)/src/include/preludedb-sql-settings.h EXTRA_DIST = libpreludedb.i libpreludedb_perl.i libpreludedb_python.i perl/Makefile.PL.in perl/PreludeDB.pm python/setup.py.in python/preludedb.py perl/PreludeDB.c python/_preludedb.c CLEANFILES = perl/pm_to_blib perl/PreludeDB.o perl/blib python/build MAINTAINERCLEANFILES = perl/Makefile \ perl/Makefile.old \ perl/PreludeDB.bs \ perl/PreludeDB.c \ python/_preludedb.c all-am: perl python if HAVE_PERL perl: perl-build else perl: endif if HAVE_PYTHON python: python-build else python: endif if HAVE_PERL # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # perl-makefile: cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(BINDINGS_CC)" else perl-makefile: endif # proxy classes are an option for swig <= 1.3.19 and are activated by default with swig > 1.3.19 # as we don't want proxy classes, we must explicitly tell swig > 1.3.19 (that support the -noproxy option) # to not generate them perl/PreludeDB.c: $(BINDING_DEPENDS) if HAVE_SWIG $(SWIG) -I$(top_srcdir)/src/include @LIBPRELUDE_CFLAGS@ -o $@ -perl5 -nopm \ `$(SWIG) -perl5 -help 2>&1 | grep noproxy > /dev/null && echo -noproxy` $(srcdir)/libpreludedb.i endif python/_preludedb.c: $(BINDING_DEPENDS) if HAVE_SWIG $(SWIG) -I$(top_srcdir)/src/include @LIBPRELUDE_CFLAGS@ -o $@ -python -noproxy -interface _preludedb -module _preludedb $(srcdir)/libpreludedb.i endif perl-build: perl/PreludeDB.c perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" python-build: python/_preludedb.c cd python && CC="$(BINDINGS_CC)" $(PYTHON) setup.py build install-exec-hook: perl-makefile if HAVE_PERL cd perl && $(MAKE) LD_RUN_PATH="" install endif if HAVE_PYTHON cd python && $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` endif uninstall-hook: perl-makefile if HAVE_PERL cd perl && $(MAKE) uninstall endif if HAVE_PYTHON cd python && $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` endif clean-local: if HAVE_PERL cd perl && if test -f Makefile; then $(MAKE) clean; fi endif if HAVE_PYTHON cd python && $(PYTHON) setup.py clean -a endif -include $(top_srcdir)/git.mk libpreludedb-1.0.0/bindings/libpreludedb.i0000664000076400007640000000567111324461504015515 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude program. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #define inline %{ #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #include "preludedb-version.h" #include %} typedef struct idmef_value idmef_value_t; typedef struct idmef_criteria idmef_criteria_t; typedef struct idmef_message idmef_message_t; typedef struct idmef_time idmef_time_t; typedef struct idmef_path idmef_path_t; typedef struct idmef_criterion_value idmef_criterion_value_t; typedef struct prelude_string prelude_string_t; typedef int int32_t; typedef unsigned int uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; %ignore preludedb_error_t; typedef signed int preludedb_error_t; typedef enum { PRELUDE_BOOL_TRUE = TRUE, PRELUDE_BOOL_FALSE = FALSE } prelude_bool_t; #ifdef SWIGPYTHON %include libpreludedb_python.i #endif /* ! SWIGPYTHON */ #ifdef SWIGPERL %include libpreludedb_perl.i #endif /* ! SWIGPERL */ %apply SWIGTYPE **OUTPARAM { idmef_message_t **, preludedb_t **, preludedb_path_selection_t **, preludedb_result_idents_t **, preludedb_result_values_t **, preludedb_selected_path_t **, preludedb_sql_t **, preludedb_sql_settings_t ** }; %apply SWIGTYPE *INPARAM { idmef_message_t *, preludedb_t *, preludedb_path_selection_t *, preludedb_result_idents_t *, preludedb_result_values_t *, preludedb_selected_path_t *, preludedb_sql_t *, preludedb_sql_field_t *, preludedb_sql_row_t *, preludedb_sql_settings_t *, preludedb_sql_table_t * }; %apply SWIGTYPE **OUTRESULT { preludedb_result_idents_t **, preludedb_result_values_t **, preludedb_sql_field_t **, preludedb_sql_row_t **, preludedb_sql_table_t ** }; %include "preludedb-sql-settings.h" %include "preludedb-sql.h" %include "preludedb.h" %include "preludedb-error.h" %include "preludedb-version.h" %include "preludedb-path-selection.h" libpreludedb-1.0.0/bindings/Makefile.in0000664000076400007640000006113411347715642014761 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BINDING_DEPENDS = libpreludedb.i libpreludedb_perl.i libpreludedb_python.i \ $(top_srcdir)/src/include/preludedb-error.h \ $(top_srcdir)/src/include/preludedb.h \ $(top_srcdir)/src/include/preludedb-path-selection.h \ $(top_srcdir)/src/include/preludedb-plugin-format.h \ $(top_srcdir)/src/include/preludedb-plugin-sql.h \ $(top_srcdir)/src/include/preludedb-sql.h \ $(top_srcdir)/src/include/preludedb-sql-settings.h EXTRA_DIST = libpreludedb.i libpreludedb_perl.i libpreludedb_python.i perl/Makefile.PL.in perl/PreludeDB.pm python/setup.py.in python/preludedb.py perl/PreludeDB.c python/_preludedb.c CLEANFILES = perl/pm_to_blib perl/PreludeDB.o perl/blib python/build MAINTAINERCLEANFILES = perl/Makefile \ perl/Makefile.old \ perl/PreludeDB.bs \ perl/PreludeDB.c \ python/_preludedb.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 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 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: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook 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: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local 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-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-hook all-am: perl python @HAVE_PERL_TRUE@perl: perl-build @HAVE_PERL_FALSE@perl: @HAVE_PYTHON_TRUE@python: python-build @HAVE_PYTHON_FALSE@python: # # Workaround invalid Makefile generated by MakeMaker when UTF-8 is enabled. # @HAVE_PERL_TRUE@perl-makefile: @HAVE_PERL_TRUE@ cd perl && LANG="" DESTDIR=$(DESTDIR) LIBDIR=$(libdir) $(PERL) Makefile.PL @PERL_EXTRA_PARAMS@ CC="$(BINDINGS_CC)" @HAVE_PERL_FALSE@perl-makefile: # proxy classes are an option for swig <= 1.3.19 and are activated by default with swig > 1.3.19 # as we don't want proxy classes, we must explicitly tell swig > 1.3.19 (that support the -noproxy option) # to not generate them perl/PreludeDB.c: $(BINDING_DEPENDS) @HAVE_SWIG_TRUE@ $(SWIG) -I$(top_srcdir)/src/include @LIBPRELUDE_CFLAGS@ -o $@ -perl5 -nopm \ @HAVE_SWIG_TRUE@ `$(SWIG) -perl5 -help 2>&1 | grep noproxy > /dev/null && echo -noproxy` $(srcdir)/libpreludedb.i python/_preludedb.c: $(BINDING_DEPENDS) @HAVE_SWIG_TRUE@ $(SWIG) -I$(top_srcdir)/src/include @LIBPRELUDE_CFLAGS@ -o $@ -python -noproxy -interface _preludedb -module _preludedb $(srcdir)/libpreludedb.i perl-build: perl/PreludeDB.c perl-makefile cd perl && $(MAKE) LD_RUN_PATH="" python-build: python/_preludedb.c cd python && CC="$(BINDINGS_CC)" $(PYTHON) setup.py build install-exec-hook: perl-makefile @HAVE_PERL_TRUE@ cd perl && $(MAKE) LD_RUN_PATH="" install @HAVE_PYTHON_TRUE@ cd python && $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` uninstall-hook: perl-makefile @HAVE_PERL_TRUE@ cd perl && $(MAKE) uninstall @HAVE_PYTHON_TRUE@ cd python && $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` clean-local: @HAVE_PERL_TRUE@ cd perl && if test -f Makefile; then $(MAKE) clean; fi @HAVE_PYTHON_TRUE@ cd python && $(PYTHON) setup.py clean -a -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/bindings/libpreludedb_python.i0000664000076400007640000002037111226653036017114 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude program. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %{ void swig_python_raise_exception(int error, const char *strerror) { PyObject *module; PyObject *exception_class; PyObject *exception; module = PyImport_ImportModule("preludedb"); exception_class = PyObject_GetAttrString(module, "PreludeDBError"); exception = PyObject_CallFunction(exception_class, "is", error, strerror); if ( exception ) { PyErr_SetObject(exception_class, exception); Py_DECREF(exception); } Py_DECREF(module); Py_DECREF(exception_class); } %} %exception { Py_BEGIN_ALLOW_THREADS $function Py_END_ALLOW_THREADS } %typemap(in, numinputs=0) preludedb_result_values_t **result2 ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(in) preludedb_result_values_t ** { if ( $input == Py_None ) return NULL; if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, SWIG_POINTER_EXCEPTION|0) ) return NULL; } %typemap(argout) preludedb_result_values_t **result2 { long size; size = PyInt_AsLong($result); if ( size < 0 ) { swig_python_raise_exception(size, NULL); $result = NULL; } else if ( size == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else { PyObject *s = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); $result = PyTuple_New(2); PyTuple_SetItem($result, 0, s); PyTuple_SetItem($result, 1, PyInt_FromLong(size)); } }; %inline %{ int preludedb_get_values2(preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result2) { return preludedb_get_values(db, path_selection, criteria, distinct, limit, offset, result2); } %} %typemap(in, numinputs=0) preludedb_result_idents_t **result2 ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(in) preludedb_result_idents_t ** { if ( $input == Py_None ) return NULL; if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, SWIG_POINTER_EXCEPTION|0) ) return NULL; } %typemap(argout) preludedb_result_idents_t **result2 { long size; size = PyInt_AsLong($result); if ( size < 0 ) { swig_python_raise_exception(size, NULL); $result = NULL; } else if ( size == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else { PyObject *s = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); $result = PyTuple_New(2); PyTuple_SetItem($result, 0, s); PyTuple_SetItem($result, 1, PyInt_FromLong(size)); } }; %inline %{ int preludedb_get_alert_idents2(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result2) { return preludedb_get_alert_idents(db, criteria, limit, offset, order, result2); } int preludedb_get_heartbeat_idents2(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result2) { return preludedb_get_heartbeat_idents(db, criteria, limit, offset, order, result2); } %} %typemap(in) const char * { if ( $input == Py_None ) $1 = NULL; else if ( PyString_Check($input) ) $1 = PyString_AsString($input); else { PyErr_Format(PyExc_TypeError, "expected None or string, %s found", $input->ob_type->tp_name); return NULL; } }; %typemap(freearg) const char * ""; %typemap(in, numinputs=0) idmef_value_t ***values (idmef_value_t **tmp) { $1 = &tmp; }; %typemap(argout) idmef_value_t ***values { long size; size = PyInt_AsLong($result); if ( size < 0 ) { swig_python_raise_exception(size, NULL); $result = NULL; } else if ( size == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else { idmef_value_t **values = *($1); int cnt; $result = PyList_New(0); for ( cnt = 0; cnt < size; cnt++ ) { PyObject *s = SWIG_NewPointerObj((void *) values[cnt], $descriptor(idmef_value_t *), 0); PyList_Append($result, s); Py_XDECREF(s); } free(values); } }; %typemap(in, numinputs=0) SWIGTYPE **OUTPARAM ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTPARAM { $result = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); }; %typemap(in) SWIGTYPE *INPARAM { if ( $input == Py_None ) return NULL; if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, SWIG_POINTER_EXCEPTION|0) ) return NULL; } %typemap(in, numinputs=0) uint64_t *ident (uint64_t tmp) { $1 = &tmp; }; %typemap(in, numinputs=0) (char *errbuf, size_t size) (char tmp[PRELUDEDB_ERRBUF_SIZE]) { $1 = tmp; $2 = sizeof(tmp); }; %typemap(out) int { if ( $1 < 0 ) { swig_python_raise_exception($1, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ $result = PyInt_FromLong($1); }; %typemap(out) ssize_t { if ( $1 < 0 ) { swig_python_raise_exception($1, NULL); return NULL; } /* * swig workaround: we want to access ret from some argout typemap when ret can * contain the number of results for example, but the C result is not reachable * from argout */ $result = PyLong_FromLongLong($1); }; %typemap(argout) uint64_t *ident { if ( PyInt_AsLong($result) == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else $result = PyLong_FromUnsignedLongLong(*($1)); }; %typemap(in, numinputs=0) prelude_string_t *output { int ret; ret = prelude_string_new(&($1)); if ( ret < 0 ) { swig_python_raise_exception(ret, NULL); return NULL; } }; %typemap(argout) prelude_string_t *output { $result = PyString_FromStringAndSize(prelude_string_get_string($1), prelude_string_get_len($1)); prelude_string_destroy($1); }; %typemap(in, numinputs=0) SWIGTYPE **OUTRESULT ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTRESULT { if ( PyInt_AsLong($result) == 0 ) { $result = Py_None; Py_INCREF(Py_None); } else $result = SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0); }; %typemap(in, numinputs=0) char **output (char *tmp) { $1 = &tmp; }; %typemap(argout) char **output { if ( PyInt_AsLong($result) < 0 ) { swig_python_raise_exception(PyInt_AsLong($result), NULL); return NULL; } $result = PyString_FromString(*$1); free(*$1); }; %typemap(in) (uint64_t *idents, size_t size) { int i = 0; if ( ! PyList_Check($input) ) { PyErr_SetString(PyExc_TypeError,"not a list"); return NULL; } $2 = PyList_Size($input); $1 = malloc($2 * sizeof(uint64_t)); if ( !$1 ) return NULL; for ( i = 0; i < $2; i++ ) $1[i] = (uint64_t) PyLong_AsUnsignedLongLong(PyList_GetItem($input, i)); } %typemap(freearg) (uint64_t *idents, size_t size) { free($1); } %pythoncode %{ import prelude class PreludeDBError(prelude.PreludeError): def __str__(self): if self._strerror: return self._strerror return preludedb_strerror(self.errno) or "" %} libpreludedb-1.0.0/bindings/libpreludedb_perl.i0000664000076400007640000000646211226653036016542 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the Prelude program. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ %module PreludeDB %typemap(in) SWIGTYPE **OUTPARAM ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTPARAM { SV *sv; sv = SvRV($input); sv_setsv(sv, SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0)); }; %typemap(in) uint8_t { $1 = (uint8_t) SvIV($input); }; %typemap(in) uint64_t { if ( SvIOK($input) ) { $1 = (uint64_t) SvIV($input); } else { if ( sscanf(SvPV_nolen($input), "%" PRELUDE_PRIu64, &($1)) < 1 ) { croak("Argument %s is not an unsigned 64 bits integer\n", SvPV_nolen($input)); } } }; /* %typemap(out) int { */ /* $result = newSViv($1); */ /* argvi++; */ /* if ( $1 < 0 ) */ /* XSRETURN(argvi); */ /* }; */ %typemap(in) idmef_value_t ***values (idmef_value_t **tmp) { $1 = &tmp; }; %typemap(argout) idmef_value_t ***values { I32 len; unsigned int cnt; AV *av; if ( SvTYPE(SvRV($input)) != SVt_PVAV ) croak("want a reference to an array"); av = (AV *) SvRV($input); len = av_len(av); for ( cnt = 0; cnt < len; cnt++ ) { av_push(av, SWIG_NewPointerObj((void *) (*$1)[cnt], $descriptor(idmef_value_t *), 0)); } free($1); }; %typemap(in) SWIGTYPE *ident (uint64_t tmp) { $1 = &tmp; }; %typemap(argout) uint64_t *ident { if ( SvIV($result) == 0 ) sv_setsv(SvRV($input), &PL_sv_undef); else { sv_setsv(SvRV($input), sv_2mortal(newSVpvf("%" PRELUDE_PRIu64, *$1))); } }; %typemap(in) prelude_string_t *output { int ret; ret = prelude_string_new(&($1)); if ( ret < 0 ) croak("%s", prelude_strerror(ret)); }; %typemap(argout) prelude_string_t *output { sv_setsv(SvRV($input), newSVpv(prelude_string_get_string($1), 0)); prelude_string_destroy($1); }; %typemap(in) SWIGTYPE **OUTRESULT ($*1_type tmp) { $1 = ($1_ltype) &tmp; }; %typemap(argout) SWIGTYPE **OUTRESULT { if ( SvIV(ST(argvi - 1)) > 0 ) { SV *sv; sv = SvRV($input); sv_setsv(sv, SWIG_NewPointerObj((void *) * $1, $*1_descriptor, 0)); } }; %typemap(in) SWIGTYPE *INPARAM { if ( ! SvROK($input) ) { croak("Argument $argnum is null."); return; } if ( SWIG_ConvertPtr($input, (void **)&arg$argnum, $1_descriptor, 0) ) return; } %typemap(in) char **output (char *tmp) { $1 = &tmp; }; %typemap(argout) char **output { if ( SvIV($result) < 0 ) croak("%s", prelude_strerror(SvIV($result))); sv_setsv(SvRV($input), sv_2mortal(newSVpv(*$1, 0))); free(*$1); }; libpreludedb-1.0.0/preludedb-admin.c0000664000076400007640000011160111330531411014270 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "preludedb-path-selection.h" #include "preludedb.h" #define MAX_EVENT_PER_TRANSACTION 1000 /* * FIXME: cleanup the statistics handling mess. */ static sig_atomic_t stop_processing = 0; static const char *query_logging = NULL; static prelude_bool_t have_query_logging = FALSE; static uint64_t cur_count = 0; static int64_t limit = -1, offset = 0, offset_copy, limit_copy = -1; static idmef_criteria_t *criteria = NULL; static unsigned int events_per_transaction = MAX_EVENT_PER_TRANSACTION; typedef struct { prelude_list_t list; double elapsed; size_t processed; const char *opname; } stat_item_t; /* * Runtime statistics. */ static PRELUDE_LIST(stat_list); static struct timeval start, end; static sig_atomic_t dump_stat = FALSE; /* * */ ssize_t (*delete_message_from_result_idents)(preludedb_t *db, preludedb_result_idents_t *result) = NULL; ssize_t (*delete_message_from_list)(preludedb_t *db, uint64_t *idents, size_t size) = NULL; int (*get_message)(preludedb_t *db, uint64_t ident, idmef_message_t **message) = NULL; int (*get_message_idents)(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result) = NULL; #define stat_compute(stat, op, count) stat_start(stat); op; stat_end(stat, count) #ifndef MIN # define MIN(x, y) (((x) < (y)) ? (x) : (y)) #endif static stat_item_t *stat_item_new(const char *opname) { stat_item_t *st; st = calloc(1, sizeof(*st)); if ( ! st ) return NULL; st->opname = opname; prelude_list_add_tail(&stat_list, &st->list); return st; } static void stat_dump_all(void) { stat_item_t *stat; prelude_list_t *tmp; double total_elapsed = 0; size_t total_processed = 0; prelude_list_for_each(&stat_list, tmp) { stat = prelude_list_entry(tmp, stat_item_t, list); total_elapsed += stat->elapsed; total_processed = stat->processed; if ( limit != -1 ) fprintf(stderr, "%" PRELUDE_PRIu64 "/%" PRELUDE_PRIu64, (uint64_t) stat->processed, (uint64_t) limit); else fprintf(stderr, "%" PRELUDE_PRIu64, (uint64_t) stat->processed); fprintf(stderr, " '%s' events processed in %f seconds (%f seconds/events - %f %s/sec average).\n", stat->opname, stat->elapsed, stat->elapsed / stat->processed, stat->processed / stat->elapsed, stat->opname); } if ( limit != -1 ) fprintf(stderr, "%" PRELUDE_PRIu64 "/%" PRELUDE_PRIu64, (uint64_t) total_processed, (uint64_t) limit); else fprintf(stderr, "%" PRELUDE_PRIu64, (uint64_t) total_processed); fprintf(stderr, " events processed in %f seconds (%f seconds/events - %f events/sec average).\n", total_elapsed, total_elapsed / total_processed, total_processed / total_elapsed); } static void compute_elapsed(stat_item_t *stat, struct timeval *end, struct timeval *start) { int nsec; /* Perform the carry for the later subtraction by updating 'start'. */ if ( end->tv_usec < start->tv_usec ) { nsec = (start->tv_usec - end->tv_usec) / 1000000 + 1; start->tv_usec -= 1000000 * nsec; start->tv_sec += nsec; } if ( end->tv_usec - start->tv_usec > 1000000 ) { nsec = (end->tv_usec - start->tv_usec) / 1000000; start->tv_usec += 1000000 * nsec; start->tv_sec -= nsec; } /* Compute the time remaining to wait. tv_usec is certainly positive. */ stat->elapsed += (end->tv_sec - start->tv_sec); stat->elapsed += ((float) (end->tv_usec - start->tv_usec) / 1000000); } static void stat_end(stat_item_t *stat, size_t count) { gettimeofday(&end, NULL); stat->processed += count; compute_elapsed(stat, &end, &start); if ( ! dump_stat ) return; stat_dump_all(); dump_stat = FALSE; } static void stat_start(stat_item_t *stat) { gettimeofday(&start, NULL); } static void free_global(void) { if ( criteria ) idmef_criteria_destroy(criteria); } static void flush_transaction_if_needed(preludedb_t *db, unsigned int *event_no, unsigned int increment) { if ( ! event_no ) cur_count += increment; else if ( events_per_transaction ) { (*event_no) += increment; if ( *event_no >= events_per_transaction || (increment == 0 && *event_no) ) { preludedb_transaction_end(db); preludedb_transaction_start(db); cur_count += *event_no; *event_no = 0; } } } static void transaction_start(preludedb_t *db) { if ( events_per_transaction > 1 ) preludedb_transaction_start(db); } static void transaction_end(preludedb_t *db, int ret, unsigned int event_no) { if ( events_per_transaction > 1 ) { if ( ret < 0 ) preludedb_transaction_abort(db); else { cur_count += event_no; preludedb_transaction_end(db); } } } static void handle_stats_signal(int signo) { /* * re-establish signal handler */ signal(signo, handle_stats_signal); dump_stat = TRUE; } static void handle_signal(int signo) { char buf[] = "Interrupted by signal. Will exit after current transaction.\n"; /* * re-establish signal handler */ signal(signo, handle_signal); write(STDERR_FILENO, buf, sizeof(buf)); stop_processing = TRUE; } static int db_error(preludedb_t *db, ssize_t ret, const char *fmt, ...) { va_list ap; if ( ret == 0 ) return ret; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, ": %s.\n", preludedb_strerror(ret)); return ret; } static int fetch_message_idents_limited(preludedb_t *db, preludedb_result_idents_t **result, prelude_bool_t no_increment) { int count; int64_t local_limit; local_limit = (limit_copy < 0) ? events_per_transaction : MIN(events_per_transaction, limit_copy); count = get_message_idents(db, criteria, (int) local_limit, (int) offset + ((no_increment) ? 0 : cur_count), 0, result); if ( count < 0 ) return db_error(db, count, "retrieving alert ident failed"); if ( limit_copy > 0 ) limit_copy -= count; return count; } static int set_criteria(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { int ret; ret = idmef_criteria_new_from_string(&criteria, optarg); if ( ret < 0 ) prelude_perror(ret, "could not load criteria"); return ret; } static int set_query_logging(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { have_query_logging = TRUE; if ( optarg && strcmp(optarg, "-") != 0 ) query_logging = strdup(optarg); return 0; } static int set_count(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { limit = strtoll(optarg, NULL, 0); if ( limit == PRELUDE_INT64_MIN || limit == PRELUDE_INT64_MAX ) { fprintf(stderr, "Invalid count specified: '%s'.\n", optarg); return -1; } limit_copy = limit; return 0; } static int set_offset(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { offset = strtoll(optarg, NULL, 0); if ( offset == PRELUDE_INT64_MIN || offset == PRELUDE_INT64_MAX ) { fprintf(stderr, "Invalid offset specified: '%s'.\n", optarg); return -1; } if ( offset < 0 ) offset = 0; return 0; } static int set_events_per_transaction(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { events_per_transaction = atoi(optarg); return 0; } static int set_help(prelude_option_t *opt, const char *optarg, prelude_string_t *err, void *context) { return prelude_error(PRELUDE_ERROR_EOF); } static void cmd_generic_help(void) { fprintf(stderr, "Database arguments:\n"); fprintf(stderr, " host\t: Host where the database engine listen (default:localhost).\n"); fprintf(stderr, " port\t: Port where the database engine listen.\n"); fprintf(stderr, " type\t: Type of database (mysql/pgsql/sqlite).\n"); fprintf(stderr, " name\t: Name of the database.\n"); fprintf(stderr, " file\t: file where the database is stored (sqlite).\n"); fprintf(stderr, " user\t: User to access the database.\n"); fprintf(stderr, " pass\t: Password to access the database.\n\n"); fprintf(stderr, "Valid options:\n"); fprintf(stderr, " --offset : Skip processing until 'offset' events.\n"); fprintf(stderr, " --count : Process at most count events.\n"); fprintf(stderr, " --query-logging [filename] : Log SQL query to the specified file.\n"); fprintf(stderr, " --criteria : Only process events matching criteria.\n"); fprintf(stderr, " --events-per-transaction : Maximum number of event to process per transaction (default %d).\n", events_per_transaction); } static void cmd_delete_help(void) { fprintf(stderr, "Usage : delete [options]\n"); fprintf(stderr, "Example: preludedb-admin delete alert \"type=mysql name=dbname user=prelude\"\n\n"); fprintf(stderr, "Delete messages from .\n\n"); cmd_generic_help(); } static void cmd_save_help(void) { fprintf(stderr, "Usage : save [filename] [options]\n"); fprintf(stderr, "Example: preludedb-admin save alert \"type=mysql name=dbname user=prelude\" outputfile\n\n"); fprintf(stderr, "Save messages from into [filename].\n"); fprintf(stderr, "If no filename argument is provided, data will be written to standard output.\n\n"); cmd_generic_help(); } static void cmd_load_help(void) { fprintf(stderr, "Usage : load [filename] [options]\n"); fprintf(stderr, "Example: preludedb-admin load \"type=mysql name=dbname user=prelude\" inputfile\n\n"); fprintf(stderr, "Load messages from [filename] into .\n"); fprintf(stderr, "If no filename argument is provided, data will be read from standard input.\n\n"); cmd_generic_help(); } static void cmd_copy_move_help(prelude_bool_t delete_copied) { fprintf(stderr, "Usage : %s [options]\n", delete_copied ? "move" : "copy"); fprintf(stderr, "Example: preludedb-admin %s alert \"type=mysql name=dbname user=prelude\" \"type=pgsql name=dbname user=prelude\"\n\n", delete_copied ? "move" : "copy"); fprintf(stderr, "%s messages from to .\n\n", delete_copied ? "Move" : "Copy"); cmd_generic_help(); } static void cmd_print_help(void) { fprintf(stderr, "Usage : print [filename] [options]\n"); fprintf(stderr, "Example: preludedb-admin print alert \"type=mysql name=dbname user=prelude\"\n\n"); fprintf(stderr, "Retrieve and print message from .\n"); fprintf(stderr, "Data will be written to [filename] if provided.\n\n"); cmd_generic_help(); } static void cmd_count_help(void) { fprintf(stderr, "Usage : count [options]\n"); fprintf(stderr, "Example: preludedb-admin count alert \"type=mysql name=dbname user=prelude\"\n\n"); fprintf(stderr, "Retrieve event count from .\n"); cmd_generic_help(); } static void print_help(char **argv) { fprintf(stderr, "Usage: %s \n\n", argv[0]); fprintf(stderr, "\tcount - Retrieve event count from the database.\n"); fprintf(stderr, "\tcopy - Make a copy of a Prelude database to another database.\n"); fprintf(stderr, "\tdelete - Delete content of a Prelude database.\n"); fprintf(stderr, "\tload - Load a Prelude database from a file.\n"); fprintf(stderr, "\tmove - Move content of a Prelude database to another database.\n"); fprintf(stderr, "\tprint - Print message from a Prelude database.\n"); fprintf(stderr, "\tsave - Save a Prelude database to a file.\n\n"); } static int setup_generic_options(int *argc, char **argv) { int ret; prelude_string_t *err; prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "offset", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_offset, NULL); prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "count", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_count, NULL); prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "query-logging", NULL, PRELUDE_OPTION_ARGUMENT_OPTIONAL, set_query_logging, NULL); prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "criteria", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_criteria, NULL); prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 0, "events-per-transaction", NULL, PRELUDE_OPTION_ARGUMENT_REQUIRED, set_events_per_transaction, NULL); prelude_option_add(NULL, NULL, PRELUDE_OPTION_TYPE_CLI, 'h', "help", NULL, PRELUDE_OPTION_ARGUMENT_NONE, set_help, NULL); ret = prelude_option_read(NULL, NULL, argc, argv, &err, NULL); if ( ret < 0 && prelude_error_get_code(ret) != PRELUDE_ERROR_EOF ) fprintf(stderr, "Option error: %s.\n", prelude_strerror(ret)); else *argc -= (ret - 1); return ret; } static int setup_message_type(const char *type) { if ( strcasecmp(type, "alert") == 0 ) { get_message = preludedb_get_alert; get_message_idents = preludedb_get_alert_idents; delete_message_from_list = preludedb_delete_alert_from_list; delete_message_from_result_idents = preludedb_delete_alert_from_result_idents; } else if ( strcasecmp(type, "heartbeat") == 0 ) { get_message = preludedb_get_heartbeat; get_message_idents = preludedb_get_heartbeat_idents; delete_message_from_list = preludedb_delete_heartbeat_from_list; delete_message_from_result_idents = preludedb_delete_heartbeat_from_result_idents; } else { fprintf(stderr, "Invalid IDMEF message type: '%s', should be \"alert\" or \"heartbeat\".\n", type); return -1; } return 0; } static int db_new_from_string(preludedb_t **db, const char *str) { int ret; preludedb_sql_t *sql; preludedb_sql_settings_t *sql_settings; ret = preludedb_sql_settings_new_from_string(&sql_settings, str); if ( ret < 0 ) { fprintf(stderr, "Error loading database settings: %s.\n", preludedb_strerror(ret)); return ret; } ret = preludedb_sql_new(&sql, NULL, sql_settings); if ( ret < 0 ) { fprintf(stderr, "Error creating database interface: %s.\n", preludedb_strerror(ret)); preludedb_sql_settings_destroy(sql_settings); return ret; } ret = preludedb_new(db, sql, NULL, NULL, 0); if ( ret < 0 ) { fprintf(stderr, "could not initialize database '%s': %s\n", str, preludedb_strerror(ret)); preludedb_sql_destroy(sql); return ret; } if ( have_query_logging ) preludedb_sql_enable_query_logging(sql, query_logging); return 0; } static int do_delete(preludedb_t *db, preludedb_result_idents_t *idents, ssize_t (*dfunc)(preludedb_t *db, preludedb_result_idents_t *idents), stat_item_t *stat_delete) { ssize_t ret; stat_compute(stat_delete, ret = dfunc(db, idents), ret); if ( ret < 0 ) ret = db_error(db, ret, "delete event failed"); return ret; } static int copy_iterate(preludedb_t *src, preludedb_t *dst, preludedb_result_idents_t *idents, unsigned int *dst_event_no, int (*get_message)(preludedb_t *db, uint64_t ident, idmef_message_t **msg), ssize_t (*delete)(preludedb_t *db, uint64_t *idents, size_t size), stat_item_t *stat_fetch, stat_item_t *stat_insert, stat_item_t *stat_delete) { int ret = 0; ssize_t count; uint64_t ident; idmef_message_t *msg; size_t delete_index = 0; uint64_t delete_tbl[1024]; while ( (ret = preludedb_result_idents_get_next(idents, &ident)) > 0 ) { stat_compute(stat_fetch, ret = get_message(src, ident, &msg), 1); if ( ret < 0 ) { db_error(src, ret, "Error retrieving message ident %" PRELUDE_PRIu64 "", ident); return ret; } stat_compute(stat_insert, ret = preludedb_insert_message(dst, msg), 1); idmef_message_destroy(msg); if ( ret < 0 ) { db_error(dst, ret, "Error inserting message %" PRELUDE_PRIu64 "", ident); return ret; } if ( delete ) { delete_tbl[delete_index++] = ident; if ( (events_per_transaction && *dst_event_no >= events_per_transaction) || delete_index >= (sizeof(delete_tbl) / sizeof(*delete_tbl)) ) { stat_compute(stat_delete, count = delete(src, delete_tbl, delete_index), count); if ( count < 0 ) { db_error(dst, count, "Error deleting %d messages", delete_index); continue; } delete_index = 0; } } flush_transaction_if_needed(dst, dst_event_no, 1); } flush_transaction_if_needed(dst, dst_event_no, 0); if ( delete_index ) { stat_compute(stat_delete, count = delete(src, delete_tbl, delete_index), count); if ( count < 0 ) { db_error(dst, count, "Error deleting message"); return -1; } } return ret; } static int do_cmd_copy_move(int argc, char **argv, prelude_bool_t delete_copied) { int ret, idx, count; preludedb_t *src, *dst; preludedb_result_idents_t *idents; unsigned int dst_event_no = 0; stat_item_t *stat_delete = NULL; stat_item_t *stat_fetch = stat_item_new("fetch"); stat_item_t *stat_insert = stat_item_new("insert"); idx = setup_generic_options(&argc, argv); if ( idx < 0 || argc < 3 ) { cmd_copy_move_help(delete_copied); exit(1); } ret = setup_message_type(argv[idx++]); if ( ret < 0 ) { cmd_copy_move_help(delete_copied); exit(1); } ret = db_new_from_string(&src, argv[idx]); if ( ret < 0 ) return ret; ret = db_new_from_string(&dst, argv[idx + 1]); if ( ret < 0 ) return ret; if ( delete_copied ) stat_delete = stat_item_new("delete"); transaction_start(dst); do { count = ret = fetch_message_idents_limited(src, &idents, (delete_copied) ? TRUE : FALSE); if ( count > 0 ) { ret = copy_iterate(src, dst, idents, &dst_event_no, get_message, (delete_copied) ? delete_message_from_list : NULL, stat_fetch, stat_insert, stat_delete); preludedb_result_idents_destroy(idents); } } while ( count > 0 && ret >= 0 && ! stop_processing ); transaction_end(dst, ret, dst_event_no); preludedb_destroy(src); preludedb_destroy(dst); return ret; } static int cmd_copy(int argc, char **argv) { return do_cmd_copy_move(argc, argv, FALSE); } static int cmd_move(int argc, char **argv) { return do_cmd_copy_move(argc, argv, TRUE); } static int cmd_delete(int argc, char **argv) { preludedb_t *db; int ret, idx, count; unsigned int event_no = 0; preludedb_result_idents_t *idents; stat_item_t *stat_delete = stat_item_new("delete"); idx = setup_generic_options(&argc, argv); if ( idx < 0 || argc != 3 ) { cmd_delete_help(); exit(1); } ret = setup_message_type(argv[idx++]); if ( ret < 0 ) { cmd_delete_help(); exit(1); } if ( ! criteria ) { fprintf(stderr, "No criteria provided for deletion.\n"); return -1; } ret = db_new_from_string(&db, argv[idx]); if ( ret < 0 ) return ret; transaction_start(db); do { count = ret = fetch_message_idents_limited(db, &idents, TRUE); if ( count > 0 ) { ret = do_delete(db, idents, delete_message_from_result_idents, stat_delete); preludedb_result_idents_destroy(idents); flush_transaction_if_needed(db, &event_no, count); } } while ( count > 0 && ret >= 0 && ! stop_processing ); transaction_end(db, ret, event_no); preludedb_destroy(db); return ret; } static int save_msg(prelude_msgbuf_t *msgbuf, prelude_msg_t *msg) { int ret; prelude_io_t *fd = prelude_msgbuf_get_data(msgbuf); ret = prelude_msg_write(msg, fd); prelude_msg_recycle(msg); return ret; } static int save_iterate_message(preludedb_t *db, preludedb_result_idents_t *idents, prelude_msgbuf_t *msgbuf, int (*get_message)(preludedb_t *db, uint64_t ident, idmef_message_t **out), stat_item_t *stat_fetch, stat_item_t *stat_save) { int ret = 0; uint64_t ident; idmef_message_t *message; while ( ! stop_processing && (ret = preludedb_result_idents_get_next(idents, &ident)) > 0 ) { stat_compute(stat_fetch, ret = get_message(db, ident, &message), 1); if ( ret < 0 ) { db_error(db, ret, "Error retrieving message ident %" PRELUDE_PRIu64 "", ident); continue; } stat_compute(stat_save, ret = idmef_message_write(message, msgbuf); prelude_msgbuf_mark_end(msgbuf), 1); idmef_message_destroy(message); if ( ret < 0 ) { prelude_perror(ret, "Error writing message %" PRELUDE_PRIu64 " to disk", ident); continue; } cur_count++; } return 0; } static int cmd_save(int argc, char **argv) { int ret, idx, count; preludedb_t *db; prelude_io_t *io; FILE *fd = stdout; prelude_msgbuf_t *msgbuf; preludedb_result_idents_t *idents; stat_item_t *stat_fetch = stat_item_new("fetch"); stat_item_t *stat_save = stat_item_new("save"); idx = setup_generic_options(&argc, argv); if ( idx < 0 || argc < 3 ) { cmd_save_help(); exit(1); } ret = setup_message_type(argv[idx++]); if ( ret < 0 ) { cmd_save_help(); exit(1); } ret = db_new_from_string(&db, argv[idx]); if ( ret < 0 ) return ret; if ( argc > 3 && *argv[idx + 1] != '-' ) { fd = fopen(argv[idx + 1], "w"); if ( ! fd ) { fprintf(stderr, "could not open '%s' for writing: %s.\n", argv[idx + 1], strerror(errno)); return -1; } } ret = prelude_io_new(&io); if ( ret < 0 ) return ret; prelude_io_set_file_io(io, fd); ret = prelude_msgbuf_new(&msgbuf); if ( ret < 0 ) return ret; prelude_msgbuf_set_data(msgbuf, io); prelude_msgbuf_set_callback(msgbuf, save_msg); do { count = ret = fetch_message_idents_limited(db, &idents, FALSE); if ( count > 0 ) { ret = save_iterate_message(db, idents, msgbuf, get_message, stat_fetch, stat_save); preludedb_result_idents_destroy(idents); } } while ( count > 0 && ret >= 0 && ! stop_processing ); prelude_msgbuf_destroy(msgbuf); if ( fd != stdout ) prelude_io_close(io); preludedb_destroy(db); return ret; } static int do_read_message(prelude_io_t *io, prelude_msg_t **msg, idmef_message_t **idmef) { int ret; *msg = NULL; *idmef = NULL; ret = prelude_msg_read(msg, io); if ( ret < 0 ) { if ( prelude_error_get_code(ret) == PRELUDE_ERROR_EOF ) return 0; return ret; } if ( offset_copy > 0 ) { offset_copy--; prelude_msg_destroy(*msg); return 1; } if ( limit != -1 && cur_count >= (uint64_t) limit ) { prelude_msg_destroy(*msg); return 0; } ret = idmef_message_new(idmef); if ( ret < 0 ) { fprintf(stderr, "error creating new IDMEF message: %s.\n", prelude_strerror(ret)); return ret; } ret = idmef_message_read(*idmef, *msg); if ( ret < 0 ) return ret; return 1; } static int load_from_file(preludedb_t *db, prelude_io_t *io, stat_item_t *stat_fetch, stat_item_t *stat_insert, unsigned int *event_no) { int ret = 0; prelude_msg_t *msg; idmef_message_t *idmef; while ( ! stop_processing ) { stat_start(stat_fetch); ret = do_read_message(io, &msg, &idmef); stat_end(stat_fetch, (ret >= 0) ? ret : 0); if ( ret < 0 ) { fprintf(stderr, "error decoding IDMEF message: %s.\n", prelude_strerror(ret)); break; } if ( ret == 0 ) break; if ( ! idmef ) continue; if ( ! criteria || idmef_criteria_match(criteria, idmef) ) { stat_compute(stat_insert, ret = preludedb_insert_message(db, idmef), 1); if ( ret < 0 ) { db_error(db, ret, "error inserting IDMEF message"); break; } } idmef_message_destroy(idmef); prelude_msg_destroy(msg); flush_transaction_if_needed(db, event_no, 1); } return ret; } static int cmd_load(int argc, char **argv) { FILE *fd = stdin; preludedb_t *db; prelude_io_t *io; int ret, idx, argc2; unsigned int event_no = 0; stat_item_t *stat_fetch = stat_item_new("fetch"); stat_item_t *stat_insert = stat_item_new("insert"); argc2 = argc; idx = setup_generic_options(&argc2, argv); if ( idx < 0 || argc < 2 ) { cmd_load_help(); exit(1); } ret = db_new_from_string(&db, argv[idx++]); if ( ret < 0 ) return ret; ret = prelude_io_new(&io); if ( ret < 0 ) return ret; if ( idx == argc ) argv[argc++] = "-"; transaction_start(db); while ( idx < argc ) { fd = (strcmp(argv[idx], "-") == 0) ? stdin : fopen(argv[idx], "r"); if ( ! fd ) { fprintf(stderr, "could not open '%s' for reading: %s.\n", argv[idx], strerror(errno)); return -1; } prelude_io_set_file_io(io, fd); offset_copy = offset; ret = load_from_file(db, io, stat_fetch, stat_insert, &event_no); if ( ret < 0 ) { fprintf(stderr, "error reading reading '%s': %s.\n", argv[idx], prelude_strerror(ret)); break; } if ( fd != stdin ) prelude_io_close(io); idx++; } transaction_end(db, ret, event_no); prelude_io_destroy(io); preludedb_destroy(db); return ret; } static int print_iterate_message(preludedb_t *db, preludedb_result_idents_t *idents, prelude_io_t *io, int (*get_message)(preludedb_t *db, uint64_t ident, idmef_message_t **idmef), stat_item_t *stat_fetch, stat_item_t *stat_print) { int ret = 0; uint64_t ident; idmef_message_t *idmef; while ( ! stop_processing && (ret = preludedb_result_idents_get_next(idents, &ident)) > 0 ) { stat_compute(stat_fetch, ret = get_message(db, ident, &idmef), 1); if ( ret < 0 ) { db_error(db, ret, "Error retrieving message ident %" PRELUDE_PRIu64, ident); return ret; } stat_compute(stat_print, idmef_message_print(idmef, io), 1); idmef_message_destroy(idmef); cur_count++; } return ret; } static int cmd_print(int argc, char **argv) { int ret, idx, count; FILE *fd = stdout; preludedb_t *db; prelude_io_t *io; preludedb_result_idents_t *idents; stat_item_t *stat_fetch = stat_item_new("fetch"); stat_item_t *stat_print = stat_item_new("print"); idx = setup_generic_options(&argc, argv); if ( idx < 0 || argc < 3 ) { cmd_print_help(); exit(1); } ret = setup_message_type(argv[idx++]); if ( ret < 0 ) { cmd_print_help(); exit(1); } ret = db_new_from_string(&db, argv[idx]); if ( ret < 0 ) return ret; if ( argc > 3 && *argv[idx + 1] != '-' ) { fd = fopen(argv[idx + 1], "w"); if ( ! fd ) { fprintf(stderr, "could not open '%s' for reading: %s.\n", argv[idx + 1], strerror(errno)); return -1; } } ret = prelude_io_new(&io); if ( ret < 0 ) return ret; prelude_io_set_file_io(io, fd); do { count = ret = fetch_message_idents_limited(db, &idents, FALSE); if ( count > 0 ) { ret = print_iterate_message(db, idents, io, get_message, stat_fetch, stat_print); preludedb_result_idents_destroy(idents); } } while ( count > 0 && ret >= 0 && ! stop_processing ); if ( fd != stdout ) prelude_io_close(io); prelude_io_destroy(io); preludedb_destroy(db); return ret; } static int cmd_count(int argc, char **argv) { char buf[128]; int ret, idx; preludedb_t *db; idmef_value_t **values; preludedb_result_values_t *results; preludedb_path_selection_t *ps; preludedb_selected_path_t *sp; idx = setup_generic_options(&argc, argv); if ( idx < 0 || argc < 3 ) { cmd_count_help(); exit(1); } snprintf(buf, sizeof(buf), "count(%s.create_time)", argv[idx]); ret = setup_message_type(argv[idx++]); if ( ret < 0 ) { cmd_count_help(); exit(1); } ret = db_new_from_string(&db, argv[idx]); if ( ret < 0 ) return ret; ret = preludedb_path_selection_new(&ps); if ( ret < 0 ) { preludedb_destroy(db); return ret; } ret = preludedb_selected_path_new_string(&sp, buf); if ( ret < 0 ) { preludedb_destroy(db); preludedb_path_selection_destroy(ps); return ret; } preludedb_path_selection_add(ps, sp); ret = preludedb_get_values(db, ps, criteria, FALSE, (int) limit, (int) offset, &results); if ( ret < 0 ) { ret = db_error(db, ret, "error retrieving database count"); goto err; } ret = preludedb_result_values_get_next(results, &values); if ( ret < 0 ) goto err; printf("COUNT: %u\n", idmef_value_get_uint32(values[0])); idmef_value_destroy(values[0]); err: preludedb_path_selection_destroy(ps); preludedb_result_values_destroy(results); preludedb_destroy(db); return ret; } int main(int argc, char **argv) { int ret; size_t i; const struct { char *name; int (*run)(int argc, char **argv); } commands[] = { { "count", cmd_count }, { "copy", cmd_copy }, { "delete", cmd_delete }, { "load", cmd_load }, { "move", cmd_move }, { "print", cmd_print }, { "save", cmd_save }, }; signal(SIGINT, handle_signal); signal(SIGTERM, handle_signal); signal(SIGUSR1, handle_stats_signal); signal(SIGQUIT, handle_stats_signal); ret = preludedb_init(); if ( ret < 0 ) { prelude_perror(ret, "error initializing libpreludedb"); return ret; } if ( argc < 2 ) { print_help(argv); return -1; } for ( i = 0; i < sizeof(commands) / sizeof(*commands); i++ ) { if ( strcmp(argv[1], commands[i].name) != 0 ) continue; ret = commands[i].run(--argc, &argv[1]); if ( (ret < 0 || stop_processing) ) fprintf(stderr, "%s at transaction %" PRELUDE_PRIu64 ". Use --offset %" PRELUDE_PRIu64 " to resume operation.\n", (ret < 0) ? "Error" : "Interrupted by signal", cur_count, (offset == -1) ? cur_count : cur_count + offset); if ( cur_count > 0 || ret == 0 ) stat_dump_all(); free_global(); preludedb_deinit(); return ret; } fprintf(stderr, "Unknown command: %s.\n", argv[1]); print_help(argv); free_global(); preludedb_deinit(); return -1; } libpreludedb-1.0.0/m4/0000775000076400007640000000000011347715757011521 500000000000000libpreludedb-1.0.0/m4/lt~obsolete.m40000644000076400007640000001311311347715621014240 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 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 4 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_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 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])]) libpreludedb-1.0.0/m4/libpreludedb.m40000664000076400007640000001720211226653036014325 00000000000000dnl Autoconf macros for libpreludedb dnl $id$ # Modified for LIBPRELUDEDB -- Yoann Vandoorselaere # Modified for LIBGNUTLS -- nmav # Configure paths for LIBGCRYPT # Shamelessly stolen from the one of XDELTA by Owen Taylor # Werner Koch 99-12-09 dnl AM_PATH_LIBPRELUDEDB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]], THREAD_SUPPORT) dnl Test for libpreludedb, and define LIBPRELUDEDB_CFLAGS, LIBPRELUDEDB_LDFLAGS, and LIBPRELUDEDB_LIBS dnl AC_DEFUN([AM_PATH_LIBPRELUDEDB], [dnl dnl Get the cflags and libraries from the libpreludedb-config script dnl AC_ARG_WITH(libpreludedb-prefix, AC_HELP_STRING(--with-libpreludedb-prefix=PFX, Prefix where libpreludedb is installed (optional)), libpreludedb_config_prefix="$withval", libpreludedb_config_prefix="") if test x$libpreludedb_config_prefix != x ; then if test x${LIBPRELUDEDB_CONFIG+set} != xset ; then LIBPRELUDEDB_CONFIG=$libpreludedb_config_prefix/bin/libpreludedb-config fi fi AC_PATH_PROG(LIBPRELUDEDB_CONFIG, libpreludedb-config, no) if test "$LIBPRELUDEDB_CONFIG" != "no"; then if $($LIBPRELUDEDB_CONFIG --thread > /dev/null 2>&1); then if test x$4 = xtrue || test x$4 = xyes; then libpreludedb_config_args="--thread" fi fi fi min_libpreludedb_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libpreludedb - version >= $min_libpreludedb_version) no_libpreludedb="" if test "$LIBPRELUDEDB_CONFIG" = "no" ; then no_libpreludedb=yes else LIBPRELUDEDB_CFLAGS=`$LIBPRELUDEDB_CONFIG $libpreludedb_config_args $libpreludedb_config_args --cflags` LIBPRELUDEDB_LDFLAGS=`$LIBPRELUDEDB_CONFIG $libpreludedb_config_args $libpreludedb_config_args --ldflags` LIBPRELUDEDB_LIBS=`$LIBPRELUDEDB_CONFIG $libpreludedb_config_args $libpreludedb_config_args --libs` libpreludedb_config_version=`$LIBPRELUDEDB_CONFIG $libpreludedb_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LDFLAGS="$LDFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBPRELUDEDB_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDEDB_LDFLAGS" LIBS="$LIBS $LIBPRELUDEDB_LIBS" dnl dnl Now check if the installed libpreludedb is sufficiently new. Also sanity dnl checks the results of libpreludedb-config to some extent dnl rm -f conf.libpreludedbtest AC_TRY_RUN([ #include #include #include #include int main () { system ("touch conf.libpreludedbtest"); if( strcmp( preludedb_check_version(NULL), "$libpreludedb_config_version" ) ) { printf("\n*** 'libpreludedb-config --version' returned %s, but LIBPRELUDEDB (%s)\n", "$libpreludedb_config_version", preludedb_check_version(NULL) ); printf("*** was found! If libpreludedb-config was correct, then it is best\n"); printf("*** to remove the old version of LIBPRELUDEDB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libpreludedb-config was wrong, set the environment variable LIBPRELUDEDB_CONFIG\n"); printf("*** to point to the correct copy of libpreludedb-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(preludedb_check_version(NULL), LIBPRELUDEDB_VERSION ) ) { printf("\n*** LIBPRELUDEDB header file (version %s) does not match\n", LIBPRELUDEDB_VERSION); printf("*** library (version %s)\n", preludedb_check_version(NULL) ); } else { if ( preludedb_check_version( "$min_libpreludedb_version" ) ) { return 0; } else { printf("no\n*** An old version of LIBPRELUDEDB (%s) was found.\n", preludedb_check_version(NULL) ); printf("*** You need a version of LIBPRELUDEDB newer than %s. The latest version of\n", "$min_libpreludedb_version" ); printf("*** LIBPRELUDEDB is always available from http://www.prelude-ids.org/download/releases.\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libpreludedb-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBPRELUDEDB, but you can also set the LIBPRELUDEDB_CONFIG environment to point to the\n"); printf("*** correct copy of libpreludedb-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libpreludedb=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" fi if test "x$no_libpreludedb" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else if test -f conf.libpreludedbtest ; then : else AC_MSG_RESULT(no) fi if test "$LIBPRELUDEDB_CONFIG" = "no" ; then echo "*** The libpreludedb-config script installed by LIBPRELUDEDB could not be found" echo "*** If LIBPRELUDEDB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBPRELUDEDB_CONFIG environment variable to the" echo "*** full path to libpreludedb-config." else if test -f conf.libpreludedbtest ; then : else echo "*** Could not run libpreludedb test program, checking why..." CFLAGS="$CFLAGS $LIBPRELUDEDB_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDEDB_LDFLAGS" LIBS="$LIBS $LIBPRELUDEDB_LIBS" AC_TRY_LINK([ #include #include #include #include ], [ return !!preludedb_check_version(NULL); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBPRELUDEDB or finding the wrong" echo "*** version of LIBPRELUDEDB. If it is not finding LIBPRELUDEDB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBPRELUDEDB was incorrectly installed" echo "*** or that you have moved LIBPRELUDEDB since it was installed. In the latter case, you" echo "*** may want to edit the libpreludedb-config script: $LIBPRELUDEDB_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LDFLAGS="$ac_save_LDFLAGS" LIBS="$ac_save_LIBS" fi fi LIBPRELUDEDB_CFLAGS="" LIBPRELUDEDB_LDFLAGS="" LIBPRELUDEDB_LIBS="" ifelse([$3], , :, [$3]) fi rm -f conf.libpreludedbtest AC_SUBST(LIBPRELUDEDB_CFLAGS) AC_SUBST(LIBPRELUDEDB_LDFLAGS) AC_SUBST(LIBPRELUDEDB_LIBS) ]) dnl *-*wedit:notab*-* Please keep this as the last line. libpreludedb-1.0.0/m4/ax_c_check_flag.m40000664000076400007640000000554111226653036014733 00000000000000##### http://autoconf-archive.cryp.to/ax_c_check_flag.html # # SYNOPSIS # # AX_C_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE]) # # DESCRIPTION # # This macro tests if the C compiler supports the flag FLAG-TO-CHECK. # If successfull execute ACTION-IF-SUCCESS otherwise # ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be # used as in AC_LANG_PROGRAM macro. # # This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to # Bogdan Drozdowski for testing and bug fixes. # # LAST MODIFICATION # # 2007-11-26 # # COPYLEFT # # Copyright (c) 2007 Francesco Salvestrini # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_C_CHECK_FLAG],[ AC_PREREQ([2.61]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_SED]) flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'` AC_CACHE_CHECK([whether the C compiler accepts the $1 flag], [ax_cv_c_check_flag_$flag],[ AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([$2],[$3]) ],[ eval "ax_cv_c_check_flag_$flag=yes" ],[ eval "ax_cv_c_check_flag_$flag=no" ]) CFLAGS="$save_CFLAGS" AC_LANG_POP ]) AS_IF([eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"],[ : $4 ],[ : $5 ]) ]) libpreludedb-1.0.0/m4/ax_lib_postgresql.m40000664000076400007640000001170311226653036015411 00000000000000# =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_lib_postgresql.html # =========================================================================== # # SYNOPSIS # # AX_LIB_POSTGRESQL([MINIMUM-VERSION]) # # DESCRIPTION # # This macro provides tests of availability of PostgreSQL 'libpq' library # of particular version or newer. # # AX_LIB_POSTGRESQL macro takes only one argument which is optional. If # there is no required version passed, then macro does not run version # test. # # The --with-postgresql option takes one of three possible values: # # no - do not check for PostgreSQL client library # # yes - do check for PostgreSQL library in standard locations (pg_config # should be in the PATH) # # path - complete path to pg_config utility, use this option if pg_config # can't be found in the PATH # # This macro calls: # # AC_SUBST(POSTGRESQL_CFLAGS) # AC_SUBST(POSTGRESQL_LDFLAGS) # AC_SUBST(POSTGRESQL_VERSION) # # And sets: # # HAVE_POSTGRESQL # # LICENSE # # Copyright (c) 2008 Mateusz Loskot # # 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. AC_DEFUN([AX_LIB_POSTGRESQL], [ AC_ARG_WITH([postgresql], AC_HELP_STRING([--with-postgresql=@<:@ARG@:>@], [use PostgreSQL library @<:@default=yes@:>@, optionally specify path to pg_config] ), [ if test "$withval" = "no"; then want_postgresql="no" elif test "$withval" = "yes"; then want_postgresql="yes" else want_postgresql="yes" PG_CONFIG="$withval" fi ], [want_postgresql="yes"] ) POSTGRESQL_CFLAGS="" POSTGRESQL_LDFLAGS="" POSTGRESQL_VERSION="" dnl dnl Check PostgreSQL libraries (libpq) dnl if test "$want_postgresql" = "yes"; then if test -z "$PG_CONFIG" -o test; then AC_PATH_PROG([PG_CONFIG], [pg_config], []) fi if test ! -x "$PG_CONFIG"; then AC_MSG_ERROR([$PG_CONFIG does not exist or it is not an exectuable file]) PG_CONFIG="no" found_postgresql="no" fi if test "$PG_CONFIG" != "no"; then AC_MSG_CHECKING([for PostgreSQL libraries]) POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`" POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq" POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'` AC_DEFINE([HAVE_POSTGRESQL], [1], [Define to 1 if PostgreSQL libraries are available]) found_postgresql="yes" AC_MSG_RESULT([yes]) else found_postgresql="no" AC_MSG_RESULT([no]) fi fi dnl dnl Check if required version of PostgreSQL is available dnl postgresql_version_req=ifelse([$1], [], [], [$1]) if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then AC_MSG_CHECKING([if PostgreSQL version is >= $postgresql_version_req]) dnl Decompose required version string of PostgreSQL dnl and calculate its number representation postgresql_version_req_major=`expr $postgresql_version_req : '\([[0-9]]*\)'` postgresql_version_req_minor=`expr $postgresql_version_req : '[[0-9]]*\.\([[0-9]]*\)'` postgresql_version_req_micro=`expr $postgresql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$postgresql_version_req_micro" = "x"; then postgresql_version_req_micro="0" fi postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \ \+ $postgresql_version_req_minor \* 1000 \ \+ $postgresql_version_req_micro` dnl Decompose version string of installed PostgreSQL dnl and calculate its number representation postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([[0-9]]*\)'` postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'` postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$postgresql_version_micro" = "x"; then postgresql_version_micro="0" fi postgresql_version_number=`expr $postgresql_version_major \* 1000000 \ \+ $postgresql_version_minor \* 1000 \ \+ $postgresql_version_micro` postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number` if test "$postgresql_version_check" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi AC_SUBST([POSTGRESQL_VERSION]) AC_SUBST([POSTGRESQL_CFLAGS]) AC_SUBST([POSTGRESQL_LDFLAGS]) ]) libpreludedb-1.0.0/m4/ax_ld_check_flag.m40000664000076400007640000000573011226653036015110 00000000000000##### http://autoconf-archive.cryp.to/ax_ld_check_flag.html # # SYNOPSIS # # AX_LD_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE]) # # DESCRIPTION # # This macro tests if the C++ compiler supports the flag # FLAG-TO-CHECK. If successfull execute ACTION-IF-SUCCESS otherwise # ACTION-IF-FAILURE. PROLOGUE and BODY are optional and should be # used as in AC_LANG_PROGRAM macro. # # Example: # # AX_LD_CHECK_FLAG([-Wl,-L/usr/lib],[],[],[ # ... # ],[ # ... # ]) # # This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to # Bogdan Drozdowski for testing and bug fixes. # # LAST MODIFICATION # # 2007-11-26 # # COPYLEFT # # Copyright (c) 2007 Francesco Salvestrini # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_LD_CHECK_FLAG],[ AC_PREREQ([2.61]) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_SED]) flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'` AC_CACHE_CHECK([whether the linker accepts the $1 flag], [ax_cv_ld_check_flag_$flag],[ #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $1" AC_LINK_IFELSE([ AC_LANG_PROGRAM([$2],[$3]) ],[ eval "ax_cv_ld_check_flag_$flag=yes" ],[ eval "ax_cv_ld_check_flag_$flag=no" ]) LDFLAGS="$save_LDFLAGS" #AC_LANG_POP ]) AS_IF([eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"],[ : $4 ],[ : $5 ]) ]) libpreludedb-1.0.0/m4/libprelude.m40000664000076400007640000001746011226653036014025 00000000000000dnl Autoconf macros for libprelude dnl $id$ # Modified for LIBPRELUDE -- Yoann Vandoorselaere # Modified for LIBGNUTLS -- nmav # Configure paths for LIBGCRYPT # Shamelessly stolen from the one of XDELTA by Owen Taylor # Werner Koch 99-12-09 dnl AM_PATH_LIBPRELUDE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]], THREAD_SUPPORT) dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS, dnl LIBPRELUDE_LDFLAGS, and LIBPRELUDE_LIBS dnl AC_DEFUN([AM_PATH_LIBPRELUDE], [dnl dnl Get the cflags and libraries from the libprelude-config script dnl AC_ARG_WITH(libprelude-prefix, AC_HELP_STRING(--with-libprelude-prefix=PFX, Prefix where libprelude is installed (optional)), libprelude_config_prefix="$withval", libprelude_config_prefix="") if test x$libprelude_config_prefix != x ; then if test x${LIBPRELUDE_CONFIG+set} != xset ; then LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config fi fi AC_PATH_PROG(LIBPRELUDE_CONFIG, libprelude-config, no) if test "$LIBPRELUDE_CONFIG" != "no"; then if $($LIBPRELUDE_CONFIG --thread > /dev/null 2>&1); then LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --thread --cflags` if test x$4 = xtrue || test x$4 = xyes; then libprelude_config_args="--thread" else libprelude_config_args="--no-thread" fi else LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --pthread-cflags` fi fi min_libprelude_version=ifelse([$1], ,0.1.0,$1) AC_MSG_CHECKING(for libprelude - version >= $min_libprelude_version) no_libprelude="" if test "$LIBPRELUDE_CONFIG" = "no" ; then no_libprelude=yes else LIBPRELUDE_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --cflags` LIBPRELUDE_LDFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --ldflags` LIBPRELUDE_LIBS=`$LIBPRELUDE_CONFIG $libprelude_config_args --libs` LIBPRELUDE_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --prefix` LIBPRELUDE_CONFIG_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --config-prefix` libprelude_config_version=`$LIBPRELUDE_CONFIG $libprelude_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LDFLAGS="$LDFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" dnl dnl Now check if the installed libprelude is sufficiently new. Also sanity dnl checks the results of libprelude-config to some extent dnl rm -f conf.libpreludetest AC_TRY_RUN([ #include #include #include #include int main () { system ("touch conf.libpreludetest"); if( strcmp( prelude_check_version(NULL), "$libprelude_config_version" ) ) { printf("\n*** 'libprelude-config --version' returned %s, but LIBPRELUDE (%s)\n", "$libprelude_config_version", prelude_check_version(NULL) ); printf("*** was found! If libprelude-config was correct, then it is best\n"); printf("*** to remove the old version of LIBPRELUDE. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libprelude-config was wrong, set the environment variable LIBPRELUDE_CONFIG\n"); printf("*** to point to the correct copy of libprelude-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(prelude_check_version(NULL), LIBPRELUDE_VERSION ) ) { printf("\n*** LIBPRELUDE header file (version %s) does not match\n", LIBPRELUDE_VERSION); printf("*** library (version %s)\n", prelude_check_version(NULL) ); } else { if ( prelude_check_version( "$min_libprelude_version" ) ) return 0; else { printf("no\n*** An old version of LIBPRELUDE (%s) was found.\n", prelude_check_version(NULL) ); printf("*** You need a version of LIBPRELUDE newer than %s. The latest version of\n", "$min_libprelude_version" ); printf("*** LIBPRELUDE is always available from http://www.prelude-ids.com/development/download/\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libprelude-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBPRELUDE, but you can also set the LIBPRELUDE_CONFIG environment to point to the\n"); printf("*** correct copy of libprelude-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libprelude=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" fi if test "x$no_libprelude" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else if test -f conf.libpreludetest ; then : else AC_MSG_RESULT(no) fi if test "$LIBPRELUDE_CONFIG" = "no" ; then echo "*** The libprelude-config script installed by LIBPRELUDE could not be found" echo "*** If LIBPRELUDE was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBPRELUDE_CONFIG environment variable to the" echo "*** full path to libprelude-config." else if test -f conf.libpreludetest ; then : else echo "*** Could not run libprelude test program, checking why..." CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" AC_TRY_LINK([ #include #include #include #include ], [ return !!prelude_check_version(NULL); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBPRELUDE or finding the wrong" echo "*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBPRELUDE was incorrectly installed" echo "*** or that you have moved LIBPRELUDE since it was installed. In the latter case, you" echo "*** may want to edit the libprelude-config script: $LIBPRELUDE_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LDFLAGS="$ac_save_LDFLAGS" LIBS="$ac_save_LIBS" fi fi LIBPRELUDE_CFLAGS="" LIBPRELUDE_LDFLAGS="" LIBPRELUDE_LIBS="" ifelse([$3], , :, [$3]) fi rm -f conf.libpreludetest AC_SUBST(LIBPRELUDE_CFLAGS) AC_SUBST(LIBPRELUDE_PTHREAD_CFLAGS) AC_SUBST(LIBPRELUDE_LDFLAGS) AC_SUBST(LIBPRELUDE_LIBS) AC_SUBST(LIBPRELUDE_PREFIX) AC_SUBST(LIBPRELUDE_CONFIG_PREFIX) ]) dnl *-*wedit:notab*-* Please keep this as the last line. libpreludedb-1.0.0/m4/ltoptions.m40000644000076400007640000002724211347715620013730 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 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 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_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], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [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_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], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && 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])]) libpreludedb-1.0.0/m4/ltversion.m40000644000076400007640000000127711347715621013723 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 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. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libpreludedb-1.0.0/m4/libtool.m40000644000076400007640000077341111347715620013347 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 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) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 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.58])dnl We use AC_INCLUDES_DEFAULT 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 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_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _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 _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_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which 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 _LT_PROG_ECHO_BACKSLASH 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 "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # 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. 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' # 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_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 "X$][$1" | $Xsed -e "$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 "X$" | $Xsed -e "$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' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) 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 "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_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]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 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) 2008 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. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && 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) fi ])# 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 which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _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 "X${COLLECT_NAMES+set}" != Xset; 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$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' TIMESTAMP='$TIMESTAMP' 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)], [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 # _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([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)]) 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], []) # _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 test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; 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" ]) 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 "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _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 "$lt_cv_apple_cc_single_mod" != "yes"; 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 # ----------------------- # 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. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # 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 if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _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 "x$enable_libtool_lock" != xno && 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 which ABI we are using. 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 which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|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 x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf64_sparc" ;; *) 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_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) 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 openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _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_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" # 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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 x"[$]$2" = xyes; 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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 x"[$]$2" = xyes; 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; ;; 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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 ;; 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"; 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 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 "$cross_compiling" = yes; 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 __oline__ "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 void fnord() { int i=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; /* 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 "x$enable_dlopen" != xyes; 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 ]) ;; *) 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 "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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 "x$lt_cv_dlopen_self" = xyes; 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:__oline__: $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:__oline__: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 in which 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 "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; 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 "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; 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_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 AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # 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 -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # 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` 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" else 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; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 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 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 need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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 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,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. 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 ;; 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 ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 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 ;; freebsd1*) dynamic_linker=no ;; 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[[123]]*) 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} $libname${shared_ext}' 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 ;; gnu*) version_type=linux 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 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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' ;; interix[[3-9]]*) version_type=linux 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 "$lt_cv_prog_gnu_ld" = yes; then version_type=linux 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 ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux 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 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], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 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 "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux 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 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 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 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 "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _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([], [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], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which 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 which 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 AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 /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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 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 ;; gnu*) 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]) 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 Linux ELF. linux* | k*bsd*-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*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; esac ]) 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_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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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 "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 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:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $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:__oline__: 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_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-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 "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _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([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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global 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};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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 # 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 #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. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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_save_LIBS="$LIBS" lt_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_save_LIBS" CFLAGS="$lt_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 "$pipe_works" = yes; 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 _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_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_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)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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)= ;; 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 "$host_cpu" = ia64; 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 ;; 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 "$host_cpu" != ia64; 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) 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*) # IBM XL 8.0 on PPC _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*) # 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 "$GCC" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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' ;; 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 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 "$host_cpu" = ia64; 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 ;; 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']) ;; 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) 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' ;; pgcc* | pgf77* | pgf90* | pgf95*) # 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*) # IBM XL C 8.0/Fortran 10.1 on PPC _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)='-Wl,' ;; *Sun\ F*) # 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)='' ;; 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*) _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 which 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_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # 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]) # # 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_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' 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 AIX nm, but means don't demangle with GNU 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")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ 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_flag_spec_ld, $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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; 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 2>&1` in *\ [[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 "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. _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(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/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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) tmp_diet=no if test "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no then tmp_addflag= 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; 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; $ECHO \"$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 "x$supports_anon_versioning" = xyes; 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 xlf*) # 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)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 $compiler_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 $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' 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 $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 ;; 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 can not *** 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 $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 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU 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")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 _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 "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 _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' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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. _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 `$ECHO "X$deplibs" | $Xsed -e '\''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(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; 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 ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $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 -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 "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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 "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $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 "$GCC" = yes -a "$with_gnu_ld" = no; 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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' ;; *) _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 "$with_gnu_ld" = no; 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 "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _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' ;; esac 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 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "$GCC" = yes; 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}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${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 ${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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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_MSG_CHECKING([whether -lc should be explicitly linked in]) $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_TAGVAR(archive_cmds_need_lc, $1)=no else _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* AC_MSG_RESULT([$_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_flag_spec_ld], [1], [[If ld is used when linking, 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([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _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([], [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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _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], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl 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_flag_spec_ld, $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(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 "$_lt_caught_CXX_error" != yes; 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_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++"} 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 "$GXX" = yes; 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 "$GXX" = yes; 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 "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -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 "\-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 "$host_cpu" = ia64; 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 # need to do runtime linking. 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 ;; 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,' if test "$GXX" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 _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 "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 _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' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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*) # _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(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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; 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 ;; freebsd[[12]]*) # 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 ;; gnu*) ;; 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 $output_objdir/$soname = $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; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $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 $with_gnu_ld = no; 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; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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) 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; $ECHO "X$list" | $Xsed' _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 | $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 | $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 | $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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will 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; $ECHO \"$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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # 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 "x$supports_anon_versioning" = xyes; 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; $ECHO \"$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='echo' # 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 ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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=echo 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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 "\-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*) # 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='echo' # 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 -nostdlib $LDFLAGS $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 -nostdlib ${wl}-M $wl$lib.exp -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 "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $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 -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 "\-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 can NOT 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(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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 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 "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _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 # 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 ]) 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 $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p 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 ;; *.$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 "$pre_test_object_deps_done" = no; 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 # 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)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; 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_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _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_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _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_flag_spec_ld, $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(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 "$_lt_disable_F77" != yes; 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 CC=${F77-"f77"} 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _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_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _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_flag_spec_ld, $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(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 "$_lt_disable_FC" != yes; 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 CC=${FC-"f95"} 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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" fi # test "$_lt_disable_FC" != yes 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_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} 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 ## 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" ])# _LT_LANG_GCJ_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_GCC=$GCC GCC= CC=${RC-"windres"} 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" ])# _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 "x${GCJFLAGS+set}" = xset || 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_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_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 $lt_ac_count -gt 10 && 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], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 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_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # 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" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname 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). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname 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). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) libpreludedb-1.0.0/m4/gtk-doc.m40000664000076400007640000000277311226653036013227 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ dnl AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first dnl AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST(HTML_DIR) dnl enable/disable documentation building AC_ARG_ENABLE(gtk-doc, AC_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [default=no]]),, enable_gtk_doc=no) have_gtk_doc=no if test x$enable_gtk_doc = xyes; then if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then have_gtk_doc=yes fi dnl do we want to do a version check? ifelse([$1],[],, [gtk_doc_min_version=$1 if test "$have_gtk_doc" = yes; then AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) have_gtk_doc=no fi fi ]) if test "$have_gtk_doc" != yes; then enable_gtk_doc=no fi fi AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") ]) libpreludedb-1.0.0/m4/Makefile.am0000664000076400007640000000031211226653036013454 00000000000000m4datadir = $(datadir)/aclocal dist_m4data_DATA = libpreludedb.m4 GITIGNOREFILES = libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 -include $(top_srcdir)/git.mk libpreludedb-1.0.0/m4/ax_lib_sqlite3.m40000664000076400007640000001167411226653036014601 00000000000000# =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_lib_sqlite3.html # =========================================================================== # # SYNOPSIS # # AX_LIB_SQLITE3([MINIMUM-VERSION]) # # DESCRIPTION # # Test for the SQLite 3 library of a particular version (or newer) # # This macro takes only one optional argument, required version of SQLite # 3 library. If required version is not passed, 3.0.0 is used in the test # of existance of SQLite 3. # # If no intallation prefix to the installed SQLite library is given the # macro searches under /usr, /usr/local, and /opt. # # This macro calls: # # AC_SUBST(SQLITE3_CFLAGS) # AC_SUBST(SQLITE3_LDFLAGS) # AC_SUBST(SQLITE3_VERSION) # # And sets: # # HAVE_SQLITE3 # # LICENSE # # Copyright (c) 2008 Mateusz Loskot # # 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. AC_DEFUN([AX_LIB_SQLITE3], [ AC_ARG_WITH([sqlite3], AC_HELP_STRING( [--with-sqlite3=@<:@ARG@:>@], [use SQLite 3 library @<:@default=yes@:>@, optionally specify the prefix for sqlite3 library] ), [ if test "$withval" = "no"; then WANT_SQLITE3="no" elif test "$withval" = "yes"; then WANT_SQLITE3="yes" ac_sqlite3_path="" else WANT_SQLITE3="yes" ac_sqlite3_path="$withval" fi ], [WANT_SQLITE3="yes"] ) SQLITE3_CFLAGS="" SQLITE3_LDFLAGS="" SQLITE3_VERSION="" if test "x$WANT_SQLITE3" = "xyes"; then ac_sqlite3_header="sqlite3.h" sqlite3_version_req=ifelse([$1], [], [3.0.0], [$1]) sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([[0-9]]*\.[[0-9]]*\)'` sqlite3_version_req_major=`expr $sqlite3_version_req : '\([[0-9]]*\)'` sqlite3_version_req_minor=`expr $sqlite3_version_req : '[[0-9]]*\.\([[0-9]]*\)'` sqlite3_version_req_micro=`expr $sqlite3_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$sqlite3_version_req_micro" = "x" ; then sqlite3_version_req_micro="0" fi sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \ \+ $sqlite3_version_req_minor \* 1000 \ \+ $sqlite3_version_req_micro` AC_MSG_CHECKING([for SQLite3 library >= $sqlite3_version_req]) if test "$ac_sqlite3_path" != ""; then ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib" ac_sqlite3_cppflags="-I$ac_sqlite3_path/include" else for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \ && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then ac_sqlite3_path=$ac_sqlite3_path_tmp ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include" ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib" break; fi done fi ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3" saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags" AC_LANG_PUSH(C++) AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([[@%:@include ]], [[ #if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number) // Everything is okay #else # error SQLite version is too old #endif ]] ) ], [ AC_MSG_RESULT([yes]) success="yes" ], [ AC_MSG_RESULT([not found]) succees="no" ] ) AC_LANG_POP([C++]) CPPFLAGS="$saved_CPPFLAGS" if test "$success" = "yes"; then SQLITE3_CFLAGS="$ac_sqlite3_cppflags" SQLITE3_LDFLAGS="$ac_sqlite3_ldflags" ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header" dnl Retrieve SQLite release version if test "x$ac_sqlite3_header_path" != "x"; then ac_sqlite3_version=`cat $ac_sqlite3_header_path \ | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \ | sed -e 's/"//'` if test $ac_sqlite3_version != ""; then SQLITE3_VERSION=$ac_sqlite3_version else AC_MSG_WARN([Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!]) fi fi AC_SUBST(SQLITE3_CFLAGS) AC_SUBST(SQLITE3_LDFLAGS) AC_SUBST(SQLITE3_VERSION) AC_DEFINE([HAVE_SQLITE3], [], [Have the SQLITE3 library]) fi fi ]) libpreludedb-1.0.0/m4/ltsugar.m40000644000076400007640000001042411347715620013350 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 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 ]) libpreludedb-1.0.0/m4/Makefile.in0000664000076400007640000005756611347715643013523 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = m4 DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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__installdirs = "$(DESTDIR)$(m4datadir)" DATA = $(dist_m4data_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ m4datadir = $(datadir)/aclocal dist_m4data_DATA = libpreludedb.m4 GITIGNOREFILES = libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_m4dataDATA: $(dist_m4data_DATA) @$(NORMAL_INSTALL) test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \ 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)$(m4datadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ done uninstall-dist_m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(m4datadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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)$(m4datadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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_m4dataDATA 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_m4dataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_m4dataDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-dist_m4dataDATA -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/m4/ax_lib_mysql.m40000664000076400007640000001063111226653036014352 00000000000000# =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_lib_mysql.html # =========================================================================== # # SYNOPSIS # # AX_LIB_MYSQL([MINIMUM-VERSION]) # # DESCRIPTION # # This macro provides tests of availability of MySQL client library of # particular version or newer. # # AX_LIB_MYSQL macro takes only one argument which is optional. If there # is no required version passed, then macro does not run version test. # # The --with-mysql option takes one of three possible values: # # no - do not check for MySQL client library # # yes - do check for MySQL library in standard locations (mysql_config # should be in the PATH) # # path - complete path to mysql_config utility, use this option if # mysql_config can't be found in the PATH # # This macro calls: # # AC_SUBST(MYSQL_CFLAGS) # AC_SUBST(MYSQL_LDFLAGS) # AC_SUBST(MYSQL_VERSION) # # And sets: # # HAVE_MYSQL # # LICENSE # # Copyright (c) 2008 Mateusz Loskot # # 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. AC_DEFUN([AX_LIB_MYSQL], [ AC_ARG_WITH([mysql], AC_HELP_STRING([--with-mysql=@<:@ARG@:>@], [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config] ), [ if test "$withval" = "no"; then want_mysql="no" elif test "$withval" = "yes"; then want_mysql="yes" else want_mysql="yes" MYSQL_CONFIG="$withval" fi ], [want_mysql="yes"] ) MYSQL_CFLAGS="" MYSQL_LDFLAGS="" MYSQL_VERSION="" dnl dnl Check MySQL libraries (libpq) dnl if test "$want_mysql" = "yes"; then if test -z "$MYSQL_CONFIG" -o test; then AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [no]) fi if test "$MYSQL_CONFIG" != "no"; then AC_MSG_CHECKING([for MySQL libraries]) MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" MYSQL_VERSION=`$MYSQL_CONFIG --version` AC_DEFINE([HAVE_MYSQL], [1], [Define to 1 if MySQL libraries are available]) found_mysql="yes" AC_MSG_RESULT([yes]) else found_mysql="no" AC_MSG_RESULT([no]) fi fi dnl dnl Check if required version of MySQL is available dnl mysql_version_req=ifelse([$1], [], [], [$1]) if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req]) dnl Decompose required version string of MySQL dnl and calculate its number representation mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'` mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'` mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$mysql_version_req_micro" = "x"; then mysql_version_req_micro="0" fi mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \ \+ $mysql_version_req_minor \* 1000 \ \+ $mysql_version_req_micro` dnl Decompose version string of installed MySQL dnl and calculate its number representation mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'` mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'` mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$mysql_version_micro" = "x"; then mysql_version_micro="0" fi mysql_version_number=`expr $mysql_version_major \* 1000000 \ \+ $mysql_version_minor \* 1000 \ \+ $mysql_version_micro` mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number` if test "$mysql_version_check" = "1"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi AC_SUBST([MYSQL_VERSION]) AC_SUBST([MYSQL_CFLAGS]) AC_SUBST([MYSQL_LDFLAGS]) ]) libpreludedb-1.0.0/m4/as-ac-expand.m40000664000076400007640000000210511226653036014125 00000000000000dnl as-ac-expand.m4 0.2.0 dnl autostars m4 macro for expanding directories using configure's prefix dnl thomas@apestaart.org dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) dnl example dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local AC_DEFUN([AS_AC_EXPAND], [ EXP_VAR=[$1] FROM_VAR=[$2] dnl first expand prefix and exec_prefix if necessary prefix_save=$prefix exec_prefix_save=$exec_prefix dnl if no prefix given, then use /usr/local, the default prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi dnl if no exec_prefix given, then use prefix if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" dnl loop until it doesn't change anymore while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done dnl clean up full_var=$new_full_var AC_SUBST([$1], "$full_var") dnl restore prefix and exec_prefix prefix=$prefix_save exec_prefix=$exec_prefix_save ]) libpreludedb-1.0.0/AUTHORS0000664000076400007640000000000011226653036012142 00000000000000libpreludedb-1.0.0/configure0000775000076400007640000351236711347715637013046 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 # PATH needs CR # 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_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 if (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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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. 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); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. 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 # Name of the executable. 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'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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 { (exit 1); exit 1; }; } # 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # 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 if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, 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= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src" # 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" gl_use_threads_default= gl_header_list= gl_func_list= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS format_schema_dir format_plugin_dir sql_plugin_dir db_plugin_dir SYSCONFDIR DATADIR LIBDIR LIBPRELUDEDB_SONAME BINDINGS_CC PCFLAGS GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE PKG_CONFIG HTML_DIR LIBTESTS_LIBDEPS YIELD_LIB HAVE_WINT_T HAVE_WCHAR_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H REPLACE_WCWIDTH REPLACE_WCSNRTOMBS REPLACE_WCSRTOMBS REPLACE_WCRTOMB REPLACE_MBSNRTOWCS REPLACE_MBSRTOWCS REPLACE_MBRLEN REPLACE_MBRTOWC REPLACE_MBSINIT REPLACE_WCTOB REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB HAVE_WCSNRTOMBS HAVE_WCSRTOMBS HAVE_WCRTOMB HAVE_MBSNRTOWCS HAVE_MBSRTOWCS HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC GNULIB_WCWIDTH GNULIB_WCSNRTOMBS GNULIB_WCSRTOMBS GNULIB_WCRTOMB GNULIB_MBSNRTOWCS GNULIB_MBSRTOWCS GNULIB_MBRLEN GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H REPLACE_TIMEGM REPLACE_STRPTIME REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX PTRDIFF_T_SUFFIX HAVE_SIGNED_WINT_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_SIG_ATOMIC_T BITSIZEOF_WINT_T BITSIZEOF_WCHAR_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_PTRDIFF_T HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H STDDEF_H HAVE_WCHAR_T REPLACE_NULL REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF REPLACE_VFPRINTF REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_STDIO_WRITE_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT REPLACE_RENAME REPLACE_REMOVE REPLACE_PRINTF REPLACE_POPEN REPLACE_PERROR REPLACE_OBSTACK_PRINTF REPLACE_GETLINE REPLACE_FTELLO REPLACE_FTELL REPLACE_FSEEKO REPLACE_FSEEK REPLACE_FREOPEN REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT HAVE_DPRINTF HAVE_DECL_VSNPRINTF HAVE_DECL_SNPRINTF HAVE_DECL_OBSTACK_PRINTF HAVE_DECL_GETLINE HAVE_DECL_GETDELIM HAVE_DECL_FPURGE GNULIB_VSPRINTF_POSIX GNULIB_VSNPRINTF GNULIB_VPRINTF_POSIX GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF GNULIB_VASPRINTF GNULIB_STDIO_H_SIGPIPE GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE GNULIB_PUTS GNULIB_PUTCHAR GNULIB_PUTC GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETLINE GNULIB_GETDELIM GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK GNULIB_FREOPEN GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN GNULIB_FFLUSH GNULIB_FCLOSE GNULIB_DPRINTF APPLE_UNIVERSAL_BUILD UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL REPLACE_STRNDUP REPLACE_STRERROR REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP HAVE_STRPBRK HAVE_DECL_STRNLEN HAVE_DECL_STRNDUP HAVE_DECL_STRDUP HAVE_STRCHRNUL HAVE_STPNCPY HAVE_STPCPY HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP GNULIB_MBSSPN GNULIB_MBSPBRK GNULIB_MBSCSPN GNULIB_MBSCASESTR GNULIB_MBSPCASECMP GNULIB_MBSNCASECMP GNULIB_MBSCASECMP GNULIB_MBSSTR GNULIB_MBSRCHR GNULIB_MBSCHR GNULIB_MBSNLEN GNULIB_MBSLEN GNULIB_STRTOK_R GNULIB_STRCASESTR GNULIB_STRSTR GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY GNULIB_STPCPY GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR LTLIBMULTITHREAD LIBMULTITHREAD LTLIBTHREAD LIBTHREAD LIBPTH_PREFIX LTLIBPTH LIBPTH FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYTHON PERL_EXTRA_PARAMS HAVE_PERL_FALSE HAVE_PERL_TRUE PERL HAVE_SWIG_FALSE HAVE_SWIG_TRUE SWIG HAVE_SQLITE3_FALSE HAVE_SQLITE3_TRUE SQLITE3_VERSION SQLITE3_LDFLAGS SQLITE3_CFLAGS HAVE_PGSQL_FALSE HAVE_PGSQL_TRUE POSTGRESQL_LDFLAGS POSTGRESQL_CFLAGS POSTGRESQL_VERSION PG_CONFIG HAVE_MYSQL_FALSE HAVE_MYSQL_TRUE MYSQL_LDFLAGS MYSQL_CFLAGS MYSQL_VERSION MYSQL_CONFIG LIBPRELUDE_CONFIG_PREFIX LIBPRELUDE_PREFIX LIBPRELUDE_LIBS LIBPRELUDE_LDFLAGS LIBPRELUDE_PTHREAD_CFLAGS LIBPRELUDE_CFLAGS LIBPRELUDE_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL OBJDUMP DLLTOOL AS EGREP GREP CPP RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE 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_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build 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_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_threads enable_static enable_shared with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_libprelude_prefix with_mysql with_postgresql with_sqlite3 with_swig with_perl with_perl_installdirs with_python enable_rpath with_libpth_prefix with_html_dir enable_gtk_doc ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # 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}' 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=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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } 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_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $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_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 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_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 this package 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/PACKAGE] --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] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then 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-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-threads={posix|solaris|pth|win32} specify multithreading API --disable-threads build without multithread safety --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-rpath do not hardcode runtime library paths --enable-gtk-doc use gtk-doc to build documentation default=no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libprelude-prefix=PFX Prefix where libprelude is installed (optional) --with-mysql=[ARG] use MySQL client library [default=yes], optionally specify path to mysql_config --with-postgresql=[ARG] use PostgreSQL library [default=yes], optionally specify path to pg_config --with-sqlite3=[ARG] use SQLite 3 library [default=yes], optionally specify the prefix for sqlite3 library --with-swig[=PATH] Re-generate perl/python bindings sources [default=auto] --with-perl[=PATH] Enable support for perl binding [default=auto] --with-perl-installdirs=[site|vendor] Specify where to install the Perl module [default=site] --with-python[=PATH] Enable support for python binding [default=auto] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib --without-libpth-prefix don't search for libpth in includedir and libdir --with-html-dir=PATH path to installed docs 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 C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP 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. _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 configure generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 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 $as_me, which was generated by GNU Autoconf 2.63. 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) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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:$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= ;; #( *) $as_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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX 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 cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX 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'; { (exit 1); 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 # 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 # 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 ac_site_file1=$CONFIG_SITE 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 -r "$ac_site_file"; then { $as_echo "$as_me:$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" 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. if test -f "$cache_file"; then { $as_echo "$as_me:$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:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gl_header_list="$gl_header_list errno.h" gl_header_list="$gl_header_list float.h" gl_header_list="$gl_header_list sys/mman.h" gl_func_list="$gl_func_list mprotect" gl_header_list="$gl_header_list stddef.h" gl_header_list="$gl_header_list stdint.h" gl_header_list="$gl_header_list wchar.h" gl_header_list="$gl_header_list stdio.h" gl_header_list="$gl_header_list string.h" gl_func_list="$gl_func_list strndup" gl_header_list="$gl_header_list time.h" gl_header_list="$gl_header_list sys/time.h" gl_func_list="$gl_func_list vasnprintf" # 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:$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:$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:$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:$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:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$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_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } 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. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; 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_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; 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:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; 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_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; 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 { $as_echo "$as_me:$LINENO: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 $as_echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- libpreludedb_major=1 libpreludedb_minor=0 libpreludedb_micro=0 libpreludedb_patchlevel= libpreludedb_version=$libpreludedb_major.$libpreludedb_minor.$libpreludedb_micro$libpreludedb_patchlevel libpreludedb_current=4 libpreludedb_revision=10 libpreludedb_age=4 LIBPRELUDEDB_SONAME=$libpreludedb_current:$libpreludedb_revision:$libpreludedb_age am__api_version='1.11' # 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:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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:$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:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # 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_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; 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 ( 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 rm -f conftest.file 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_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } 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 --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$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}" != 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$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:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$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:$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:$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 test "${ac_cv_path_mkdir+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 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. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$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:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$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 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_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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=libpreludedb VERSION=$libpreludedb_version 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # 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:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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:$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:$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$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:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$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 test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$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:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$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:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* 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" 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 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 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:$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:$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='\' 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:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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'. 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 8's {/usr,}/bin/sh. touch 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 ;; 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:$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 BINDINGS_CC="$CC" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$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:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$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:$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 if test "x$CC" != xcc; then { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 { $as_echo "$as_me:$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 test "${ac_cv_prog_CPP+set}" = set; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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:$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } 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:$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 test "${ac_cv_path_GREP+set}" = set; 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" { test -f "$ac_path_GREP" && $as_test_x "$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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; 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" { test -f "$ac_path_EGREP" && $as_test_x "$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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : 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 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF 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` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 $as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 $as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } fi if test "x$ac_cv_header_minix_config_h" = x""yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi case "$host_os" in hpux*) cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE 500 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; gl_use_threads=$enableval else if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else case "$host_os" in osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac fi fi if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_TRY_LINK test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi enable_dlopen=yes enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:$LINENO: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:$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:$LINENO: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:$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:$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 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$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:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$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 ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump # 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=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$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.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:$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 test "${ac_cv_path_SED+set}" = set; 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 $as_unset ac_script || 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" { test -f "$ac_path_SED" && $as_test_x "$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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$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:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; 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" { test -f "$ac_path_FGREP" && $as_test_x "$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 ac_count=`expr $ac_count + 1` 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_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$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 "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$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 "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; 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:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; 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:$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 test "${lt_cv_path_NM+set}" = set; 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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$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:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$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 -symbols" "link -dump -symbols" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$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:$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 if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; 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:6305: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:6308: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:6311: 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:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; 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; ;; 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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 ;; 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"; 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 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:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$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"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } 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:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$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 darwin*) if test "$GCC" = yes; 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$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:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; 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 # which 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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 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 ;; gnu*) 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]) 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 Linux ELF. linux* | k*bsd*-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*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } 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}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$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:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$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:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$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:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$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:$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 openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # 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:$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 test "${lt_cv_sys_global_symbol_pipe+set}" = set; 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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global 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};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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 # 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:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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 #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. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_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 "$pipe_works" = yes; 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:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && 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 which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 which ABI we are using. echo '#line 7513 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|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:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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" 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$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:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$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:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$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:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$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:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$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:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$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:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$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:$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:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; 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 test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; 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:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&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 "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 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=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # 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 # 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:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; 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:$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 "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # 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. 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' # 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 for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # 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:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; 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:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$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:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; 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:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$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 "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; 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" # 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:8848: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8852: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; 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= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; 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' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; 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 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; 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' ;; 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) 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' ;; pgcc* | pgf77* | pgf90* | pgf95*) # 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*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # 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='' ;; 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*) 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 which 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:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_pic_works+set}" = set; 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" # 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:9187: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9191: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; 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:$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 test "${lt_cv_prog_compiler_static_works+set}" = set; 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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:9292: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9296: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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:9347: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9351: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$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:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$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:$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_flag_spec_ld= 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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; 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 2>&1` in *\ [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 "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. _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' 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/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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) tmp_diet=no if test "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no then tmp_addflag= 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; 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; $ECHO \"$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 "x$supports_anon_versioning" = xyes; 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 xlf*) # 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= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 $compiler_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 $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' 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 $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 ;; 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 can not *** 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 $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 if test "$ld_shlibs" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU 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")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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. 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 `$ECHO "X$deplibs" | $Xsed -e '\''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' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo 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 ;; freebsd1*) ld_shlibs=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 -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${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 "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $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 "$GCC" = yes -a "$with_gnu_ld" = no; 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${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' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; 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 "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${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 ${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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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:$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:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # 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 -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # 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` 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" else 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; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 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 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 need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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 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,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. 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 ;; 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 ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 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 ;; freebsd1*) dynamic_linker=no ;; 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[123]*) 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} $libname${shared_ext}' 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 ;; gnu*) version_type=linux 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 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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' ;; interix[3-9]*) version_type=linux 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 "$lt_cv_prog_gnu_ld" = yes; then version_type=linux 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 ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux 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 save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 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 "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux 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 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 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 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:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$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 "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; 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:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; 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:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; 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 ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* 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 (); /* 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_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$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" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* 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 (); /* 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_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$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" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; 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 12150 "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 void fnord() { int i=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; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$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 test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; 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 12246 "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 void fnord() { int i=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; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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:$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:$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:$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:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$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 "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$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: { $as_echo "$as_me:$LINENO: checking for cpu-specific compiler flags" >&5 $as_echo_n "checking for cpu-specific compiler flags... " >&6; } if test "$host_cpu" == "x86_64" && test $enable_static = "yes"; then { $as_echo "$as_me:$LINENO: result: x86_64/static: adding -fPIC" >&5 $as_echo "x86_64/static: adding -fPIC" >&6; } flag=`echo "-fPIC" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -fPIC flag" >&5 $as_echo_n "checking whether the C compiler accepts the -fPIC flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; 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 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fPIC" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" 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 ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : CPPFLAGS="$CPPFLAGS -fPIC" else : fi else { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } fi { $as_echo "$as_me:$LINENO: checking for platform-specific compiler flags" >&5 $as_echo_n "checking for platform-specific compiler flags... " >&6; } case "$host_os" in darwin*) # It may be called "cc", but it's really a GCC derivative # with a problematic special precompiler and precompiled # headers; turn off the special precompiler, as some # apparently-legal code won't compile with its precompiled # headers. { $as_echo "$as_me:$LINENO: result: Darwin: adding -no-cpp-precomp" >&5 $as_echo "Darwin: adding -no-cpp-precomp" >&6; } flag=`echo "-no-cpp-precomp" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -no-cpp-precomp flag" >&5 $as_echo_n "checking whether the C compiler accepts the -no-cpp-precomp flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; 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 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-cpp-precomp" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" 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 ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS -no-cpp-precomp" else : fi libext=dylib ;; *) libext=so { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi 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="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; 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'. 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_CXX_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 8's {/usr,}/bin/sh. touch 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 ;; 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi 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="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; 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'. 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_CXX_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 8's {/usr,}/bin/sh. touch 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 ;; 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$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 "$_lt_caught_CXX_error" != yes; 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. # 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 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* # Allow CC to be a program name with arguments. lt_save_CC=$CC 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++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$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 "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; 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:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; 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 # 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 "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${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 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= 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. archive_cmds_CXX='$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 "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; 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 # need to do runtime linking. 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 ;; 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_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; 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_CXX=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_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${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_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$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. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' 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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${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_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$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 (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="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_CXX="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}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$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}" archive_expsym_cmds_CXX="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 ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $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; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=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 ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$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; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${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 ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${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_CXX='$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_CXX='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++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-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. archive_cmds_CXX='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' archive_expsym_cmds_CXX='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; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$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."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='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 | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$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 hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='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 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=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='echo' # 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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=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*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=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. archive_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # 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 "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='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' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=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?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # 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. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$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. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -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 "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='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 -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 "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT 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_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$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 ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$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... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p 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 "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$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 "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken 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. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-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_CXX='-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 lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; 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_prog_compiler_pic_CXX=-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_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--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 ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # 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:15759: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15763: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=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:15858: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15862: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=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:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=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:15910: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15914: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=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:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$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:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$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:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 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 AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX 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:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } 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 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 need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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 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,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 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="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. 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 ;; 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 ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux 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 ;; freebsd1*) dynamic_linker=no ;; 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[123]*) 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} $libname${shared_ext}' 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 ;; gnu*) version_type=linux 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 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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' ;; interix[3-9]*) version_type=linux 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 "$lt_cv_prog_gnu_ld" = yes; then version_type=linux 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 ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux 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 save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents 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;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 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 "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux 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 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 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 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:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC 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 "$_lt_caught_CXX_error" != yes 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 flag=`echo "-z relro" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the linker accepts the -z relro flag" >&5 $as_echo_n "checking whether the linker accepts the -z relro flag... " >&6; } if { as_var=ax_cv_ld_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -z relro" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "ax_cv_ld_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_ld_check_flag_$flag=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" #AC_LANG_POP fi ac_res=`eval 'as_val=${'ax_cv_ld_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"; then : LDFLAGS="$LDFLAGS -z relro" else : fi flag=`echo "-z now" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the linker accepts the -z now flag" >&5 $as_echo_n "checking whether the linker accepts the -z now flag... " >&6; } if { as_var=ax_cv_ld_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else #AC_LANG_PUSH([C]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -z now" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "ax_cv_ld_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_ld_check_flag_$flag=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" #AC_LANG_POP fi ac_res=`eval 'as_val=${'ax_cv_ld_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"; then : LDFLAGS="$LDFLAGS -z now" else : fi for i in -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused \ -Wformat -Wformat-security; do flag=`echo "$i" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the $i flag" >&5 $as_echo_n "checking whether the C compiler accepts the $i flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; 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 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $i" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" 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 ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS $i" else : fi done if test x$buggy_pthread_initializers = xyes; then flag=`echo "-Wno-missing-braces" | $SED 'y% .=/+-(){}<>:*,%_______________%'` { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wno-missing-braces flag" >&5 $as_echo_n "checking whether the C compiler accepts the -Wno-missing-braces flag... " >&6; } if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; 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 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-missing-braces" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "ax_cv_c_check_flag_$flag=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ax_cv_c_check_flag_$flag=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" 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 ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then : PCFLAGS="$PCFLAGS -Wno-missing-braces" else : fi fi # Check whether --with-libprelude-prefix was given. if test "${with_libprelude_prefix+set}" = set; then withval=$with_libprelude_prefix; libprelude_config_prefix="$withval" else libprelude_config_prefix="" fi if test x$libprelude_config_prefix != x ; then if test x${LIBPRELUDE_CONFIG+set} != xset ; then LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config fi fi # Extract the first word of "libprelude-config", so it can be a program name with args. set dummy libprelude-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_LIBPRELUDE_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $LIBPRELUDE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBPRELUDE_CONFIG="$LIBPRELUDE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_LIBPRELUDE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBPRELUDE_CONFIG" && ac_cv_path_LIBPRELUDE_CONFIG="no" ;; esac fi LIBPRELUDE_CONFIG=$ac_cv_path_LIBPRELUDE_CONFIG if test -n "$LIBPRELUDE_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $LIBPRELUDE_CONFIG" >&5 $as_echo "$LIBPRELUDE_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBPRELUDE_CONFIG" != "no"; then if $($LIBPRELUDE_CONFIG --thread > /dev/null 2>&1); then LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --thread --cflags` if test xno = xtrue || test xno = xyes; then libprelude_config_args="--thread" else libprelude_config_args="--no-thread" fi else LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG --pthread-cflags` fi fi min_libprelude_version=0.9.9 { $as_echo "$as_me:$LINENO: checking for libprelude - version >= $min_libprelude_version" >&5 $as_echo_n "checking for libprelude - version >= $min_libprelude_version... " >&6; } no_libprelude="" if test "$LIBPRELUDE_CONFIG" = "no" ; then no_libprelude=yes else LIBPRELUDE_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --cflags` LIBPRELUDE_LDFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --ldflags` LIBPRELUDE_LIBS=`$LIBPRELUDE_CONFIG $libprelude_config_args --libs` LIBPRELUDE_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --prefix` LIBPRELUDE_CONFIG_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --config-prefix` libprelude_config_version=`$LIBPRELUDE_CONFIG $libprelude_config_args --version` ac_save_CFLAGS="$CFLAGS" ac_save_LDFLAGS="$LDFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" rm -f conf.libpreludetest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { system ("touch conf.libpreludetest"); if( strcmp( prelude_check_version(NULL), "$libprelude_config_version" ) ) { printf("\n*** 'libprelude-config --version' returned %s, but LIBPRELUDE (%s)\n", "$libprelude_config_version", prelude_check_version(NULL) ); printf("*** was found! If libprelude-config was correct, then it is best\n"); printf("*** to remove the old version of LIBPRELUDE. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libprelude-config was wrong, set the environment variable LIBPRELUDE_CONFIG\n"); printf("*** to point to the correct copy of libprelude-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ( strcmp(prelude_check_version(NULL), LIBPRELUDE_VERSION ) ) { printf("\n*** LIBPRELUDE header file (version %s) does not match\n", LIBPRELUDE_VERSION); printf("*** library (version %s)\n", prelude_check_version(NULL) ); } else { if ( prelude_check_version( "$min_libprelude_version" ) ) return 0; else { printf("no\n*** An old version of LIBPRELUDE (%s) was found.\n", prelude_check_version(NULL) ); printf("*** You need a version of LIBPRELUDE newer than %s. The latest version of\n", "$min_libprelude_version" ); printf("*** LIBPRELUDE is always available from http://www.prelude-ids.com/development/download/\n"); printf("*** \n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libprelude-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBPRELUDE, but you can also set the LIBPRELUDE_CONFIG environment to point to the\n"); printf("*** correct copy of libprelude-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : 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 ( exit $ac_status ) no_libprelude=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" fi if test "x$no_libprelude" = x ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : else if test -f conf.libpreludetest ; then : else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$LIBPRELUDE_CONFIG" = "no" ; then echo "*** The libprelude-config script installed by LIBPRELUDE could not be found" echo "*** If LIBPRELUDE was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBPRELUDE_CONFIG environment variable to the" echo "*** full path to libprelude-config." else if test -f conf.libpreludetest ; then : else echo "*** Could not run libprelude test program, checking why..." CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" LIBS="$LIBS $LIBPRELUDE_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { return !!prelude_check_version(NULL); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBPRELUDE or finding the wrong" echo "*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBPRELUDE was incorrectly installed" echo "*** or that you have moved LIBPRELUDE since it was installed. In the latter case, you" echo "*** may want to edit the libprelude-config script: $LIBPRELUDE_CONFIG" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LDFLAGS="$ac_save_LDFLAGS" LIBS="$ac_save_LIBS" fi fi LIBPRELUDE_CFLAGS="" LIBPRELUDE_LDFLAGS="" LIBPRELUDE_LIBS="" { { $as_echo "$as_me:$LINENO: error: Cannot find libprelude: Is libprelude-config in the path?" >&5 $as_echo "$as_me: error: Cannot find libprelude: Is libprelude-config in the path?" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.libpreludetest # Check whether --with-mysql was given. if test "${with_mysql+set}" = set; then withval=$with_mysql; if test "$withval" = "no"; then want_mysql="no" elif test "$withval" = "yes"; then want_mysql="yes" else want_mysql="yes" MYSQL_CONFIG="$withval" fi else want_mysql="yes" fi MYSQL_CFLAGS="" MYSQL_LDFLAGS="" MYSQL_VERSION="" if test "$want_mysql" = "yes"; then if test -z "$MYSQL_CONFIG" -o test; then # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $MYSQL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no" ;; esac fi MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG if test -n "$MYSQL_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5 $as_echo "$MYSQL_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$MYSQL_CONFIG" != "no"; then { $as_echo "$as_me:$LINENO: checking for MySQL libraries" >&5 $as_echo_n "checking for MySQL libraries... " >&6; } MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" MYSQL_VERSION=`$MYSQL_CONFIG --version` cat >>confdefs.h <<\_ACEOF #define HAVE_MYSQL 1 _ACEOF found_mysql="yes" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else found_mysql="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi mysql_version_req= if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then { $as_echo "$as_me:$LINENO: checking if MySQL version is >= $mysql_version_req" >&5 $as_echo_n "checking if MySQL version is >= $mysql_version_req... " >&6; } mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'` mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'` mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$mysql_version_req_micro" = "x"; then mysql_version_req_micro="0" fi mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \ \+ $mysql_version_req_minor \* 1000 \ \+ $mysql_version_req_micro` mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'` mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'` mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$mysql_version_micro" = "x"; then mysql_version_micro="0" fi mysql_version_number=`expr $mysql_version_major \* 1000000 \ \+ $mysql_version_minor \* 1000 \ \+ $mysql_version_micro` mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number` if test "$mysql_version_check" = "1"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi with_mysql="no" if test x$MYSQL_CONFIG != x; then with_mysql="yes" LIBS_bkp=$LIBS LIBS="$MYSQL_LDFLAGS" { $as_echo "$as_me:$LINENO: checking for mysql_real_escape_string" >&5 $as_echo_n "checking for mysql_real_escape_string... " >&6; } if test "${ac_cv_func_mysql_real_escape_string+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mysql_real_escape_string to an innocuous variant, in case declares mysql_real_escape_string. For example, HP-UX 11i declares gettimeofday. */ #define mysql_real_escape_string innocuous_mysql_real_escape_string /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mysql_real_escape_string (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mysql_real_escape_string /* 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 mysql_real_escape_string (); /* 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_mysql_real_escape_string || defined __stub___mysql_real_escape_string choke me #endif int main () { return mysql_real_escape_string (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mysql_real_escape_string=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mysql_real_escape_string=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mysql_real_escape_string" >&5 $as_echo "$ac_cv_func_mysql_real_escape_string" >&6; } if test "x$ac_cv_func_mysql_real_escape_string" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MYSQL_REAL_ESCAPE_STRING /**/ _ACEOF fi LIBS=$LIBS_bkp fi if test x$with_mysql = xyes; then HAVE_MYSQL_TRUE= HAVE_MYSQL_FALSE='#' else HAVE_MYSQL_TRUE='#' HAVE_MYSQL_FALSE= fi # Check whether --with-postgresql was given. if test "${with_postgresql+set}" = set; then withval=$with_postgresql; if test "$withval" = "no"; then want_postgresql="no" elif test "$withval" = "yes"; then want_postgresql="yes" else want_postgresql="yes" PG_CONFIG="$withval" fi else want_postgresql="yes" fi POSTGRESQL_CFLAGS="" POSTGRESQL_LDFLAGS="" POSTGRESQL_VERSION="" if test "$want_postgresql" = "yes"; then if test -z "$PG_CONFIG" -o test; then # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PG_CONFIG=$ac_cv_path_PG_CONFIG if test -n "$PG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 $as_echo "$PG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test ! -x "$PG_CONFIG"; then { { $as_echo "$as_me:$LINENO: error: $PG_CONFIG does not exist or it is not an exectuable file" >&5 $as_echo "$as_me: error: $PG_CONFIG does not exist or it is not an exectuable file" >&2;} { (exit 1); exit 1; }; } PG_CONFIG="no" found_postgresql="no" fi if test "$PG_CONFIG" != "no"; then { $as_echo "$as_me:$LINENO: checking for PostgreSQL libraries" >&5 $as_echo_n "checking for PostgreSQL libraries... " >&6; } POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`" POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq" POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'` cat >>confdefs.h <<\_ACEOF #define HAVE_POSTGRESQL 1 _ACEOF found_postgresql="yes" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else found_postgresql="no" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi postgresql_version_req= if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then { $as_echo "$as_me:$LINENO: checking if PostgreSQL version is >= $postgresql_version_req" >&5 $as_echo_n "checking if PostgreSQL version is >= $postgresql_version_req... " >&6; } postgresql_version_req_major=`expr $postgresql_version_req : '\([0-9]*\)'` postgresql_version_req_minor=`expr $postgresql_version_req : '[0-9]*\.\([0-9]*\)'` postgresql_version_req_micro=`expr $postgresql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$postgresql_version_req_micro" = "x"; then postgresql_version_req_micro="0" fi postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \ \+ $postgresql_version_req_minor \* 1000 \ \+ $postgresql_version_req_micro` postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([0-9]*\)'` postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[0-9]*\.\([0-9]*\)'` postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$postgresql_version_micro" = "x"; then postgresql_version_micro="0" fi postgresql_version_number=`expr $postgresql_version_major \* 1000000 \ \+ $postgresql_version_minor \* 1000 \ \+ $postgresql_version_micro` postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number` if test "$postgresql_version_check" = "1"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi with_pgsql="no" if test x$POSTGRESQL_VERSION != x; then with_pgsql="yes" LIBS_bkp=$LIBS LIBS="$POSTGRESQL_LDFLAGS" { $as_echo "$as_me:$LINENO: checking for PQserverVersion" >&5 $as_echo_n "checking for PQserverVersion... " >&6; } if test "${ac_cv_func_PQserverVersion+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define PQserverVersion to an innocuous variant, in case declares PQserverVersion. For example, HP-UX 11i declares gettimeofday. */ #define PQserverVersion innocuous_PQserverVersion /* System header to define __stub macros and hopefully few prototypes, which can conflict with char PQserverVersion (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef PQserverVersion /* 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 PQserverVersion (); /* 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_PQserverVersion || defined __stub___PQserverVersion choke me #endif int main () { return PQserverVersion (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_PQserverVersion=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_PQserverVersion=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_PQserverVersion" >&5 $as_echo "$ac_cv_func_PQserverVersion" >&6; } if test "x$ac_cv_func_PQserverVersion" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PQSERVERVERSION /**/ _ACEOF fi LIBS=$LIBS_bkp; fi if test x$with_pgsql = xyes; then HAVE_PGSQL_TRUE= HAVE_PGSQL_FALSE='#' else HAVE_PGSQL_TRUE='#' HAVE_PGSQL_FALSE= fi # Check whether --with-sqlite3 was given. if test "${with_sqlite3+set}" = set; then withval=$with_sqlite3; if test "$withval" = "no"; then WANT_SQLITE3="no" elif test "$withval" = "yes"; then WANT_SQLITE3="yes" ac_sqlite3_path="" else WANT_SQLITE3="yes" ac_sqlite3_path="$withval" fi else WANT_SQLITE3="yes" fi SQLITE3_CFLAGS="" SQLITE3_LDFLAGS="" SQLITE3_VERSION="" if test "x$WANT_SQLITE3" = "xyes"; then ac_sqlite3_header="sqlite3.h" sqlite3_version_req="3.0.0" sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([0-9]*\.[0-9]*\)'` sqlite3_version_req_major=`expr $sqlite3_version_req : '\([0-9]*\)'` sqlite3_version_req_minor=`expr $sqlite3_version_req : '[0-9]*\.\([0-9]*\)'` sqlite3_version_req_micro=`expr $sqlite3_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$sqlite3_version_req_micro" = "x" ; then sqlite3_version_req_micro="0" fi sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \ \+ $sqlite3_version_req_minor \* 1000 \ \+ $sqlite3_version_req_micro` { $as_echo "$as_me:$LINENO: checking for SQLite3 library >= $sqlite3_version_req" >&5 $as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; } if test "$ac_sqlite3_path" != ""; then ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib" ac_sqlite3_cppflags="-I$ac_sqlite3_path/include" else for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \ && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then ac_sqlite3_path=$ac_sqlite3_path_tmp ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include" ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib" break; fi done fi ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3" saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number) // Everything is okay #else # error SQLite version is too old #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } success="yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } succees="no" 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 CPPFLAGS="$saved_CPPFLAGS" if test "$success" = "yes"; then SQLITE3_CFLAGS="$ac_sqlite3_cppflags" SQLITE3_LDFLAGS="$ac_sqlite3_ldflags" ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header" if test "x$ac_sqlite3_header_path" != "x"; then ac_sqlite3_version=`cat $ac_sqlite3_header_path \ | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \ | sed -e 's/"//'` if test $ac_sqlite3_version != ""; then SQLITE3_VERSION=$ac_sqlite3_version else { $as_echo "$as_me:$LINENO: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&5 $as_echo "$as_me: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&2;} fi fi cat >>confdefs.h <<\_ACEOF #define HAVE_SQLITE3 /**/ _ACEOF fi fi if test x$SQLITE3_VERSION != x; then with_sqlite3="yes" else with_sqlite3="no" fi if test x$with_sqlite3 = xyes; then HAVE_SQLITE3_TRUE= HAVE_SQLITE3_FALSE='#' else HAVE_SQLITE3_TRUE='#' HAVE_SQLITE3_FALSE= fi # Check whether --with-swig was given. if test "${with_swig+set}" = set; then withval=$with_swig; swig_required=true; if test x$withval = xyes; then with_swig="swig"; fi else with_swig="swig" fi if test x$with_swig != xno; then # Extract the first word of "`basename $with_swig`", so it can be a program name with args. set dummy `basename $with_swig`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_SWIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_swig`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="no" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:$LINENO: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$SWIG = xno; then if test x$swig_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_swig binary" >&5 $as_echo "$as_me: error: Could not find $with_swig binary" >&2;} { (exit 1); exit 1; }; } fi fi fi if test x$SWIG != xno; then HAVE_SWIG_TRUE= HAVE_SWIG_FALSE='#' else HAVE_SWIG_TRUE='#' HAVE_SWIG_FALSE= fi # Check whether --with-perl was given. if test "${with_perl+set}" = set; then withval=$with_perl; perl_required=true; if test x$withval = xyes; then with_perl="perl"; fi else with_perl="perl" fi if test x$with_perl != xno; then # Extract the first word of "`basename $with_perl`", so it can be a program name with args. set dummy `basename $with_perl`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_perl`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:$LINENO: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$PERL = xno; then if test x$perl_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_perl binary" >&5 $as_echo "$as_me: error: Could not find $with_perl binary" >&2;} { (exit 1); exit 1; }; } fi with_perl=no else PERL_CFLAGS="-I`$PERL -e 'use Config; print $Config{archlib}'`/CORE" old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" if test "${ac_cv_header_EXTERN_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for EXTERN.h" >&5 $as_echo_n "checking for EXTERN.h... " >&6; } if test "${ac_cv_header_EXTERN_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_EXTERN_h" >&5 $as_echo "$ac_cv_header_EXTERN_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking EXTERN.h usability" >&5 $as_echo_n "checking EXTERN.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking EXTERN.h presence" >&5 $as_echo_n "checking EXTERN.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: EXTERN.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: EXTERN.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: EXTERN.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: EXTERN.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: EXTERN.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: EXTERN.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: EXTERN.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: EXTERN.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: EXTERN.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: EXTERN.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for EXTERN.h" >&5 $as_echo_n "checking for EXTERN.h... " >&6; } if test "${ac_cv_header_EXTERN_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_EXTERN_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_EXTERN_h" >&5 $as_echo "$ac_cv_header_EXTERN_h" >&6; } fi if test "x$ac_cv_header_EXTERN_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking for perl.h" >&5 $as_echo_n "checking for perl.h... " >&6; } if test "${ac_cv_header_perl_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_perl_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_perl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_perl_h" >&5 $as_echo "$ac_cv_header_perl_h" >&6; } if test "x$ac_cv_header_perl_h" = x""yes; then with_perl=yes else with_perl=no fi else with_perl=no fi CPPFLAGS="$old_CPPFLAGS" fi fi if test x$with_perl = xyes; then HAVE_PERL_TRUE= HAVE_PERL_FALSE='#' else HAVE_PERL_TRUE='#' HAVE_PERL_FALSE= fi PERL_INSTALLDIRS="site" # Check whether --with-perl-installdirs was given. if test "${with_perl_installdirs+set}" = set; then withval=$with_perl_installdirs; PERL_INSTALLDIRS="$withval" fi if test x$PERL_INSTALLDIRS != xsite && test x$PERL_INSTALLDIRS != xvendor; then { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-perl-installdirs: only \"site\" or \"vendor\" supported." >&5 $as_echo "$as_me: error: Invalid value for --with-perl-installdirs: only \"site\" or \"vendor\" supported." >&2;} { (exit 1); exit 1; }; } fi PERL_EXTRA_PARAMS="INSTALLDIRS=$PERL_INSTALLDIRS" # Check whether --with-python was given. if test "${with_python+set}" = set; then withval=$with_python; python_required=true; if test x$withval = xyes; then with_python="python"; fi else with_python="python" fi if test x$with_python != xno; then # Extract the first word of "`basename $with_python`", so it can be a program name with args. set dummy `basename $with_python`; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`dirname $with_python`:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="no" ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$PYTHON = xno; then if test x$python_required = xtrue; then { { $as_echo "$as_me:$LINENO: error: Could not find $with_python binary" >&5 $as_echo "$as_me: error: Could not find $with_python binary" >&2;} { (exit 1); exit 1; }; } fi with_python=no else old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`" if test "${ac_cv_header_Python_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 $as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 $as_echo "$ac_cv_header_Python_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5 $as_echo_n "checking Python.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5 $as_echo_n "checking Python.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 $as_echo_n "checking for Python.h... " >&6; } if test "${ac_cv_header_Python_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_Python_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 $as_echo "$ac_cv_header_Python_h" >&6; } fi if test "x$ac_cv_header_Python_h" = x""yes; then with_python=yes else with_python=no fi CPPFLAGS="$old_CPPFLAGS" fi fi if test x$with_python = xyes; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_working_alloca_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_alloca_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 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 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=buggy else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_have_include_next=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 CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi for ac_header in $gl_header_list do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } if test "${gl_cv_header_errno_h_complete+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5 $as_echo "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else : if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_errno_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_errno_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/errno.h#{ s#.*"\(.*/errno.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_errno_h='<'errno.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_errno_h fi NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EMULTIHOP; } static unsigned long int ulongval () { return EMULTIHOP; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EMULTIHOP) < 0) { long int i = longval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val` 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 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return ENOLINK; } static unsigned long int ulongval () { return ENOLINK; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((ENOLINK) < 0) { long int i = longval (); if (i != (ENOLINK)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (ENOLINK)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_ENOLINK=`cat conftest.val` 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 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EOVERFLOW; } static unsigned long int ulongval () { return EOVERFLOW; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EOVERFLOW) < 0) { long int i = longval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val` 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 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&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. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path 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 "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${acl_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:$LINENO: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if test "${acl_cv_rpath+set}" = set; then $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:$LINENO: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if test "${gl_cv_solaris_64bit+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then { $as_echo "$as_me:$LINENO: checking whether imported symbols can be declared weak" >&5 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; } gl_have_weak=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern void xyzzy (); #pragma weak xyzzy int main () { xyzzy(); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_weak=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $gl_have_weak" >&5 $as_echo "$gl_have_weak" >&6; } if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. if test "${ac_cv_header_pthread_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 $as_echo_n "checking for pthread.h... " >&6; } if test "${ac_cv_header_pthread_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 $as_echo "$ac_cv_header_pthread_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5 $as_echo_n "checking pthread.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5 $as_echo_n "checking pthread.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 $as_echo_n "checking for pthread.h... " >&6; } if test "${ac_cv_header_pthread_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_pthread_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 $as_echo "$ac_cv_header_pthread_h" >&6; } fi if test "x$ac_cv_header_pthread_h" = x""yes; then gl_have_pthread_h=yes else gl_have_pthread_h=no fi if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_pthread=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_pthread_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) cat >>confdefs.h <<\_ACEOF #define PTHREAD_IN_USE_DETECTION_HARD 1 _ACEOF esac fi else # Some library is needed. Try libpthread and libc_r. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_pthread_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread fi if test -z "$gl_have_pthread"; then # For FreeBSD 4. { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lc_r" >&5 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; } if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_c_r_pthread_kill=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_kill=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_kill" >&5 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r fi fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix cat >>confdefs.h <<\_ACEOF #define USE_POSIX_THREADS 1 _ACEOF if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_POSIX_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { thr_self(); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_solaristhread=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" cat >>confdefs.h <<\_ACEOF #define USE_SOLARIS_THREADS 1 _ACEOF if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_SOLARIS_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" { $as_echo "$as_me:$LINENO: checking how to link with libpth" >&5 $as_echo_n "checking how to link with libpth... " >&6; } if test "${ac_cv_libpth_libs+set}" = set; then $as_echo_n "(cached) " >&6 else use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libpth-prefix was given. if test "${with_libpth_prefix+set}" = set; then withval=$with_libpth_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBPTH= LTLIBPTH= INCPTH= LIBPTH_PREFIX= HAVE_LIBPTH= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='pth ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" else LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'pth'; then LIBPTH_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBPTH; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" ;; esac done fi else LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" done fi ac_cv_libpth_libs="$LIBPTH" ac_cv_libpth_ltlibs="$LTLIBPTH" ac_cv_libpth_cppflags="$INCPTH" ac_cv_libpth_prefix="$LIBPTH_PREFIX" fi { $as_echo "$as_me:$LINENO: result: $ac_cv_libpth_libs" >&5 $as_echo "$ac_cv_libpth_libs" >&6; } LIBPTH="$ac_cv_libpth_libs" LTLIBPTH="$ac_cv_libpth_ltlibs" INCPTH="$ac_cv_libpth_cppflags" LIBPTH_PREFIX="$ac_cv_libpth_prefix" for element in $INCPTH; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done HAVE_LIBPTH=yes gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pth_self(); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_have_pth=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" cat >>confdefs.h <<\_ACEOF #define USE_PTH_THREADS 1 _ACEOF if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then cat >>confdefs.h <<\_ACEOF #define USE_PTH_THREADS_WEAK 1 _ACEOF LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=win32 cat >>confdefs.h <<\_ACEOF #define USE_WIN32_THREADS 1 _ACEOF fi fi fi fi { $as_echo "$as_me:$LINENO: checking for multithread API to use" >&5 $as_echo_n "checking for multithread API to use... " >&6; } { $as_echo "$as_me:$LINENO: result: $gl_threads_api" >&5 $as_echo "$gl_threads_api" >&6; } { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac for ac_func in $gl_func_list do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRERROR=0; REPLACE_STRNDUP=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. { $as_echo "$as_me:$LINENO: checking for mmap" >&5 $as_echo_n "checking for mmap... " >&6; } if test "${ac_cv_func_mmap+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mmap to an innocuous variant, in case declares mmap. For example, HP-UX 11i declares gettimeofday. */ #define mmap innocuous_mmap /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mmap (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mmap /* 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 mmap (); /* 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_mmap || defined __stub___mmap choke me #endif int main () { return mmap (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mmap=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mmap=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 $as_echo "$ac_cv_func_mmap" >&6; } if test "x$ac_cv_func_mmap" = x""yes; then gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:$LINENO: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define MAP_ANONYMOUS MAP_ANON _ACEOF gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MAP_ANONYMOUS 1 _ACEOF fi fi : : for ac_func in memchr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_memchr = no; then for ac_header in bp-sym.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done REPLACE_MEMCHR=1 fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:$LINENO: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } if test "${gl_cv_func_memchr_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_memchr_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif int main () { char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) return 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) return 2; } return 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_memchr_works=yes 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 ( exit $ac_status ) gl_cv_func_memchr_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then for ac_header in bp-sym.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done REPLACE_MEMCHR=1 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" fi fi gl_cv_c_multiarch=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then cat >>confdefs.h <<\_ACEOF #define AA_APPLE_UNIVERSAL_BUILD 1 _ACEOF APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FFLUSH=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; GNULIB_FREOPEN=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; GNULIB_PRINTF_POSIX=0; GNULIB_PUTC=0; GNULIB_PUTCHAR=0; GNULIB_PUTS=0; GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_VASPRINTF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; GNULIB_VPRINTF=0; GNULIB_VPRINTF_POSIX=0; GNULIB_VSNPRINTF=0; GNULIB_VSPRINTF_POSIX=0; HAVE_DECL_FPURGE=1; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; HAVE_DECL_OBSTACK_PRINTF=1; HAVE_DECL_SNPRINTF=1; HAVE_DECL_VSNPRINTF=1; HAVE_DPRINTF=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; REPLACE_FPURGE=0; REPLACE_FREOPEN=0; REPLACE_FSEEK=0; REPLACE_FSEEKO=0; REPLACE_FTELL=0; REPLACE_FTELLO=0; REPLACE_GETLINE=0; REPLACE_OBSTACK_PRINTF=0; REPLACE_PERROR=0; REPLACE_POPEN=0; REPLACE_PRINTF=0; REPLACE_REMOVE=0; REPLACE_RENAME=0; REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_VASPRINTF=0; REPLACE_VDPRINTF=0; REPLACE_VFPRINTF=0; REPLACE_VPRINTF=0; REPLACE_VSNPRINTF=0; REPLACE_VSPRINTF=0; { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 $as_echo_n "checking whether snprintf is declared... " >&6; } if test "${ac_cv_have_decl_snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef snprintf (void) snprintf; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 $as_echo "$ac_cv_have_decl_snprintf" >&6; } if test "x$ac_cv_have_decl_snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 0 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; STDDEF_H=''; { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wchar_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if test "${ac_cv_type_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if test "$cross_compiling" = yes; then ac_cv_type_long_long_int=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long_int=yes 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 ( exit $ac_status ) ac_cv_type_long_long_int=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long_int=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_INT 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_type_unsigned_long_long_int=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long_int=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG_INT 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether strdup is declared" >&5 $as_echo_n "checking whether strdup is declared... " >&6; } if test "${ac_cv_have_decl_strdup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strdup (void) strdup; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strdup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strdup=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5 $as_echo "$ac_cv_have_decl_strdup" >&6; } if test "x$ac_cv_have_decl_strdup" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict /**/ _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac : if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_string_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_string_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/string.h#{ s#.*"\(.*/string.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_string_h='<'string.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5 $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_string_h fi NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking whether strndup is declared" >&5 $as_echo_n "checking whether strndup is declared... " >&6; } if test "${ac_cv_have_decl_strndup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strndup (void) strndup; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strndup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strndup=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5 $as_echo "$ac_cv_have_decl_strndup" >&6; } if test "x$ac_cv_have_decl_strndup" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 $as_echo_n "checking whether strnlen is declared... " >&6; } if test "${ac_cv_have_decl_strnlen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strnlen (void) strnlen; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strnlen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strnlen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnlen" >&5 $as_echo "$ac_cv_have_decl_strnlen" >&6; } if test "x$ac_cv_have_decl_strnlen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 0 _ACEOF fi REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_STRPTIME=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; : { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_sys_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/time.h#{ s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_time_h='<'time.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wint_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if test "${gl_cv_header_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_inttypes_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 $as_echo "$gl_cv_header_inttypes_h" >&6; } if test $gl_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if test "${gl_cv_header_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_stdint_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_stdint_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 $as_echo "$gl_cv_header_stdint_h" >&6; } if test $gl_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } if test "${gt_cv_c_intmax_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif int main () { intmax_t x = -1; return !x; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_intmax_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_intmax_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 $as_echo "$gt_cv_c_intmax_t" >&6; } if test $gt_cv_c_intmax_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INTMAX_T 1 _ACEOF else test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' cat >>confdefs.h <<_ACEOF #define intmax_t $ac_type _ACEOF fi for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 $as_echo_n "checking whether _snprintf is declared... " >&6; } if test "${ac_cv_have_decl__snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _snprintf (void) _snprintf; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl__snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl__snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 $as_echo "$ac_cv_have_decl__snprintf" >&6; } if test "x$ac_cv_have_decl__snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 $as_echo_n "checking whether vsnprintf is declared... " >&6; } if test "${ac_cv_have_decl_vsnprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef vsnprintf (void) vsnprintf; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_vsnprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_vsnprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; } if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VSNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VSNPRINTF 0 _ACEOF fi GNULIB_BTOWC=0; GNULIB_WCTOB=0; GNULIB_MBSINIT=0; GNULIB_MBRTOWC=0; GNULIB_MBRLEN=0; GNULIB_MBSRTOWCS=0; GNULIB_MBSNRTOWCS=0; GNULIB_WCRTOMB=0; GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; HAVE_MBRLEN=1; HAVE_MBSRTOWCS=1; HAVE_MBSNRTOWCS=1; HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; REPLACE_WCTOB=0; REPLACE_MBSINIT=0; REPLACE_MBRTOWC=0; REPLACE_MBRLEN=0; REPLACE_MBSRTOWCS=0; REPLACE_MBSNRTOWCS=0; REPLACE_WCRTOMB=0; REPLACE_WCSRTOMBS=0; REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; { $as_echo "$as_me:$LINENO: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod #include extern int zero (void); int main () { return zero(); } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest1.$ac_objext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod #include int zero (void) { return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_correct_inline" >&5 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } if test $gl_cv_header_wchar_h_correct_inline = no; then { { $as_echo "$as_me:$LINENO: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&5 $as_echo "$as_me: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&2;} { (exit 1); exit 1; }; } fi if true; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=true gl_source_base='libmissing' if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } if test "${gl_cv_rpl_alloca+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 $as_echo "$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi FLOAT_H= case "$host_os" in beos* | openbsd*) FLOAT_H=float.h : if test $gl_cv_have_include_next = yes; then gl_cv_next_float_h='<'float.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_float_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_float_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/float.h#{ s#.*"\(.*/float.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_float_h='<'float.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5 $as_echo "$gl_cv_next_float_h" >&6; } fi NEXT_FLOAT_H=$gl_cv_next_float_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'float.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_float_h fi NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive ;; esac if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. { $as_echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5 $as_echo_n "checking for pthread_rwlock_t... " >&6; } if test "${ac_cv_type_pthread_rwlock_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pthread_rwlock_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof (pthread_rwlock_t)) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof ((pthread_rwlock_t))) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pthread_rwlock_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pthread_rwlock_t" >&5 $as_echo "$ac_cv_type_pthread_rwlock_t" >&6; } if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_RWLOCK 1 _ACEOF fi # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi GNULIB_MEMCHR=1 for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } if test "${gl_cv_size_max+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_size_max= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Found it" >/dev/null 2>&1; then gl_cv_size_max=yes fi rm -f conftest* if test -z "$gl_cv_size_max"; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) size_t_bits_minus_1=$ac_lo;; '') size_t_bits_minus_1= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) * CHAR_BIT - 1) < 0) { long int i = longval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then size_t_bits_minus_1=`cat conftest.val` 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 ( exit $ac_status ) size_t_bits_minus_1= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) fits_in_uint=$ac_lo;; '') fits_in_uint= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) { long int i = longval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then fits_in_uint=`cat conftest.val` 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 ( exit $ac_status ) fits_in_uint= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern size_t foo; extern unsigned long foo; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then fits_in_uint=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else gl_cv_size_max='((size_t)~(size_t)0)' fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 $as_echo "$gl_cv_size_max" >&6; } if test "$gl_cv_size_max" != yes; then cat >>confdefs.h <<_ACEOF #define SIZE_MAX $gl_cv_size_max _ACEOF fi gl_cv_func_snprintf_usable=no for ac_func in snprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_snprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes 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 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_snprintf_usable=yes ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi : fi : if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi GNULIB_SNPRINTF=1 if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:$LINENO: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if test "${gl_cv_decl_null_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_decl_null_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then : if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stddef_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stddef_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stddef.h#{ s#.*"\(.*/stddef.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stddef_h='<'stddef.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if test "$cross_compiling" = yes; then gl_cv_header_working_stdint_h=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return 1; } return 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_stdint_h=yes 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 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi : if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` 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 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` 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 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then result=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdio_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdio_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdio.h#{ s#.*"\(.*/stdio.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdio_h='<'stdio.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5 $as_echo "$gl_cv_next_stdio_h" >&6; } fi NEXT_STDIO_H=$gl_cv_next_stdio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdio_h fi NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_func in strdup do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done : if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi : GNULIB_STRDUP=1 : : if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. { $as_echo "$as_me:$LINENO: checking for working strndup" >&5 $as_echo_n "checking for working strndup... " >&6; } if test "${gl_cv_func_strndup_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case $host_os in aix*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0'; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_strndup_works=yes 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 ( exit $ac_status ) gl_cv_func_strndup_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_strndup_works" >&5 $as_echo "$gl_cv_func_strndup_works" >&6; } case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" ;; esac else gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" fi GNULIB_STRNDUP=1 : if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi { $as_echo "$as_me:$LINENO: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } if test "${ac_cv_func_strnlen_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strnlen_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #define S "foobar" #define S_LEN (sizeof S - 1) /* At least one implementation is buggy: that of AIX 4.3 would give strnlen (S, 1) == 3. */ int i; for (i = 0; i < S_LEN + 1; ++i) { int expected = i <= S_LEN ? i : S_LEN; if (strnlen (S, i) != expected) return 1; } return 0; ; return 0; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_strnlen_working=yes 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 ( exit $ac_status ) ac_cv_func_strnlen_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 $as_echo "$ac_cv_func_strnlen_working" >&6; } test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) cat >>confdefs.h <<\_ACEOF #define strnlen rpl_strnlen _ACEOF : fi GNULIB_STRNLEN=1 { $as_echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } if test "${gl_cv_time_r_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_time_r_posix=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_time_r_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 $as_echo "$gl_cv_time_r_posix" >&6; } if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" : fi : if test $ac_cv_func_vasnprintf = no; then : gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then cat >>confdefs.h <<\_ACEOF #define REPLACE_VASNPRINTF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 $as_echo_n "checking for ptrdiff_t... " >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_ptrdiff_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((ptrdiff_t))) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 $as_echo "$ac_cv_type_ptrdiff_t" >&6; } if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi fi gl_cv_func_vsnprintf_usable=no for ac_func in vsnprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_vsnprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes 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 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_vsnprintf_usable=yes ;; esac fi if test $gl_cv_func_vsnprintf_usable = no; then gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext" if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 fi : fi : if test $ac_cv_have_decl_vsnprintf = no; then HAVE_DECL_VSNPRINTF=0 fi GNULIB_VSNPRINTF=1 : : if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_wchar_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wchar_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wchar.h#{ s#.*"\(.*/wchar.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 $as_echo "$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wchar.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wchar_h fi NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require additional headers. */ #ifndef __GLIBC__ # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$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:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done gltests_libdeps= gltests_ltlibdeps= gl_source_base='libmissing/tests' { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wchar_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wint_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" for ac_func in pthread_atfork do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$gl_save_LIBS" fi YIELD_LIB= if test $gl_threads_api = posix; then { $as_echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5 $as_echo_n "checking for sched_yield in -lrt... " >&6; } if test "${ac_cv_lib_rt_sched_yield+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_rt_sched_yield=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rt_sched_yield=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then YIELD_LIB=-lrt else { $as_echo "$as_me:$LINENO: checking for sched_yield in -lposix4" >&5 $as_echo_n "checking for sched_yield in -lposix4... " >&6; } if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix4 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_posix4_sched_yield=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix4_sched_yield=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sched_yield" >&5 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } if test "x$ac_cv_lib_posix4_sched_yield" = x""yes; then YIELD_LIB=-lposix4 fi fi fi LIBTESTS_LIBDEPS="$gltests_libdeps" # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then enableval=$enable_gtk_doc; else enable_gtk_doc=no fi have_gtk_doc=no if test x$enable_gtk_doc = xyes; then if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then have_gtk_doc=yes fi gtk_doc_min_version=1.0 if test "$have_gtk_doc" = yes; then { $as_echo "$as_me:$LINENO: checking gtk-doc version >= $gtk_doc_min_version" >&5 $as_echo_n "checking gtk-doc version >= $gtk_doc_min_version... " >&6; } if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } have_gtk_doc=no fi fi if test "$have_gtk_doc" != yes; then enable_gtk_doc=no fi fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* 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. */ char *t; 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 saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; 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 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF 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:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then enableval=$enable_gtk_doc; else enable_gtk_doc=no fi have_gtk_doc=no if test x$enable_gtk_doc = xyes; then if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then have_gtk_doc=yes fi gtk_doc_min_version=1.0 if test "$have_gtk_doc" = yes; then { $as_echo "$as_me:$LINENO: checking gtk-doc version >= $gtk_doc_min_version" >&5 $as_echo_n "checking gtk-doc version >= $gtk_doc_min_version... " >&6; } if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } have_gtk_doc=no fi fi if test "$have_gtk_doc" != yes; then enable_gtk_doc=no fi fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi EXP_VAR=LIBDIR FROM_VAR=$libdir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var LIBDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save EXP_VAR=DATADIR FROM_VAR=$datadir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var DATADIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save EXP_VAR=SYSCONFDIR FROM_VAR=$sysconfdir prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var SYSCONFDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save db_plugin_dir=$LIBDIR/libpreludedb/plugins sql_plugin_dir=$db_plugin_dir/sql format_plugin_dir=$db_plugin_dir/formats format_schema_dir=$DATADIR/libpreludedb ac_config_files="$ac_config_files libpreludedb-config Makefile m4/Makefile libmissing/Makefile libmissing/tests/Makefile src/Makefile src/include/Makefile src/include/preludedb-version.h plugins/Makefile plugins/sql/Makefile plugins/sql/mysql/Makefile plugins/sql/pgsql/Makefile plugins/sql/sqlite3/Makefile plugins/format/Makefile plugins/format/classic/Makefile plugins/format/classic/include/Makefile docs/Makefile docs/api/Makefile docs/manpages/Makefile bindings/Makefile bindings/perl/Makefile.PL bindings/python/setup.py" ac_config_commands="$ac_config_commands default" 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:$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= ;; #( *) $as_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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$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= 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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_MYSQL_TRUE}" && test -z "${HAVE_MYSQL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MYSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_MYSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PGSQL_TRUE}" && test -z "${HAVE_PGSQL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PGSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PGSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_SQLITE3_TRUE}" && test -z "${HAVE_SQLITE3_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SQLITE3\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_SQLITE3\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_SWIG_TRUE}" && test -z "${HAVE_SWIG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } 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:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_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 # PATH needs CR # 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_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 if (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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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. 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); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. 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 # Name of the executable. 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'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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 { (exit 1); exit 1; }; } # 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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 # 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 $as_me, which was generated by GNU Autoconf 2.63. 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 from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, 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_version="\\ config.status configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 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=$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 ;; --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"` ;; esac CONFIG_FILES="$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 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --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_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$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' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ 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_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) 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 \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which 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' TIMESTAMP='$TIMESTAMP' 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" ;; "libpreludedb-config") CONFIG_FILES="$CONFIG_FILES libpreludedb-config" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "libmissing/Makefile") CONFIG_FILES="$CONFIG_FILES libmissing/Makefile" ;; "libmissing/tests/Makefile") CONFIG_FILES="$CONFIG_FILES libmissing/tests/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;; "src/include/preludedb-version.h") CONFIG_FILES="$CONFIG_FILES src/include/preludedb-version.h" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/sql/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sql/Makefile" ;; "plugins/sql/mysql/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sql/mysql/Makefile" ;; "plugins/sql/pgsql/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sql/pgsql/Makefile" ;; "plugins/sql/sqlite3/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sql/sqlite3/Makefile" ;; "plugins/format/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/format/Makefile" ;; "plugins/format/classic/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/format/classic/Makefile" ;; "plugins/format/classic/include/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/format/classic/include/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/api/Makefile") CONFIG_FILES="$CONFIG_FILES docs/api/Makefile" ;; "docs/manpages/Makefile") CONFIG_FILES="$CONFIG_FILES docs/manpages/Makefile" ;; "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;; "bindings/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES bindings/perl/Makefile.PL" ;; "bindings/python/setup.py") CONFIG_FILES="$CONFIG_FILES bindings/python/setup.py" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # 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=' ' 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 {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } 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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// 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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } 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_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[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="$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_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$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:$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 >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } 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:$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 "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } 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:$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"" || { # Autoconf 2.62 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"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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 case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Whether or not to build static libraries. build_old_libs=$enable_static # 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 # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # 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 # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # 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 # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # 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 # 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 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 of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # 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 # 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 # 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 # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # 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 # 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 # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # 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 # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # 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 # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # 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 # 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 # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _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 "X${COLLECT_NAMES+set}" != Xset; 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # 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" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname 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). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname 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). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$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" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # 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_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # 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_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # 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_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "default":C) chmod +x libpreludedb-config ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # 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 || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo echo "*** Dumping configuration ***" echo " - Generate documentation : $enable_gtk_doc" echo " - Enable MySQL plugin : $with_mysql" echo " - Enable PostgreSQL plugin : $with_pgsql" echo " - Enable SQLite3 plugin : $with_sqlite3" echo " - Perl binding : $with_perl" echo " - Python binding : $with_python"; libpreludedb-1.0.0/libpreludedb-config.in0000664000076400007640000000316511226653036015341 00000000000000#!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no want_cflags=no want_libs=no thread_set=no usage="\ Usage: libpreludedb-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--thread] [--libs] [--ldflags] [--cflags] [--plugin-dir]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo $prefix ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo $exec_prefix ;; --version) echo @VERSION@ ;; --cflags) want_cflags=yes ;; --ldflags) echo @LIBPRELUDE_LDFLAGS@ ;; --libs) want_libs=yes ;; --plugin-dir) echo @db_plugin_dir@ ;; --thread) thread_set=yes ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done if test $want_cflags = yes; then flags="" if test @includedir@ != /usr/include ; then flags=-I@includedir@ fi if test $thread_set = yes; then flags=$flags @THREADCPPFLAGS@ fi echo $flags fi if test $want_libs = yes; then libdirs=-L@libdir@ if test $thread_set = yes; then thrlibs=@LTLIBMULTITHREAD@ else thrlibs=@LTLIBTHREAD@ fi echo $libdirs -lpreludedb @LIBPRELUDE_LIBS@ $thrlibs fi exit 0 libpreludedb-1.0.0/config.sub0000755000076400007640000010316711347715642013103 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 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-dietlibc | linux-newlib* | 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/'` ;; *) 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*) 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 \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | 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 \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | 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 | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-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-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | 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-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | 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-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | 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-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | 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 ;; 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) 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'm not sure what "Sysv32" means. Should this be sysv3.2? 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 ;; 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 ;; mingw32) basic_machine=i386-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 ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; 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 ;; 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) basic_machine=powerpc-unknown ;; ppc-*) 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) 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 ;; 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 ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-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 ;; 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* \ | -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* \ | -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* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -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*) # 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 ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -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 ;; # 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 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; 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: libpreludedb-1.0.0/arg-nonnull.h0000664000076400007640000000231011330611104013467 00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009, 2010 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 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 Lesser 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 . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif libpreludedb-1.0.0/Makefile.am0000664000076400007640000000305211226653036013140 00000000000000ACLOCAL_AMFLAGS = -I m4 -I libmissing/m4 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc EXTRA_DIST = LICENSE.README HACKING.README SUBDIRS = m4 libmissing src plugins bindings docs MAINTAINERCLEANFILES = \ $(srcdir)/INSTALL \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ $(srcdir)/install-sh \ $(srcdir)/ltmain.sh \ $(srcdir)/missing \ $(srcdir)/mkinstalldirs \ $(srcdir)/omf.make \ $(srcdir)/xmldocs.make \ $(srcdir)/gtk-doc.make \ $(srcdir)/ChangeLog \ `find "$(srcdir)" -type f -name Makefile.in -print` bin_SCRIPTS = $(top_builddir)/libpreludedb-config distuninstallcheck_listfiles = find . -type f -print | grep -v 'perl' | grep -v '3pm' AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing @LIBPRELUDE_CFLAGS@ bin_PROGRAMS = preludedb-admin preludedb_admin_LDFLAGS = @LIBPRELUDE_LDFLAGS@ preludedb_admin_LDADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ preludedb_admin_SOURCES = preludedb-admin.c dist-hook: @if test -d "$(srcdir)/.git"; then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -include $(top_srcdir)/git.mk libpreludedb-1.0.0/README0000664000076400007640000000374411226653036011774 00000000000000PreludeDB Library (http://www.prelude-ids.org) PreludeDB is brought to you by PreludeIDS Technologies (http://www.prelude-ids.com). PreludeDB Library Overview ======================== The PreludeDB Library provides an abstraction layer upon the type and the format of the database used to store IDMEF alerts. It allows developers to use the Prelude IDMEF database easily and efficiently without worrying about SQL, and to access the database independently of the type/format of the database. IRC === If there's something you just can't find out elsewhere, you want to give feedback directly to the authors or you're just bored, visit #prelude on irc.freenode.net Get Support =========== Prelude-user mailing list archives can be accessed at: http://www.prelude-ids.org/mailman/listinfo Commercial Support is available through the PreludeIDS Technologies company: http://www.prelude-ids.com, info@prelude-ids.com Help development ================ 1. SUBMITTING PATCHES The Prelude source is constantly changing. If you want to submit a patch, please do so from the most recent CVS source tree, subscribe to the prelude-devel mailing list by sending a mail to: prelude-devel-subscribe@prelude-ids.org and post your patch with a description of functionality. You can also attach patches to bugs on http://trac.prelude-ids.org 2. BUGS If you find any bugs, please report them to: http://trac.prelude-ids.org Please make sure that what you're reporting is actually a BUG and not a problem on your side. 3. SUGGESTIONS Subscribe to prelude-devel and give us your suggestions. How to install the PreludeDB Library ================================== If you don't want to build the PreludeDB Library yourself, you can get prebuild rpm and debian packages at http://www.prelude-ids.org. If you want to build PreludeDB, unpack the tarball and cd into the newly created directory. Then type : ./configure make If everything works, su to root and type: make install libpreludedb-1.0.0/ltmain.sh0000755000076400007640000073306011347715620012740 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --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 informational messages (default) # --version print version information # -h, --help print short or 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. # 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) # $progname: (GNU libtool) 2.2.6b # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION=2.2.6b TIMESTAMP="" package_revision=1.3017 # 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 # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: 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. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # 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" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # 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: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to 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 '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && 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_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_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 "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # 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 () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </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 } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # 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 # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break 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 $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # 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 } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; 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=$mode' for more information." } # 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 \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 "$lalib_p" = yes } # 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 () { func_lalib_p "$1" } # 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_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # 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 () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" 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 () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$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 () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then 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 "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && 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 "$build_old_libs" = yes; 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 "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; 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 command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && 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 "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && 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 "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $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 building PIC objects only -prefer-non-pic try to building 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 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 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 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -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 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 \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # 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 $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # 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 dir="$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 -*) ;; *) # 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_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. 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" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" 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 "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. 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" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_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 -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=yes if test "$isdir" = yes; 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. staticlibs="$staticlibs $file" ;; *.la) # 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 "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "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_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) 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" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else 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 "$build_old_libs" = yes; 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=yes 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 "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { 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 "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) 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_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $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 "$mode" = install && 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 () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; 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 "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $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" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } 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 $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," 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" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$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"' # 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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else 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 () { $opt_debug 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` darwin_base_archive=`basename "$darwin_archive"` 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 "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -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 | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $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. Xsed='${SED} -e 1s/^X//' 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 ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; 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" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 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\ " } # end: func_emit_wrapper_part2 # 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 in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # 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. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # 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_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # 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 # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # 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 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #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 ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); 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_fatal (const char *message, ...); 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_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 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; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); 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]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * 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) { LTWRAPPER_DEBUGPRINTF (("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 { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("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 (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int 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) { int orig_value_len = strlen (orig_value); int 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; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? 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 #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? 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 } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug 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 # which 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 which 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 dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no 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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && 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 dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" 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 "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if 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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" 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 ;; 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 "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$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 ;; -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$arg" = "X-export-symbols"; 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" dir=$func_stripname_result if test -z "$dir"; 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 # 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 "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -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) compiler_flags="$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) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$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 ;; -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_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$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" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$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" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$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" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" 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. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. 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 "$export_dynamic" = yes && 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 \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # 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_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries 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=no 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 "$linkmode,$pass" = "lib,link"; 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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if 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=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # 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 "X$inherited_linker_flags" | $Xsed -e '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 "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then 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 "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$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 "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names 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*) 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 "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # 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 "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) 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 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$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 "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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" objs="$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 "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; 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 "$deplibs_check_method" != pass_all; 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!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi 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 # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|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" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; 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 "$loop" -ne 0; 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) 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 "$loop" -ne 0; 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. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. 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 "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$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 "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e '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 "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names 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 linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$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" delfiles="$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 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # 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 fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || 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 cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' 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 "X$skipped_export" != "X:"; 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 "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && 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 delfiles="$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 "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && 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" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && 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 output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" 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 "X$objlist" = X || 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 "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$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~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then 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 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_silent || { 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 "$mode" = relink; 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 if ${skipped_export-false}; then 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 "X$include_expsyms" | $Xsed | $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 delfiles="$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 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 "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi 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" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { 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 "$mode" = relink; 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 "$mode" = relink; 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 "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" 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 if test "$build_libtool_libs" != yes; then 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 fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" 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" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ 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 "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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 "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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 "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e '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=$?' # 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 fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if 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 if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$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" generated="$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" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi 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 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 "X$oldobjs" = "X" ; 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 "$build_old_libs" = yes && 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$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" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$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" newdlprefiles="$newdlprefiles $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 newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $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 can not 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 "$installed" = no && test "$need_relink" = yes; 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 } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || 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 "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) 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 rmfiles="$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 rmfiles="$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 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$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 # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared 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: # vi:sw=2 libpreludedb-1.0.0/plugins/0000775000076400007640000000000011347715760012654 500000000000000libpreludedb-1.0.0/plugins/Makefile.am0000664000076400007640000000006411226653036014621 00000000000000SUBDIRS = sql format -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/format/0000775000076400007640000000000011347715760014144 500000000000000libpreludedb-1.0.0/plugins/format/Makefile.am0000664000076400007640000000006111226653036016106 00000000000000SUBDIRS = classic -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/format/classic/0000775000076400007640000000000011347715760015565 500000000000000libpreludedb-1.0.0/plugins/format/classic/mysql2sqlite.sh0000775000076400007640000000042311226653036020505 00000000000000#!/bin/sh sed \ -e 's/#.*//' \ -e '/^DROP /d' \ -e 's/[a-zA-Z]*INT /INTEGER /' \ -e 's/UNSIGNED //' \ -e 's/ENUM([^)]\{1,\})/TEXT/' \ -e 's/VARCHAR([^)]\{1,\})/TEXT/' \ -e 's/AUTO_INCREMENT/AUTOINCREMENT/' \ -e 's/TYPE=InnoDB//' \ -e 's/([0-9]\{1,\})//g' \ $1 libpreludedb-1.0.0/plugins/format/classic/sqlite-update-14-5.sql0000664000076400007640000000154611226653036021372 00000000000000BEGIN; UPDATE _format SET version='14.5'; ALTER TABLE Prelude_SnmpService RENAME TO Prelude_SnmpServiceOld; CREATE TABLE Prelude_SnmpService ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, snmp_oid TEXT NULL, message_processing_model INTEGER NULL, security_model INTEGER NULL, security_name TEXT NULL, security_level INTEGER NULL, context_name TEXT NULL, context_engine_id TEXT NULL, command TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; INSERT INTO Prelude_SnmpService (_message_ident, _parent_type, _parent0_index, snmp_oid, security_name, context_name, context_engine_id, command) SELECT _message_ident, _parent_type, _parent0_index, snmp_oid, security_name, context_name, context_engine_id, command FROM Prelude_SnmpServiceOld; DROP TABLE Prelude_SnmpServiceOld; COMMIT; libpreludedb-1.0.0/plugins/format/classic/mysql2pgsql.sh0000775000076400007640000000156711226653036020344 00000000000000#!/bin/sh sed \ -e 's/#.*//' \ -e 's/ INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT/ SERIAL PRIMARY KEY/' \ -e 's/BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT/BIGSERIAL PRIMARY KEY/' \ -e 's/DROP TABLE IF EXISTS/DROP TABLE/' \ -e 's/BLOB/BYTEA/' \ -e 's/ TINYINT UNSIGNED / INT2 /g' \ -e 's/ TINYINT / INT2 /g' \ -e 's/ SMALLINT UNSIGNED / INT4 /g' \ -e 's/ SMALLINT / INT2 /g' \ -e 's/ BIGINT UNSIGNED / INT8 /g' \ -e 's/ BIGINT / INT8 /g' \ -e 's/ INT\(EGER\)\{0,1\} UNSIGNED / INT8 /g' \ -e 's/ INT\(EGER\)\{0,1\} / INT4 /g' \ -e 's/DATETIME/TIMESTAMP/' \ -e 's/TYPE=InnoDB//' \ -e "s/\"\([^\"]*\)\"/'\1'/g" \ -e 's/\_parent_type ENUM(\(.*\))/_parent_type VARCHAR(1) CHECK \(_parent_type IN \(\1\)\)/' \ -e 's/\(.*\) ENUM(\(.*\))/\1 VARCHAR(32) CHECK \(\1 IN \(\2\)\)/' \ -e 's/\([[:lower:]_]\{1,\}\)([0-9]\{1,\})/\1/g' \ $1 libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-5.sql0000664000076400007640000000052011226653036021225 00000000000000UPDATE _format SET version="14.5"; ALTER TABLE Prelude_SnmpService DROP community; ALTER TABLE Prelude_SnmpService ADD COLUMN message_processing_model INTEGER UNSIGNED NULL; ALTER TABLE Prelude_SnmpService ADD COLUMN security_model INTEGER UNSIGNED NULL; ALTER TABLE Prelude_SnmpService ADD COLUMN security_level INTEGER UNSIGNED NULL;libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-6.sql0000664000076400007640000000571711226653036021224 00000000000000-- you can safely ignore error if the following action fails: ALTER TABLE Prelude_Checksum DROP CONSTRAINT prelude_checksum_algorithm_check; BEGIN; UPDATE _format SET version='14.6'; ALTER TABLE Prelude_Alertident ALTER COLUMN _index TYPE INT4; ALTER TABLE Prelude_Service ALTER COLUMN _parent0_index TYPE INT2; ALTER TABLE Prelude_Service ALTER COLUMN ip_version TYPE INT2; ALTER TABLE Prelude_Service ALTER COLUMN iana_protocol_number TYPE INT2; ALTER TABLE Prelude_Service ALTER COLUMN port TYPE INT4; ALTER TABLE Prelude_Checksum ADD CHECK ( algorithm IN ('MD4', 'MD5', 'SHA1', 'SHA2-256', 'SHA2-384', 'SHA2-512', 'CRC-32', 'Haval', 'Tiger', 'Gost')); ALTER TABLE Prelude_Alertident ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_ToolAlert ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_CorrelationAlert ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_OverflowAlert ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Analyzer ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Classification ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Reference ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Source ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Target ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_File ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_FileAccess ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_FileAccess_Permission ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Linkage ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Inode ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Checksum ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Impact ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Action ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Confidence ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Assessment ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_AdditionalData ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_CreateTime ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_DetectTime ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_AnalyzerTime ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Node ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Address ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_User ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_UserId ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Process ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_ProcessArg ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_ProcessEnv ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_Service ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_WebService ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_WebServiceArg ALTER COLUMN _message_ident TYPE INT8; ALTER TABLE Prelude_SnmpService ALTER COLUMN _message_ident TYPE INT8; COMMIT; libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-7.sql0000664000076400007640000000017111226653036021231 00000000000000BEGIN; UPDATE _format SET version="14.7"; ALTER TABLE Prelude_Impact CHANGE description description TEXT NULL; COMMIT; libpreludedb-1.0.0/plugins/format/classic/classic-path-resolve.c0000664000076400007640000003547411330320036021672 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include "preludedb-path-selection.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "classic-sql-join.h" #include "classic-sql-select.h" #include "classic-path-resolve.h" #define FIELD_CONTEXT_WHERE 1 #define FIELD_CONTEXT_SELECT 2 #define FIELD_CONTEXT_FUNCTION 3 static int default_table_name_resolver(const idmef_path_t *path, char **table_name) { char c; int ret; const char *class_name; prelude_string_t *string; prelude_bool_t next_is_maj = TRUE; class_name = idmef_class_get_name(idmef_path_get_class(path, idmef_path_get_depth(path) - 2)); ret = prelude_string_new(&string); if ( ret < 0 ) return ret; ret = prelude_string_cat(string, "Prelude_"); if ( ret < 0 ) goto error; while ( *class_name ) { c = *class_name++; if ( c == '_' ) { next_is_maj = TRUE; continue; } if ( next_is_maj ) { c += 'A' - 'a'; next_is_maj = FALSE; } ret = prelude_string_ncat(string, &c, 1); if ( ret < 0 ) goto error; } ret = prelude_string_get_string_released(string, table_name); error: prelude_string_destroy(string); return ret; } static int default_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { return prelude_string_sprintf(output, "%s.%s", table_name, idmef_path_get_name(path, idmef_path_get_depth(path) - 1)); } static int time_with_usec_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { if ( field_context == FIELD_CONTEXT_SELECT ) return prelude_string_sprintf(output, "%s.time, %s.gmtoff, %s.usec", table_name, table_name, table_name); return prelude_string_sprintf(output, "%s.time", table_name); } static int time_without_usec_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( field_context == FIELD_CONTEXT_SELECT ) return prelude_string_sprintf(output, "%s.%s, %s.%s_gmtoff, 0", table_name, child_name, table_name, child_name); return prelude_string_sprintf(output, "%s.%s", table_name, child_name); } static int message_table_name_resolver(const idmef_path_t *path, char **table_name) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "create_time") == 0 ) *table_name = strdup("Prelude_CreateTime"); else if ( strcmp(child_name, "detect_time") == 0 ) *table_name = strdup("Prelude_DetectTime"); else if ( strcmp(child_name, "analyzer_time") == 0 ) *table_name = strdup("Prelude_AnalyzerTime"); else return default_table_name_resolver(path, table_name); return *table_name ? 0 : prelude_error_from_errno(errno); } static int message_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "create_time") == 0 || strcmp(child_name, "detect_time") == 0 || strcmp(child_name, "analyzer_time") == 0 ) return time_with_usec_field_name_resolver(path, field_context, table_name, output); return default_field_name_resolver(path, field_context, table_name, output); } static int process_table_name_resolver(const idmef_path_t *path, char **table_name) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "arg") == 0 ) *table_name = strdup("Prelude_ProcessArg"); else if ( strcmp(child_name, "env") == 0 ) *table_name = strdup("Prelude_ProcessEnv"); else *table_name = strdup("Prelude_Process"); return *table_name ? 0 : prelude_error_from_errno(errno); } static int file_access_table_name_resolver(const idmef_path_t *path, char **table_name) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "permission") == 0 ) *table_name = strdup("Prelude_FileAccess_Permission"); else *table_name = strdup("Prelude_FileAccess"); return *table_name ? 0 : prelude_error_from_errno(errno); } static int web_service_table_name_resolver(const idmef_path_t *path, char **table_name) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "arg") == 0 ) *table_name = strdup("Prelude_WebServiceArg"); else *table_name = strdup("Prelude_WebService"); return *table_name ? 0 : prelude_error_from_errno(errno); } static int snmp_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "oid") == 0 ) child_name = "snmp_oid"; return prelude_string_sprintf(output, "%s.%s", table_name, child_name); } static int checksum_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "key") == 0 ) child_name = "checksum_key"; return prelude_string_sprintf(output, "%s.%s", table_name, child_name); } static int file_field_name_resolver(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output) { const char *child_name = idmef_path_get_name(path, idmef_path_get_depth(path) - 1); if ( strcmp(child_name, "create_time") == 0 || strcmp(child_name, "modify_time") == 0 || strcmp(child_name, "access_time") == 0 ) return time_without_usec_field_name_resolver(path, field_context, table_name, output); return prelude_string_sprintf(output, "%s.%s", table_name, child_name); } typedef struct classic_idmef_class { idmef_class_id_t id; int (*resolve_table_name)(const idmef_path_t *path, char **table_name); int (*resolve_field_name)(const idmef_path_t *path, int field_context, const char *table_name, prelude_string_t *output); } classic_idmef_class_t; static const classic_idmef_class_t classes[] = { { IDMEF_CLASS_ID_ALERT, message_table_name_resolver, message_field_name_resolver }, { IDMEF_CLASS_ID_HEARTBEAT, message_table_name_resolver, message_field_name_resolver }, { IDMEF_CLASS_ID_PROCESS, process_table_name_resolver, default_field_name_resolver }, { IDMEF_CLASS_ID_SNMP_SERVICE, default_table_name_resolver, snmp_field_name_resolver }, { IDMEF_CLASS_ID_WEB_SERVICE, web_service_table_name_resolver, default_field_name_resolver }, { IDMEF_CLASS_ID_CHECKSUM, default_table_name_resolver, checksum_field_name_resolver }, { IDMEF_CLASS_ID_FILE, default_table_name_resolver, file_field_name_resolver }, { IDMEF_CLASS_ID_FILE_ACCESS, file_access_table_name_resolver, default_field_name_resolver }, }; static const classic_idmef_class_t default_class = { 0, default_table_name_resolver, default_field_name_resolver }; static const classic_idmef_class_t *search_path(const idmef_path_t *path) { idmef_class_id_t class_id; unsigned int i; class_id = idmef_path_get_class(path, idmef_path_get_depth(path) - 2); for ( i = 0; i < sizeof (classes) / sizeof (classes[0]); i++ ) if ( class_id == classes[i].id ) return &classes[i]; return &default_class; } static int classic_path_resolve(const idmef_path_t *path, int field_context, classic_sql_join_t *join, prelude_string_t *output) { const classic_idmef_class_t *class; classic_sql_joined_table_t *table; char *table_name; int ret; if ( idmef_path_get_depth(path) == 2 && idmef_path_get_value_type(path, 1) != IDMEF_VALUE_TYPE_TIME ) return default_field_name_resolver(path, field_context, "top_table", output); class = search_path(path); table = classic_sql_join_lookup_table(join, path); if ( ! table ) { ret = class->resolve_table_name(path, &table_name); if ( ret < 0 ) return ret; ret = classic_sql_join_new_table(join, &table, path, table_name); if ( ret < 0 ) return ret; } return class->resolve_field_name(path, field_context, classic_sql_joined_table_get_name(table), output); } int classic_path_resolve_selected(preludedb_sql_t *sql, preludedb_selected_path_t *selected, classic_sql_join_t *join, classic_sql_select_t *select) { idmef_path_t *path; preludedb_selected_path_flags_t flags; prelude_string_t *field_name; int ret; int field_context; ret = prelude_string_new(&field_name); if ( ret < 0 ) return ret; path = preludedb_selected_path_get_path(selected); flags = preludedb_selected_path_get_flags(selected); if ( flags & (PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN| PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX| PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG| PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD| PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT) ) field_context = FIELD_CONTEXT_FUNCTION; else field_context = FIELD_CONTEXT_SELECT; ret = classic_path_resolve(path, field_context, join, field_name); if ( ret < 0 ) goto error; ret = classic_sql_select_add_field(select, prelude_string_get_string(field_name), flags); error: prelude_string_destroy(field_name); return ret; } int classic_path_resolve_selection(preludedb_sql_t *sql, preludedb_path_selection_t *selection, classic_sql_join_t *join, classic_sql_select_t *select) { preludedb_selected_path_t *selected = NULL; int ret; while ( (selected = preludedb_path_selection_get_next(selection, selected)) ) { ret = classic_path_resolve_selected(sql, selected, join, select); if ( ret < 0 ) return ret; } return 0; } static int classic_path_resolve_criterion(preludedb_sql_t *sql, idmef_criterion_t *criterion, classic_sql_join_t *join, prelude_string_t *output) { prelude_string_t *field_name; int ret; ret = prelude_string_new(&field_name); if ( ret < 0 ) return ret; ret = classic_path_resolve(idmef_criterion_get_path(criterion), FIELD_CONTEXT_WHERE, join, field_name); if ( ret < 0 ) goto error; ret = preludedb_sql_build_criterion_string(sql, output, prelude_string_get_string(field_name), idmef_criterion_get_operator(criterion), idmef_criterion_get_value(criterion)); error: prelude_string_destroy(field_name); return ret; } int classic_path_resolve_criteria(preludedb_sql_t *sql, idmef_criteria_t *criteria, classic_sql_join_t *join, prelude_string_t *output) { int ret; idmef_criteria_t *or, *and; or = idmef_criteria_get_or(criteria); and = idmef_criteria_get_and(criteria); if ( or ) { ret = prelude_string_cat(output, "(("); if ( ret < 0 ) return ret; } ret = classic_path_resolve_criterion(sql, idmef_criteria_get_criterion(criteria), join, output); if ( ret < 0 ) return ret; if ( and ) { ret = prelude_string_cat(output, " AND "); if ( ret < 0 ) return ret; ret = classic_path_resolve_criteria(sql, and, join, output); if ( ret < 0 ) return ret; } if ( or ) { ret = prelude_string_cat(output, ") OR ("); if ( ret < 0 ) return ret; ret = classic_path_resolve_criteria(sql, or, join, output); if ( ret < 0 ) return ret; ret = prelude_string_cat(output, "))"); if ( ret < 0 ) return ret; } return 0; } libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-1.sql0000664000076400007640000000020311226653036021217 00000000000000ALTER TABLE Prelude_Impact CHANGE severity severity ENUM("info", "low", "medium", "high") NULL; UPDATE _format SET version="14.1"; libpreludedb-1.0.0/plugins/format/classic/mysql.sql0000664000076400007640000003561111226653036017372 00000000000000DROP TABLE IF EXISTS _format; CREATE TABLE _format ( name VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL ); INSERT INTO _format (name, version) VALUES('classic', '14.7'); DROP TABLE IF EXISTS Prelude_Alert; CREATE TABLE Prelude_Alert ( _ident BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, messageid VARCHAR(255) NULL ) TYPE=InnoDB; CREATE INDEX prelude_alert_messageid ON Prelude_Alert (messageid); DROP TABLE IF EXISTS Prelude_Alertident; CREATE TABLE Prelude_Alertident ( _message_ident BIGINT UNSIGNED NOT NULL, _index INTEGER NOT NULL, _parent_type ENUM('T','C') NOT NULL, # T=ToolAlert C=CorrelationAlert alertident VARCHAR(255) NOT NULL, analyzerid VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_ToolAlert; CREATE TABLE Prelude_ToolAlert ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, command VARCHAR(255) NULL ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_CorrelationAlert; CREATE TABLE Prelude_CorrelationAlert ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_OverflowAlert; CREATE TABLE Prelude_OverflowAlert ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, program VARCHAR(255) NOT NULL, size INTEGER UNSIGNED NULL, buffer BLOB NULL ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Heartbeat; CREATE TABLE Prelude_Heartbeat ( _ident BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, messageid VARCHAR(255) NULL, heartbeat_interval INTEGER NULL ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Analyzer; CREATE TABLE Prelude_Analyzer ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H') NOT NULL, # A=Alert H=Hearbeat _index TINYINT NOT NULL, analyzerid VARCHAR(255) NULL, name VARCHAR(255) NULL, manufacturer VARCHAR(255) NULL, model VARCHAR(255) NULL, version VARCHAR(255) NULL, class VARCHAR(255) NULL, ostype VARCHAR(255) NULL, osversion VARCHAR(255) NULL, PRIMARY KEY (_parent_type,_message_ident,_index) ) TYPE=InnoDB; CREATE INDEX prelude_analyzer_analyzerid ON Prelude_Analyzer (_parent_type,_index,analyzerid); CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type,_index,model); DROP TABLE IF EXISTS Prelude_Classification; CREATE TABLE Prelude_Classification ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, ident VARCHAR(255) NULL, text VARCHAR(255) NOT NULL ) TYPE=InnoDB; CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text(40)); DROP TABLE IF EXISTS Prelude_Reference; CREATE TABLE Prelude_Reference ( _message_ident BIGINT UNSIGNED NOT NULL, _index TINYINT NOT NULL, origin ENUM("unknown","vendor-specific","user-specific","bugtraqid","cve","osvdb") NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, meaning VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) TYPE=InnoDB; CREATE INDEX prelude_reference_index_name ON Prelude_Reference (name(40)); DROP TABLE IF EXISTS Prelude_Source; CREATE TABLE Prelude_Source ( _message_ident BIGINT UNSIGNED NOT NULL, _index SMALLINT NOT NULL, ident VARCHAR(255) NULL, spoofed ENUM("unknown","yes","no") NOT NULL, interface VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Target; CREATE TABLE Prelude_Target ( _message_ident BIGINT UNSIGNED NOT NULL, _index SMALLINT NOT NULL, ident VARCHAR(255) NULL, decoy ENUM("unknown","yes","no") NOT NULL, interface VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_File; CREATE TABLE Prelude_File ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _index TINYINT NOT NULL, ident VARCHAR(255) NULL, path VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, category ENUM("current", "original") NULL, create_time DATETIME NULL, create_time_gmtoff INTEGER NULL, modify_time DATETIME NULL, modify_time_gmtoff INTEGER NULL, access_time DATETIME NULL, access_time_gmtoff INTEGER NULL, data_size INT UNSIGNED NULL, disk_size INT UNSIGNED NULL, fstype ENUM("ufs", "efs", "nfs", "afs", "ntfs", "fat16", "fat32", "pcfs", "joliet", "iso9660") NULL, file_type VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _parent0_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_FileAccess; CREATE TABLE Prelude_FileAccess ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, _index TINYINT NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_FileAccess_Permission; CREATE TABLE Prelude_FileAccess_Permission ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, _parent2_index TINYINT NOT NULL, _index TINYINT NOT NULL, permission VARCHAR(255) NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _parent2_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Linkage; CREATE TABLE Prelude_Linkage ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, _index TINYINT NOT NULL, category ENUM("hard-link","mount-point","reparse-point","shortcut","stream","symbolic-link") NOT NULL, name VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Inode; CREATE TABLE Prelude_Inode ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, change_time DATETIME NULL, change_time_gmtoff INTEGER NULL, number INT UNSIGNED NULL, major_device INT UNSIGNED NULL, minor_device INT UNSIGNED NULL, c_major_device INT UNSIGNED NULL, c_minor_device INT UNSIGNED NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Checksum; CREATE TABLE Prelude_Checksum ( _message_ident BIGINT UNSIGNED NOT NULL, _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, _index TINYINT NOT NULL, algorithm ENUM("MD4", "MD5", "SHA1", "SHA2-256", "SHA2-384", "SHA2-512", "CRC-32", "Haval", "Tiger", "Gost") NOT NULL, value VARCHAR(255) NOT NULL, checksum_key VARCHAR(255) NULL, # key is a reserved word PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Impact; CREATE TABLE Prelude_Impact ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, description TEXT NULL, severity ENUM("info", "low","medium","high") NULL, completion ENUM("failed", "succeeded") NULL, type ENUM("admin", "dos", "file", "recon", "user", "other") NOT NULL ) TYPE=InnoDB; CREATE INDEX prelude_impact_index_severity ON Prelude_Impact (severity); CREATE INDEX prelude_impact_index_completion ON Prelude_Impact (completion); CREATE INDEX prelude_impact_index_type ON Prelude_Impact (type); DROP TABLE IF EXISTS Prelude_Action; CREATE TABLE Prelude_Action ( _message_ident BIGINT UNSIGNED NOT NULL, _index TINYINT NOT NULL, description VARCHAR(255) NULL, category ENUM("block-installed", "notification-sent", "taken-offline", "other") NOT NULL, PRIMARY KEY (_message_ident, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Confidence; CREATE TABLE Prelude_Confidence ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, confidence FLOAT NULL, rating ENUM("low", "medium", "high", "numeric") NOT NULL ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Assessment; CREATE TABLE Prelude_Assessment ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_AdditionalData; CREATE TABLE Prelude_AdditionalData ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A', 'H') NOT NULL, _index TINYINT NOT NULL, type ENUM("boolean","byte","character","date-time","integer","ntpstamp","portlist","real","string","byte-string","xml") NOT NULL, meaning VARCHAR(255) NULL, data BLOB NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_CreateTime; CREATE TABLE Prelude_CreateTime ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H') NOT NULL, # A=Alert H=Hearbeat time DATETIME NOT NULL, usec INTEGER UNSIGNED NOT NULL, gmtoff INTEGER NOT NULL, PRIMARY KEY (_parent_type,_message_ident) ) TYPE=InnoDB; CREATE INDEX prelude_createtime_index ON Prelude_CreateTime (_parent_type,time); DROP TABLE IF EXISTS Prelude_DetectTime; CREATE TABLE Prelude_DetectTime ( _message_ident BIGINT UNSIGNED NOT NULL PRIMARY KEY, time DATETIME NOT NULL, usec INTEGER UNSIGNED NOT NULL, gmtoff INTEGER NOT NULL ) TYPE=InnoDB; CREATE INDEX prelude_detecttime_index ON Prelude_DetectTime (time); DROP TABLE IF EXISTS Prelude_AnalyzerTime; CREATE TABLE Prelude_AnalyzerTime ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H') NOT NULL, # A=Alert H=Hearbeat time DATETIME NOT NULL, usec INTEGER UNSIGNED NOT NULL, gmtoff INTEGER NOT NULL, PRIMARY KEY (_parent_type, _message_ident) ) TYPE=InnoDB; CREATE INDEX prelude_analyzertime_index ON Prelude_AnalyzerTime (_parent_type,time); DROP TABLE IF EXISTS Prelude_Node; CREATE TABLE Prelude_Node ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H','S','T') NOT NULL, # A=Analyzer T=Target S=Source H=Heartbeat _parent0_index SMALLINT NOT NULL, ident VARCHAR(255) NULL, category ENUM("unknown","ads","afs","coda","dfs","dns","hosts","kerberos","nds","nis","nisplus","nt","wfw") NULL, location VARCHAR(255) NULL, name VARCHAR(255) NULL, PRIMARY KEY(_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location(20)); CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name(20)); DROP TABLE IF EXISTS Prelude_Address; CREATE TABLE Prelude_Address ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H','S','T') NOT NULL, # A=Analyser T=Target S=Source H=Heartbeat _parent0_index SMALLINT NOT NULL, _index TINYINT NOT NULL, ident VARCHAR(255) NULL, category ENUM("unknown","atm","e-mail","lotus-notes","mac","sna","vm","ipv4-addr","ipv4-addr-hex","ipv4-net","ipv4-net-mask","ipv6-addr","ipv6-addr-hex","ipv6-net","ipv6-net-mask") NOT NULL, vlan_name VARCHAR(255) NULL, vlan_num INTEGER UNSIGNED NULL, address VARCHAR(255) NOT NULL, netmask VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) TYPE=InnoDB; CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address(10)); DROP TABLE IF EXISTS Prelude_User; CREATE TABLE Prelude_User ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T') NOT NULL, # T=Target S=Source _parent0_index SMALLINT NOT NULL, ident VARCHAR(255) NULL, category ENUM("unknown","application","os-device") NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_UserId; CREATE TABLE Prelude_UserId ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T', 'F') NOT NULL, # T=Target User S=Source User F=File Access _parent0_index SMALLINT NOT NULL, _parent1_index TINYINT NOT NULL, _parent2_index TINYINT NOT NULL, _index TINYINT NOT NULL, ident VARCHAR(255) NULL, type ENUM("current-user","original-user","target-user","user-privs","current-group","group-privs","other-privs") NOT NULL, name VARCHAR(255) NULL, tty VARCHAR(255) NULL, number INTEGER UNSIGNED NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _parent1_index, _parent2_index, _index) # _parent_index1 and _parent2_index will always be zero if parent_type = 'F' ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Process; CREATE TABLE Prelude_Process ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H','S','T') NOT NULL, # A=Analyzer T=Target S=Source H=Heartbeat _parent0_index SMALLINT NOT NULL, ident VARCHAR(255) NULL, name VARCHAR(255) NOT NULL, pid INTEGER UNSIGNED NULL, path VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_ProcessArg; CREATE TABLE Prelude_ProcessArg ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H','S','T') NOT NULL DEFAULT 'A', # A=Analyser T=Target S=Source _parent0_index SMALLINT NOT NULL, _index TINYINT NOT NULL, arg VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_ProcessEnv; CREATE TABLE Prelude_ProcessEnv ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('A','H','S','T') NOT NULL, # A=Analyser T=Target S=Source _parent0_index SMALLINT NOT NULL, _index TINYINT NOT NULL, env VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_Service; CREATE TABLE Prelude_Service ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T') NOT NULL, # T=Target S=Source _parent0_index SMALLINT NOT NULL, ident VARCHAR(255) NULL, ip_version TINYINT UNSIGNED NULL, name VARCHAR(255) NULL, port SMALLINT UNSIGNED NULL, iana_protocol_number TINYINT UNSIGNED NULL, iana_protocol_name VARCHAR(255) NULL, portlist VARCHAR (255) NULL, protocol VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol(10),port); CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol(10),name(10)); DROP TABLE IF EXISTS Prelude_WebService; CREATE TABLE Prelude_WebService ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T') NOT NULL, # T=Target S=Source _parent0_index SMALLINT NOT NULL, url VARCHAR(255) NOT NULL, cgi VARCHAR(255) NULL, http_method VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_WebServiceArg; CREATE TABLE Prelude_WebServiceArg ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T') NOT NULL, # T=Target S=Source _parent0_index SMALLINT NOT NULL, _index TINYINT NOT NULL, arg VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) TYPE=InnoDB; DROP TABLE IF EXISTS Prelude_SnmpService; CREATE TABLE Prelude_SnmpService ( _message_ident BIGINT UNSIGNED NOT NULL, _parent_type ENUM('S','T') NOT NULL, # T=Target S=Source _parent0_index SMALLINT NOT NULL, snmp_oid VARCHAR(255) NULL, # oid is a reserved word in PostgreSQL message_processing_model INTEGER UNSIGNED NULL, security_model INTEGER UNSIGNED NULL, security_name VARCHAR(255) NULL, security_level INTEGER UNSIGNED NULL, context_name VARCHAR(255) NULL, context_engine_id VARCHAR(255) NULL, command VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) TYPE=InnoDB; libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-3.sql0000664000076400007640000000014111226653036021222 00000000000000UPDATE _format SET version="14.3"; ALTER TABLE Prelude_SNMPService RENAME Prelude_SnmpService; libpreludedb-1.0.0/plugins/format/classic/classic-delete.c0000664000076400007640000002330411326045005020515 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb.h" #include "classic-delete.h" static int delete_message(preludedb_sql_t *sql, unsigned int count, const char **queries, const char *idents) { unsigned int i; int ret, tmp; ret = preludedb_sql_transaction_start(sql); if ( ret < 0 ) return ret; for ( i = 0; i < count; i++ ) { ret = preludedb_sql_query_sprintf(sql, NULL, queries[i], idents); if ( ret < 0 ) goto error; } return preludedb_sql_transaction_end(sql); error: tmp = preludedb_sql_transaction_abort(sql); return (tmp < 0) ? tmp : ret; } static int do_delete_alert(preludedb_sql_t *sql, const char *idents) { static const char *queries[] = { "DELETE FROM Prelude_Action WHERE _message_ident %s", "DELETE FROM Prelude_AdditionalData WHERE _message_ident %s AND _parent_type = 'A'", "DELETE FROM Prelude_Address WHERE _message_ident %s AND _parent_type != 'H'", "DELETE FROM Prelude_Alert WHERE _ident %s", "DELETE FROM Prelude_Alertident WHERE _message_ident %s", "DELETE FROM Prelude_Analyzer WHERE _message_ident %s AND _parent_type = 'A'", "DELETE FROM Prelude_AnalyzerTime WHERE _message_ident %s AND _parent_type = 'A'", "DELETE FROM Prelude_Assessment WHERE _message_ident %s", "DELETE FROM Prelude_Classification WHERE _message_ident %s", "DELETE FROM Prelude_Reference WHERE _message_ident %s", "DELETE FROM Prelude_Confidence WHERE _message_ident %s", "DELETE FROM Prelude_CorrelationAlert WHERE _message_ident %s", "DELETE FROM Prelude_CreateTime WHERE _message_ident %s AND _parent_type = 'A'", "DELETE FROM Prelude_DetectTime WHERE _message_ident %s", "DELETE FROM Prelude_File WHERE _message_ident %s", "DELETE FROM Prelude_FileAccess WHERE _message_ident %s", "DELETE FROM Prelude_FileAccess_Permission WHERE _message_ident %s", "DELETE FROM Prelude_Impact WHERE _message_ident %s", "DELETE FROM Prelude_Inode WHERE _message_ident %s", "DELETE FROM Prelude_Checksum WHERE _message_ident %s", "DELETE FROM Prelude_Linkage WHERE _message_ident %s", "DELETE FROM Prelude_Node WHERE _message_ident %s AND _parent_type != 'H'", "DELETE FROM Prelude_OverflowAlert WHERE _message_ident %s", "DELETE FROM Prelude_Process WHERE _message_ident %s AND _parent_type != 'H'", "DELETE FROM Prelude_ProcessArg WHERE _message_ident %s AND _parent_type != 'H'", "DELETE FROM Prelude_ProcessEnv WHERE _message_ident %s AND _parent_type != 'H'", "DELETE FROM Prelude_SnmpService WHERE _message_ident %s", "DELETE FROM Prelude_Service WHERE _message_ident %s", "DELETE FROM Prelude_Source WHERE _message_ident %s", "DELETE FROM Prelude_Target WHERE _message_ident %s", "DELETE FROM Prelude_ToolAlert WHERE _message_ident %s", "DELETE FROM Prelude_User WHERE _message_ident %s", "DELETE FROM Prelude_UserId WHERE _message_ident %s", "DELETE FROM Prelude_WebService WHERE _message_ident %s", "DELETE FROM Prelude_WebServiceArg WHERE _message_ident %s" }; return delete_message(sql, sizeof(queries) / sizeof(*queries), queries, idents); } static int do_delete_heartbeat(preludedb_sql_t *sql, const char *idents) { static const char *queries[] = { "DELETE FROM Prelude_AdditionalData WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_Address WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_Analyzer WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_AnalyzerTime WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_CreateTime WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_Node WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_Process WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_ProcessArg WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_ProcessEnv WHERE _parent_type = 'H' AND _message_ident %s", "DELETE FROM Prelude_Heartbeat WHERE _ident %s", }; return delete_message(sql, sizeof(queries) / sizeof(*queries), queries, idents); } static ssize_t get_string_from_ident_list(prelude_string_t **out, uint64_t *ident, size_t size) { int ret; size_t i; prelude_bool_t need_sep = FALSE; ret = prelude_string_new(out); if ( ret < 0 ) return ret; ret = prelude_string_cat(*out, "IN ("); if ( ret < 0 ) goto err; for ( i = 0; i < size; i++ ) { ret = prelude_string_sprintf(*out, "%s%" PRELUDE_PRIu64, (need_sep) ? ", " : "", ident[i]); if ( ret < 0 ) goto err; need_sep = TRUE; } ret = prelude_string_cat(*out, ")"); if ( ret < 0 ) goto err; return i; err: prelude_string_destroy(*out); return ret; } static ssize_t get_string_from_result_ident(prelude_string_t **out, preludedb_result_idents_t *res) { int ret; size_t i = 0; uint64_t ident; prelude_bool_t need_sep = FALSE; ret = prelude_string_new(out); if ( ret < 0 ) return ret; ret = prelude_string_cat(*out, "IN ("); if ( ret < 0 ) goto err; while ( preludedb_result_idents_get_next(res, &ident) ) { ret = prelude_string_sprintf(*out, "%s%" PRELUDE_PRIu64, (need_sep) ? ", " : "", ident); if ( ret < 0 ) goto err; i++; need_sep = TRUE; } if ( i == 0 ) { ret = 0; goto err; } ret = prelude_string_cat(*out, ")"); if ( ret < 0 ) goto err; return i; err: prelude_string_destroy(*out); return ret; } int classic_delete_alert(preludedb_sql_t *sql, uint64_t ident) { char buf[32]; snprintf(buf, sizeof(buf), "= %" PRELUDE_PRIu64, ident); return do_delete_alert(sql, buf); } int classic_delete_heartbeat(preludedb_sql_t *sql, uint64_t ident) { char buf[32]; snprintf(buf, sizeof(buf), "= %" PRELUDE_PRIu64, ident); return do_delete_heartbeat(sql, buf); } ssize_t classic_delete_alert_from_result_idents(preludedb_sql_t *sql, preludedb_result_idents_t *results) { int ret; ssize_t count; prelude_string_t *buf; count = get_string_from_result_ident(&buf, results); if ( count <= 0 ) return count; ret = do_delete_alert(sql, prelude_string_get_string(buf)); prelude_string_destroy(buf); return (ret < 0) ? ret : count; } ssize_t classic_delete_alert_from_list(preludedb_sql_t *sql, uint64_t *ident, size_t size) { int ret; ssize_t count; prelude_string_t *buf; count = get_string_from_ident_list(&buf, ident, size); if ( count < 0 ) return count; ret = do_delete_alert(sql, prelude_string_get_string(buf)); prelude_string_destroy(buf); return (ret < 0) ? ret : count; } ssize_t classic_delete_heartbeat_from_result_idents(preludedb_sql_t *sql, preludedb_result_idents_t *results) { int ret; ssize_t count; prelude_string_t *buf; count = get_string_from_result_ident(&buf, results); if ( count <= 0 ) return count; ret = do_delete_heartbeat(sql, prelude_string_get_string(buf)); prelude_string_destroy(buf); return (ret < 0) ? ret : count; } ssize_t classic_delete_heartbeat_from_list(preludedb_sql_t *sql, uint64_t *ident, size_t size) { int ret; ssize_t count; prelude_string_t *buf; count = get_string_from_ident_list(&buf, ident, size); if ( count < 0 ) return count; ret = do_delete_heartbeat(sql, prelude_string_get_string(buf)); prelude_string_destroy(buf); return (ret < 0) ? ret : count; } libpreludedb-1.0.0/plugins/format/classic/Makefile.am0000664000076400007640000000257711226653036017545 00000000000000SUBDIRS=include AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(srcdir)/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ classic_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ classic_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ classic_la_SOURCES = classic.c classic-delete.c classic-get.c classic-insert.c classic-path-resolve.c classic-sql-join.c classic-sql-select.c classic_LTLIBRARIES = classic.la classicdir = $(format_plugin_dir) EXTRA_DIST = mysql2sqlite.sh mysql2pgsql.sh schemadatadir = $(format_schema_dir)/classic dist_schemadata_DATA = mysql2sqlite.sh \ mysql2pgsql.sh \ mysql.sql \ mysql-update-14-1.sql \ mysql-update-14-2.sql \ mysql-update-14-3.sql \ mysql-update-14-4.sql \ mysql-update-14-5.sql \ mysql-update-14-6.sql \ mysql-update-14-7.sql \ pgsql.sql \ pgsql-update-14-1.sql \ pgsql-update-14-2.sql \ pgsql-update-14-3.sql \ pgsql-update-14-4.sql \ pgsql-update-14-5.sql \ pgsql-update-14-6.sql \ pgsql-update-14-7.sql \ sqlite.sql \ sqlite-update-14-4.sql \ sqlite-update-14-5.sql \ sqlite-update-14-6.sql \ sqlite-update-14-7.sql sqlite.sql: mysql.sql $(srcdir)/mysql2sqlite.sh $(srcdir)/mysql.sql > $@ pgsql.sql: mysql.sql $(srcdir)/mysql2pgsql.sh $(srcdir)/mysql.sql > $@ -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/format/classic/pgsql.sql0000664000076400007640000003334211226653036017352 00000000000000DROP TABLE _format; CREATE TABLE _format ( name VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL ); INSERT INTO _format (name, version) VALUES('classic', '14.7'); DROP TABLE Prelude_Alert; CREATE TABLE Prelude_Alert ( _ident BIGSERIAL PRIMARY KEY, messageid VARCHAR(255) NULL ) ; CREATE INDEX prelude_alert_messageid ON Prelude_Alert (messageid); DROP TABLE Prelude_Alertident; CREATE TABLE Prelude_Alertident ( _message_ident INT8 NOT NULL, _index INT4 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('T','C')) NOT NULL, alertident VARCHAR(255) NOT NULL, analyzerid VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) ; DROP TABLE Prelude_ToolAlert; CREATE TABLE Prelude_ToolAlert ( _message_ident INT8 NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, command VARCHAR(255) NULL ) ; DROP TABLE Prelude_CorrelationAlert; CREATE TABLE Prelude_CorrelationAlert ( _message_ident INT8 NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL ) ; DROP TABLE Prelude_OverflowAlert; CREATE TABLE Prelude_OverflowAlert ( _message_ident INT8 NOT NULL PRIMARY KEY, program VARCHAR(255) NOT NULL, size INT8 NULL, buffer BYTEA NULL ) ; DROP TABLE Prelude_Heartbeat; CREATE TABLE Prelude_Heartbeat ( _ident BIGSERIAL PRIMARY KEY, messageid VARCHAR(255) NULL, heartbeat_interval INT4 NULL ) ; DROP TABLE Prelude_Analyzer; CREATE TABLE Prelude_Analyzer ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H')) NOT NULL, _index INT2 NOT NULL, analyzerid VARCHAR(255) NULL, name VARCHAR(255) NULL, manufacturer VARCHAR(255) NULL, model VARCHAR(255) NULL, version VARCHAR(255) NULL, class VARCHAR(255) NULL, ostype VARCHAR(255) NULL, osversion VARCHAR(255) NULL, PRIMARY KEY (_parent_type,_message_ident,_index) ) ; CREATE INDEX prelude_analyzer_analyzerid ON Prelude_Analyzer (_parent_type,_index,analyzerid); CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type,_index,model); DROP TABLE Prelude_Classification; CREATE TABLE Prelude_Classification ( _message_ident INT8 NOT NULL PRIMARY KEY, ident VARCHAR(255) NULL, text VARCHAR(255) NOT NULL ) ; CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text); DROP TABLE Prelude_Reference; CREATE TABLE Prelude_Reference ( _message_ident INT8 NOT NULL, _index INT2 NOT NULL, origin VARCHAR(32) CHECK ( origin IN ('unknown','vendor-specific','user-specific','bugtraqid','cve','osvdb')) NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, meaning VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) ; CREATE INDEX prelude_reference_index_name ON Prelude_Reference (name); DROP TABLE Prelude_Source; CREATE TABLE Prelude_Source ( _message_ident INT8 NOT NULL, _index INT2 NOT NULL, ident VARCHAR(255) NULL, spoofed VARCHAR(32) CHECK ( spoofed IN ('unknown','yes','no')) NOT NULL, interface VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) ; DROP TABLE Prelude_Target; CREATE TABLE Prelude_Target ( _message_ident INT8 NOT NULL, _index INT2 NOT NULL, ident VARCHAR(255) NULL, decoy VARCHAR(32) CHECK ( decoy IN ('unknown','yes','no')) NOT NULL, interface VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _index) ) ; DROP TABLE Prelude_File; CREATE TABLE Prelude_File ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _index INT2 NOT NULL, ident VARCHAR(255) NULL, path VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, category VARCHAR(32) CHECK ( category IN ('current', 'original')) NULL, create_time TIMESTAMP NULL, create_time_gmtoff INT4 NULL, modify_time TIMESTAMP NULL, modify_time_gmtoff INT4 NULL, access_time TIMESTAMP NULL, access_time_gmtoff INT4 NULL, data_size INT8 NULL, disk_size INT8 NULL, fstype VARCHAR(32) CHECK ( fstype IN ('ufs', 'efs', 'nfs', 'afs', 'ntfs', 'fat16', 'fat32', 'pcfs', 'joliet', 'iso9660')) NULL, file_type VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _parent0_index, _index) ) ; DROP TABLE Prelude_FileAccess; CREATE TABLE Prelude_FileAccess ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, _index INT2 NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; DROP TABLE Prelude_FileAccess_Permission; CREATE TABLE Prelude_FileAccess_Permission ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, _parent2_index INT2 NOT NULL, _index INT2 NOT NULL, permission VARCHAR(255) NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _parent2_index, _index) ) ; DROP TABLE Prelude_Linkage; CREATE TABLE Prelude_Linkage ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, _index INT2 NOT NULL, category VARCHAR(32) CHECK ( category IN ('hard-link','mount-point','reparse-point','shortcut','stream','symbolic-link')) NOT NULL, name VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; DROP TABLE Prelude_Inode; CREATE TABLE Prelude_Inode ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, change_time TIMESTAMP NULL, change_time_gmtoff INT4 NULL, number INT8 NULL, major_device INT8 NULL, minor_device INT8 NULL, c_major_device INT8 NULL, c_minor_device INT8 NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index) ) ; DROP TABLE Prelude_Checksum; CREATE TABLE Prelude_Checksum ( _message_ident INT8 NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, _index INT2 NOT NULL, algorithm VARCHAR(32) CHECK ( algorithm IN ('MD4', 'MD5', 'SHA1', 'SHA2-256', 'SHA2-384', 'SHA2-512', 'CRC-32', 'Haval', 'Tiger', 'Gost')) NOT NULL, value VARCHAR(255) NOT NULL, checksum_key VARCHAR(255) NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; DROP TABLE Prelude_Impact; CREATE TABLE Prelude_Impact ( _message_ident INT8 NOT NULL PRIMARY KEY, description TEXT NULL, severity VARCHAR(32) CHECK ( severity IN ('info', 'low','medium','high')) NULL, completion VARCHAR(32) CHECK ( completion IN ('failed', 'succeeded')) NULL, type VARCHAR(32) CHECK ( type IN ('admin', 'dos', 'file', 'recon', 'user', 'other')) NOT NULL ) ; CREATE INDEX prelude_impact_index_severity ON Prelude_Impact (severity); CREATE INDEX prelude_impact_index_completion ON Prelude_Impact (completion); CREATE INDEX prelude_impact_index_type ON Prelude_Impact (type); DROP TABLE Prelude_Action; CREATE TABLE Prelude_Action ( _message_ident INT8 NOT NULL, _index INT2 NOT NULL, description VARCHAR(255) NULL, category VARCHAR(32) CHECK ( category IN ('block-installed', 'notification-sent', 'taken-offline', 'other')) NOT NULL, PRIMARY KEY (_message_ident, _index) ) ; DROP TABLE Prelude_Confidence; CREATE TABLE Prelude_Confidence ( _message_ident INT8 NOT NULL PRIMARY KEY, confidence FLOAT NULL, rating VARCHAR(32) CHECK ( rating IN ('low', 'medium', 'high', 'numeric')) NOT NULL ) ; DROP TABLE Prelude_Assessment; CREATE TABLE Prelude_Assessment ( _message_ident INT8 NOT NULL PRIMARY KEY ) ; DROP TABLE Prelude_AdditionalData; CREATE TABLE Prelude_AdditionalData ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A', 'H')) NOT NULL, _index INT2 NOT NULL, type VARCHAR(32) CHECK ( type IN ('boolean','byte','character','date-time','integer','ntpstamp','portlist','real','string','byte-string','xml')) NOT NULL, meaning VARCHAR(255) NULL, data BYTEA NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) ; DROP TABLE Prelude_CreateTime; CREATE TABLE Prelude_CreateTime ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H')) NOT NULL, time TIMESTAMP NOT NULL, usec INT8 NOT NULL, gmtoff INT4 NOT NULL, PRIMARY KEY (_parent_type,_message_ident) ) ; CREATE INDEX prelude_createtime_index ON Prelude_CreateTime (_parent_type,time); DROP TABLE Prelude_DetectTime; CREATE TABLE Prelude_DetectTime ( _message_ident INT8 NOT NULL PRIMARY KEY, time TIMESTAMP NOT NULL, usec INT8 NOT NULL, gmtoff INT4 NOT NULL ) ; CREATE INDEX prelude_detecttime_index ON Prelude_DetectTime (time); DROP TABLE Prelude_AnalyzerTime; CREATE TABLE Prelude_AnalyzerTime ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H')) NOT NULL, time TIMESTAMP NOT NULL, usec INT8 NOT NULL, gmtoff INT4 NOT NULL, PRIMARY KEY (_parent_type, _message_ident) ) ; CREATE INDEX prelude_analyzertime_index ON Prelude_AnalyzerTime (_parent_type,time); DROP TABLE Prelude_Node; CREATE TABLE Prelude_Node ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H','S','T')) NOT NULL, _parent0_index INT2 NOT NULL, ident VARCHAR(255) NULL, category VARCHAR(32) CHECK ( category IN ('unknown','ads','afs','coda','dfs','dns','hosts','kerberos','nds','nis','nisplus','nt','wfw')) NULL, location VARCHAR(255) NULL, name VARCHAR(255) NULL, PRIMARY KEY(_parent_type, _message_ident, _parent0_index) ) ; CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location); CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name); DROP TABLE Prelude_Address; CREATE TABLE Prelude_Address ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H','S','T')) NOT NULL, _parent0_index INT2 NOT NULL, _index INT2 NOT NULL, ident VARCHAR(255) NULL, category VARCHAR(32) CHECK ( category IN ('unknown','atm','e-mail','lotus-notes','mac','sna','vm','ipv4-addr','ipv4-addr-hex','ipv4-net','ipv4-net-mask','ipv6-addr','ipv6-addr-hex','ipv6-net','ipv6-net-mask')) NOT NULL, vlan_name VARCHAR(255) NULL, vlan_num INT8 NULL, address VARCHAR(255) NOT NULL, netmask VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address); DROP TABLE Prelude_User; CREATE TABLE Prelude_User ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T')) NOT NULL, _parent0_index INT2 NOT NULL, ident VARCHAR(255) NULL, category VARCHAR(32) CHECK ( category IN ('unknown','application','os-device')) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; DROP TABLE Prelude_UserId; CREATE TABLE Prelude_UserId ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T', 'F')) NOT NULL, _parent0_index INT2 NOT NULL, _parent1_index INT2 NOT NULL, _parent2_index INT2 NOT NULL, _index INT2 NOT NULL, ident VARCHAR(255) NULL, type VARCHAR(32) CHECK ( type IN ('current-user','original-user','target-user','user-privs','current-group','group-privs','other-privs')) NOT NULL, name VARCHAR(255) NULL, tty VARCHAR(255) NULL, number INT8 NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _parent1_index, _parent2_index, _index) ) ; DROP TABLE Prelude_Process; CREATE TABLE Prelude_Process ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H','S','T')) NOT NULL, _parent0_index INT2 NOT NULL, ident VARCHAR(255) NULL, name VARCHAR(255) NOT NULL, pid INT8 NULL, path VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; DROP TABLE Prelude_ProcessArg; CREATE TABLE Prelude_ProcessArg ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H','S','T')) NOT NULL DEFAULT 'A', _parent0_index INT2 NOT NULL, _index INT2 NOT NULL, arg VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; DROP TABLE Prelude_ProcessEnv; CREATE TABLE Prelude_ProcessEnv ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('A','H','S','T')) NOT NULL, _parent0_index INT2 NOT NULL, _index INT2 NOT NULL, env VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; DROP TABLE Prelude_Service; CREATE TABLE Prelude_Service ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T')) NOT NULL, _parent0_index INT2 NOT NULL, ident VARCHAR(255) NULL, ip_version INT2 NULL, name VARCHAR(255) NULL, port INT4 NULL, iana_protocol_number INT2 NULL, iana_protocol_name VARCHAR(255) NULL, portlist VARCHAR (255) NULL, protocol VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol,port); CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol,name); DROP TABLE Prelude_WebService; CREATE TABLE Prelude_WebService ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T')) NOT NULL, _parent0_index INT2 NOT NULL, url VARCHAR(255) NOT NULL, cgi VARCHAR(255) NULL, http_method VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; DROP TABLE Prelude_WebServiceArg; CREATE TABLE Prelude_WebServiceArg ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T')) NOT NULL, _parent0_index INT2 NOT NULL, _index INT2 NOT NULL, arg VARCHAR(255) NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; DROP TABLE Prelude_SnmpService; CREATE TABLE Prelude_SnmpService ( _message_ident INT8 NOT NULL, _parent_type VARCHAR(1) CHECK (_parent_type IN ('S','T')) NOT NULL, _parent0_index INT2 NOT NULL, snmp_oid VARCHAR(255) NULL, message_processing_model INT8 NULL, security_model INT8 NULL, security_name VARCHAR(255) NULL, security_level INT8 NULL, context_name VARCHAR(255) NULL, context_engine_id VARCHAR(255) NULL, command VARCHAR(255) NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; libpreludedb-1.0.0/plugins/format/classic/sqlite-update-14-6.sql0000664000076400007640000000004311226653036021362 00000000000000UPDATE _format SET version="14.6"; libpreludedb-1.0.0/plugins/format/classic/classic-get.c0000664000076400007640000023227011326045005020036 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "classic-get.h" #define db_log(sql) prelude_log(PRELUDE_LOG_ERR, "%s\n", prelude_sql_error(sql)) #define log_memory_exhausted() prelude_log(PRELUDE_LOG_ERR, "memory exhausted !\n") #define get_(type, name) \ static int _get_ ## name (preludedb_sql_t *sql, preludedb_sql_row_t *row, \ int index, \ void *parent, int (*parent_new_child)(void *parent, type **child)) \ { \ preludedb_sql_field_t *field; \ type *value; \ int ret; \ \ ret = preludedb_sql_row_fetch_field(row, index, &field); \ if ( ret <= 0 ) \ return ret; \ \ ret = parent_new_child(parent, &value); \ if ( ret < 0 ) \ return ret; \ \ return preludedb_sql_field_to_ ## name (field, value); \ } get_(uint8_t, uint8) get_(uint16_t, uint16) get_(uint32_t, uint32) get_(float, float) #define get_uint8(sql, row, index, parent, parent_new_child) \ _get_uint8(sql, row, index, parent, (int (*)(void *, uint8_t **)) parent_new_child) #define get_uint16(sql, row, index, parent, parent_new_child) \ _get_uint16(sql, row, index, parent, (int (*)(void *, uint16_t **)) parent_new_child) #define get_uint32(sql, row, index, parent, parent_new_child) \ _get_uint32(sql, row, index, parent, (int (*)(void *, uint32_t **)) parent_new_child) #define get_float(sql, row, index, parent, parent_new_child) \ _get_float(sql, row, index, parent, (int (*)(void *, float **)) parent_new_child) static int _get_string(preludedb_sql_t *sql, preludedb_sql_row_t *row, int index, void *parent, int (*parent_new_child)(void *parent, prelude_string_t **child)) { preludedb_sql_field_t *field; prelude_string_t *string; int ret; ret = preludedb_sql_row_fetch_field(row, index, &field); if ( ret <= 0 ) return ret; ret = parent_new_child(parent, &string); if ( ret < 0 ) return ret; ret = prelude_string_set_dup_fast(string, preludedb_sql_field_get_value(field), preludedb_sql_field_get_len(field)); return (ret < 0) ? ret : 1; } static int _get_string_listed(preludedb_sql_t *sql, preludedb_sql_row_t *row, int index, void *parent, int (*parent_new_child)(void *parent, prelude_string_t **child, int pos)) { preludedb_sql_field_t *field; prelude_string_t *string; int ret; ret = preludedb_sql_row_fetch_field(row, index, &field); if ( ret <= 0 ) return ret; ret = parent_new_child(parent, &string, IDMEF_LIST_APPEND); if ( ret < 0 ) return ret; ret = prelude_string_set_dup_fast(string, preludedb_sql_field_get_value(field), preludedb_sql_field_get_len(field)); return (ret < 0) ? ret : 1; } static int _get_enum(preludedb_sql_t *sql, preludedb_sql_row_t *row, int index, void *parent, int (*parent_new_child)(void *parent, int **child), int (*convert_enum)(const char *)) { preludedb_sql_field_t *field; int *enum_val; int ret; ret = preludedb_sql_row_fetch_field(row, index, &field); if ( ret <= 0 ) return ret; ret = parent_new_child(parent, &enum_val); if ( ret < 0 ) return ret; *enum_val = convert_enum(preludedb_sql_field_get_value(field)); return 1; } static int _get_timestamp(preludedb_sql_t *sql, preludedb_sql_row_t *row, int time_index, int gmtoff_index, int usec_index, void *parent, int (*parent_new_child)(void *parent, idmef_time_t **child)) { preludedb_sql_field_t *time_field, *gmtoff_field, *usec_field = NULL; const char *tmp; int32_t gmtoff; uint32_t usec = 0; idmef_time_t *time; int ret; ret = preludedb_sql_row_fetch_field(row, time_index, &time_field); if ( ret <= 0 ) return ret; ret = preludedb_sql_row_fetch_field(row, gmtoff_index, &gmtoff_field); if ( ret <= 0 ) return (ret < 0) ? ret : -1; if ( usec_index != -1 ) { ret = preludedb_sql_row_fetch_field(row, usec_index, &usec_field); if ( ret <= 0 ) return (ret < 0) ? ret : -1; ret = preludedb_sql_field_to_uint32(usec_field, &usec); if ( ret < 0 ) return ret; } tmp = preludedb_sql_field_get_value(time_field); ret = preludedb_sql_field_to_int32(gmtoff_field, &gmtoff); if ( ret < 0 ) return ret; ret = parent_new_child(parent, &time); if ( ret < 0 ) return ret; return preludedb_sql_time_from_timestamp(time, tmp, gmtoff, usec); } #define get_string(sql, row, index, parent, parent_new_child) \ _get_string(sql, row, index, parent, (int (*)(void *, prelude_string_t **)) parent_new_child) #define get_string_listed(sql, row, index, parent, parent_new_child) \ _get_string_listed(sql, row, index, parent, (int (*)(void *, prelude_string_t **, int)) parent_new_child) #define get_enum(sql, row, index, parent, parent_new_child, convert_enum) \ _get_enum(sql, row, index, parent, (int (*)(void *, int **)) parent_new_child, convert_enum) #define get_timestamp(sql, row, time_index, gmtoff_index, usec_index, parent, parent_new_child) \ _get_timestamp(sql, row, time_index, gmtoff_index, usec_index, parent, (int (*)(void *, idmef_time_t **)) parent_new_child) static int get_analyzer_time(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, void *parent, int (*parent_new_child)(void *parent, idmef_time_t **child)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT time, gmtoff, usec " "FROM Prelude_AnalyzerTime " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 "", parent_type, message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = get_timestamp(sql, row, 0, 1, 2, parent, parent_new_child); error: preludedb_sql_table_destroy(table); return ret; } static int get_detect_time(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT time, gmtoff, usec " "FROM Prelude_DetectTime " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = get_timestamp(sql, row, 0, 1, 2, alert, idmef_alert_new_detect_time); error: preludedb_sql_table_destroy(table); return ret; } static int get_create_time(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, void *parent, int (*parent_new_child)(void *parent, idmef_time_t **time)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT time, gmtoff, usec " "FROM Prelude_CreateTime " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 "", parent_type, message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = get_timestamp(sql, row, 0, 1, 2, parent, parent_new_child); error: preludedb_sql_table_destroy(table); return ret; } static int get_user_id(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, int file_index, int file_access_index, void *parent, prelude_bool_t listed, int (*_parent_new_child)(void *, idmef_user_id_t **child)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_user_id_t *user_id; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, type, name, number, tty " "FROM Prelude_UserId " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND " "_parent0_index = %d AND _parent1_index = %d AND _parent2_index = %d AND _index != -1 " "ORDER BY _index ASC", parent_type, message_ident, parent_index, file_index, file_access_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { if ( listed ) { int (*parent_new_child)(void *parent, idmef_user_id_t **, int) = (int (*)(void *, idmef_user_id_t **, int)) _parent_new_child; ret = parent_new_child(parent, &user_id, IDMEF_LIST_APPEND); } else { int (*parent_new_child)(void *parent, idmef_user_id_t **) = _parent_new_child; ret = parent_new_child(parent, &user_id); } if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, user_id, idmef_user_id_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, user_id, idmef_user_id_new_type, idmef_user_id_type_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, user_id, idmef_user_id_new_name); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 3, user_id, idmef_user_id_new_number); if ( ret < 0 ) goto error; ret = get_string(sql, row, 4, user_id, idmef_user_id_new_tty); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_user(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, idmef_user_t **child)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_user_t *user; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, category " "FROM Prelude_User " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = parent_new_child(parent, &user); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, user, idmef_user_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, user, idmef_user_new_category, idmef_user_category_to_numeric); if ( ret < 0 ) goto error; ret = get_user_id(sql, message_ident, parent_type, parent_index, 0, 0, user, TRUE, (int (*)(void *, idmef_user_id_t **)) idmef_user_new_user_id); error: preludedb_sql_table_destroy(table); return ret; } static int get_process_arg(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, char parent_index, void *parent, int (*parent_new_child)(void *parent, prelude_string_t **child, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT arg " "FROM Prelude_ProcessArg " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _index != -1 ORDER BY _index ASC", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = get_string_listed(sql, row, 0, parent, parent_new_child); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_process_env(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, prelude_string_t **child, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT env " "FROM Prelude_ProcessEnv " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _index != -1 ORDER BY _index ASC", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = get_string_listed(sql, row, 0, parent, parent_new_child); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_process(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, idmef_process_t **child)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_process_t *process; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, name, pid, path " "FROM Prelude_Process " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = parent_new_child(parent, &process); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, process, idmef_process_new_ident); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, process, idmef_process_new_name); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 2, process, idmef_process_new_pid); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, process, idmef_process_new_path); if ( ret < 0 ) goto error; ret = get_process_arg(sql, message_ident, parent_type, parent_index, process, (int (*)(void *, prelude_string_t **, int)) idmef_process_new_arg); if ( ret < 0 ) goto error; ret = get_process_env(sql, message_ident, parent_type, parent_index, process, (int (*)(void *, prelude_string_t **, int)) idmef_process_new_env); error: preludedb_sql_table_destroy(table); return ret; } static int get_web_service_arg(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, idmef_web_service_t *web_service) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT arg " "FROM Prelude_WebServiceArg " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _index != -1 ORDER BY _index ASC", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = get_string_listed(sql, row, 0, web_service, idmef_web_service_new_arg); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_web_service(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, idmef_service_t *service) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_web_service_t *web_service; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT url, cgi, http_method " "FROM Prelude_WebService " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_service_new_web_service(service, &web_service); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, web_service, idmef_web_service_new_url); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, web_service, idmef_web_service_new_cgi); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, web_service, idmef_web_service_new_http_method); if ( ret < 0 ) goto error; ret = get_web_service_arg(sql, message_ident, parent_type, parent_index, web_service); error: preludedb_sql_table_destroy(table); return ret; } static int get_snmp_service(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, idmef_service_t *service) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_snmp_service_t *snmp_service; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT snmp_oid, message_processing_model, security_model, security_name, " "security_level, context_name, context_engine_id, command " "FROM Prelude_SnmpService " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_service_new_snmp_service(service, &snmp_service); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, snmp_service, idmef_snmp_service_new_oid); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 1, snmp_service, idmef_snmp_service_new_message_processing_model); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 2, snmp_service, idmef_snmp_service_new_security_model); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, snmp_service, idmef_snmp_service_new_security_name); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 4, snmp_service, idmef_snmp_service_new_security_level); if ( ret < 0 ) goto error; ret = get_string(sql, row, 5, snmp_service, idmef_snmp_service_new_context_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 6, snmp_service, idmef_snmp_service_new_context_engine_id); if ( ret < 0 ) goto error; ret = get_string(sql, row, 7, snmp_service, idmef_snmp_service_new_command); error: preludedb_sql_table_destroy(table); return ret; } static int get_service(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, idmef_service_t **child)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_service_t *service; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, ip_version, name, port, iana_protocol_number, iana_protocol_name, portlist, protocol " "FROM Prelude_Service " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return 0; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = parent_new_child(parent, &service); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, service, idmef_service_new_ident); if ( ret < 0 ) goto error; ret = get_uint8(sql, row, 1, service, idmef_service_new_ip_version); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, service, idmef_service_new_name); if ( ret < 0 ) goto error; ret = get_uint16(sql, row, 3, service, idmef_service_new_port); if ( ret < 0 ) goto error; ret = get_uint8(sql, row, 4, service, idmef_service_new_iana_protocol_number); if ( ret < 0 ) goto error; ret = get_string(sql, row, 5, service, idmef_service_new_iana_protocol_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 6, service, idmef_service_new_portlist); if ( ret < 0 ) goto error; ret = get_string(sql, row, 7, service, idmef_service_new_protocol); if ( ret < 0 ) goto error; ret = get_web_service(sql, message_ident, parent_type, parent_index, service); if ( ret < 0 ) goto error; ret = get_snmp_service(sql, message_ident, parent_type, parent_index, service); error: preludedb_sql_table_destroy(table); return ret; } static int get_address(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, idmef_address_t **child, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_address_t *idmef_address; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, category, vlan_name, vlan_num, address, netmask " "FROM Prelude_Address " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _index != -1 ORDER BY _index ASC", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = parent_new_child(parent, &idmef_address, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, idmef_address, idmef_address_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, idmef_address, idmef_address_new_category, idmef_address_category_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, idmef_address, idmef_address_new_vlan_name); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 3, idmef_address, idmef_address_new_vlan_num); if ( ret < 0 ) goto error; ret = get_string(sql, row, 4, idmef_address, idmef_address_new_address); if ( ret < 0 ) goto error; ret = get_string(sql, row, 5, idmef_address, idmef_address_new_netmask); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_node(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, int parent_index, void *parent, int (*parent_new_child)(void *parent, idmef_node_t **node)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_node_t *node; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, category, location, name " "FROM Prelude_Node " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d", parent_type, message_ident, parent_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = parent_new_child(parent, &node); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, node, idmef_node_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, node, idmef_node_new_category, idmef_node_category_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, node, idmef_node_new_location); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, node, idmef_node_new_name); if ( ret < 0 ) goto error; ret = get_address(sql, message_ident, parent_type, parent_index, node, (int (*)(void *, idmef_address_t **, int)) idmef_node_new_address); error: preludedb_sql_table_destroy(table); return ret; } static int get_analyzer(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, void *parent, int (*parent_new_child)(void *parent, idmef_analyzer_t **child, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_analyzer_t *analyzer; int ret; int index; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT analyzerid, name, manufacturer, model, version, class, ostype, osversion " "FROM Prelude_Analyzer " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", parent_type, message_ident); if ( ret <= 0 ) return ret; index = 0; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = parent_new_child(parent, &analyzer, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, analyzer, idmef_analyzer_new_analyzerid); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, analyzer, idmef_analyzer_new_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, analyzer, idmef_analyzer_new_manufacturer); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, analyzer, idmef_analyzer_new_model); if ( ret < 0 ) goto error; ret = get_string(sql, row, 4, analyzer, idmef_analyzer_new_version); if ( ret < 0 ) goto error; ret = get_string(sql, row, 5, analyzer, idmef_analyzer_new_class); if ( ret < 0 ) goto error; ret = get_string(sql, row, 6, analyzer, idmef_analyzer_new_ostype); if ( ret < 0 ) goto error; ret = get_string(sql, row, 7, analyzer, idmef_analyzer_new_osversion); if ( ret < 0 ) goto error; ret = get_node(sql, message_ident, parent_type, index, analyzer, (int (*)(void *, idmef_node_t **)) idmef_analyzer_new_node); if ( ret < 0 ) goto error; ret = get_process(sql, message_ident, parent_type, index, analyzer, (int (*)(void *, idmef_process_t **)) idmef_analyzer_new_process); if ( ret < 0 ) goto error; index++; } error: preludedb_sql_table_destroy(table); return ret; } static int get_action(preludedb_sql_t *sql, uint64_t message_ident, idmef_assessment_t *assessment) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_action_t *action; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT category, description " "FROM Prelude_Action " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_assessment_new_action(assessment, &action, IDMEF_LIST_APPEND); if ( ret < 0 ) return ret; ret = get_enum(sql, row, 0, action, idmef_action_new_category, idmef_action_category_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, action, idmef_action_new_description); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_confidence(preludedb_sql_t *sql, uint64_t message_ident, idmef_assessment_t *assessment) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_confidence_t *confidence; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT rating, confidence " "FROM Prelude_Confidence " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_assessment_new_confidence(assessment, &confidence); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 0, confidence, idmef_confidence_new_rating, idmef_confidence_rating_to_numeric); if ( ret < 0 ) goto error; ret = get_float(sql, row, 1, confidence, idmef_confidence_new_confidence); error: preludedb_sql_table_destroy(table); return ret; } static int get_impact(preludedb_sql_t *sql, uint64_t message_ident, idmef_assessment_t *assessment) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_impact_t *impact; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT severity, completion, type, description " "FROM Prelude_Impact " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_assessment_new_impact(assessment, &impact); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 0, impact, idmef_impact_new_severity, idmef_impact_severity_to_numeric); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, impact, idmef_impact_new_completion, idmef_impact_completion_to_numeric); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 2, impact, idmef_impact_new_type, idmef_impact_type_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, impact, idmef_impact_new_description); error: preludedb_sql_table_destroy(table); return ret; } static int get_assessment(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; idmef_assessment_t *assessment; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT _message_ident " "FROM Prelude_Assessment " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; preludedb_sql_table_destroy(table); ret = idmef_alert_new_assessment(alert, &assessment); if ( ret < 0 ) goto error; ret = get_impact(sql, message_ident, assessment); if ( ret < 0 ) goto error; ret = get_confidence(sql, message_ident, assessment); if ( ret < 0 ) goto error; ret = get_action(sql, message_ident, assessment); if ( ret < 0 ) goto error; error: return ret; } static int get_file_access_permission(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, int file_access_index, idmef_file_access_t *parent) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT permission " "FROM Prelude_FileAccess_Permission " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND " "_parent1_index = %d AND _parent2_index = %d AND _index != -1 " "ORDER BY _index ASC", message_ident, target_index, file_index, file_access_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = get_string_listed(sql, row, 0, parent, idmef_file_access_new_permission); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_file_access(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_file_t *file) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; preludedb_sql_field_t *field; idmef_file_access_t *file_access; uint32_t file_access_count; unsigned int cnt; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT COUNT(*) " "FROM Prelude_FileAccess " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _parent1_index = %d AND _index != -1", message_ident, target_index, file_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 0, &field); if ( ret <= 0 ) goto error; ret = preludedb_sql_field_to_uint32(field, &file_access_count); if ( ret < 0 ) goto error; for ( cnt = 0; cnt < file_access_count; cnt++ ) { ret = idmef_file_new_file_access(file, &file_access, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_user_id(sql, message_ident, 'F', target_index, file_index, cnt, file_access, FALSE, (int (*)(void *, idmef_user_id_t **)) idmef_file_access_new_user_id); if ( ret < 0 ) goto error; ret = get_file_access_permission(sql, message_ident, target_index, file_index, cnt, file_access); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_linkage(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_file_t *file) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_linkage_t *linkage; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT category, name, path " "FROM Prelude_Linkage " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _parent1_index = %d AND _index != -1 " "ORDER BY _index ASC", message_ident, target_index, file_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_file_new_linkage(file, &linkage, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 0, linkage, idmef_linkage_new_category, idmef_linkage_category_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, linkage, idmef_linkage_new_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, linkage, idmef_linkage_new_path); if ( ret < 0 ) goto error; } /* FIXME: file in linkage is not currently supported */ error: preludedb_sql_table_destroy(table); return ret; } static int get_inode(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_file_t *file) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_inode_t *inode; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT change_time, change_time_gmtoff, number, major_device, minor_device, " "c_major_device, c_minor_device " "FROM Prelude_Inode " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _parent1_index = %d", message_ident, target_index, file_index); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_file_new_inode(file, &inode); if ( ret < 0 ) goto error; ret = get_timestamp(sql, row, 0, 1, -1, inode, idmef_inode_new_change_time); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 2, inode, idmef_inode_new_number); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 3, inode, idmef_inode_new_major_device); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 4, inode, idmef_inode_new_minor_device); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 5, inode, idmef_inode_new_c_major_device); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 6, inode, idmef_inode_new_c_minor_device); if ( ret < 0 ) goto error; error: preludedb_sql_table_destroy(table); return ret; } static int get_checksum(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_file_t *file) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_checksum_t *checksum; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT value, checksum_key, algorithm " "FROM Prelude_Checksum " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _parent1_index = %d AND _index != -1 " "ORDER BY _index ASC", message_ident, target_index, file_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_file_new_checksum(file, &checksum, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, checksum, idmef_checksum_new_value); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, checksum, idmef_checksum_new_key); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 2, checksum, idmef_checksum_new_algorithm, idmef_checksum_algorithm_to_numeric); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_file(preludedb_sql_t *sql, uint64_t message_ident, int target_index, idmef_target_t *target) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_file_t *file = NULL; int cnt; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, category, name, path, create_time, create_time_gmtoff, " "modify_time, modify_time_gmtoff, access_time, " "access_time_gmtoff, data_size, disk_size, fstype, file_type " "FROM Prelude_File " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _parent0_index = %d AND _index != -1 " "ORDER BY _index ASC", message_ident, target_index); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_target_new_file(target, &file, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, file, idmef_file_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, file, idmef_file_new_category, idmef_file_category_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, file, idmef_file_new_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, file, idmef_file_new_path); if ( ret < 0 ) goto error; ret = get_timestamp(sql, row, 4, 5, -1, file, idmef_file_new_create_time); if ( ret < 0 ) goto error; ret = get_timestamp(sql, row, 6, 7, -1, file, idmef_file_new_modify_time); if ( ret < 0 ) goto error; ret = get_timestamp(sql, row, 8, 9, -1, file, idmef_file_new_access_time); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 10, file, idmef_file_new_data_size); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 11, file, idmef_file_new_disk_size); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 12, file, idmef_file_new_fstype, idmef_file_fstype_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 13, file, idmef_file_new_file_type); if ( ret < 0 ) goto error; } file = NULL; cnt = 0; while ( (file = idmef_target_get_next_file(target, file)) ) { ret = get_file_access(sql, message_ident, target_index, cnt, file); if ( ret < 0 ) goto error; ret = get_linkage(sql, message_ident, target_index, cnt, file); if ( ret < 0 ) goto error; ret = get_inode(sql, message_ident, target_index, cnt, file); if ( ret < 0 ) goto error; ret = get_checksum(sql, message_ident, target_index, cnt, file); if ( ret < 0 ) goto error; cnt++; } error: preludedb_sql_table_destroy(table); return ret; } static int get_source(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_source_t *source; int cnt; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, spoofed, interface " "FROM Prelude_Source " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_alert_new_source(alert, &source, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, source, idmef_source_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, source, idmef_source_new_spoofed, idmef_source_spoofed_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, source, idmef_source_new_interface); if ( ret < 0 ) goto error; } source = NULL; cnt = 0; while ( (source = idmef_alert_get_next_source(alert, source)) ) { ret = get_node(sql, message_ident, 'S', cnt, source, (int (*)(void *, idmef_node_t **)) idmef_source_new_node); if ( ret < 0 ) goto error; ret = get_user(sql, message_ident, 'S', cnt, source, (int (*)(void *, idmef_user_t **)) idmef_source_new_user); if ( ret < 0 ) goto error; ret = get_process(sql, message_ident, 'S', cnt, source, (int (*)(void *, idmef_process_t **)) idmef_source_new_process); if ( ret < 0 ) goto error; ret = get_service(sql, message_ident, 'S', cnt, source, (int (*)(void *, idmef_service_t **)) idmef_source_new_service); if ( ret < 0 ) goto error; cnt++; } error: preludedb_sql_table_destroy(table); return ret; } static int get_target(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_target_t *target; int cnt; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, decoy, interface " "FROM Prelude_Target " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_alert_new_target(alert, &target, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, target, idmef_target_new_ident); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 1, target, idmef_target_new_decoy, idmef_target_decoy_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, target, idmef_target_new_interface); if ( ret < 0 ) goto error; } target = NULL; cnt = 0; while ( (target = idmef_alert_get_next_target(alert, target)) ) { ret = get_node(sql, message_ident, 'T', cnt, target, (int (*)(void *, idmef_node_t **)) idmef_target_new_node); if ( ret < 0 ) goto error; ret = get_user(sql, message_ident, 'T', cnt, target, (int (*)(void *, idmef_user_t **)) idmef_target_new_user); if ( ret < 0 ) goto error; ret = get_process(sql, message_ident, 'T', cnt, target, (int (*)(void *, idmef_process_t **)) idmef_target_new_process); if ( ret < 0 ) goto error; ret = get_service(sql, message_ident, 'T', cnt, target, (int (*)(void *, idmef_service_t **)) idmef_target_new_service); if ( ret < 0 ) goto error; ret = get_file(sql, message_ident, cnt, target); if ( ret < 0 ) goto error; cnt++; } error: preludedb_sql_table_destroy(table); return ret; } static int get_additional_data(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, void *parent, int (*parent_new_child)(void *, idmef_additional_data_t **, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_additional_data_t *additional_data; idmef_data_t *data; preludedb_sql_field_t *field; int ret = 0; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT type, meaning, data " "FROM Prelude_AdditionalData " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", parent_type, message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = parent_new_child(parent, &additional_data, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 0, additional_data, idmef_additional_data_new_type, idmef_additional_data_type_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, additional_data, idmef_additional_data_new_meaning); if ( ret < 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 2, &field); if ( ret <= 0 ) goto error; ret = idmef_additional_data_new_data(additional_data, &data); if ( ret < 0 ) goto error; switch ( idmef_additional_data_get_type(additional_data) ) { case IDMEF_ADDITIONAL_DATA_TYPE_BOOLEAN: case IDMEF_ADDITIONAL_DATA_TYPE_BYTE: { uint8_t value; ret = preludedb_sql_field_to_uint8(field, &value); if ( ret < 0 ) ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); else idmef_data_set_byte(data, value); break; } case IDMEF_ADDITIONAL_DATA_TYPE_CHARACTER: { uint8_t value; ret = preludedb_sql_field_to_uint8(field, &value); if ( ret < 0 ) ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); else idmef_data_set_char(data, (char) value); break; } case IDMEF_ADDITIONAL_DATA_TYPE_DATE_TIME: case IDMEF_ADDITIONAL_DATA_TYPE_PORTLIST: case IDMEF_ADDITIONAL_DATA_TYPE_STRING: case IDMEF_ADDITIONAL_DATA_TYPE_XML: ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); break; case IDMEF_ADDITIONAL_DATA_TYPE_REAL: { float value; ret = preludedb_sql_field_to_float(field, &value); if ( ret < 0 ) ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); else idmef_data_set_float(data, value); break; } case IDMEF_ADDITIONAL_DATA_TYPE_INTEGER: { uint32_t value; ret = preludedb_sql_field_to_uint32(field, &value); if ( ret < 0 ) ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); else idmef_data_set_uint32(data, value); break; } case IDMEF_ADDITIONAL_DATA_TYPE_BYTE_STRING: { unsigned char *value; size_t value_size; ret = preludedb_sql_unescape_binary(sql, preludedb_sql_field_get_value(field), preludedb_sql_field_get_len(field), &value, &value_size); if ( ret < 0 ) break; ret = idmef_data_set_byte_string_nodup(data, value, value_size); break; } case IDMEF_ADDITIONAL_DATA_TYPE_NTPSTAMP: { uint64_t value; ret = preludedb_sql_field_to_uint64(field, &value); if ( ret < 0 ) ret = idmef_data_set_char_string_dup(data, preludedb_sql_field_get_value(field)); else idmef_data_set_uint64(data, value); break; } case IDMEF_ADDITIONAL_DATA_TYPE_ERROR: ret = -1; } if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_reference(preludedb_sql_t *sql, uint64_t message_ident, idmef_classification_t *classification) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_reference_t *reference; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT origin, name, url, meaning " "FROM Prelude_Reference " "WHERE _message_ident = %" PRELUDE_PRIu64 " AND _index != -1 " "ORDER BY _index ASC", message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = idmef_classification_new_reference(classification, &reference, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_enum(sql, row, 0, reference, idmef_reference_new_origin, idmef_reference_origin_to_numeric); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, reference, idmef_reference_new_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 2, reference, idmef_reference_new_url); if ( ret < 0 ) goto error; ret = get_string(sql, row, 3, reference, idmef_reference_new_meaning); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_classification(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_classification_t *classification; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT ident, text " "FROM Prelude_Classification " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_alert_new_classification(alert, &classification); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, classification, idmef_classification_new_ident); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, classification, idmef_classification_new_text); if ( ret < 0 ) goto error; ret = get_reference(sql, message_ident, classification); if ( ret < 0 ) goto error; error: preludedb_sql_table_destroy(table); return ret; } static int get_alertident(preludedb_sql_t *sql, uint64_t message_ident, char parent_type, void *parent, int (*parent_new_child)(void *parent, idmef_alertident_t **child, int pos)) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_alertident_t *alertident = NULL; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT alertident, analyzerid " "FROM Prelude_Alertident " "WHERE _parent_type = '%c' AND _message_ident = %" PRELUDE_PRIu64" AND _index != -1 " "ORDER BY _index ASC", parent_type, message_ident); if ( ret <= 0 ) return ret; while ( (ret = preludedb_sql_table_fetch_row(table, &row)) > 0 ) { ret = parent_new_child(parent, &alertident, IDMEF_LIST_APPEND); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, alertident, idmef_alertident_new_alertident); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, alertident, idmef_alertident_new_analyzerid); if ( ret < 0 ) goto error; } error: preludedb_sql_table_destroy(table); return ret; } static int get_tool_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_tool_alert_t *tool_alert; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT name, command " "FROM Prelude_ToolAlert " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_alert_new_tool_alert(alert, &tool_alert); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, tool_alert, idmef_tool_alert_new_name); if ( ret < 0 ) goto error; ret = get_string(sql, row, 1, tool_alert, idmef_tool_alert_new_command); if ( ret < 0 ) goto error; ret = get_alertident(sql, message_ident, 'T', tool_alert, (int (*)(void *, idmef_alertident_t **, int)) idmef_tool_alert_new_alertident); error: preludedb_sql_table_destroy(table); return ret; } static int get_correlation_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_correlation_alert_t *correlation_alert; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT name " "FROM Prelude_CorrelationAlert " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_alert_new_correlation_alert(alert, &correlation_alert); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, correlation_alert, idmef_correlation_alert_new_name); if ( ret < 0 ) goto error; ret = get_alertident(sql, message_ident, 'C', correlation_alert, (int (*)(void *, idmef_alertident_t **, int)) idmef_correlation_alert_new_alertident); error: preludedb_sql_table_destroy(table); return ret; } static int get_overflow_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; idmef_overflow_alert_t *overflow_alert; preludedb_sql_field_t *field; idmef_data_t *buffer; unsigned char *data; size_t data_size; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT program, size, buffer " "FROM Prelude_OverflowAlert " "WHERE _message_ident = %" PRELUDE_PRIu64 "", message_ident); if ( ret <= 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret <= 0 ) goto error; ret = idmef_alert_new_overflow_alert(alert, &overflow_alert); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, overflow_alert, idmef_overflow_alert_new_program); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 1, overflow_alert, idmef_overflow_alert_new_size); if ( ret < 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 2, &field); if ( ret < 0 ) goto error; ret = idmef_overflow_alert_new_buffer(overflow_alert, &buffer); if ( ret < 0 ) goto error; ret = preludedb_sql_unescape_binary(sql, preludedb_sql_field_get_value(field), preludedb_sql_field_get_len(field), &data, &data_size); if ( ret < 0 ) goto error; ret = idmef_data_set_byte_string_nodup(buffer, data, data_size); error: preludedb_sql_table_destroy(table); return ret; } static int get_alert_messageid(preludedb_sql_t *sql, uint64_t ident, idmef_alert_t *alert) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT messageid FROM Prelude_Alert WHERE _ident = %" PRELUDE_PRIu64 "", ident); if ( ret < 0 ) return ret; if ( ret == 0 ) return preludedb_error(PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT); ret = preludedb_sql_table_fetch_row(table, &row); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, alert, idmef_alert_new_messageid); error: preludedb_sql_table_destroy(table); return (ret < 0) ? ret : 1; } int classic_get_alert(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message) { idmef_alert_t *alert; int ret; ret = idmef_message_new(message); if ( ret < 0 ) return ret; ret = idmef_message_new_alert(*message, &alert); if ( ret < 0 ) goto error; ret = get_alert_messageid(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_assessment(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_analyzer(sql, ident, 'A', alert, (int (*)(void *, idmef_analyzer_t **, int)) idmef_alert_new_analyzer); if ( ret < 0 ) goto error; ret = get_create_time(sql, ident, 'A', alert, (int (*)(void *, idmef_time_t **)) idmef_alert_new_create_time); if ( ret < 0 ) goto error; ret = get_detect_time(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_analyzer_time(sql, ident, 'A', alert, (int (*)(void *, idmef_time_t **)) idmef_alert_new_analyzer_time); if ( ret < 0 ) goto error; ret = get_source(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_target(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_classification(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_additional_data(sql, ident, 'A', alert, (int (*)(void *, idmef_additional_data_t **, int)) idmef_alert_new_additional_data); if ( ret < 0 ) goto error; ret = get_tool_alert(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_correlation_alert(sql, ident, alert); if ( ret < 0 ) goto error; ret = get_overflow_alert(sql, ident, alert); if ( ret < 0 ) goto error; return 0; error: idmef_message_destroy(*message); return ret; } static int _get_heartbeat(preludedb_sql_t *sql, uint64_t ident, idmef_heartbeat_t *heartbeat) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT messageid, heartbeat_interval FROM Prelude_Heartbeat WHERE _ident = %" PRELUDE_PRIu64 "", ident); if ( ret < 0 ) return ret; if ( ret == 0 ) return preludedb_error(PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT); ret = preludedb_sql_table_fetch_row(table, &row); if ( ret < 0 ) goto error; ret = get_string(sql, row, 0, heartbeat, idmef_heartbeat_new_messageid); if ( ret < 0 ) goto error; ret = get_uint32(sql, row, 1, heartbeat, idmef_heartbeat_new_heartbeat_interval); error: preludedb_sql_table_destroy(table); return (ret < 0) ? ret : 1; } int classic_get_heartbeat(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message) { idmef_heartbeat_t *heartbeat; int ret; ret = idmef_message_new(message); if ( ret < 0 ) return ret; ret = idmef_message_new_heartbeat(*message, &heartbeat); if ( ret < 0 ) goto error; ret = _get_heartbeat(sql, ident, heartbeat); if ( ret <= 0 ) goto error; ret = get_analyzer(sql, ident, 'H', heartbeat, (int (*)(void *, idmef_analyzer_t **, int)) idmef_heartbeat_new_analyzer); if ( ret < 0 ) goto error; ret = get_create_time(sql, ident, 'H', heartbeat, (int (*)(void *, idmef_time_t **)) idmef_heartbeat_new_create_time); if ( ret < 0 ) goto error; ret = get_analyzer_time(sql, ident, 'H', heartbeat, (int (*)(void *, idmef_time_t **)) idmef_heartbeat_new_analyzer_time); if ( ret < 0 ) goto error; ret = get_additional_data(sql, ident, 'H', heartbeat, (int (*)(void *, idmef_additional_data_t **, int)) idmef_heartbeat_new_additional_data); if ( ret < 0 ) goto error; return 0; error: idmef_message_destroy(*message); return ret; } libpreludedb-1.0.0/plugins/format/classic/classic-insert.c0000664000076400007640000016735011304302334020566 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "classic-insert.h" static inline const char *get_string(prelude_string_t *string) { const char *s; if ( ! string ) return NULL; s = prelude_string_get_string(string); return s ? s : ""; } static inline int get_data(preludedb_sql_t *sql, idmef_data_t *data, char **output) { int ret; prelude_string_t *string; switch ( idmef_data_get_type(data) ) { case IDMEF_DATA_TYPE_BYTE: case IDMEF_DATA_TYPE_BYTE_STRING: return preludedb_sql_escape_binary(sql, idmef_data_get_data(data), idmef_data_get_len(data), output); case IDMEF_DATA_TYPE_CHAR_STRING: return preludedb_sql_escape_binary(sql, idmef_data_get_data(data), idmef_data_get_len(data) - 1, output); case IDMEF_DATA_TYPE_CHAR: return preludedb_sql_escape_binary(sql, idmef_data_get_data(data), 1, output); default: ret = prelude_string_new(&string); if ( ret < 0 ) return ret; ret = idmef_data_to_string(data, string); if ( ret < 0 ) { prelude_string_destroy(string); return ret; } ret = preludedb_sql_escape_binary(sql, (const unsigned char *) prelude_string_get_string(string), prelude_string_get_len(string), output); prelude_string_destroy(string); return ret; } } static inline char *get_optional_enum(int *value, char *(*convert_func)(int)) { if ( ! value ) return NULL; return convert_func(*value); } #define get_optional_integer(name, type, format) \ static inline void get_optional_ ## name(char *dst, size_t size, type *value) \ { \ if ( ! value ) \ strncpy(dst, "NULL", size); \ else \ snprintf(dst, size, format, *value); \ } /* * %hh convertion specifier is not portable. */ static inline void get_optional_uint8(char *dst, size_t size, uint8_t *value) { if ( ! value ) strncpy(dst, "NULL", size); else { unsigned int tmp = (unsigned int) *value; snprintf(dst, size, "%u", tmp); } } get_optional_integer(uint16, uint16_t, "%hu") get_optional_integer(int32, int32_t, "%d") get_optional_integer(uint32, uint32_t, "%u") get_optional_integer(uint64, uint64_t, "%" PRELUDE_PRIu64) get_optional_integer(float, float, "%f") static int insert_address(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, int address_index, idmef_address_t *address) { int ret; char *vlan_name, vlan_num[16], *addr, *netmask, *category, *ident; if ( ! address ) return 0; ret = preludedb_sql_escape(sql, idmef_address_category_to_string(idmef_address_get_category(address)), &category); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_address_get_ident(address)), &ident); if ( ret < 0 ) { free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_address_get_address(address)), &addr); if ( ret < 0 ) { free(ident); free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_address_get_netmask(address)), &netmask); if ( ret < 0 ) { free(ident); free(addr); free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_address_get_vlan_name(address)), &vlan_name); if ( ret < 0 ) { free(ident); free(addr); free(netmask); free(category); return ret; } get_optional_int32(vlan_num, sizeof(vlan_num), idmef_address_get_vlan_num(address)); ret = preludedb_sql_insert(sql, "Prelude_Address", "_parent_type, _message_ident, _parent0_index, _index," "ident, category, vlan_name, vlan_num, address, netmask", "'%c', %" PRELUDE_PRIu64 ", %d, %d, %s, %s, %s, %s, %s, %s", parent_type, message_ident, parent_index, address_index, ident, category, vlan_name, vlan_num, addr, netmask); free(ident); free(addr); free(netmask); free(category); free(vlan_name); return ret; } static int insert_node(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_node_t *node) { int ret; idmef_address_t *address, *last_address; char *location, *name, *category, *ident; int index; if ( ! node ) return 0; ret = preludedb_sql_escape(sql, idmef_node_category_to_string(idmef_node_get_category(node)), &category); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_node_get_ident(node)), &ident); if ( ret < 0 ) { free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_node_get_name(node)), &name); if ( ret < 0 ) { free(ident); free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_node_get_location(node)), &location); if ( ret < 0 ) { free(name); free(ident); free(category); return -1; } ret = preludedb_sql_insert(sql, "Prelude_Node", "_parent_type, _message_ident, _parent0_index, " "ident, category, location, name", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s", parent_type, message_ident, parent_index, ident, category, location, name); free(name); free(ident); free(location); free(category); if ( ret < 0 ) return ret; index = 0; last_address = address = NULL; while ( (address = idmef_node_get_next_address(node, address)) ) { ret = insert_address(sql, parent_type, message_ident, parent_index, index++, address); if ( ret < 0 ) return ret; last_address = address; } if ( last_address ) { ret = insert_address(sql, parent_type, message_ident, parent_index, -1, last_address); if ( ret < 0 ) return ret; } return 0; } static int insert_user_id(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, int file_index, int file_access_index, int index, idmef_user_id_t *user_id) { int ret; char *name, *type, *ident, *tty, number[16]; ret = preludedb_sql_escape(sql, get_string(idmef_user_id_get_ident(user_id)), &ident); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_user_id_get_tty(user_id)), &tty); if ( ret < 0 ) { free(ident); return ret; } ret = preludedb_sql_escape(sql, idmef_user_id_type_to_string(idmef_user_id_get_type(user_id)), &type); if ( ret < 0 ) { free(tty); free(ident); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_user_id_get_name(user_id)), &name); if ( ret < 0 ) { free(tty); free(type); free(ident); return ret; } get_optional_uint32(number, sizeof(number), idmef_user_id_get_number(user_id)); ret = preludedb_sql_insert(sql, "Prelude_UserId", "_parent_type, _message_ident, _parent0_index, _parent1_index, _parent2_index, _index, " "ident, type, name, number, tty", "'%c', %" PRELUDE_PRIu64 ", %d, %d, %d, %d, %s, %s, %s, %s, %s", parent_type, message_ident, parent_index, file_index, file_access_index, index, ident, type, name, number, tty); free(tty); free(type); free(name); free(ident); return ret; } static int insert_user(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_user_t *user) { char *category, *ident; idmef_user_id_t *user_id, *last_user_id; int index; int ret; if ( ! user ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_user_get_ident(user)), &ident); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, idmef_user_category_to_string(idmef_user_get_category(user)), &category); if ( ret < 0 ) { free(ident); return ret; } ret = preludedb_sql_insert(sql, "Prelude_User", "_parent_type, _message_ident, _parent0_index, " "ident, category", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s", parent_type, message_ident, parent_index, ident, category); free(ident); free(category); if ( ret < 0 ) return ret; index = 0; last_user_id = user_id = NULL; while ( (user_id = idmef_user_get_next_user_id(user, user_id)) ) { ret = insert_user_id(sql, parent_type, message_ident, parent_index, 0, 0, index++, user_id); if ( ret < 0 ) return ret; last_user_id = user_id; } if ( last_user_id ) { ret = insert_user_id(sql, parent_type, message_ident, parent_index, 0, 0, -1, last_user_id); if ( ret < 0 ) return ret; } return 1; } static int insert_process_arg(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, int arg_index, prelude_string_t *arg) { char *tmp; int ret; ret = preludedb_sql_escape(sql, get_string(arg), &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_ProcessArg", "_parent_type, _message_ident, _parent0_index, _index, arg", "'%c', %" PRELUDE_PRIu64 ", %d, %d, %s", parent_type, message_ident, parent_index, arg_index, tmp); free(tmp); return ret; } static int insert_process_env(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, int env_index, prelude_string_t *env) { char *tmp; int ret; ret = preludedb_sql_escape(sql, get_string(env), &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_ProcessEnv", "_parent_type, _message_ident, _parent0_index, _index, env", "'%c', %" PRELUDE_PRIu64 ", %d, %d, %s", parent_type, message_ident, parent_index, env_index, tmp); free(tmp); return ret; } static int insert_process(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_process_t *process) { prelude_string_t *process_arg, *last_process_arg; prelude_string_t *process_env, *last_process_env; char *name, *path, pid[16], *ident; int index; int ret; if ( ! process ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_process_get_ident(process)), &ident); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_process_get_name(process)), &name); if ( ret < 0 ) { free(ident); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_process_get_path(process)), &path); if ( ret < 0 ) { free(ident); free(name); return ret; } get_optional_uint32(pid, sizeof(pid), idmef_process_get_pid(process)); ret = preludedb_sql_insert(sql, "Prelude_Process", "_parent_type, _message_ident, _parent0_index, ident, name, pid, path", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s", parent_type, message_ident, parent_index, ident, name, pid, path); free(name); free(path); free(ident); if ( ret < 0 ) return ret; index = 0; last_process_arg = process_arg = NULL; while ( (process_arg = idmef_process_get_next_arg(process, process_arg)) ) { ret = insert_process_arg(sql, parent_type, message_ident, parent_index, index++, process_arg); if ( ret < 0 ) return ret; last_process_arg = process_arg; } index = 0; last_process_env = process_env = NULL; while ( (process_env = idmef_process_get_next_env(process, process_env)) ) { ret = insert_process_env(sql, parent_type, message_ident, parent_index, index++, process_env); if ( ret < 0 ) return ret; last_process_env = process_env; } return 1; } static int insert_snmp_service(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_snmp_service_t *snmp_service) { char *oid = NULL, *community = NULL, *security_name = NULL, *context_name = NULL, *context_engine_id = NULL, *command = NULL, mpm[12], sem[12], sel[12]; int ret = -1; if ( ! snmp_service ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_snmp_service_get_oid(snmp_service)), &oid); if ( ret < 0 ) goto error; get_optional_uint32(mpm, sizeof(mpm), idmef_snmp_service_get_message_processing_model(snmp_service)); get_optional_uint32(sem, sizeof(sem), idmef_snmp_service_get_security_model(snmp_service)); ret = preludedb_sql_escape(sql, get_string(idmef_snmp_service_get_security_name(snmp_service)), &security_name); if ( ret < 0 ) goto error; get_optional_uint32(sel, sizeof(sel), idmef_snmp_service_get_security_level(snmp_service)); ret = preludedb_sql_escape(sql, get_string(idmef_snmp_service_get_context_name(snmp_service)), &context_name); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_snmp_service_get_context_engine_id(snmp_service)), &context_engine_id); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_snmp_service_get_command(snmp_service)), &command); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_SnmpService", "_parent_type, _message_ident, _parent0_index, snmp_oid, message_processing_model, " "security_model, security_name, security_level, context_name, " "context_engine_id, command", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s, %s, %s, %s, %s", parent_type, message_ident, parent_index, oid, mpm, sem, security_name, sel, context_name, context_engine_id, command); error: if ( oid ) free(oid); if ( community ) free(community); if ( security_name ) free(security_name); if ( context_name ) free(context_name); if ( context_engine_id ) free(context_engine_id); if ( command ) free(command); return ret; } static int insert_web_service_arg(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, int arg_index, prelude_string_t *arg) { char *tmp; int ret; ret = preludedb_sql_escape(sql, get_string(arg), &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_WebServiceArg", "_parent_type, _message_ident, _parent0_index, _index, arg", "'%c', %" PRELUDE_PRIu64 ", %d, %d, %s", parent_type, message_ident, parent_index, arg_index, tmp); free(tmp); return ret; } static int insert_web_service(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_web_service_t *web_service) { prelude_string_t *web_service_arg, *last_web_service_arg; char *url, *cgi, *method; int index = 0; int ret; if ( ! web_service ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_web_service_get_url(web_service)), &url); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_web_service_get_cgi(web_service)), &cgi); if ( ret < 0 ) { free(url); return -1; } ret = preludedb_sql_escape(sql, get_string(idmef_web_service_get_http_method(web_service)), &method); if ( ret < 0 ) { free(url); free(cgi); return ret; } ret = preludedb_sql_insert(sql, "Prelude_WebService", "_parent_type, _message_ident, _parent0_index, " "url, cgi, http_method", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s", parent_type, message_ident, parent_index, url, cgi, method); free(url); free(cgi); free(method); index = 0; last_web_service_arg = web_service_arg = NULL; while ( (web_service_arg = idmef_web_service_get_next_arg(web_service, web_service_arg)) ) { ret = insert_web_service_arg(sql, parent_type, message_ident, parent_index, index++, web_service_arg); if ( ret < 0 ) return ret; last_web_service_arg = web_service_arg; } if ( last_web_service_arg ) { ret = insert_web_service_arg(sql, parent_type, message_ident, parent_index, -1, last_web_service_arg); if ( ret < 0 ) return ret; } return 1; } static int insert_service(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int parent_index, idmef_service_t *service) { int ret = -1; char ip_version[8], *name = NULL, port[8], iana_protocol_number[8], *iana_protocol_name = NULL, *portlist = NULL, *protocol = NULL, *ident; if ( ! service ) return 0; get_optional_uint8(ip_version, sizeof(ip_version), idmef_service_get_ip_version(service)); ret = preludedb_sql_escape(sql, get_string(idmef_service_get_ident(service)), &ident); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_service_get_name(service)), &name); if ( ret < 0 ) goto error; get_optional_uint16(port, sizeof(port), idmef_service_get_port(service)); get_optional_uint8(iana_protocol_number, sizeof(iana_protocol_number), idmef_service_get_iana_protocol_number(service)); ret = preludedb_sql_escape(sql, get_string(idmef_service_get_iana_protocol_name(service)), &iana_protocol_name); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_service_get_portlist(service)), &portlist); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_service_get_protocol(service)), &protocol); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_Service", "_parent_type, _message_ident, _parent0_index, " "ident, ip_version, name, port, iana_protocol_number, iana_protocol_name, portlist, protocol", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s, %s, %s, %s, %s", parent_type, message_ident, parent_index, ident, ip_version, name, port, iana_protocol_number, iana_protocol_name, portlist, protocol); if ( ret < 0 ) goto error; switch ( idmef_service_get_type(service)) { case IDMEF_SERVICE_TYPE_DEFAULT: break; case IDMEF_SERVICE_TYPE_WEB: ret = insert_web_service(sql, parent_type, message_ident, parent_index, idmef_service_get_web_service(service)); break; case IDMEF_SERVICE_TYPE_SNMP: ret = insert_snmp_service(sql, parent_type, message_ident, parent_index, idmef_service_get_snmp_service(service)); break; default: ret = -1; } error: if ( name ) free(name); if ( iana_protocol_name ) free(iana_protocol_name); if ( portlist ) free(portlist); if ( protocol ) free(protocol); if ( ident ) free(ident); return ret; } static int insert_inode(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_inode_t *inode) { char ctime[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE], ctime_gmtoff[16]; char number[16], major_device[16], minor_device[16], c_major_device[16], c_minor_device[16]; int ret; if ( ! inode ) return 0; if ( preludedb_sql_time_to_timestamp(sql, idmef_inode_get_change_time(inode), ctime, sizeof (ctime), ctime_gmtoff, sizeof (ctime_gmtoff), NULL, 0) < 0 ) return -1; get_optional_uint32(number, sizeof(number), idmef_inode_get_number(inode)); get_optional_uint32(major_device, sizeof(major_device), idmef_inode_get_major_device(inode)); get_optional_uint32(minor_device, sizeof(minor_device), idmef_inode_get_minor_device(inode)); get_optional_uint32(c_major_device, sizeof(c_major_device), idmef_inode_get_c_major_device(inode)); get_optional_uint32(c_minor_device, sizeof(c_minor_device), idmef_inode_get_c_minor_device(inode)); ret = preludedb_sql_insert(sql, "Prelude_Inode", "_message_ident, _parent0_index, _parent1_index, " "change_time, change_time_gmtoff, number, major_device, minor_device, c_major_device, " "c_minor_device", "%" PRELUDE_PRIu64 ", %d, %d, %s, %s, %s, %s, %s, %s, %s", message_ident, target_index, file_index, ctime, ctime_gmtoff, number, major_device, minor_device, c_major_device, c_minor_device); return ret; } static int insert_linkage(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, int index, idmef_linkage_t *linkage) { int ret; char *name, *path, *category; if ( ! linkage ) return 0; ret = preludedb_sql_escape(sql, idmef_linkage_category_to_string(idmef_linkage_get_category(linkage)), &category); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_linkage_get_name(linkage)), &name); if ( ret < 0 ) { free(category); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_linkage_get_path(linkage)), &path); if ( ret < 0 ) { free(name); free(category); return ret; } ret = preludedb_sql_insert(sql, "Prelude_Linkage", "_message_ident, _parent0_index, _parent1_index, _index, category, name, path", "%" PRELUDE_PRIu64 ", %d, %d, %d, %s, %s, %s", message_ident, target_index, file_index, index, category, name, path); free(name); free(path); free(category); /* FIXME: idmef_file in idmef_linkage is not currently supported by the db */ return ret; } static int insert_file_access_permission(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, int file_access_index, int perm_index, prelude_string_t *perm) { char *tmp; int ret; ret = preludedb_sql_escape(sql, get_string(perm), &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_FileAccess_Permission", "_message_ident, _parent0_index, _parent1_index, _parent2_index, _index, permission", "%" PRELUDE_PRIu64 ", %d, %d, %d, %d, %s", message_ident, target_index, file_index, file_access_index, perm_index, tmp); free(tmp); return ret; } static int insert_file_access(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, int file_access_index, idmef_file_access_t *file_access) { prelude_string_t *file_access_permission, *last_file_access_permission; int index; int ret; if ( ! file_access ) return 0; ret = preludedb_sql_insert(sql, "Prelude_FileAccess", "_message_ident, _parent0_index, _parent1_index, _index", "%" PRELUDE_PRIu64 ", %d, %d, %d", message_ident, target_index, file_index, file_access_index); if ( ret < 0 ) return ret; index = 0; last_file_access_permission = file_access_permission = NULL; while ( (file_access_permission = idmef_file_access_get_next_permission(file_access, file_access_permission)) ) { ret = insert_file_access_permission(sql, message_ident, target_index, file_index, file_access_index, index++, file_access_permission); if ( ret < 0 ) return ret; last_file_access_permission = file_access_permission; } if ( last_file_access_permission ) { ret = insert_file_access_permission(sql, message_ident, target_index, file_index, file_access_index, -1, last_file_access_permission); if ( ret < 0 ) return ret; } ret = insert_user_id(sql, 'F', message_ident, target_index, file_index, file_access_index, 0, idmef_file_access_get_user_id(file_access)); return ret; } static int insert_checksum(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, int checksum_index, idmef_checksum_t *checksum) { char *value = NULL, *key = NULL, *algorithm = NULL; int ret = -1; ret = preludedb_sql_escape(sql, get_string(idmef_checksum_get_value(checksum)), &value); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_checksum_get_key(checksum)), &key); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, idmef_checksum_algorithm_to_string(idmef_checksum_get_algorithm(checksum)), &algorithm); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_Checksum", "_message_ident, _parent0_index, _parent1_index, _index, value, checksum_key, algorithm", "%" PRELUDE_PRIu64 ", %d, %d, %d, %s, %s, %s", message_ident, target_index, file_index, checksum_index, value, key, algorithm); error: if ( value ) free(value); if ( key ) free(key); if ( algorithm ) free(algorithm); return ret; } static int insert_file(preludedb_sql_t *sql, uint64_t message_ident, int target_index, int file_index, idmef_file_t *file) { int ret = -1; idmef_linkage_t *linkage, *last_linkage; idmef_checksum_t *checksum, *last_checksum; idmef_file_access_t *file_access, *last_file_access; int index; char *name = NULL, *path = NULL, *category = NULL, *fstype = NULL, *ident = NULL, *file_type = NULL, data_size[32], disk_size[32]; char ctime[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE], ctime_gmtoff[16]; char mtime[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE], mtime_gmtoff[16]; char atime[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE], atime_gmtoff[16]; ret = preludedb_sql_time_to_timestamp(sql, idmef_file_get_create_time(file), ctime, sizeof (ctime), ctime_gmtoff, sizeof (ctime_gmtoff), NULL, 0); if ( ret < 0 ) return ret; ret = preludedb_sql_time_to_timestamp(sql, idmef_file_get_modify_time(file), mtime, sizeof (mtime), mtime_gmtoff, sizeof (mtime_gmtoff), NULL, 0); if ( ret < 0 ) return ret; ret = preludedb_sql_time_to_timestamp(sql, idmef_file_get_access_time(file), atime, sizeof(atime), atime_gmtoff, sizeof (atime_gmtoff), NULL, 0); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, idmef_file_category_to_string(idmef_file_get_category(file)), &category); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_file_get_ident(file)), &ident); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_file_get_name(file)), &name); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_file_get_path(file)), &path); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_file_get_file_type(file)), &file_type); if ( ret < 0 ) goto error; get_optional_uint64(data_size, sizeof(data_size), idmef_file_get_data_size(file)); get_optional_uint64(disk_size, sizeof(disk_size), idmef_file_get_disk_size(file)); ret = preludedb_sql_escape(sql, get_optional_enum((int *) idmef_file_get_fstype(file), (char *(*)(int)) idmef_file_fstype_to_string), &fstype); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_File", "_message_ident, _parent0_index, _index, ident, category, name, path, " "create_time, create_time_gmtoff, modify_time, modify_time_gmtoff, access_time, access_time_gmtoff, " "data_size, disk_size, fstype, file_type", "%" PRELUDE_PRIu64 ", %d, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", message_ident, target_index, file_index, ident, category, name, path, ctime, ctime_gmtoff, mtime, mtime_gmtoff, atime, atime_gmtoff, data_size, disk_size, fstype, file_type); if ( ret < 0 ) goto error; index = 0; last_file_access = file_access = NULL; while ( (file_access = idmef_file_get_next_file_access(file, file_access)) ) { ret = insert_file_access(sql, message_ident, target_index, file_index, index++, file_access); if ( ret < 0 ) goto error; last_file_access = file_access; } if ( last_file_access ) { ret = insert_file_access(sql, message_ident, target_index, file_index, -1, last_file_access); if ( ret < 0 ) goto error; } index = 0; last_linkage = linkage = NULL; while ( (linkage = idmef_file_get_next_linkage(file, linkage)) ) { ret = insert_linkage(sql, message_ident, target_index, file_index, index++, linkage); if ( ret < 0 ) goto error; last_linkage = linkage; } if ( last_linkage ) { ret = insert_linkage(sql, message_ident, target_index, file_index, -1, last_linkage); if ( ret < 0 ) return ret; } ret = insert_inode(sql, message_ident, target_index, file_index, idmef_file_get_inode(file)); if ( ret < 0 ) goto error; index = 0; last_checksum = checksum = NULL; while ( (checksum = idmef_file_get_next_checksum(file, checksum)) ) { ret = insert_checksum(sql, message_ident, target_index, file_index, index++, checksum); if ( ret < 0 ) goto error; last_checksum = checksum; } if ( last_checksum ) { ret = insert_checksum(sql, message_ident, target_index, file_index, -1, last_checksum); if ( ret < 0 ) goto error; } error: if ( ident ) free(ident); if ( name ) free(name); if ( path ) free(path); if ( category ) free(category); if ( fstype ) free(fstype); if ( file_type ) free(file_type); return ret; } static int insert_source(preludedb_sql_t *sql, uint64_t message_ident, int index, idmef_source_t *source) { int ret; char *interface, *spoofed, *ident; ret = preludedb_sql_escape(sql, get_string(idmef_source_get_ident(source)), &ident); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, idmef_source_spoofed_to_string(idmef_source_get_spoofed(source)), &spoofed); if ( ret < 0 ) { free(ident); return ret; } ret = preludedb_sql_escape(sql, get_string(idmef_source_get_interface(source)), &interface); if ( ret < 0 ) { free(ident); free(spoofed); return ret; } ret = preludedb_sql_insert(sql, "Prelude_Source", "_message_ident, _index, ident, spoofed, interface", "%" PRELUDE_PRIu64 ", %d, %s, %s, %s", message_ident, index, ident, spoofed, interface); free(ident); free(spoofed); free(interface); if ( ret < 0 ) return ret; ret = insert_node(sql, 'S', message_ident, index, idmef_source_get_node(source)); if ( ret < 0 ) return ret; ret = insert_user(sql, 'S', message_ident, index, idmef_source_get_user(source)); if ( ret < 0 ) return ret; ret = insert_process(sql, 'S', message_ident, index, idmef_source_get_process(source)); if ( ret < 0 ) return ret; ret = insert_service(sql, 'S', message_ident, index, idmef_source_get_service(source)); if ( ret < 0 ) return ret; return 1; } static int insert_target(preludedb_sql_t *sql, uint64_t message_ident, int target_index, idmef_target_t *target) { int ret; idmef_file_t *file, *last_file; int index; char *interface, *decoy, *ident; ret = preludedb_sql_escape(sql, idmef_target_decoy_to_string(idmef_target_get_decoy(target)), &decoy); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_target_get_ident(target)), &ident); if ( ret < 0 ) { free(decoy); return -2; } ret = preludedb_sql_escape(sql, get_string(idmef_target_get_interface(target)), &interface); if ( ret < 0 ) { free(ident); free(decoy); return -2; } ret = preludedb_sql_insert(sql, "Prelude_Target", "_message_ident, _index, ident, decoy, interface", "%" PRELUDE_PRIu64 ", %d, %s, %s, %s", message_ident, target_index, ident, decoy, interface); free(ident); free(decoy); free(interface); if ( ret < 0 ) return -1; ret = insert_node(sql, 'T', message_ident, target_index, idmef_target_get_node(target)); if ( ret < 0 ) return ret; ret = insert_user(sql, 'T', message_ident, target_index, idmef_target_get_user(target)); if ( ret < 0 ) return ret; ret = insert_process(sql, 'T', message_ident, target_index, idmef_target_get_process(target)); if ( ret < 0 ) return ret; ret = insert_service(sql, 'T', message_ident, target_index, idmef_target_get_service(target)); if ( ret < 0 ) return ret; index = 0; last_file = file = NULL; while ( (file = idmef_target_get_next_file(target, file)) ) { ret = insert_file(sql, message_ident, target_index, index++, file); if ( ret < 0 ) return ret; last_file = file; } if ( last_file ) { ret = insert_file(sql, message_ident, target_index, -1, last_file); if ( ret < 0 ) return ret; } return 1; } static int insert_analyzer(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int analyzer_index, idmef_analyzer_t *analyzer) { int ret = -1; char *name = NULL, *manufacturer = NULL, *model = NULL, *version = NULL, *class = NULL, *ostype = NULL, *osversion = NULL, *analyzerid = NULL; if ( ! analyzer ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_analyzerid(analyzer)), &analyzerid); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_class(analyzer)), &class); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_name(analyzer)), &name); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_model(analyzer)), &model); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_version(analyzer)), &version); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_manufacturer(analyzer)), &manufacturer); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_ostype(analyzer)), &ostype); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_analyzer_get_osversion(analyzer)), &osversion); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_Analyzer", "_parent_type, _message_ident, _index, analyzerid, name, manufacturer, " "model, version, class, " "ostype, osversion", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s, %s, %s, %s, %s", parent_type, message_ident, analyzer_index, analyzerid, name, manufacturer, model, version, class, ostype, osversion); if ( ret < 0 ) goto error; ret = insert_node(sql, parent_type, message_ident, analyzer_index, idmef_analyzer_get_node(analyzer)); if ( ret < 0 ) goto error; ret = insert_process(sql, parent_type, message_ident, analyzer_index, idmef_analyzer_get_process(analyzer)); error: if ( class ) free(class); if ( name ) free(name); if ( model ) free(model); if ( version ) free(version); if ( manufacturer ) free(manufacturer); if ( ostype ) free(ostype); if ( osversion ) free(osversion); if ( analyzerid ) free(analyzerid); return ret; } static int insert_reference(preludedb_sql_t *sql, uint64_t message_ident, int reference_index, idmef_reference_t *reference) { char *origin = NULL, *name = NULL, *url = NULL, *meaning = NULL; int ret = -1; ret = preludedb_sql_escape(sql, idmef_reference_origin_to_string(idmef_reference_get_origin(reference)), &origin); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_reference_get_url(reference)), &url); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_reference_get_name(reference)), &name); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_reference_get_meaning(reference)), &meaning); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_Reference", "_message_ident, _index, origin, name, url, meaning", "%" PRELUDE_PRIu64 ", %d, %s, %s, %s, %s", message_ident, reference_index, origin, name, url, meaning); error: if ( origin ) free(origin); if ( url ) free(url); if ( name ) free(name); if ( meaning ) free(meaning); return ret; } static int insert_classification(preludedb_sql_t *sql, uint64_t message_ident, idmef_classification_t *classification) { char *text, *ident; idmef_reference_t *reference, *last_reference; int index; int ret; if ( ! classification ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_classification_get_ident(classification)), &ident); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_classification_get_text(classification)), &text); if ( ret < 0 ) { free(ident); return ret; } ret = preludedb_sql_insert(sql, "Prelude_Classification", "_message_ident, ident, text", "%" PRELUDE_PRIu64 ", %s, %s", message_ident, ident, text); free(text); free(ident); index = 0; last_reference = reference = NULL; while ( (reference = idmef_classification_get_next_reference(classification, reference)) ) { ret = insert_reference(sql, message_ident, index++, reference); if ( ret < 0 ) return ret; last_reference = reference; } if ( last_reference ) { ret = insert_reference(sql, message_ident, -1, last_reference); if ( ret < 0 ) return ret; } return 1; } static int insert_additional_data(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int ad_index, idmef_additional_data_t *additional_data) { int ret; char *meaning, *type, *data; if ( ! additional_data ) return 0; ret = preludedb_sql_escape(sql, idmef_additional_data_type_to_string(idmef_additional_data_get_type(additional_data)), &type); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_additional_data_get_meaning(additional_data)), &meaning); if ( ret < 0 ) { free(type); return ret; } ret = get_data(sql, idmef_additional_data_get_data(additional_data), &data); if ( ret < 0 ) { free(type); free(meaning); return ret; } ret = preludedb_sql_insert(sql, "Prelude_AdditionalData", "_parent_type, _message_ident, _index, type, meaning, data", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s, %s", parent_type, message_ident, ad_index, type, meaning, data); free(type); free(meaning); free(data); return ret; } static int insert_createtime(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, idmef_time_t *time) { char utc_time[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE]; char utc_time_usec[16]; char utc_time_gmtoff[16]; int ret; ret = preludedb_sql_time_to_timestamp(sql, time, utc_time, sizeof (utc_time), utc_time_gmtoff, sizeof (utc_time_gmtoff), utc_time_usec, sizeof (utc_time_usec)); if ( ret < 0 ) return ret; return preludedb_sql_insert(sql, "Prelude_CreateTime", "_parent_type, _message_ident, time, gmtoff, usec", "'%c', %" PRELUDE_PRIu64 ", %s, %s, %s", parent_type, message_ident, utc_time, utc_time_gmtoff, utc_time_usec); } static int insert_detecttime(preludedb_sql_t *sql, uint64_t message_ident, idmef_time_t *time) { char utc_time[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE]; char utc_time_usec[16]; char utc_time_gmtoff[16]; int ret; if ( ! time ) return 0; ret = preludedb_sql_time_to_timestamp(sql, time, utc_time, sizeof (utc_time), utc_time_gmtoff, sizeof (utc_time_gmtoff), utc_time_usec, sizeof (utc_time_usec)); if ( ret < 0 ) return ret; return preludedb_sql_insert(sql, "Prelude_DetectTime", "_message_ident, time, gmtoff, usec", "%" PRELUDE_PRIu64 ", %s, %s, %s", message_ident, utc_time, utc_time_gmtoff, utc_time_usec); } static int insert_analyzertime(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, idmef_time_t *time) { char utc_time[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE]; char utc_time_usec[16]; char utc_time_gmtoff[16]; int ret; if ( ! time ) return 0; ret = preludedb_sql_time_to_timestamp(sql, time, utc_time, sizeof(utc_time), utc_time_gmtoff, sizeof(utc_time_gmtoff), utc_time_usec, sizeof (utc_time_usec)); if ( ret < 0 ) return ret; return preludedb_sql_insert(sql, "Prelude_AnalyzerTime", "_parent_type, _message_ident, time, gmtoff, usec", "'%c', %" PRELUDE_PRIu64 ", %s, %s, %s", parent_type, message_ident, utc_time, utc_time_gmtoff, utc_time_usec); } static int insert_impact(preludedb_sql_t *sql, uint64_t message_ident, idmef_impact_t *impact) { int ret = -1; char *completion = NULL, *type = NULL, *severity = NULL, *description = NULL; if ( ! impact ) return 0; ret = preludedb_sql_escape(sql, get_optional_enum((int *) idmef_impact_get_completion(impact), (char *(*)(int)) idmef_impact_completion_to_string), &completion); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, idmef_impact_type_to_string(idmef_impact_get_type(impact)), &type); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_optional_enum((int *) idmef_impact_get_severity(impact), (char *(*)(int))idmef_impact_severity_to_string), &severity); if ( ret < 0 ) goto error; ret = preludedb_sql_escape(sql, get_string(idmef_impact_get_description(impact)), &description); if ( ret < 0 ) goto error; ret = preludedb_sql_insert(sql, "Prelude_Impact", "_message_ident, severity, completion, type, description", "%" PRELUDE_PRIu64 ", %s, %s, %s, %s", message_ident, severity, completion, type, description); error: if ( completion ) free(completion); if ( type ) free(type); if ( severity ) free(severity); if ( description ) free(description); return ret; } static int insert_action(preludedb_sql_t *sql, uint64_t message_ident, int action_index, idmef_action_t *action) { int ret; char *category, *description; ret = preludedb_sql_escape(sql, idmef_action_category_to_string(idmef_action_get_category(action)), &category); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_action_get_description(action)), &description); if ( ret < 0 ) { free(category); return ret; } ret = preludedb_sql_insert(sql, "Prelude_Action", "_message_ident, _index, category, description", "%" PRELUDE_PRIu64 ", %d, %s, %s", message_ident, action_index, category, description); free(category); free(description); return ret; } static int insert_confidence(preludedb_sql_t *sql, uint64_t message_ident, idmef_confidence_t *confidence) { int ret; char *rating; if ( ! confidence ) return 0; ret = preludedb_sql_escape(sql, idmef_confidence_rating_to_string(idmef_confidence_get_rating(confidence)), &rating); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_Confidence", "_message_ident, rating, confidence", "%" PRELUDE_PRIu64 ", %s, %f", message_ident, rating, idmef_confidence_get_confidence(confidence)); free(rating); return ret; } static int insert_assessment(preludedb_sql_t *sql, uint64_t message_ident, idmef_assessment_t *assessment) { idmef_action_t *action, *last_action; int index; int ret; if ( ! assessment ) return 0; ret = preludedb_sql_insert(sql, "Prelude_Assessment", "_message_ident", "%" PRELUDE_PRIu64, message_ident); if ( ret < 0 ) return ret; ret = insert_impact(sql, message_ident, idmef_assessment_get_impact(assessment)); if ( ret < 0 ) return ret; ret = insert_confidence(sql, message_ident, idmef_assessment_get_confidence(assessment)); if ( ret < 0 ) return ret; index = 0; last_action = action = NULL; while ( (action = idmef_assessment_get_next_action(assessment, action)) ) { ret = insert_action(sql, message_ident, index++, action); if ( ret < 0 ) return ret; last_action = action; } if ( last_action ) { ret = insert_action(sql, message_ident, -1, last_action); if ( ret < 0 ) return ret; } return 1; } static int insert_overflow_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_overflow_alert_t *overflow_alert) { char *program, *buffer, size[16]; int ret; ret = preludedb_sql_escape(sql, get_string(idmef_overflow_alert_get_program(overflow_alert)), &program); if ( ret < 0 ) return ret; ret = get_data(sql, idmef_overflow_alert_get_buffer(overflow_alert), &buffer); if ( ret < 0 ) { free(program); return ret; } get_optional_uint32(size, sizeof(size), idmef_overflow_alert_get_size(overflow_alert)); ret = preludedb_sql_insert(sql, "Prelude_OverflowAlert", "_message_ident, program, size, buffer", "%" PRELUDE_PRIu64 ", %s, %s, %s", message_ident, program, size, buffer); free(program); free(buffer); return ret; } static int insert_alertident(preludedb_sql_t *sql, char parent_type, uint64_t message_ident, int alertident_index, idmef_alertident_t *alertident) { int ret; char *analyzerid, *messageid; ret = preludedb_sql_escape(sql, get_string(idmef_alertident_get_analyzerid(alertident)), &analyzerid); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_alertident_get_alertident(alertident)), &messageid); if ( ret < 0 ) { free(analyzerid); return ret; } ret = preludedb_sql_insert(sql, "Prelude_Alertident", "_parent_type, _message_ident, _index, alertident, analyzerid", "'%c', %" PRELUDE_PRIu64 ", %d, %s, %s", parent_type, message_ident, alertident_index, messageid, analyzerid); free(analyzerid); free(messageid); return ret; } static int insert_tool_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_tool_alert_t *tool_alert) { char *name, *command; idmef_alertident_t *alertident, *last_alertident; int index; int ret; if ( ! tool_alert ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_tool_alert_get_name(tool_alert)), &name); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, get_string(idmef_tool_alert_get_command(tool_alert)), &command); if ( ret < 0 ) { free(name); return ret; } ret = preludedb_sql_insert(sql, "Prelude_ToolAlert", "_message_ident, name, command", "%" PRELUDE_PRIu64 ", %s, %s", message_ident, name, command); free(name); free(command); index = 0; last_alertident = alertident = NULL; while ( (alertident = idmef_tool_alert_get_next_alertident(tool_alert, alertident)) ) { ret = insert_alertident(sql, 'T', message_ident, index++, alertident); if ( ret < 0 ) return ret; last_alertident = alertident; } if ( ret < 0 ) { ret = insert_alertident(sql, 'T', message_ident, -1, alertident); if ( ret < 0 ) return ret; } return 1; } static int insert_correlation_alert(preludedb_sql_t *sql, uint64_t message_ident, idmef_correlation_alert_t *correlation_alert) { char *name; idmef_alertident_t *alertident, *last_alertident; int index; int ret; if ( ! correlation_alert ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_correlation_alert_get_name(correlation_alert)), &name); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, "Prelude_CorrelationAlert", "_message_ident, name", "%" PRELUDE_PRIu64 ", %s", message_ident, name); free(name); if ( ret < 0 ) return ret; index = 0; last_alertident = alertident = NULL; while ( (alertident = idmef_correlation_alert_get_next_alertident(correlation_alert, alertident)) ) { ret = insert_alertident(sql, 'C', message_ident, index++, alertident); if ( ret < 0 ) return ret; last_alertident = alertident; } if ( last_alertident ) { ret = insert_alertident(sql, 'C', message_ident, -1, last_alertident); if ( ret < 0 ) return ret; } return 1; } static int get_last_insert_ident(preludedb_sql_t *sql, const char *table_name, uint64_t *result) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; preludedb_sql_field_t *field; int ret; ret = preludedb_sql_query_sprintf(sql, &table, "SELECT max(_ident) FROM %s;", table_name); if ( ret < 0 ) return ret; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret < 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 0, &field); if ( ret < 0 ) goto error; ret = preludedb_sql_field_to_uint64(field, result); if ( ret < 0 ) goto error; error: preludedb_sql_table_destroy(table); return ret; } static int insert_message_messageid(preludedb_sql_t *sql, const char *table_name, prelude_string_t *messageid, uint64_t *result) { int ret; char *tmp; ret = preludedb_sql_escape(sql, get_string(messageid), &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_insert(sql, table_name, "messageid", "%s", tmp); free(tmp); if ( ret < 0 ) return ret; return get_last_insert_ident(sql, table_name, result); } static int insert_alert(preludedb_sql_t *sql, idmef_alert_t *alert) { uint64_t ident; idmef_source_t *source, *last_source; idmef_target_t *target, *last_target; idmef_analyzer_t *analyzer, *last_analyzer; idmef_additional_data_t *additional_data, *last_additional_data; int index; int ret; if ( ! alert ) return 0; ret = insert_message_messageid(sql, "Prelude_Alert", idmef_alert_get_messageid(alert), &ident); if ( ret < 0 ) return ret; ret = insert_createtime(sql, 'A', ident, idmef_alert_get_create_time(alert)); if ( ret < 0 ) return ret; ret = insert_detecttime(sql, ident, idmef_alert_get_detect_time(alert)); if ( ret < 0 ) return ret; ret = insert_analyzertime(sql, 'A', ident, idmef_alert_get_analyzer_time(alert)); if ( ret < 0 ) return ret; ret = insert_assessment(sql, ident, idmef_alert_get_assessment(alert)); if ( ret < 0 ) return ret; switch ( idmef_alert_get_type(alert) ) { case IDMEF_ALERT_TYPE_DEFAULT: break; case IDMEF_ALERT_TYPE_TOOL: ret = insert_tool_alert(sql, ident, idmef_alert_get_tool_alert(alert)); if ( ret < 0 ) return ret; break; case IDMEF_ALERT_TYPE_OVERFLOW: ret = insert_overflow_alert(sql, ident, idmef_alert_get_overflow_alert(alert)); if ( ret < 0 ) return ret; break; case IDMEF_ALERT_TYPE_CORRELATION: ret = insert_correlation_alert(sql, ident, idmef_alert_get_correlation_alert(alert)); if ( ret < 0 ) return ret; break; default: return -1; } index = 0; last_analyzer = analyzer = NULL; while ( (analyzer = idmef_alert_get_next_analyzer(alert, analyzer)) ) { ret = insert_analyzer(sql, 'A', ident, index++, analyzer); if ( ret < 0 ) return ret; last_analyzer = analyzer; } if ( last_analyzer ) { ret = insert_analyzer(sql, 'A', ident, -1, last_analyzer); if ( ret < 0 ) return ret; } index = 0; last_source = source = NULL; while ( (source = idmef_alert_get_next_source(alert, source)) ) { ret = insert_source(sql, ident, index++, source); if ( ret < 0 ) return ret; last_source = source; } if ( last_source ) { ret = insert_source(sql, ident, -1, last_source); if ( ret < 0 ) return ret; } index = 0; last_target = target = NULL; while ( (target = idmef_alert_get_next_target(alert, target)) ) { ret = insert_target(sql, ident, index++, target); if ( ret < 0 ) return ret; last_target = target; } if ( last_target ) { ret = insert_target(sql, ident, -1, last_target); if ( ret < 0 ) return ret; } ret = insert_classification(sql, ident, idmef_alert_get_classification(alert)); if ( ret < 0 ) return ret; index = 0; last_additional_data = additional_data = NULL; while ( (additional_data = idmef_alert_get_next_additional_data(alert, additional_data)) ) { ret = insert_additional_data(sql, 'A', ident, index++, additional_data); if ( ret < 0 ) return ret; last_additional_data = additional_data; } if ( last_additional_data ) { ret = insert_additional_data(sql, 'A', ident, -1, last_additional_data); if ( ret < 0 ) return ret; } return 1; } static int insert_heartbeat(preludedb_sql_t *sql, idmef_heartbeat_t *heartbeat) { uint64_t ident; idmef_analyzer_t *analyzer, *last_analyzer; char heartbeat_interval[16], *messageid; idmef_additional_data_t *additional_data, *last_additional_data; unsigned int index; int ret; if ( ! heartbeat ) return 0; ret = preludedb_sql_escape(sql, get_string(idmef_heartbeat_get_messageid(heartbeat)), &messageid); if ( ret < 0 ) return ret; get_optional_uint32(heartbeat_interval, sizeof(heartbeat_interval), idmef_heartbeat_get_heartbeat_interval(heartbeat)); ret = preludedb_sql_insert(sql, "Prelude_Heartbeat", "messageid, heartbeat_interval", "%s, %s", messageid, heartbeat_interval); free(messageid); if ( ret < 0 ) return ret; ret = get_last_insert_ident(sql, "Prelude_Heartbeat", &ident); if ( ret < 0 ) return ret; index = 0; last_analyzer = analyzer = NULL; while ( (analyzer = idmef_heartbeat_get_next_analyzer(heartbeat, analyzer)) ) { ret = insert_analyzer(sql, 'H', ident, index++, analyzer); if ( ret < 0 ) return ret; last_analyzer = analyzer; } if ( last_analyzer ) { ret = insert_analyzer(sql, 'H', ident, -1, last_analyzer); if ( ret < 0 ) return ret; } ret = insert_createtime(sql, 'H', ident, idmef_heartbeat_get_create_time(heartbeat)); if ( ret < 0 ) return ret; ret = insert_analyzertime(sql, 'H', ident, idmef_heartbeat_get_analyzer_time(heartbeat)); if ( ret < 0 ) return ret; index = 0; last_additional_data = additional_data = NULL; while ( (additional_data = idmef_heartbeat_get_next_additional_data(heartbeat, additional_data)) ) { ret = insert_additional_data(sql, 'H', ident, index++, additional_data); if ( ret < 0 ) return ret; last_additional_data = additional_data; } if ( last_additional_data ) { ret = insert_additional_data(sql, 'H', ident, -1, last_additional_data); if ( ret < 0 ) return ret; } return 1; } int classic_insert(preludedb_sql_t *sql, idmef_message_t *message) { int ret; if ( ! message ) return 0; ret = preludedb_sql_transaction_start(sql); if ( ret < 0 ) return ret; switch ( idmef_message_get_type(message) ) { case IDMEF_MESSAGE_TYPE_ALERT: ret = insert_alert(sql, idmef_message_get_alert(message)); break; case IDMEF_MESSAGE_TYPE_HEARTBEAT: ret = insert_heartbeat(sql, idmef_message_get_heartbeat(message)); break; default: return -1; } if ( ret < 0 ) { int tmp; tmp = preludedb_sql_transaction_abort(sql); return (tmp < 0) ? tmp : ret; } return preludedb_sql_transaction_end(sql); } libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-1.sql0000664000076400007640000000004311226653036021202 00000000000000UPDATE _format SET version='14.1'; libpreludedb-1.0.0/plugins/format/classic/Makefile.in0000664000076400007640000011163711347715643017563 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/format/classic DIST_COMMON = $(dist_schemadata_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__installdirs = "$(DESTDIR)$(classicdir)" \ "$(DESTDIR)$(schemadatadir)" LTLIBRARIES = $(classic_LTLIBRARIES) classic_la_DEPENDENCIES = $(top_builddir)/src/libpreludedb.la am_classic_la_OBJECTS = classic.lo classic-delete.lo classic-get.lo \ classic-insert.lo classic-path-resolve.lo classic-sql-join.lo \ classic-sql-select.lo classic_la_OBJECTS = $(am_classic_la_OBJECTS) classic_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(classic_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(classic_la_SOURCES) DIST_SOURCES = $(classic_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(dist_schemadata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(srcdir)/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ classic_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ classic_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ classic_la_SOURCES = classic.c classic-delete.c classic-get.c classic-insert.c classic-path-resolve.c classic-sql-join.c classic-sql-select.c classic_LTLIBRARIES = classic.la classicdir = $(format_plugin_dir) EXTRA_DIST = mysql2sqlite.sh mysql2pgsql.sh schemadatadir = $(format_schema_dir)/classic dist_schemadata_DATA = mysql2sqlite.sh \ mysql2pgsql.sh \ mysql.sql \ mysql-update-14-1.sql \ mysql-update-14-2.sql \ mysql-update-14-3.sql \ mysql-update-14-4.sql \ mysql-update-14-5.sql \ mysql-update-14-6.sql \ mysql-update-14-7.sql \ pgsql.sql \ pgsql-update-14-1.sql \ pgsql-update-14-2.sql \ pgsql-update-14-3.sql \ pgsql-update-14-4.sql \ pgsql-update-14-5.sql \ pgsql-update-14-6.sql \ pgsql-update-14-7.sql \ sqlite.sql \ sqlite-update-14-4.sql \ sqlite-update-14-5.sql \ sqlite-update-14-6.sql \ sqlite-update-14-7.sql all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/format/classic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/format/classic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-classicLTLIBRARIES: $(classic_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(classicdir)" || $(MKDIR_P) "$(DESTDIR)$(classicdir)" @list='$(classic_LTLIBRARIES)'; test -n "$(classicdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(classicdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(classicdir)"; \ } uninstall-classicLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(classic_LTLIBRARIES)'; test -n "$(classicdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(classicdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(classicdir)/$$f"; \ done clean-classicLTLIBRARIES: -test -z "$(classic_LTLIBRARIES)" || rm -f $(classic_LTLIBRARIES) @list='$(classic_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done classic.la: $(classic_la_OBJECTS) $(classic_la_DEPENDENCIES) $(classic_la_LINK) -rpath $(classicdir) $(classic_la_OBJECTS) $(classic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-delete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-get.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-insert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-path-resolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-sql-join.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic-sql-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classic.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_schemadataDATA: $(dist_schemadata_DATA) @$(NORMAL_INSTALL) test -z "$(schemadatadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadatadir)" @list='$(dist_schemadata_DATA)'; test -n "$(schemadatadir)" || list=; \ 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)$(schemadatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(schemadatadir)" || exit $$?; \ done uninstall-dist_schemadataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_schemadata_DATA)'; test -n "$(schemadatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(schemadatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(schemadatadir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(classicdir)" "$(DESTDIR)$(schemadatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-classicLTLIBRARIES clean-generic clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-classicLTLIBRARIES \ install-dist_schemadataDATA 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-classicLTLIBRARIES \ uninstall-dist_schemadataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-classicLTLIBRARIES \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-classicLTLIBRARIES install-data \ install-data-am install-dist_schemadataDATA 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-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-classicLTLIBRARIES \ uninstall-dist_schemadataDATA sqlite.sql: mysql.sql $(srcdir)/mysql2sqlite.sh $(srcdir)/mysql.sql > $@ pgsql.sql: mysql.sql $(srcdir)/mysql2pgsql.sh $(srcdir)/mysql.sql > $@ -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/format/classic/include/0000775000076400007640000000000011347715760017210 500000000000000libpreludedb-1.0.0/plugins/format/classic/include/classic-get.h0000664000076400007640000000223611226653036021473 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_GET_H #define _LIBPRELUDEDB_CLASSIC_GET_H int classic_get_alert(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); int classic_get_heartbeat(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); #endif /* ! _LIBPRELUDEDB_CLASSIC_GET_H */ libpreludedb-1.0.0/plugins/format/classic/include/Makefile.am0000664000076400007640000000023711226653036021157 00000000000000noinst_HEADERS = classic-delete.h classic-get.h classic-insert.h classic-path-resolve.h classic-sql-join.h classic-sql-select.h -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/format/classic/include/classic-insert.h0000664000076400007640000000212111226653036022211 00000000000000/***** * * Copyright (C) 2001-2004 Yoann Vandoorselaere * Copyright (C) 2003-2005 Nicolas Delon * All Rights Reserved * * This file is part of the Prelude program. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_INSERT_H #define _LIBPRELUDEDB_CLASSIC_INSERT_H int classic_insert(preludedb_sql_t *sql, idmef_message_t *message); #endif /* _LIBPRELUDEDB_CLASSIC_INSERT_H */ libpreludedb-1.0.0/plugins/format/classic/include/classic-delete.h0000664000076400007640000000301611226653036022153 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_DELETE_H #define _LIBPRELUDEDB_CLASSIC_DELETE_H int classic_delete_alert(preludedb_sql_t *sql, uint64_t ident); ssize_t classic_delete_alert_from_list(preludedb_sql_t *sql, uint64_t *ident, size_t size); ssize_t classic_delete_alert_from_result_idents(preludedb_sql_t *sql, preludedb_result_idents_t *results); int classic_delete_heartbeat(preludedb_sql_t *sql, uint64_t ident); ssize_t classic_delete_heartbeat_from_list(preludedb_sql_t *sql, uint64_t *ident, size_t size); ssize_t classic_delete_heartbeat_from_result_idents(preludedb_sql_t *sql, preludedb_result_idents_t *results); #endif /* _LIBPRELUDEDB_CLASSIC_DELETE_H */ libpreludedb-1.0.0/plugins/format/classic/include/Makefile.in0000664000076400007640000005731311347715643021206 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/format/classic/include DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_HEADERS = classic-delete.h classic-get.h classic-insert.h classic-path-resolve.h classic-sql-join.h classic-sql-select.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/format/classic/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/format/classic/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: 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 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/format/classic/include/classic-sql-select.h0000664000076400007640000000277011226653036022773 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_SQL_SELECT_H #define _LIBPRELUDEDB_CLASSIC_SQL_SELECT_H typedef struct classic_sql_select classic_sql_select_t; int classic_sql_select_new(classic_sql_select_t **select); void classic_sql_select_destroy(classic_sql_select_t *select); int classic_sql_select_add_field(classic_sql_select_t *select, const char *field_name, preludedb_selected_path_flags_t flags); int classic_sql_select_fields_to_string(classic_sql_select_t *select, prelude_string_t *output); int classic_sql_select_modifiers_to_string(classic_sql_select_t *select, prelude_string_t *output); #endif /* _LIBPRELUDEDB_CLASSIC_SQL_SELECT_H */ libpreludedb-1.0.0/plugins/format/classic/include/classic-path-resolve.h0000664000076400007640000000273411226653036023330 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_PATH_RESOLVE_H #define _LIBPRELUDEDB_CLASSIC_PATH_RESOLVE_H int classic_path_resolve_selected(preludedb_sql_t *sql, preludedb_selected_path_t *selected, classic_sql_join_t *join, classic_sql_select_t *select); int classic_path_resolve_selection(preludedb_sql_t *sql, preludedb_path_selection_t *selection, classic_sql_join_t *join, classic_sql_select_t *select); int classic_path_resolve_criteria(preludedb_sql_t *sql, idmef_criteria_t *criteria, classic_sql_join_t *join, prelude_string_t *output); #endif /* _LIBPRELUDEDB_CLASSIC_PATH_RESOLVE_H */ libpreludedb-1.0.0/plugins/format/classic/include/classic-sql-join.h0000664000076400007640000000334511226653036022452 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_CLASSIC_SQL_JOIN_H #define _LIBPRELUDEDB_CLASSIC_SQL_JOIN_H typedef struct classic_sql_joined_table classic_sql_joined_table_t; typedef struct classic_sql_join classic_sql_join_t; int classic_sql_join_new(classic_sql_join_t **join); void classic_sql_join_destroy(classic_sql_join_t *join); void classic_sql_join_set_top_class(classic_sql_join_t *join, idmef_class_id_t top_class); classic_sql_joined_table_t *classic_sql_join_lookup_table(const classic_sql_join_t *join, const idmef_path_t *path); int classic_sql_join_to_string(classic_sql_join_t *join, prelude_string_t *output); int classic_sql_join_new_table(classic_sql_join_t *join, classic_sql_joined_table_t **table, const idmef_path_t *path, char *table_name); const char *classic_sql_joined_table_get_name(classic_sql_joined_table_t *table); #endif /* _LIBPRELUDEDB_CLASSIC_SQL_JOIN_H */ libpreludedb-1.0.0/plugins/format/classic/sqlite-update-14-4.sql0000664000076400007640000000074711226653036021373 00000000000000UPDATE _format SET version='14.4'; BEGIN; ALTER TABLE Prelude_AdditionalData RENAME TO Prelude_AdditionalDataOld; CREATE TABLE Prelude_AdditionalData ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _index INTEGER NOT NULL, type TEXT NOT NULL, meaning TEXT NULL, data BLOB NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) ; INSERT INTO Prelude_AdditionalData SELECT * FROM Prelude_AdditionalDataOld; DROP TABLE Prelude_AdditionalDataOld; COMMIT; libpreludedb-1.0.0/plugins/format/classic/classic.c0000664000076400007640000003473211330320030017251 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include "preludedb-error.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #include "preludedb-plugin-format.h" #include "classic-insert.h" #include "classic-get.h" #include "classic-delete.h" #include "classic-sql-join.h" #include "classic-sql-select.h" #include "classic-path-resolve.h" #define CLASSIC_SCHEMA_VERSION 14.7 int classic_LTX_prelude_plugin_version(void); int classic_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data); struct db_value_info { idmef_value_type_id_t type; preludedb_selected_path_flags_t flags; }; struct db_result { preludedb_sql_table_t *table; struct db_value_info *values_info; unsigned int value_count; }; static int get_message_idents_set_order(preludedb_sql_t *sql, idmef_class_id_t message_type, preludedb_result_idents_order_t order, classic_sql_join_t *join, classic_sql_select_t *select) { preludedb_selected_path_t *selected_path; idmef_path_t *path; int ret; if ( message_type == IDMEF_CLASS_ID_ALERT ) ret = idmef_path_new_fast(&path, "alert.create_time"); else ret = idmef_path_new_fast(&path, "heartbeat.create_time"); if ( ret < 0 ) return ret; ret = preludedb_selected_path_new(&selected_path, path, (order == PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC ? PRELUDEDB_SELECTED_OBJECT_ORDER_DESC : PRELUDEDB_SELECTED_OBJECT_ORDER_ASC)); if ( ret < 0 ) { idmef_path_destroy(path); return ret; } ret = classic_path_resolve_selected(sql, selected_path, join, select); preludedb_selected_path_destroy(selected_path); return ret; } static int get_message_idents(preludedb_sql_t *sql, idmef_class_id_t message_type, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_sql_table_t **table) { prelude_string_t *query; prelude_string_t *where = NULL; classic_sql_join_t *join; classic_sql_select_t *select; int ret; ret = prelude_string_new(&query); if ( ret < 0 ) return ret; ret = classic_sql_join_new(&join); if ( ret < 0 ) { prelude_string_destroy(query); return ret; } ret = classic_sql_select_new(&select); if ( ret < 0 ) { prelude_string_destroy(query); classic_sql_join_destroy(join); return ret; } classic_sql_join_set_top_class(join, message_type); ret = classic_sql_select_add_field(select, "DISTINCT(top_table._ident)", 0); if ( ret < 0 ) goto error; if ( order ) { ret = get_message_idents_set_order(sql, message_type, order, join, select); if ( ret < 0 ) return ret; } if ( criteria ) { ret = prelude_string_new(&where); if ( ret < 0 ) goto error; ret = classic_path_resolve_criteria(sql, criteria, join, where); if ( ret < 0 ) { prelude_string_destroy(where); goto error; } } ret = prelude_string_sprintf(query, "SELECT "); if ( ret < 0 ) goto error; ret = classic_sql_select_fields_to_string(select, query); if ( ret < 0 ) goto error; ret = prelude_string_cat(query, " FROM "); if ( ret < 0 ) goto error; ret = classic_sql_join_to_string(join, query); if ( ret < 0 ) goto error; if ( where ) { ret = prelude_string_cat(query, " WHERE "); if ( ret < 0 ) goto error; ret = prelude_string_cat(query, prelude_string_get_string(where)); if ( ret < 0 ) goto error; } ret = classic_sql_select_modifiers_to_string(select, query); if ( ret < 0 ) goto error; ret = preludedb_sql_build_limit_offset_string(sql, limit, offset, query); if ( ret < 0 ) goto error; ret = preludedb_sql_query(sql, prelude_string_get_string(query), table); error: prelude_string_destroy(query); if ( where ) prelude_string_destroy(where); classic_sql_join_destroy(join); classic_sql_select_destroy(select); return ret; } static int classic_get_alert_idents(preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res) { return get_message_idents(sql, IDMEF_CLASS_ID_ALERT, criteria, limit, offset, order, (preludedb_sql_table_t **) res); } static int classic_get_heartbeat_idents(preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res) { return get_message_idents(sql, IDMEF_CLASS_ID_HEARTBEAT, criteria, limit, offset, order, (preludedb_sql_table_t **) res); } static size_t classic_get_message_ident_count(void *res) { return preludedb_sql_table_get_row_count(res); } static int classic_get_next_message_ident(void *res, uint64_t *ident) { preludedb_sql_row_t *row; preludedb_sql_field_t *field; int ret; ret = preludedb_sql_table_fetch_row(res, &row); if ( ret <= 0 ) return ret; ret = preludedb_sql_row_fetch_field(row, 0, &field); if ( ret <= 0 ) return ret; ret = preludedb_sql_field_to_uint64(field, ident); return (ret < 0) ? ret : 1; } static void classic_destroy_message_idents_resource(void *res) { preludedb_sql_table_destroy(res); } static int classic_get_values(preludedb_sql_t *sql, preludedb_path_selection_t *selection, idmef_criteria_t *criteria, int distinct, int limit, int offset, void **res) { prelude_string_t *where = NULL; prelude_string_t *query; classic_sql_join_t *join; classic_sql_select_t *select; int ret; ret = classic_sql_join_new(&join); if ( ret < 0 ) return ret; ret = classic_sql_select_new(&select); if ( ret < 0 ) { classic_sql_join_destroy(join); return ret; } ret = prelude_string_new(&query); if ( ret < 0 ) { classic_sql_join_destroy(join); classic_sql_select_destroy(select); return ret; } ret = classic_path_resolve_selection(sql, selection, join, select); if ( ret < 0 ) goto error; if ( criteria ) { ret = prelude_string_new(&where); if ( ret < 0 ) goto error; ret = classic_path_resolve_criteria(sql, criteria, join, where); if ( ret < 0 ) goto error; } ret = prelude_string_cat(query, "SELECT "); if ( ret < 0 ) goto error; if ( distinct ) { ret = prelude_string_cat(query, "DISTINCT "); if ( ret < 0 ) goto error; } ret = classic_sql_select_fields_to_string(select, query); if ( ret < 0 ) goto error; ret = prelude_string_cat(query, " FROM "); if ( ret < 0 ) goto error; ret = classic_sql_join_to_string(join, query); if ( ret < 0 ) goto error; if ( where ) { ret = prelude_string_sprintf(query, " WHERE %s", prelude_string_get_string(where)); if ( ret < 0 ) goto error; } ret = classic_sql_select_modifiers_to_string(select, query); if ( ret < 0 ) goto error; ret = preludedb_sql_build_limit_offset_string(sql, limit, offset, query); if ( ret < 0 ) goto error; ret = preludedb_sql_query(sql, prelude_string_get_string(query), (preludedb_sql_table_t **) res); error: prelude_string_destroy(query); if ( where ) prelude_string_destroy(where); classic_sql_join_destroy(join); classic_sql_select_destroy(select); return ret; } static int get_value(preludedb_sql_row_t *row, int cnt, preludedb_selected_path_t *selected, idmef_value_t **value) { preludedb_selected_path_flags_t flags; idmef_path_t *path; idmef_value_type_id_t type; preludedb_sql_field_t *field; const char *char_val; unsigned int retrieved = 1; int ret; prelude_bool_t multiple_time_field = FALSE; flags = preludedb_selected_path_get_flags(selected); path = preludedb_selected_path_get_path(selected); type = idmef_path_get_value_type(path, idmef_path_get_depth(path) - 1); ret = preludedb_sql_row_fetch_field(row, cnt, &field); if ( ret < 0 ) return ret; if ( type == IDMEF_VALUE_TYPE_TIME && ! (flags & (PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN|PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX| PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG|PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD)) ) multiple_time_field = TRUE; if ( ret == 0 ) { *value = NULL; return (multiple_time_field) ? 3 : 1; } char_val = preludedb_sql_field_get_value(field); if ( flags & PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT ) { uint32_t count; ret = preludedb_sql_field_to_uint32(field, &count); if ( ret < 0 ) return ret; ret = idmef_value_new_uint32(value, count); if ( ret < 0 ) return ret; return 1; } switch ( type ) { case IDMEF_VALUE_TYPE_TIME: { uint32_t usec = 0; int32_t gmtoff = 0; idmef_time_t *time; if ( multiple_time_field ) { preludedb_sql_field_t *gmtoff_field, *usec_field; ret = preludedb_sql_row_fetch_field(row, cnt + 1, &gmtoff_field); if ( ret < 0 ) return ret; if ( ret > 0 ) { ret = preludedb_sql_field_to_int32(gmtoff_field, &gmtoff); if ( ret < 0 ) return ret; } ret = preludedb_sql_row_fetch_field(row, cnt + 2, &usec_field); if ( ret < 0 ) return ret; if ( ret > 0 ) { if ( preludedb_sql_field_to_uint32(usec_field, &usec) < 0 ) return ret; } retrieved += 2; } ret = idmef_time_new(&time); if ( ret < 0 ) return ret; preludedb_sql_time_from_timestamp(time, char_val, gmtoff, usec); ret = idmef_value_new_time(value, time); if ( ret < 0 ) { idmef_time_destroy(time); return ret; } break; } default: ret = idmef_value_new_from_path(value, path, char_val); if ( ret < 0 ) return ret; } return retrieved; } static int classic_get_next_values(void *res, preludedb_path_selection_t *selection, idmef_value_t ***values) { preludedb_sql_row_t *row; preludedb_selected_path_t *selected; unsigned int sql_cnt, value_cnt; unsigned int column_count; int ret; ret = preludedb_sql_table_fetch_row(res, &row); if ( ret <= 0 ) return ret; column_count = preludedb_path_selection_get_count(selection); *values = malloc(column_count * sizeof (**values)); if ( ! *values ) return preludedb_error_from_errno(errno); selected = NULL; sql_cnt = 0; for ( value_cnt = 0; value_cnt < column_count; value_cnt++ ) { selected = preludedb_path_selection_get_next(selection, selected); ret = get_value(row, sql_cnt, selected, *values + value_cnt); if ( ret < 0 ) break; sql_cnt += ret; } if ( ret < 0 ) { unsigned int cnt; for ( cnt = 0; cnt < value_cnt; cnt++ ) idmef_value_destroy((*values)[cnt]); free(*values); return ret; } return value_cnt; } static void classic_destroy_values_resource(void *res) { preludedb_sql_table_destroy(res); } static int classic_check_schema_version(const char *version) { double d; if ( ! version ) return preludedb_error(PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID); if ( sscanf(version, "%lf", &d) <= 0 ) return preludedb_error(PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID); if ( d > CLASSIC_SCHEMA_VERSION ) return preludedb_error_verbose(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT, "Database schema version %g is too recent (%g required)", d, CLASSIC_SCHEMA_VERSION); if ( d < CLASSIC_SCHEMA_VERSION ) return preludedb_error_verbose(PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD, "Database schema version %g is too old (%g required)", d, CLASSIC_SCHEMA_VERSION); return 0; } int classic_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data) { int ret; preludedb_plugin_format_t *plugin; ret = preludedb_plugin_format_new(&plugin); if ( ret < 0 ) return ret; prelude_plugin_set_name((prelude_plugin_generic_t *) plugin, "Classic"); prelude_plugin_entry_set_plugin(pe, (void *) plugin); preludedb_plugin_format_set_check_schema_version_func(plugin, classic_check_schema_version); preludedb_plugin_format_set_get_alert_idents_func(plugin, classic_get_alert_idents); preludedb_plugin_format_set_get_heartbeat_idents_func(plugin, classic_get_heartbeat_idents); preludedb_plugin_format_set_get_message_ident_count_func(plugin, classic_get_message_ident_count); preludedb_plugin_format_set_get_next_message_ident_func(plugin, classic_get_next_message_ident); preludedb_plugin_format_set_destroy_message_idents_resource_func(plugin, classic_destroy_message_idents_resource); preludedb_plugin_format_set_get_alert_func(plugin, classic_get_alert); preludedb_plugin_format_set_get_heartbeat_func(plugin, classic_get_heartbeat); preludedb_plugin_format_set_delete_alert_func(plugin, classic_delete_alert); preludedb_plugin_format_set_delete_alert_from_list_func(plugin, classic_delete_alert_from_list); preludedb_plugin_format_set_delete_alert_from_result_idents_func(plugin, classic_delete_alert_from_result_idents); preludedb_plugin_format_set_delete_heartbeat_func(plugin, classic_delete_heartbeat); preludedb_plugin_format_set_delete_heartbeat_from_list_func(plugin, classic_delete_heartbeat_from_list); preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func(plugin, classic_delete_heartbeat_from_result_idents); preludedb_plugin_format_set_insert_message_func(plugin, classic_insert); preludedb_plugin_format_set_get_values_func(plugin, classic_get_values); preludedb_plugin_format_set_get_next_values_func(plugin, classic_get_next_values); preludedb_plugin_format_set_destroy_values_resource_func(plugin, classic_destroy_values_resource); return 0; } int classic_LTX_prelude_plugin_version(void) { return PRELUDE_PLUGIN_API_VERSION; } libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-5.sql0000664000076400007640000000050511226653036021211 00000000000000BEGIN; UPDATE _format SET version='14.5'; ALTER TABLE Prelude_SnmpService DROP COLUMN community; ALTER TABLE Prelude_SnmpService ADD COLUMN message_processing_model INT8 NULL; ALTER TABLE Prelude_SnmpService ADD COLUMN security_model INT8 NULL; ALTER TABLE Prelude_SnmpService ADD COLUMN security_level INT8 NULL; COMMIT; libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-4.sql0000664000076400007640000000014611226653036021230 00000000000000UPDATE _format SET version="14.4"; ALTER TABLE Prelude_AdditionalData CHANGE data data BLOB NOT NULL; libpreludedb-1.0.0/plugins/format/classic/classic-sql-select.c0000664000076400007640000001353311326045005021332 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include "preludedb-path-selection.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "classic-sql-select.h" struct classic_sql_select { prelude_string_t *fields; unsigned int field_count; prelude_string_t *order_by; prelude_string_t *group_by; }; int classic_sql_select_new(classic_sql_select_t **select) { int ret; *select = calloc(1, sizeof (**select)); if ( ! *select ) return prelude_error_from_errno(errno); ret = prelude_string_new(&(*select)->fields); if ( ret < 0 ) { free(*select); return ret; } ret = prelude_string_new(&(*select)->order_by); if ( ret < 0 ) { prelude_string_destroy((*select)->fields); free(*select); return ret; } ret = prelude_string_new(&(*select)->group_by); if ( ret < 0 ) { prelude_string_destroy((*select)->fields); prelude_string_destroy((*select)->order_by); free(*select); return ret; } return 0; } void classic_sql_select_destroy(classic_sql_select_t *select) { prelude_string_destroy(select->fields); prelude_string_destroy(select->order_by); prelude_string_destroy(select->group_by); free(select); } int classic_sql_select_add_field(classic_sql_select_t *select, const char *field_name, preludedb_selected_path_flags_t flags) { static const struct { int flag; const char *function_name; } sql_functions_table[] = { { PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN, "MIN" }, { PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX, "MAX" }, { PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG, "AVG" }, { PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD, "STD" }, { PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT, "COUNT" } }; unsigned int i; const char *function_name = NULL; int ret; if ( ! prelude_string_is_empty(select->fields) ) { ret = prelude_string_cat(select->fields, ", "); if ( ret < 0 ) return ret; } for ( i = 0; i < sizeof (sql_functions_table) / sizeof (sql_functions_table[0]); i++ ) { if ( flags & sql_functions_table[i].flag ) { function_name = sql_functions_table[i].function_name; break; } } if ( function_name ) ret = prelude_string_sprintf(select->fields, "%s(%s)", function_name, field_name); else ret = prelude_string_cat(select->fields, field_name); if ( ret < 0 ) return ret; select->field_count++; if ( flags & PRELUDEDB_SELECTED_OBJECT_GROUP_BY ) { if ( ! prelude_string_is_empty(select->group_by) ) { ret = prelude_string_cat(select->group_by, ", "); if ( ret < 0 ) return ret; } ret = prelude_string_sprintf(select->group_by, "%d", select->field_count); if ( ret < 0 ) return ret; } if ( flags & (PRELUDEDB_SELECTED_OBJECT_ORDER_ASC|PRELUDEDB_SELECTED_OBJECT_ORDER_DESC) ) { if ( ! prelude_string_is_empty(select->order_by) ) { ret = prelude_string_cat(select->order_by, ", "); if ( ret < 0 ) return ret; } ret = prelude_string_sprintf(select->order_by, "%d %s", select->field_count, (flags & PRELUDEDB_SELECTED_OBJECT_ORDER_ASC) ? "ASC" : "DESC"); if ( ret < 0 ) return ret; } return 0; } int classic_sql_select_fields_to_string(classic_sql_select_t *select, prelude_string_t *output) { return prelude_string_ncat(output, prelude_string_get_string(select->fields), prelude_string_get_len(select->fields)); } int classic_sql_select_modifiers_to_string(classic_sql_select_t *select, prelude_string_t *output) { int ret; if ( ! prelude_string_is_empty(select->group_by) ) { ret = prelude_string_sprintf(output, " GROUP BY %s", prelude_string_get_string(select->group_by)); if ( ret < 0 ) return ret; } if ( ! prelude_string_is_empty(select->order_by) ) { ret = prelude_string_sprintf(output, " ORDER BY %s", prelude_string_get_string(select->order_by)); if ( ret < 0 ) return ret; } return 0; } libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-4.sql0000664000076400007640000000014711226653036021212 00000000000000UPDATE _format SET version='14.4'; ALTER TABLE Prelude_AdditionalData ALTER COLUMN data SET NOT NULL; libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-3.sql0000664000076400007640000000014411226653036021206 00000000000000UPDATE _format SET version='14.3'; ALTER TABLE Prelude_SNMPService RENAME TO Prelude_SnmpService; libpreludedb-1.0.0/plugins/format/classic/classic-sql-join.c0000664000076400007640000002617311330530466021023 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include "preludedb-path-selection.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "classic-sql-join.h" struct classic_sql_joined_table { prelude_list_t list; const idmef_path_t *path; char *table_name; char aliased_table_name[16]; char parent_type; prelude_string_t *index_constraints; }; struct classic_sql_join { idmef_class_id_t top_class; prelude_list_t tables; unsigned int next_id; }; int classic_sql_join_new(classic_sql_join_t **join) { *join = calloc(1, sizeof (**join)); if ( ! *join ) return prelude_error_from_errno(errno); prelude_list_init(&(*join)->tables); return 0; } void classic_sql_join_destroy(classic_sql_join_t *join) { prelude_list_t *tmp, *next; classic_sql_joined_table_t *table; prelude_list_for_each_safe(&join->tables, tmp, next) { table = prelude_list_entry(tmp, classic_sql_joined_table_t, list); free(table->table_name); prelude_string_destroy(table->index_constraints); prelude_list_del(&table->list); free(table); } free(join); } void classic_sql_join_set_top_class(classic_sql_join_t *join, idmef_class_id_t top_class) { join->top_class = top_class; } classic_sql_joined_table_t *classic_sql_join_lookup_table(const classic_sql_join_t *join, const idmef_path_t *path) { prelude_list_t *tmp; classic_sql_joined_table_t *table; unsigned int depth; int last_element_is_listed; int ret; depth = idmef_path_get_depth(path); last_element_is_listed = ((ret = idmef_path_get_index(path, depth - 1)) > -1 || prelude_error_get_code(ret) != PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN); prelude_list_for_each(&join->tables, tmp) { table = prelude_list_entry(tmp, classic_sql_joined_table_t, list); if ( depth == idmef_path_get_depth(table->path) ) { if ( last_element_is_listed || (idmef_path_get_value_type(path, -1) == IDMEF_VALUE_TYPE_TIME && idmef_path_get_class(path, depth - 2) != IDMEF_CLASS_ID_FILE) ) ret = idmef_path_compare(path, table->path); else ret = idmef_path_ncompare(path, table->path, depth - 1); if ( ret == 0 ) return table; } } return NULL; } static char resolve_file_parent_type(const idmef_path_t *path) { if ( idmef_path_get_class(path, 3) == IDMEF_CLASS_ID_FILE_ACCESS && idmef_path_get_class(path, 4) == IDMEF_CLASS_ID_USER_ID ) return 'F'; return 0; } static char resolve_target_parent_type(const idmef_path_t *path) { if ( idmef_path_get_depth(path) == 3 ) return 0; if ( idmef_path_get_class(path, 2) == IDMEF_CLASS_ID_FILE ) return resolve_file_parent_type(path); return 'T'; } static char resolve_source_parent_type(const idmef_path_t *path) { return (idmef_path_get_depth(path) > 3) ? 'S' : 0; } static char resolve_tool_alert_parent_type(const idmef_path_t *path) { if ( idmef_path_get_class(path, 2) == IDMEF_CLASS_ID_ALERTIDENT ) return 'T'; return 0; } static char resolve_correlation_alert_parent_type(const idmef_path_t *path) { if ( idmef_path_get_class(path, 2) == IDMEF_CLASS_ID_ALERTIDENT ) return 'C'; return 0; } static char resolve_alert_parent_type(const idmef_path_t *path) { switch ( idmef_path_get_class(path, 1) ) { case IDMEF_CLASS_ID_CLASSIFICATION: case IDMEF_CLASS_ID_ASSESSMENT: case IDMEF_CLASS_ID_OVERFLOW_ALERT: return 0; case IDMEF_CLASS_ID_TOOL_ALERT: return resolve_tool_alert_parent_type(path); case IDMEF_CLASS_ID_CORRELATION_ALERT: return resolve_correlation_alert_parent_type(path); case IDMEF_CLASS_ID_SOURCE: return resolve_source_parent_type(path); case IDMEF_CLASS_ID_TARGET: return resolve_target_parent_type(path); default: /* nop */; } if ( strcmp(idmef_path_get_name(path, idmef_path_get_depth(path) - 1), "detect_time") == 0 ) return 0; return 'A'; } static char resolve_parent_type(const idmef_path_t *path) { if ( idmef_path_get_class(path, 0) == IDMEF_CLASS_ID_HEARTBEAT ) return 'H'; return resolve_alert_parent_type(path); } static int add_index_constraint(classic_sql_joined_table_t *table, int parent_level, int index) { int ret; const char *operator; if ( ! prelude_string_is_empty(table->index_constraints) ) { ret = prelude_string_cat(table->index_constraints, " AND "); if ( ret < 0 ) return ret; } if ( index >= -1 ) operator = "="; else { /* index is PRELUDE_ERROR_IDMEF_PATH_INDEX_UNDEFINED */ index = -1; operator = "!="; } if ( parent_level == -1 ) ret = prelude_string_sprintf(table->index_constraints, "%s._index %s %d", table->aliased_table_name, operator, index); else ret = prelude_string_sprintf(table->index_constraints, "%s._parent%d_index %s %d", table->aliased_table_name, parent_level, operator, index); return ret; } static int resolve_indexes(classic_sql_joined_table_t *table) { unsigned int depth; unsigned int max_depth; unsigned int parent_level; int index, index1, index2; int ret = 0; max_depth = idmef_path_get_depth(table->path); if ( max_depth < 2 ) return preludedb_error(PRELUDEDB_ERROR_QUERY); parent_level = 0; for ( depth = 1; depth < max_depth - 2; depth++ ) { index = idmef_path_get_index(table->path, depth); if ( prelude_error_get_code(index) == PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN ) continue; ret = add_index_constraint(table, parent_level, index); if ( ret < 0 ) return ret; parent_level++; } index1 = idmef_path_get_index(table->path, max_depth - 1); index2 = idmef_path_get_index(table->path, max_depth - 2); if ( prelude_error_get_code(index = index1) != PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN || prelude_error_get_code(index = index2) != PRELUDE_ERROR_IDMEF_PATH_INDEX_FORBIDDEN ) ret = add_index_constraint(table, -1, index); return ret; } int classic_sql_join_new_table(classic_sql_join_t *join, classic_sql_joined_table_t **table, const idmef_path_t *path, char *table_name) { int ret; idmef_class_id_t top_class; top_class = idmef_path_get_class(path, 0); if ( join->top_class ) { if ( top_class != join->top_class ) return -1; /* conflicting top tables */ } else { join->top_class = top_class; } *table = calloc(1, sizeof (**table)); if ( ! *table ) return prelude_error_from_errno(errno); ret = prelude_string_new(&(*table)->index_constraints); if ( ret < 0 ) { free(*table); return ret; } (*table)->path = path; (*table)->table_name = table_name; sprintf((*table)->aliased_table_name, "t%d", join->next_id++); (*table)->parent_type = resolve_parent_type((*table)->path); ret = resolve_indexes(*table); if ( ret < 0 ) { prelude_string_destroy((*table)->index_constraints); free((*table)->table_name); free(*table); return ret; } prelude_list_add_tail(&join->tables, &(*table)->list); return 0; } const char *classic_sql_joined_table_get_name(classic_sql_joined_table_t *table) { return table->aliased_table_name; } static int classic_joined_table_to_string(classic_sql_joined_table_t *table, prelude_string_t *output) { int ret; ret = prelude_string_sprintf(output, " LEFT JOIN %s AS %s ON (", table->table_name, table->aliased_table_name); if ( ret < 0 ) return ret; if ( table->parent_type ) { ret = prelude_string_sprintf(output, "%s._parent_type='%c' AND ", table->aliased_table_name, table->parent_type); if ( ret < 0 ) return ret; } ret = prelude_string_sprintf(output, "%s._message_ident=top_table._ident", table->aliased_table_name); if ( ret < 0 ) return ret; if ( ! prelude_string_is_empty(table->index_constraints) ) { ret = prelude_string_sprintf(output, " AND %s", prelude_string_get_string(table->index_constraints)); if ( ret < 0 ) return ret; } return prelude_string_cat(output, ")"); } int classic_sql_join_to_string(classic_sql_join_t *join, prelude_string_t *output) { prelude_list_t *tmp; classic_sql_joined_table_t *table; int ret; ret = prelude_string_sprintf(output, "%s AS top_table", (join->top_class == IDMEF_CLASS_ID_ALERT) ? "Prelude_Alert" : "Prelude_Heartbeat"); if ( ret < 0 ) return ret; prelude_list_for_each(&join->tables, tmp) { table = prelude_list_entry(tmp, classic_sql_joined_table_t, list); ret = classic_joined_table_to_string(table, output); if ( ret < 0 ) return ret; } return 0; } libpreludedb-1.0.0/plugins/format/classic/sqlite-update-14-7.sql0000664000076400007640000000004311226653036021363 00000000000000UPDATE _format SET version="14.7"; libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-7.sql0000664000076400007640000000026611226653036021217 00000000000000BEGIN; UPDATE _format SET version='14.7'; ALTER TABLE Prelude_Impact ALTER COLUMN description TYPE TEXT; ALTER TABLE Prelude_Impact ALTER COLUMN description DROP NOT NULL; COMMIT; libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-2.sql0000664000076400007640000000313711226653036021231 00000000000000ALTER TABLE Prelude_Impact CHANGE severity severity ENUM("info", "low", "medium", "high") NULL; UPDATE _format SET version="14.2"; ALTER TABLE Prelude_Address DROP INDEX _parent_type; CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address(10)); ALTER TABLE Prelude_Analyzer DROP INDEX _parent_type; ALTER TABLE Prelude_Analyzer DROP INDEX _parent_type_2; CREATE INDEX prelude_analyzer_index_analyzerid ON Prelude_Analyzer (_parent_type, _index, analyzerid); CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type, _index, model); ALTER TABLE Prelude_Classification DROP INDEX text; CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text(40)); ALTER TABLE Prelude_File ADD COLUMN file_type VARCHAR(255) NULL; ALTER TABLE Prelude_Node DROP INDEX _parent_type; ALTER TABLE Prelude_Node DROP INDEX _parent_type_2; CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location(20)); CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name(20)); ALTER TABLE Prelude_Reference DROP INDEX name; CREATE INDEX prelude_reference_index_name ON Prelude_Reference (name(40)); ALTER TABLE Prelude_Service DROP INDEX prelude_service_index_protocol_port; ALTER TABLE Prelude_Service DROP INDEX prelude_service_index_protocol_name; CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol(10),port); CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol(10),name(10)); libpreludedb-1.0.0/plugins/format/classic/sqlite.sql0000664000076400007640000002436011226653036017525 00000000000000 CREATE TABLE _format ( name TEXT NOT NULL, version TEXT NOT NULL ); INSERT INTO _format (name, version) VALUES('classic', '14.7'); CREATE TABLE Prelude_Alert ( _ident INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, messageid TEXT NULL ) ; CREATE INDEX prelude_alert_messageid ON Prelude_Alert (messageid); CREATE TABLE Prelude_Alertident ( _message_ident INTEGER NOT NULL, _index INTEGER NOT NULL, _parent_type TEXT NOT NULL, alertident TEXT NOT NULL, analyzerid TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) ; CREATE TABLE Prelude_ToolAlert ( _message_ident INTEGER NOT NULL PRIMARY KEY, name TEXT NOT NULL, command TEXT NULL ) ; CREATE TABLE Prelude_CorrelationAlert ( _message_ident INTEGER NOT NULL PRIMARY KEY, name TEXT NOT NULL ) ; CREATE TABLE Prelude_OverflowAlert ( _message_ident INTEGER NOT NULL PRIMARY KEY, program TEXT NOT NULL, size INTEGER NULL, buffer BLOB NULL ) ; CREATE TABLE Prelude_Heartbeat ( _ident INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, messageid TEXT NULL, heartbeat_interval INTEGER NULL ) ; CREATE TABLE Prelude_Analyzer ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _index INTEGER NOT NULL, analyzerid TEXT NULL, name TEXT NULL, manufacturer TEXT NULL, model TEXT NULL, version TEXT NULL, class TEXT NULL, ostype TEXT NULL, osversion TEXT NULL, PRIMARY KEY (_parent_type,_message_ident,_index) ) ; CREATE INDEX prelude_analyzer_analyzerid ON Prelude_Analyzer (_parent_type,_index,analyzerid); CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type,_index,model); CREATE TABLE Prelude_Classification ( _message_ident INTEGER NOT NULL PRIMARY KEY, ident TEXT NULL, text TEXT NOT NULL ) ; CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text); CREATE TABLE Prelude_Reference ( _message_ident INTEGER NOT NULL, _index INTEGER NOT NULL, origin TEXT NOT NULL, name TEXT NOT NULL, url TEXT NOT NULL, meaning TEXT NULL, PRIMARY KEY (_message_ident, _index) ) ; CREATE INDEX prelude_reference_index_name ON Prelude_Reference (name); CREATE TABLE Prelude_Source ( _message_ident INTEGER NOT NULL, _index INTEGER NOT NULL, ident TEXT NULL, spoofed TEXT NOT NULL, interface TEXT NULL, PRIMARY KEY (_message_ident, _index) ) ; CREATE TABLE Prelude_Target ( _message_ident INTEGER NOT NULL, _index INTEGER NOT NULL, ident TEXT NULL, decoy TEXT NOT NULL, interface TEXT NULL, PRIMARY KEY (_message_ident, _index) ) ; CREATE TABLE Prelude_File ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _index INTEGER NOT NULL, ident TEXT NULL, path TEXT NOT NULL, name TEXT NOT NULL, category TEXT NULL, create_time DATETIME NULL, create_time_gmtoff INTEGER NULL, modify_time DATETIME NULL, modify_time_gmtoff INTEGER NULL, access_time DATETIME NULL, access_time_gmtoff INTEGER NULL, data_size INTEGER NULL, disk_size INTEGER NULL, fstype TEXT NULL, file_type TEXT NULL, PRIMARY KEY (_message_ident, _parent0_index, _index) ) ; CREATE TABLE Prelude_FileAccess ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, _index INTEGER NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; CREATE TABLE Prelude_FileAccess_Permission ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, _parent2_index INTEGER NOT NULL, _index INTEGER NOT NULL, permission TEXT NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _parent2_index, _index) ) ; CREATE TABLE Prelude_Linkage ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, _index INTEGER NOT NULL, category TEXT NOT NULL, name TEXT NOT NULL, path TEXT NOT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; CREATE TABLE Prelude_Inode ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, change_time DATETIME NULL, change_time_gmtoff INTEGER NULL, number INTEGER NULL, major_device INTEGER NULL, minor_device INTEGER NULL, c_major_device INTEGER NULL, c_minor_device INTEGER NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index) ) ; CREATE TABLE Prelude_Checksum ( _message_ident INTEGER NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, _index INTEGER NOT NULL, algorithm TEXT NOT NULL, value TEXT NOT NULL, checksum_key TEXT NULL, PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index) ) ; CREATE TABLE Prelude_Impact ( _message_ident INTEGER NOT NULL PRIMARY KEY, description TEXT NULL, severity TEXT NULL, completion TEXT NULL, type TEXT NOT NULL ) ; CREATE INDEX prelude_impact_index_severity ON Prelude_Impact (severity); CREATE INDEX prelude_impact_index_completion ON Prelude_Impact (completion); CREATE INDEX prelude_impact_index_type ON Prelude_Impact (type); CREATE TABLE Prelude_Action ( _message_ident INTEGER NOT NULL, _index INTEGER NOT NULL, description TEXT NULL, category TEXT NOT NULL, PRIMARY KEY (_message_ident, _index) ) ; CREATE TABLE Prelude_Confidence ( _message_ident INTEGER NOT NULL PRIMARY KEY, confidence FLOAT NULL, rating TEXT NOT NULL ) ; CREATE TABLE Prelude_Assessment ( _message_ident INTEGER NOT NULL PRIMARY KEY ) ; CREATE TABLE Prelude_AdditionalData ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _index INTEGER NOT NULL, type TEXT NOT NULL, meaning TEXT NULL, data BLOB NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _index) ) ; CREATE TABLE Prelude_CreateTime ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, time DATETIME NOT NULL, usec INTEGER NOT NULL, gmtoff INTEGER NOT NULL, PRIMARY KEY (_parent_type,_message_ident) ) ; CREATE INDEX prelude_createtime_index ON Prelude_CreateTime (_parent_type,time); CREATE TABLE Prelude_DetectTime ( _message_ident INTEGER NOT NULL PRIMARY KEY, time DATETIME NOT NULL, usec INTEGER NOT NULL, gmtoff INTEGER NOT NULL ) ; CREATE INDEX prelude_detecttime_index ON Prelude_DetectTime (time); CREATE TABLE Prelude_AnalyzerTime ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, time DATETIME NOT NULL, usec INTEGER NOT NULL, gmtoff INTEGER NOT NULL, PRIMARY KEY (_parent_type, _message_ident) ) ; CREATE INDEX prelude_analyzertime_index ON Prelude_AnalyzerTime (_parent_type,time); CREATE TABLE Prelude_Node ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, ident TEXT NULL, category TEXT NULL, location TEXT NULL, name TEXT NULL, PRIMARY KEY(_parent_type, _message_ident, _parent0_index) ) ; CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location); CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name); CREATE TABLE Prelude_Address ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, _index INTEGER NOT NULL, ident TEXT NULL, category TEXT NOT NULL, vlan_name TEXT NULL, vlan_num INTEGER NULL, address TEXT NOT NULL, netmask TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address); CREATE TABLE Prelude_User ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, ident TEXT NULL, category TEXT NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; CREATE TABLE Prelude_UserId ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, _parent1_index INTEGER NOT NULL, _parent2_index INTEGER NOT NULL, _index INTEGER NOT NULL, ident TEXT NULL, type TEXT NOT NULL, name TEXT NULL, tty TEXT NULL, number INTEGER NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _parent1_index, _parent2_index, _index) ) ; CREATE TABLE Prelude_Process ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, ident TEXT NULL, name TEXT NOT NULL, pid INTEGER NULL, path TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; CREATE TABLE Prelude_ProcessArg ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL DEFAULT 'A', _parent0_index INTEGER NOT NULL, _index INTEGER NOT NULL, arg TEXT NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; CREATE TABLE Prelude_ProcessEnv ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, _index INTEGER NOT NULL, env TEXT NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; CREATE TABLE Prelude_Service ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, ident TEXT NULL, ip_version INTEGER NULL, name TEXT NULL, port INTEGER NULL, iana_protocol_number INTEGER NULL, iana_protocol_name TEXT NULL, portlist VARCHAR NULL, protocol TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol,port); CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol,name); CREATE TABLE Prelude_WebService ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, url TEXT NOT NULL, cgi TEXT NULL, http_method TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; CREATE TABLE Prelude_WebServiceArg ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, _index INTEGER NOT NULL, arg TEXT NOT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index, _index) ) ; CREATE TABLE Prelude_SnmpService ( _message_ident INTEGER NOT NULL, _parent_type TEXT NOT NULL, _parent0_index INTEGER NOT NULL, snmp_oid TEXT NULL, message_processing_model INTEGER NULL, security_model INTEGER NULL, security_name TEXT NULL, security_level INTEGER NULL, context_name TEXT NULL, context_engine_id TEXT NULL, command TEXT NULL, PRIMARY KEY (_parent_type, _message_ident, _parent0_index) ) ; libpreludedb-1.0.0/plugins/format/classic/pgsql-update-14-2.sql0000664000076400007640000004264411226653036021220 00000000000000UPDATE _format SET version='14.2'; ALTER TABLE Prelude_Alertident ADD COLUMN _index INT4; ALTER TABLE Prelude_Alertident ALTER COLUMN _index SET NOT NULL; ALTER TABLE Prelude_Alertident ADD PRIMARY KEY (_parent_type, _message_ident, _index); DROP INDEX prelude_alert_ident; DROP INDEX prelude_analyzer_index_model; CREATE INDEX prelude_analyzer_index_model ON Prelude_Analyzer (_parent_type,_index,model); /* Update the data type of the column _index from Prelude_Analyzer */ ALTER TABLE Prelude_Analyzer ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Analyzer SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Analyzer DROP COLUMN _index; ALTER TABLE Prelude_Analyzer RENAME temp_useless_column to _index; /* Prelude_Analyzer->_index data type updated*/ DROP INDEX prelude_classification_index; CREATE INDEX prelude_classification_index_text ON Prelude_Classification (text); ALTER TABLE Prelude_Reference ADD PRIMARY KEY (_message_ident, _index); DROP INDEX prelude_reference_index_message_ident; /* Update the data type of the column _index from Prelude_Reference */ ALTER TABLE Prelude_Reference ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Reference SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Reference DROP COLUMN _index; ALTER TABLE Prelude_Reference RENAME temp_useless_column to _index; /* Prelude_Reference->_index data type updated*/ /* Update the data type of the column _index from Prelude_Source */ ALTER TABLE Prelude_Source ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Source SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Source DROP COLUMN _index; ALTER TABLE Prelude_Source RENAME temp_useless_column to _index; /* Prelude_Source->_index data type updated*/ /* Update the data type of the column _index from Prelude_Target */ ALTER TABLE Prelude_Target ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Target SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Target DROP COLUMN _index; ALTER TABLE Prelude_Target RENAME temp_useless_column to _index; /* Prelude_Target->_index data type updated*/ ALTER TABLE Prelude_File ADD COLUMN file_type VARCHAR(255) NULL; /* Update the data type of the column _parent0_index from Prelude_File */ ALTER TABLE Prelude_File ADD COLUMN temp_useless_column INT4; UPDATE Prelude_File SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_File DROP COLUMN _parent0_index; ALTER TABLE Prelude_File RENAME temp_useless_column to _parent0_index; /* Prelude_File->_parent0_index data type updated*/ /* Update the data type of the column _index from Prelude_File */ ALTER TABLE Prelude_File ADD COLUMN temp_useless_column INT4; UPDATE Prelude_File SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_File DROP COLUMN _index; ALTER TABLE Prelude_File RENAME temp_useless_column to _index; /* Prelude_File->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_FileAccess */ ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_FileAccess DROP COLUMN _parent0_index; ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _parent0_index; /* Prelude_FileAccess->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_FileAccess */ ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_FileAccess DROP COLUMN _parent1_index; ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _parent1_index; /* Prelude_FileAccess->_parent1_index data type updated*/ /* Update the data type of the column _index from Prelude_FileAccess */ ALTER TABLE Prelude_FileAccess ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_FileAccess DROP COLUMN _index; ALTER TABLE Prelude_FileAccess RENAME temp_useless_column to _index; /* Prelude_FileAccess->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_FileAccess_Permission */ ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent0_index; ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent0_index; /* Prelude_FileAccess_Permission->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_FileAccess_Permission */ ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent1_index; ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent1_index; /* Prelude_FileAccess_Permission->_parent1_index data type updated*/ /* Update the data type of the column _parent2_index from Prelude_FileAccess_Permission */ ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_parent2_index AS INT4); ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _parent2_index; ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _parent2_index; /* Prelude_FileAccess_Permission->_parent2_index data type updated*/ /* Update the data type of the column _index from Prelude_FileAccess_Permission */ ALTER TABLE Prelude_FileAccess_Permission ADD COLUMN temp_useless_column INT4; UPDATE Prelude_FileAccess_Permission SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_FileAccess_Permission DROP COLUMN _index; ALTER TABLE Prelude_FileAccess_Permission RENAME temp_useless_column to _index; /* Prelude_FileAccess_Permission->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Linkage */ ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Linkage SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Linkage DROP COLUMN _parent0_index; ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _parent0_index; /* Prelude_Linkage->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_Linkage */ ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Linkage SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_Linkage DROP COLUMN _parent1_index; ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _parent1_index; /* Prelude_Linkage->_parent1_index data type updated*/ /* Update the data type of the column _index from Prelude_Linkage */ ALTER TABLE Prelude_Linkage ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Linkage SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Linkage DROP COLUMN _index; ALTER TABLE Prelude_Linkage RENAME temp_useless_column to _index; /* Prelude_Linkage->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Inode */ ALTER TABLE Prelude_Inode ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Inode SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Inode DROP COLUMN _parent0_index; ALTER TABLE Prelude_Inode RENAME temp_useless_column to _parent0_index; /* Prelude_Inode->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_Inode */ ALTER TABLE Prelude_Inode ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Inode SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_Inode DROP COLUMN _parent1_index; ALTER TABLE Prelude_Inode RENAME temp_useless_column to _parent1_index; /* Prelude_Inode->_parent1_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Checksum */ ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Checksum SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Checksum DROP COLUMN _parent0_index; ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _parent0_index; /* Prelude_Checksum->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_Checksum */ ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Checksum SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_Checksum DROP COLUMN _parent1_index; ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _parent1_index; /* Prelude_Checksum->_parent1_index data type updated*/ /* Update the data type of the column _index from Prelude_Checksum */ ALTER TABLE Prelude_Checksum ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Checksum SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Checksum DROP COLUMN _index; ALTER TABLE Prelude_Checksum RENAME temp_useless_column to _index; /* Prelude_Checksum->_index data type updated*/ /* Update the data type of the column _index from Prelude_Action */ ALTER TABLE Prelude_Action ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Action SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Action DROP COLUMN _index; ALTER TABLE Prelude_Action RENAME temp_useless_column to _index; /* Prelude_Action->_index data type updated*/ /* Update the data type of the column _index from Prelude_AdditionalData */ ALTER TABLE Prelude_AdditionalData ADD COLUMN temp_useless_column INT4; UPDATE Prelude_AdditionalData SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_AdditionalData DROP COLUMN _index; ALTER TABLE Prelude_AdditionalData RENAME temp_useless_column to _index; /* Prelude_AdditionalData->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Node */ ALTER TABLE Prelude_Node ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Node SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Node DROP COLUMN _parent0_index; ALTER TABLE Prelude_Node RENAME temp_useless_column to _parent0_index; /* Prelude_Node->_parent0_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Address */ ALTER TABLE Prelude_Address ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Address SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Address DROP COLUMN _parent0_index; ALTER TABLE Prelude_Address RENAME temp_useless_column to _parent0_index; /* Prelude_Address->_parent0_index data type updated*/ /* Update the data type of the column _index from Prelude_Address */ ALTER TABLE Prelude_Address ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Address SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_Address DROP COLUMN _index; ALTER TABLE Prelude_Address RENAME temp_useless_column to _index; /* Prelude_Address->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_User */ ALTER TABLE Prelude_User ADD COLUMN temp_useless_column INT4; UPDATE Prelude_User SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_User DROP COLUMN _parent0_index; ALTER TABLE Prelude_User RENAME temp_useless_column to _parent0_index; /* Prelude_User->_parent0_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_UserId */ ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4; UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_UserId DROP COLUMN _parent0_index; ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent0_index; /* Prelude_UserId->_parent0_index data type updated*/ /* Update the data type of the column _parent1_index from Prelude_UserId */ ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4; UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent1_index AS INT4); ALTER TABLE Prelude_UserId DROP COLUMN _parent1_index; ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent1_index; /* Prelude_UserId->_parent1_index data type updated*/ /* Update the data type of the column _parent2_index from Prelude_UserId */ ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4; UPDATE Prelude_UserId SET temp_useless_column = CAST(_parent2_index AS INT4); ALTER TABLE Prelude_UserId DROP COLUMN _parent2_index; ALTER TABLE Prelude_UserId RENAME temp_useless_column to _parent2_index; /* Prelude_UserId->_parent2_index data type updated*/ /* Update the data type of the column _index from Prelude_UserId */ ALTER TABLE Prelude_UserId ADD COLUMN temp_useless_column INT4; UPDATE Prelude_UserId SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_UserId DROP COLUMN _index; ALTER TABLE Prelude_UserId RENAME temp_useless_column to _index; /* Prelude_UserId->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_Process */ ALTER TABLE Prelude_Process ADD COLUMN temp_useless_column INT4; UPDATE Prelude_Process SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_Process DROP COLUMN _parent0_index; ALTER TABLE Prelude_Process RENAME temp_useless_column to _parent0_index; /* Prelude_Process->_parent0_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_ProcessArg */ ALTER TABLE Prelude_ProcessArg ADD COLUMN temp_useless_column INT4; UPDATE Prelude_ProcessArg SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_ProcessArg DROP COLUMN _parent0_index; ALTER TABLE Prelude_ProcessArg RENAME temp_useless_column to _parent0_index; /* Prelude_ProcessArg->_parent0_index data type updated*/ /* Update the data type of the column _index from Prelude_ProcessArg */ ALTER TABLE Prelude_ProcessArg ADD COLUMN temp_useless_column INT4; UPDATE Prelude_ProcessArg SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_ProcessArg DROP COLUMN _index; ALTER TABLE Prelude_ProcessArg RENAME temp_useless_column to _index; /* Prelude_ProcessArg->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_ProcessEnv */ ALTER TABLE Prelude_ProcessEnv ADD COLUMN temp_useless_column INT4; UPDATE Prelude_ProcessEnv SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_ProcessEnv DROP COLUMN _parent0_index; ALTER TABLE Prelude_ProcessEnv RENAME temp_useless_column to _parent0_index; /* Prelude_ProcessEnv->_parent0_index data type updated*/ /* Update the data type of the column _index from Prelude_ProcessEnv */ ALTER TABLE Prelude_ProcessEnv ADD COLUMN temp_useless_column INT4; UPDATE Prelude_ProcessEnv SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_ProcessEnv DROP COLUMN _index; ALTER TABLE Prelude_ProcessEnv RENAME temp_useless_column to _index; /* Prelude_ProcessEnv->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_WebService */ ALTER TABLE Prelude_WebService ADD COLUMN temp_useless_column INT4; UPDATE Prelude_WebService SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_WebService DROP COLUMN _parent0_index; ALTER TABLE Prelude_WebService RENAME temp_useless_column to _parent0_index; /* Prelude_WebService->_parent0_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_WebServiceArg */ ALTER TABLE Prelude_WebServiceArg ADD COLUMN temp_useless_column INT4; UPDATE Prelude_WebServiceArg SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_WebServiceArg DROP COLUMN _parent0_index; ALTER TABLE Prelude_WebServiceArg RENAME temp_useless_column to _parent0_index; /* Prelude_WebServiceArg->_parent0_index data type updated*/ /* Update the data type of the column _index from Prelude_WebServiceArg */ ALTER TABLE Prelude_WebServiceArg ADD COLUMN temp_useless_column INT4; UPDATE Prelude_WebServiceArg SET temp_useless_column = CAST(_index AS INT4); ALTER TABLE Prelude_WebServiceArg DROP COLUMN _index; ALTER TABLE Prelude_WebServiceArg RENAME temp_useless_column to _index; /* Prelude_WebServiceArg->_index data type updated*/ /* Update the data type of the column _parent0_index from Prelude_SNMPService */ ALTER TABLE Prelude_SNMPService ADD COLUMN temp_useless_column INT4; UPDATE Prelude_SNMPService SET temp_useless_column = CAST(_parent0_index AS INT4); ALTER TABLE Prelude_SNMPService DROP COLUMN _parent0_index; ALTER TABLE Prelude_SNMPService RENAME temp_useless_column to _parent0_index; /* Prelude_SNMPService->_parent0_index data type updated*/ ALTER TABLE Prelude_Linkage ADD PRIMARY KEY (_message_ident, _parent0_index, _parent1_index, _index); ALTER TABLE Prelude_Impact ADD CHECK (severity IN ('info', 'low', 'medium', 'high')); DROP INDEX prelude_node_index_name; DROP INDEX prelude_node_index_location; CREATE INDEX prelude_node_index_location ON Prelude_Node (_parent_type,_parent0_index,location); CREATE INDEX prelude_node_index_name ON Prelude_Node (_parent_type,_parent0_index,name); DROP INDEX prelude_address_index_address; CREATE INDEX prelude_address_index_address ON Prelude_Address (_parent_type,_parent0_index,_index,address); DROP INDEX prelude_service_index_protocol_port; DROP INDEX prelude_service_index_protocol_name; CREATE INDEX prelude_service_index_protocol_port ON Prelude_Service (_parent_type,_parent0_index,protocol, port); CREATE INDEX prelude_service_index_protocol_name ON Prelude_Service (_parent_type,_parent0_index,protocol, name); libpreludedb-1.0.0/plugins/format/classic/mysql-update-14-6.sql0000664000076400007640000000352511226653036021236 00000000000000BEGIN; UPDATE _format SET version="14.6"; ALTER TABLE Prelude_Alertident CHANGE _index _index INTEGER NOT NULL; ALTER TABLE Prelude_Source CHANGE _index _index SMALLINT NOT NULL; ALTER TABLE Prelude_Target CHANGE _index _index SMALLINT NOT NULL; ALTER TABLE Prelude_File CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_FileAccess CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_FileAccess_Permission CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Linkage CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Inode CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Checksum CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Node CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Address CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_User CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_UserId CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Process CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_ProcessArg CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_ProcessEnv CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Service CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_WebService CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_WebServiceArg CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_SnmpService CHANGE _parent0_index _parent0_index SMALLINT NOT NULL; ALTER TABLE Prelude_Checksum CHANGE algorithm algorithm ENUM("MD4", "MD5", "SHA1", "SHA2-256", "SHA2-384", "SHA2-512", "CRC-32", "Haval", "Tiger", "Gost") NOT NULL; COMMIT; libpreludedb-1.0.0/plugins/format/Makefile.in0000664000076400007640000007150311347715643016137 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/format DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = classic all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/format/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/format/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/Makefile.in0000664000076400007640000007146111347715643014652 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = sql format all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/sql/0000775000076400007640000000000011347715760013453 500000000000000libpreludedb-1.0.0/plugins/sql/sqlite3/0000775000076400007640000000000011347715760015037 500000000000000libpreludedb-1.0.0/plugins/sql/sqlite3/Makefile.am0000664000076400007640000000070311226653036017004 00000000000000AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @SQLITE3_CFLAGS@ sqlite3_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ if HAVE_SQLITE3 sqlite3_la_SOURCES = sqlite3.c sqlite3_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @SQLITE3_LDFLAGS@ sqlite3dir = $(sql_plugin_dir) sqlite3_LTLIBRARIES = sqlite3.la endif -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/sql/sqlite3/Makefile.in0000664000076400007640000007226711347715644017043 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/sql/sqlite3 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__installdirs = "$(DESTDIR)$(sqlite3dir)" LTLIBRARIES = $(sqlite3_LTLIBRARIES) @HAVE_SQLITE3_TRUE@sqlite3_la_DEPENDENCIES = \ @HAVE_SQLITE3_TRUE@ $(top_builddir)/src/libpreludedb.la am__sqlite3_la_SOURCES_DIST = sqlite3.c @HAVE_SQLITE3_TRUE@am_sqlite3_la_OBJECTS = sqlite3.lo sqlite3_la_OBJECTS = $(am_sqlite3_la_OBJECTS) sqlite3_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(sqlite3_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_SQLITE3_TRUE@am_sqlite3_la_rpath = -rpath $(sqlite3dir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(sqlite3_la_SOURCES) DIST_SOURCES = $(am__sqlite3_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @SQLITE3_CFLAGS@ sqlite3_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ @HAVE_SQLITE3_TRUE@sqlite3_la_SOURCES = sqlite3.c @HAVE_SQLITE3_TRUE@sqlite3_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @SQLITE3_LDFLAGS@ @HAVE_SQLITE3_TRUE@sqlite3dir = $(sql_plugin_dir) @HAVE_SQLITE3_TRUE@sqlite3_LTLIBRARIES = sqlite3.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/sql/sqlite3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/sql/sqlite3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sqlite3LTLIBRARIES: $(sqlite3_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(sqlite3dir)" || $(MKDIR_P) "$(DESTDIR)$(sqlite3dir)" @list='$(sqlite3_LTLIBRARIES)'; test -n "$(sqlite3dir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sqlite3dir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sqlite3dir)"; \ } uninstall-sqlite3LTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(sqlite3_LTLIBRARIES)'; test -n "$(sqlite3dir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sqlite3dir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sqlite3dir)/$$f"; \ done clean-sqlite3LTLIBRARIES: -test -z "$(sqlite3_LTLIBRARIES)" || rm -f $(sqlite3_LTLIBRARIES) @list='$(sqlite3_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done sqlite3.la: $(sqlite3_la_OBJECTS) $(sqlite3_la_DEPENDENCIES) $(sqlite3_la_LINK) $(am_sqlite3_la_rpath) $(sqlite3_la_OBJECTS) $(sqlite3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite3.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(sqlite3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-sqlite3LTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sqlite3LTLIBRARIES 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 -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-sqlite3LTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sqlite3LTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-sqlite3LTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-sqlite3LTLIBRARIES -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/sql/sqlite3/sqlite3.c0000664000076400007640000004514711326045005016503 00000000000000/***** * * Copyright (C) 2005-2007 PreludeIDS Technologies. All Rights Reserved. * Author: Rob Holland * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "preludedb.h" #include "preludedb-plugin-sql.h" #define SQLITE_BUSY_TIMEOUT INT_MAX /* * Up to SQLite 3.2.2, there was no way to create an user defined * function for the REGEXP operator. In this situation, we use the * GLOB operator in order to define the regexp handler. */ #if SQLITE_VERSION_NUMBER >= 3002002 # define SQLITE_REGEX_OPERATOR "REGEXP" # define SQLITE_REGEX_BIND_OPERATOR "regexp" #else # define SQLITE_REGEX_OPERATOR "GLOB" # define SQLITE_REGEX_BIND_OPERATOR "glob" #endif typedef struct { size_t len; void *data; } sqlite3_field_t; typedef struct { prelude_list_t list; sqlite3_field_t *fields; } sqlite3_row_t; typedef struct { prelude_list_t rows; sqlite3_stmt *statement; unsigned int nrow; unsigned int ncolumn; sqlite3_row_t *current_row; } sqlite3_resource_t; int sqlite3_LTX_prelude_plugin_version(void); int sqlite3_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data); static void sqlite3_regexp(sqlite3_context *context, int argc, sqlite3_value **argv) { int ret; regex_t regex; if ( argc != 2 ) { sqlite3_result_error(context, "Invalid argument count", -1); return; } ret = regcomp(®ex, (const char *) sqlite3_value_text(argv[0]), REG_EXTENDED | REG_NOSUB); if ( ret != 0 ) { sqlite3_result_error(context, "error compiling regular expression", -1); return; } ret = regexec(®ex, (const char *) sqlite3_value_text(argv[1]), 0, NULL, 0); regfree(®ex); sqlite3_result_int(context, (ret == REG_NOMATCH) ? 0 : 1 ); } static int sql_open(preludedb_sql_settings_t *settings, void **session) { int ret; const char *dbfile; dbfile = preludedb_sql_settings_get_file(settings); if ( ! dbfile || ! *dbfile ) return preludedb_error_verbose(PRELUDEDB_ERROR_CONNECTION, "no database file specified"); ret = access(dbfile, F_OK); if ( ret != 0 ) return preludedb_error_verbose(PRELUDEDB_ERROR_CONNECTION, "database file '%s' does not exist", dbfile); ret = sqlite3_open(dbfile, (sqlite3 **) session); if ( ret != SQLITE_OK ) { ret = preludedb_error_verbose(PRELUDEDB_ERROR_CONNECTION, "%s", sqlite3_errmsg(*session)); sqlite3_close(*session); return ret; } ret = sqlite3_create_function(*session, SQLITE_REGEX_BIND_OPERATOR, 2, SQLITE_ANY, NULL, sqlite3_regexp, NULL, NULL); if ( ret != SQLITE_OK ) { ret = preludedb_error_verbose(PRELUDEDB_ERROR_CONNECTION, "%s", sqlite3_errmsg(*session)); sqlite3_close(*session); return ret; } sqlite3_busy_timeout(*session, SQLITE_BUSY_TIMEOUT); return 0; } static void sql_close(void *session) { sqlite3_close(session); } static int sql_escape(void *session, const char *input, size_t input_size, char **output) { char *buffer, *copy; buffer = sqlite3_mprintf("'%q'", input); if ( ! buffer ) return preludedb_error_from_errno(errno); copy = strdup(buffer); if ( ! copy ) { sqlite3_free(buffer); return preludedb_error_from_errno(errno); } sqlite3_free(buffer); *output = copy; return 0; } static int sql_build_limit_offset_string(void *session, int limit, int offset, prelude_string_t *output) { if ( limit >= 0 ) { if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT %d, %d", offset, limit); return prelude_string_sprintf(output, " LIMIT %d", limit); } else if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT %d, -1", offset); return 0; } static sqlite3_row_t *sql_resource_add_row(sqlite3_resource_t *resource, unsigned int cols) { sqlite3_row_t *row; row = malloc(sizeof(*row)); if ( ! row ) return NULL; row->fields = malloc(sizeof(*row->fields) * cols); if ( ! row->fields ) { free(row); return NULL; } resource->nrow++; prelude_list_add_tail(&resource->rows, &row->list); return row; } static int sql_resource_field_copy(sqlite3_field_t *field, sqlite3_stmt *statement, unsigned int col) { field->len = sqlite3_column_bytes(statement, col); if ( ! field->len ) { field->data = NULL; return 0; } if ( field->len + 1 < field->len ) return -1; field->data = malloc(field->len + 1); if ( ! field->data ) return preludedb_error_from_errno(errno); memcpy(field->data, sqlite3_column_blob(statement, col), field->len); ((unsigned char *) field->data)[field->len] = '\0'; return 0; } static void sql_resource_destroy(void *session, void *res) { unsigned int i; sqlite3_row_t *row; sqlite3_field_t *field; sqlite3_resource_t *resource = res; prelude_list_t *cursor, *safety_cursor; if ( ! resource ) return; prelude_list_for_each_safe(&resource->rows, cursor, safety_cursor) { row = prelude_list_entry(cursor, sqlite3_row_t, list); for ( i = 0; i < resource->ncolumn; i++ ) { field = &row->fields[i]; if ( field->data ) free(field->data); } free(row->fields); prelude_list_del(&row->list); free(row); } sqlite3_finalize(resource->statement); free(resource); } static int sql_read_row(void *session, sqlite3_stmt *statement, sqlite3_resource_t **resource) { int ret; unsigned int i; sqlite3_row_t *row; unsigned int ncolumn; ncolumn = sqlite3_column_count(statement); if ( ncolumn == 0 ) return 0; *resource = calloc(1, sizeof(**resource)); if ( ! *resource ) return preludedb_error_from_errno(errno); prelude_list_init(&(*resource)->rows); while ( (ret = sqlite3_step(statement)) ) { if ( ret == SQLITE_ERROR || ret == SQLITE_MISUSE || ret == SQLITE_BUSY ) { sql_resource_destroy(NULL, *resource); return preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, "%s", sqlite3_errmsg(session)); } else if ( ret == SQLITE_DONE ) break; assert(ret == SQLITE_ROW); row = sql_resource_add_row(*resource, ncolumn); if ( ! row ) { sql_resource_destroy(NULL, *resource); return preludedb_error_from_errno(errno); } for ( i = 0; i < ncolumn; i++ ) { ret = sql_resource_field_copy(&row->fields[i], statement, i); if ( ret < 0 ) { sql_resource_destroy(NULL, *resource); return preludedb_error_from_errno(errno); } } } (*resource)->ncolumn = ncolumn; (*resource)->statement = statement; return 1; } static int sql_query(void *session, const char *query, void **resource) { int ret; sqlite3_stmt *statement; const char *unparsed = NULL; /* * FIXME: we need a better way to know the kind of operation performed. */ if ( strncmp(query, "SELECT", 6) != 0 ) { ret = sqlite3_exec(session, query, NULL, NULL, 0); if ( ret != SQLITE_OK ) return preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, sqlite3_errmsg(session)); } else { ret = sqlite3_prepare(session, query, strlen(query), &statement, &unparsed); if ( ret != SQLITE_OK ) return preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, sqlite3_errmsg(session)); ret = sql_read_row(session, statement, (sqlite3_resource_t **) resource); if ( ret != 1 ) { sqlite3_finalize(statement); return ret; } } return ret; } static const char *sql_get_column_name(void *session, void *resource, unsigned int column_num) { sqlite3_resource_t *res = resource; if ( column_num >= res->ncolumn ) return NULL; return sqlite3_column_name(res->statement, column_num); } static int sql_get_column_num(void *session, void *resource, const char *column_name) { int ret; unsigned int i; sqlite3_resource_t *res = resource; for ( i = 0; i < res->ncolumn; i++ ) { ret = strcmp(column_name, sqlite3_column_name(res->statement, i)); if ( ret == 0 ) return i; } return -1; } static unsigned int sql_get_column_count(void *session, void *resource) { return ((sqlite3_resource_t *) resource)->ncolumn; } static unsigned int sql_get_row_count(void *session, void *resource) { return ((sqlite3_resource_t *) resource)->nrow; } static int sql_fetch_row(void *session, void *resource, void **row) { sqlite3_resource_t *res = resource; *row = prelude_list_get_next(&res->rows, res->current_row, sqlite3_row_t, list); if ( ! *row ) { res->current_row = NULL; return 0; } res->current_row = *row; return 1; } static int sql_fetch_field(void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len) { sqlite3_field_t *field; if ( column_num >= ((sqlite3_resource_t *) resource)->ncolumn ) return preludedb_error(PRELUDEDB_ERROR_INVALID_COLUMN_NUM); field = &(((sqlite3_row_t *) row)->fields[column_num]); *value = field->data; *len = field->len; if ( *len == 0 ) return 0; return 1; } static const char *get_operator_string(idmef_criterion_operator_t operator) { int i; struct tbl { idmef_criterion_operator_t operator; const char *name; } tbl[] = { { IDMEF_CRITERION_OPERATOR_EQUAL, "=" }, { IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, "=" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL, "!=" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE, "!=" }, { IDMEF_CRITERION_OPERATOR_GREATER, ">" }, { IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL, ">=" }, { IDMEF_CRITERION_OPERATOR_LESSER, "<" }, { IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL, "<=" }, { IDMEF_CRITERION_OPERATOR_SUBSTR, "LIKE" }, { IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, "LIKE" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR, "NOT LIKE" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE, "NOT LIKE " }, { IDMEF_CRITERION_OPERATOR_REGEX, SQLITE_REGEX_OPERATOR }, { IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, SQLITE_REGEX_OPERATOR }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX, "NOT " SQLITE_REGEX_OPERATOR }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE, "NOT " SQLITE_REGEX_OPERATOR }, { IDMEF_CRITERION_OPERATOR_NULL, "IS NULL" }, { IDMEF_CRITERION_OPERATOR_NOT_NULL, "IS NOT NULL" }, { 0, NULL }, }; for ( i = 0; tbl[i].operator != 0; i++ ) if ( operator == tbl[i].operator ) return tbl[i].name; return NULL; } static int sql_build_constraint_string(prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value) { const char *op_str; op_str = get_operator_string(operator); if ( ! op_str ) return -1; if ( ! value ) value = ""; if ( operator & IDMEF_CRITERION_OPERATOR_NOCASE ) return prelude_string_sprintf(out, "lower(%s) %s lower(%s)", field, op_str, value); return prelude_string_sprintf(out, "%s %s %s", field, op_str, value); } static int sql_build_time_constraint_string(prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset) { char buf[128]; const char *sql_operator; int ret; ret = snprintf(buf, sizeof(buf), "DATETIME(%s, '%d hours')", field, gmt_offset / 3600); if ( ret < 0 || (size_t) ret >= sizeof(buf) ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); sql_operator = get_operator_string(operator); if ( ! sql_operator ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); switch ( type ) { case PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: return prelude_string_sprintf(output, "STRFTIME('%%Y', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: return prelude_string_sprintf(output, "STRFTIME('%%m', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY: return prelude_string_sprintf(output, "STRFTIME('%%j', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: return prelude_string_sprintf(output, "STRFTIME('%%d', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY: return prelude_string_sprintf(output, "STRFTIME('%%w', %s) + 0 %s %d", buf, sql_operator, value % 7); case PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: return prelude_string_sprintf(output, "STRFTIME('%%H', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: return prelude_string_sprintf(output, "STRFTIME('%%M', %s) + 0 %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: return prelude_string_sprintf(output, "STRFTIME('%%S', %s) + 0 %s %d", buf, sql_operator, value); } /* not reached */ return preludedb_error(PRELUDEDB_ERROR_GENERIC); } static int sql_build_time_interval_string(preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size) { /* It's not clear where this would be used... */ return preludedb_error(PRELUDEDB_ERROR_GENERIC); } int sqlite3_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data) { int ret; preludedb_plugin_sql_t *plugin; ret = preludedb_plugin_sql_new(&plugin); if ( ret < 0 ) return ret; prelude_plugin_set_name((prelude_plugin_generic_t *) plugin, "sqlite3"); prelude_plugin_entry_set_plugin(pe, (void *) plugin); preludedb_plugin_sql_set_open_func(plugin, sql_open); preludedb_plugin_sql_set_close_func(plugin, sql_close); preludedb_plugin_sql_set_escape_func(plugin, sql_escape); preludedb_plugin_sql_set_query_func(plugin, sql_query); preludedb_plugin_sql_set_resource_destroy_func(plugin, sql_resource_destroy); preludedb_plugin_sql_set_get_column_count_func(plugin, sql_get_column_count); preludedb_plugin_sql_set_get_row_count_func(plugin, sql_get_row_count); preludedb_plugin_sql_set_get_column_name_func(plugin, sql_get_column_name); preludedb_plugin_sql_set_get_column_num_func(plugin, sql_get_column_num); preludedb_plugin_sql_set_get_operator_string_func(plugin, get_operator_string); preludedb_plugin_sql_set_fetch_row_func(plugin, sql_fetch_row); preludedb_plugin_sql_set_fetch_field_func(plugin, sql_fetch_field); preludedb_plugin_sql_set_build_constraint_string_func(plugin, sql_build_constraint_string); preludedb_plugin_sql_set_build_time_constraint_string_func(plugin, sql_build_time_constraint_string); preludedb_plugin_sql_set_build_time_interval_string_func(plugin, sql_build_time_interval_string); preludedb_plugin_sql_set_build_limit_offset_string_func(plugin, sql_build_limit_offset_string); return 0; } int sqlite3_LTX_prelude_plugin_version(void) { return PRELUDE_PLUGIN_API_VERSION; } libpreludedb-1.0.0/plugins/sql/mysql/0000775000076400007640000000000011347715760014620 500000000000000libpreludedb-1.0.0/plugins/sql/mysql/Makefile.am0000664000076400007640000000065711226653036016575 00000000000000AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @MYSQL_CFLAGS@ mysql_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ if HAVE_MYSQL mysql_la_SOURCES = mysql.c mysql_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @MYSQL_LDFLAGS@ mysqldir = $(sql_plugin_dir) mysql_LTLIBRARIES = mysql.la endif -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/sql/mysql/Makefile.in0000664000076400007640000007206111347715644016614 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/sql/mysql DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__installdirs = "$(DESTDIR)$(mysqldir)" LTLIBRARIES = $(mysql_LTLIBRARIES) @HAVE_MYSQL_TRUE@mysql_la_DEPENDENCIES = \ @HAVE_MYSQL_TRUE@ $(top_builddir)/src/libpreludedb.la am__mysql_la_SOURCES_DIST = mysql.c @HAVE_MYSQL_TRUE@am_mysql_la_OBJECTS = mysql.lo mysql_la_OBJECTS = $(am_mysql_la_OBJECTS) mysql_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mysql_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_MYSQL_TRUE@am_mysql_la_rpath = -rpath $(mysqldir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(mysql_la_SOURCES) DIST_SOURCES = $(am__mysql_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @MYSQL_CFLAGS@ mysql_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ @HAVE_MYSQL_TRUE@mysql_la_SOURCES = mysql.c @HAVE_MYSQL_TRUE@mysql_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @MYSQL_LDFLAGS@ @HAVE_MYSQL_TRUE@mysqldir = $(sql_plugin_dir) @HAVE_MYSQL_TRUE@mysql_LTLIBRARIES = mysql.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/sql/mysql/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/sql/mysql/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-mysqlLTLIBRARIES: $(mysql_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(mysqldir)" || $(MKDIR_P) "$(DESTDIR)$(mysqldir)" @list='$(mysql_LTLIBRARIES)'; test -n "$(mysqldir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(mysqldir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(mysqldir)"; \ } uninstall-mysqlLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(mysql_LTLIBRARIES)'; test -n "$(mysqldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(mysqldir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(mysqldir)/$$f"; \ done clean-mysqlLTLIBRARIES: -test -z "$(mysql_LTLIBRARIES)" || rm -f $(mysql_LTLIBRARIES) @list='$(mysql_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done mysql.la: $(mysql_la_OBJECTS) $(mysql_la_DEPENDENCIES) $(mysql_la_LINK) $(am_mysql_la_rpath) $(mysql_la_OBJECTS) $(mysql_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mysql.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(mysqldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-mysqlLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-mysqlLTLIBRARIES 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 -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-mysqlLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-mysqlLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-mysqlLTLIBRARIES install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-mysqlLTLIBRARIES -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/sql/mysql/mysql.c0000664000076400007640000003701511326045005016040 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "preludedb-plugin-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #define WAIT_TIMEOUT_VALUE "31536000" /* 365 days */ #if ! defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 32224 # define mysql_field_count mysql_num_fields #endif /* ! MYSQL_VERSION_ID */ int mysql_LTX_prelude_plugin_version(void); int mysql_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data); static prelude_bool_t is_connection_broken(void *session) { switch (mysql_errno(session)) { case CR_CONNECTION_ERROR: case CR_SERVER_GONE_ERROR: case CR_SERVER_LOST: case CR_CONN_HOST_ERROR: case CR_IPSOCK_ERROR: case ER_SERVER_SHUTDOWN: return TRUE; default: return FALSE; } } static int handle_error(void *session, prelude_error_code_t code) { int ret; if ( is_connection_broken(session) ) code = PRELUDEDB_ERROR_CONNECTION; if ( mysql_errno(session) ) ret = preludedb_error_verbose(code, "%s", mysql_error(session)); else ret = preludedb_error(code); return ret; } static int sql_open(preludedb_sql_settings_t *settings, void **session) { int ret; unsigned int port = 0; if ( preludedb_sql_settings_get_port(settings) ) port = atoi(preludedb_sql_settings_get_port(settings)); *session = mysql_init(NULL); if ( ! *session ) return preludedb_error_from_errno(errno); if ( ! mysql_real_connect(*session, preludedb_sql_settings_get_host(settings), preludedb_sql_settings_get_user(settings), preludedb_sql_settings_get_pass(settings), preludedb_sql_settings_get_name(settings), port, NULL, 0) ) { ret = handle_error(*session, PRELUDEDB_ERROR_CONNECTION); mysql_close(*session); return ret; } mysql_query(*session, "SET SESSION wait_timeout=" WAIT_TIMEOUT_VALUE); return 0; } static void sql_close(void *session) { mysql_close((MYSQL *) session); } static int sql_escape_binary(void *session, const unsigned char *input, size_t input_size, char **output) { size_t rsize; /* * MySQL documentation say : * The string pointed to by from must be length bytes long. You must * allocate the to buffer to be at least length*2+1 bytes long. (In the * worse case, each character may need to be encoded as using two bytes, * and you need room for the terminating null byte.) */ rsize = input_size * 2 + 3; if ( rsize <= input_size ) return -1; *output = malloc(rsize); if ( ! *output ) return preludedb_error_from_errno(errno); (*output)[0] = '\''; #ifdef HAVE_MYSQL_REAL_ESCAPE_STRING rsize = mysql_real_escape_string((MYSQL *) session, (*output) + 1, (const char *) input, input_size); #else rsize = mysql_escape_string((*output) + 1, (const char *) input, input_size); #endif (*output)[rsize + 1] = '\''; (*output)[rsize + 2] = '\0'; return 0; } static int sql_build_limit_offset_string(void *session, int limit, int offset, prelude_string_t *output) { if ( limit >= 0 ) { if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT %d, %d", offset, limit); return prelude_string_sprintf(output, " LIMIT %d", limit); } else if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT %d, %" PRELUDE_PRIu64, offset, PRELUDE_UINT64_MAX); return 0; } static int sql_query(void *session, const char *query, void **resource) { if ( mysql_query(session, query) != 0 ) return handle_error(session, PRELUDEDB_ERROR_QUERY); *resource = mysql_store_result(session); if ( *resource ) { if ( mysql_num_rows(*resource) == 0 ) { mysql_free_result(*resource); return 0; } return 1; } return mysql_errno(session) ? handle_error(session, PRELUDEDB_ERROR_QUERY) : 0; } static void sql_resource_destroy(void *session, void *resource) { if ( resource ) mysql_free_result(resource); } static MYSQL_FIELD *get_field(MYSQL_RES *res, unsigned int column_num) { return (column_num >= mysql_num_fields(res)) ? NULL : mysql_fetch_field_direct(res, column_num); } static const char *sql_get_column_name(void *session, void *resource, unsigned int column_num) { MYSQL_FIELD *field; field = get_field(resource, column_num); return field ? field->name : NULL; } static int sql_get_column_num(void *session, void *resource, const char *column_name) { MYSQL_FIELD *fields; int fields_num; int i; fields = mysql_fetch_fields(resource); if ( ! fields ) return -1; fields_num = mysql_num_fields(resource); for ( i = 0; i < fields_num; i++ ) { if ( strcmp(column_name, fields[i].name) == 0 ) return i; } return -1; } static unsigned int sql_get_column_count(void *session, void *resource) { return mysql_num_fields(resource); } static unsigned int sql_get_row_count(void *session, void *resource) { return (unsigned int) mysql_num_rows(resource); } static int sql_fetch_row(void *session, void *resource, void **row) { *row = mysql_fetch_row(resource); if ( ! *row ) return mysql_errno(session) ? preludedb_error(PRELUDEDB_ERROR_GENERIC) : 0; return 1; } static int sql_fetch_field(void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len) { unsigned long *lengths; if ( column_num >= mysql_num_fields(resource) ) return preludedb_error(PRELUDEDB_ERROR_INVALID_COLUMN_NUM); lengths = mysql_fetch_lengths(resource); if ( ! lengths ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); if ( ! ((MYSQL_ROW) row)[column_num] ) return 0; *value = ((MYSQL_ROW) row)[column_num]; *len = lengths[column_num]; return 1; } static const char *get_operator_string(idmef_criterion_operator_t operator) { int i; struct tbl { idmef_criterion_operator_t operator; const char *name; } tbl[] = { { IDMEF_CRITERION_OPERATOR_EQUAL, "= BINARY" }, { IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE, "=" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL, "!= BINARY" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE, "!=" }, { IDMEF_CRITERION_OPERATOR_GREATER, ">" }, { IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL, ">=" }, { IDMEF_CRITERION_OPERATOR_LESSER, "<" }, { IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL, "<=" }, { IDMEF_CRITERION_OPERATOR_SUBSTR, "LIKE BINARY" }, { IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, "LIKE" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR, "NOT LIKE BINARY" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE, "NOT LIKE " }, { IDMEF_CRITERION_OPERATOR_REGEX, "REGEXP BINARY" }, { IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, "REGEXP" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX, "NOT REGEXP" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE, "NOT REGEXP BINARY" }, { IDMEF_CRITERION_OPERATOR_NULL, "IS NULL" }, { IDMEF_CRITERION_OPERATOR_NOT_NULL, "IS NOT NULL" }, { 0, NULL }, }; for ( i = 0; tbl[i].operator != 0; i++ ) if ( operator == tbl[i].operator ) return tbl[i].name; return NULL; } static int sql_build_constraint_string(prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value) { const char *op_str; op_str = get_operator_string(operator); if ( ! op_str ) return -1; if ( ! value ) value = ""; return prelude_string_sprintf(out, "%s %s %s", field, op_str, value); } static int sql_build_time_constraint_string(prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset) { char buf[128]; const char *sql_operator; int ret; ret = snprintf(buf, sizeof(buf), "DATE_ADD(%s, INTERVAL %d HOUR)", field, gmt_offset / 3600); if ( ret < 0 || (size_t) ret >= sizeof(buf) ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); sql_operator = get_operator_string(operator); if ( ! sql_operator ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); switch ( type ) { case PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: return prelude_string_sprintf(output, "EXTRACT(YEAR FROM %s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: return prelude_string_sprintf(output, "EXTRACT(MONTH FROM %s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY: return prelude_string_sprintf(output, "DAYOFYEAR(%s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: return prelude_string_sprintf(output, "DAYOFMONTH(%s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY: return prelude_string_sprintf(output, "DAYOFWEEK(%s) %s '%d'", buf, sql_operator, value % 7 + 1); case PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: return prelude_string_sprintf(output, "EXTRACT(HOUR FROM %s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: return prelude_string_sprintf(output, "EXTRACT(MINUTE FROM %s) %s '%d'", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: return prelude_string_sprintf(output, "EXTRACT(SECOND FROM %s) %s '%d'", buf, sql_operator, value); } /* not reached */ return preludedb_error(PRELUDEDB_ERROR_GENERIC); } static int sql_build_time_interval_string(preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size) { char *type_str; int ret; switch ( type ) { case PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: type_str = "YEAR"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: type_str = "MONTH"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: type_str = "DAY"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: type_str = "HOUR"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: type_str = "MINUTE"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: type_str = "SECOND"; break; default: return preludedb_error(PRELUDEDB_ERROR_GENERIC); } ret = snprintf(buf, size, "INTERVAL %d %s", value, type_str); return (ret < 0 || (size_t) ret >= size) ? preludedb_error(PRELUDEDB_ERROR_GENERIC) : 0; } int mysql_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data) { int ret; preludedb_plugin_sql_t *plugin; ret = preludedb_plugin_sql_new(&plugin); if ( ret < 0 ) return ret; prelude_plugin_set_name((prelude_plugin_generic_t *) plugin, "MySQL"); prelude_plugin_entry_set_plugin(pe, (void *) plugin); preludedb_plugin_sql_set_open_func(plugin, sql_open); preludedb_plugin_sql_set_close_func(plugin, sql_close); preludedb_plugin_sql_set_escape_binary_func(plugin, sql_escape_binary); preludedb_plugin_sql_set_query_func(plugin, sql_query); preludedb_plugin_sql_set_resource_destroy_func(plugin, sql_resource_destroy); preludedb_plugin_sql_set_get_column_count_func(plugin, sql_get_column_count); preludedb_plugin_sql_set_get_row_count_func(plugin, sql_get_row_count); preludedb_plugin_sql_set_get_column_name_func(plugin, sql_get_column_name); preludedb_plugin_sql_set_get_column_num_func(plugin, sql_get_column_num); preludedb_plugin_sql_set_get_operator_string_func(plugin, get_operator_string); preludedb_plugin_sql_set_fetch_row_func(plugin, sql_fetch_row); preludedb_plugin_sql_set_fetch_field_func(plugin, sql_fetch_field); preludedb_plugin_sql_set_build_constraint_string_func(plugin, sql_build_constraint_string); preludedb_plugin_sql_set_build_time_constraint_string_func(plugin, sql_build_time_constraint_string); preludedb_plugin_sql_set_build_time_interval_string_func(plugin, sql_build_time_interval_string); preludedb_plugin_sql_set_build_limit_offset_string_func(plugin, sql_build_limit_offset_string); return 0; } int mysql_LTX_prelude_plugin_version(void) { return PRELUDE_PLUGIN_API_VERSION; } libpreludedb-1.0.0/plugins/sql/Makefile.am0000664000076400007640000000027611226653036015425 00000000000000SUBDIRS = mysql pgsql sqlite3 INCLUDES = -I$(top_srcdir)/libmissing -I$(top_srcdir) \ -I$(top_srcdir)/src/include \ @LIBPRELUDE_CFLAGS@ -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/sql/Makefile.in0000664000076400007640000007170711347715643015454 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/sql DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = mysql pgsql sqlite3 INCLUDES = -I$(top_srcdir)/libmissing -I$(top_srcdir) \ -I$(top_srcdir)/src/include \ @LIBPRELUDE_CFLAGS@ all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/sql/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/sql/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/plugins/sql/pgsql/0000775000076400007640000000000011347715760014601 500000000000000libpreludedb-1.0.0/plugins/sql/pgsql/pgsql.c0000664000076400007640000004004611326045005016000 00000000000000/***** * * Copyright (C) 2003-2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "preludedb-plugin-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" int pgsql_LTX_prelude_plugin_version(void); int pgsql_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data); struct pg_result { PGresult *result; int row; }; static int handle_error(prelude_error_code_t code, PGconn *conn) { int ret; char *tmp; size_t len; const char *error; if ( PQstatus(conn) == CONNECTION_BAD ) code = PRELUDEDB_ERROR_CONNECTION; error = PQerrorMessage(conn); if ( ! error ) return preludedb_error(code); /* * Pgsql error message are formatted. Remove trailing '\n'. */ tmp = strdup(error); if ( ! tmp ) return preludedb_error_verbose(code, "%s", error); len = strlen(tmp) - 1; while ( tmp[len] == '\n' || tmp[len] == ' ' ) tmp[len--] = 0; ret = preludedb_error_verbose(code, "%s", tmp); free(tmp); return ret; } static int sql_query(void *session, const char *query, void **resource) { int ret; struct pg_result *res; res = calloc(1, sizeof (*res)); if ( ! res ) return prelude_error_from_errno(errno); res->row = -1; res->result = PQexec(session, query); if ( ! res->result ) { free(res); return handle_error(PRELUDEDB_ERROR_QUERY, session); } ret = PQresultStatus(res->result); if ( ret == PGRES_TUPLES_OK && PQntuples(res->result) != 0 ) { *resource = res; return 1; } PQclear(res->result); free(res); if ( ret == PGRES_TUPLES_OK || ret == PGRES_COMMAND_OK ) return 0; return handle_error(PRELUDEDB_ERROR_QUERY, session); } static int sql_open(preludedb_sql_settings_t *settings, void **session) { int ret; PGconn *conn; conn = PQsetdbLogin(preludedb_sql_settings_get_host(settings), preludedb_sql_settings_get_port(settings), NULL, NULL, preludedb_sql_settings_get_name(settings), preludedb_sql_settings_get_user(settings), preludedb_sql_settings_get_pass(settings)); if ( PQstatus(conn) == CONNECTION_BAD ) { ret = handle_error(PRELUDEDB_ERROR_CONNECTION, conn); PQfinish(conn); return ret; } *session = conn; return sql_query(conn, "SET DATESTYLE TO 'ISO'", NULL); } static void sql_close(void *session) { PQfinish(session); } static int sql_escape(void *session, const char *input, size_t input_size, char **output) { size_t rsize; rsize = input_size * 2 + 3; if ( rsize <= input_size ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); *output = malloc(rsize); if ( ! *output ) return preludedb_error_from_errno(errno); (*output)[0] = '\''; rsize = PQescapeString((*output) + 1, input, input_size); (*output)[rsize + 1] = '\''; (*output)[rsize + 2] = '\0'; return 0; } static int sql_escape_binary(void *session, const unsigned char *input, size_t input_size, char **output) { int ret; size_t dummy; unsigned char *ptr; prelude_string_t *string; ret = prelude_string_new(&string); if ( ret < 0 ) return ret; ptr = PQescapeBytea(input, input_size, &dummy); if ( ! ptr ) { prelude_string_destroy(string); return -1; } #ifdef HAVE_PQSERVERVERSION if ( PQserverVersion(session) >= 80200 ) ret = prelude_string_sprintf(string, "E'%s'", ptr); else #endif ret = prelude_string_sprintf(string, "'%s'", ptr); free(ptr); if ( ret < 0 ) { prelude_string_destroy(string); return ret; } ret = prelude_string_get_string_released(string, output); prelude_string_destroy(string); return 0; } static int sql_unescape_binary(void *session, const char *input, unsigned char **output, size_t *output_size) { *output = PQunescapeBytea((const unsigned char *) input, output_size); if ( ! *output ) return preludedb_error_from_errno(errno); return 0; } static int sql_build_limit_offset_string(void *session, int limit, int offset, prelude_string_t *output) { if ( limit >= 0 ) { if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT %d OFFSET %d", limit, offset); return prelude_string_sprintf(output, " LIMIT %d", limit); } else if ( offset >= 0 ) return prelude_string_sprintf(output, " LIMIT ALL OFFSET %d", offset); return 0; } static void sql_resource_destroy(void *session, void *resource) { if ( resource ) { PQclear(((struct pg_result *) resource)->result); free(resource); } } static const char *sql_get_column_name(void *session, void *resource, unsigned int column_num) { return PQfname(((struct pg_result *) resource)->result, column_num); } static int sql_get_column_num(void *session, void *resource, const char *column_name) { return PQfnumber(((struct pg_result *) resource)->result, column_name); } static unsigned int sql_get_column_count(void *session, void *resource) { return PQnfields(((struct pg_result *) resource)->result); } static unsigned int sql_get_row_count(void *session, void *resource) { return PQntuples(((struct pg_result *) resource)->result); } static int sql_fetch_row(void *s, void *resource, void **row) { struct pg_result *res = resource; /* * initialize *row, but we won't use it since we access row's fields directly * through the PGresult structure */ *row = NULL; if ( res->row + 1 < PQntuples(res->result) ) { res->row++; return 1; } return 0; } static int sql_fetch_field(void *session, void *resource, void *r, unsigned int column_num, const char **value, size_t *len) { int nfields; struct pg_result *res = resource; nfields = PQnfields(res->result); if ( nfields < 0 || column_num >= (unsigned int) nfields ) return preludedb_error(PRELUDEDB_ERROR_INVALID_COLUMN_NUM); if ( PQgetisnull(res->result, res->row, column_num) ) return 0; *value = PQgetvalue(res->result, res->row, column_num); *len = PQgetlength(res->result, res->row, column_num); return 1; } static const char *get_operator_string(idmef_criterion_operator_t operator) { int i; const struct tbl { idmef_criterion_operator_t operator; const char *name; } tbl[] = { { IDMEF_CRITERION_OPERATOR_EQUAL, "=" }, { IDMEF_CRITERION_OPERATOR_NOT_EQUAL, "!=" }, { IDMEF_CRITERION_OPERATOR_GREATER, ">" }, { IDMEF_CRITERION_OPERATOR_GREATER_OR_EQUAL, ">=" }, { IDMEF_CRITERION_OPERATOR_LESSER, "<" }, { IDMEF_CRITERION_OPERATOR_LESSER_OR_EQUAL, "<=" }, { IDMEF_CRITERION_OPERATOR_SUBSTR, "LIKE" }, { IDMEF_CRITERION_OPERATOR_SUBSTR_NOCASE, "ILIKE" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR, "NOT LIKE" }, { IDMEF_CRITERION_OPERATOR_NOT_SUBSTR_NOCASE, "NOT ILIKE" }, { IDMEF_CRITERION_OPERATOR_REGEX, "~" }, { IDMEF_CRITERION_OPERATOR_REGEX_NOCASE, "~*" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX, "!~" }, { IDMEF_CRITERION_OPERATOR_NOT_REGEX_NOCASE, "!~*" }, { IDMEF_CRITERION_OPERATOR_NULL, "IS NULL" }, { IDMEF_CRITERION_OPERATOR_NOT_NULL, "IS NOT NULL" }, { 0, NULL }, }; for ( i = 0; tbl[i].operator != 0; i++ ) if ( operator == tbl[i].operator ) return tbl[i].name; return NULL; } static int sql_build_constraint_string(prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value) { const char *op_str; if ( ! value ) value = ""; op_str = get_operator_string(operator); if ( op_str ) return prelude_string_sprintf(out, "%s %s %s", field, op_str, value); else if ( operator == IDMEF_CRITERION_OPERATOR_EQUAL_NOCASE ) return prelude_string_sprintf(out, "lower(%s) = lower(%s)", field, value); else if ( operator == IDMEF_CRITERION_OPERATOR_NOT_EQUAL_NOCASE ) return prelude_string_sprintf(out, "lower(%s) != lower(%s)", field, value); return -1; } static int sql_build_time_constraint_string(prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset) { char buf[128]; const char *sql_operator; int ret; ret = snprintf(buf, sizeof (buf), "%s + INTERVAL '%d HOUR'", field, gmt_offset / 3600); if ( ret < 0 || (size_t) ret >= sizeof (buf) ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); sql_operator = get_operator_string(operator); if ( ! sql_operator ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); switch ( type ) { case PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: return prelude_string_sprintf(output, "EXTRACT(YEAR FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: return prelude_string_sprintf(output, "EXTRACT(MONTH FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY: return prelude_string_sprintf(output, "EXTRACT(DOY FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: return prelude_string_sprintf(output, "EXTRACT(DAY FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY: return prelude_string_sprintf(output, "EXTRACT(DOW FROM %s) %s %d", buf, sql_operator, value % 7 + 1); case PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: return prelude_string_sprintf(output, "EXTRACT(HOUR FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: return prelude_string_sprintf(output, "EXTRACT(MINUTE FROM %s) %s %d", buf, sql_operator, value); case PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: return prelude_string_sprintf(output, "EXTRACT(SECOND FROM %s) %s %d", buf, sql_operator, value); } /* not reached */ return preludedb_error(PRELUDEDB_ERROR_GENERIC); } static int sql_build_time_interval_string(preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size) { char *type_str; int ret; switch ( type ) { case PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR: type_str = "YEAR"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH: type_str = "MONTH"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY: type_str = "DAY"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR: type_str = "HOUR"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_MIN: type_str = "MINUTE"; break; case PRELUDEDB_SQL_TIME_CONSTRAINT_SEC: type_str = "SECOND"; break; default: return preludedb_error(PRELUDEDB_ERROR_GENERIC); } ret = snprintf(buf, size, "INTERVAL '%d %s'", value, type_str); return (ret < 0 || (size_t) ret >= size) ? preludedb_error(PRELUDEDB_ERROR_GENERIC) : 0; } int pgsql_LTX_preludedb_plugin_init(prelude_plugin_entry_t *pe, void *data) { int ret; preludedb_plugin_sql_t *plugin; ret = preludedb_plugin_sql_new(&plugin); if ( ret < 0 ) return ret; prelude_plugin_set_name((prelude_plugin_generic_t *) plugin, "PgSQL"); prelude_plugin_entry_set_plugin(pe, (void *) plugin); preludedb_plugin_sql_set_open_func(plugin, sql_open); preludedb_plugin_sql_set_close_func(plugin, sql_close); preludedb_plugin_sql_set_escape_func(plugin, sql_escape); preludedb_plugin_sql_set_escape_binary_func(plugin, sql_escape_binary); preludedb_plugin_sql_set_unescape_binary_func(plugin, sql_unescape_binary); preludedb_plugin_sql_set_query_func(plugin, sql_query); preludedb_plugin_sql_set_resource_destroy_func(plugin, sql_resource_destroy); preludedb_plugin_sql_set_get_column_count_func(plugin, sql_get_column_count); preludedb_plugin_sql_set_get_row_count_func(plugin, sql_get_row_count); preludedb_plugin_sql_set_get_column_name_func(plugin, sql_get_column_name); preludedb_plugin_sql_set_get_column_num_func(plugin, sql_get_column_num); preludedb_plugin_sql_set_get_operator_string_func(plugin, get_operator_string); preludedb_plugin_sql_set_fetch_row_func(plugin, sql_fetch_row); preludedb_plugin_sql_set_fetch_field_func(plugin, sql_fetch_field); preludedb_plugin_sql_set_build_constraint_string_func(plugin, sql_build_constraint_string); preludedb_plugin_sql_set_build_time_constraint_string_func(plugin, sql_build_time_constraint_string); preludedb_plugin_sql_set_build_time_interval_string_func(plugin, sql_build_time_interval_string); preludedb_plugin_sql_set_build_limit_offset_string_func(plugin, sql_build_limit_offset_string); return 0; } int pgsql_LTX_prelude_plugin_version(void) { return PRELUDE_PLUGIN_API_VERSION; } libpreludedb-1.0.0/plugins/sql/pgsql/Makefile.am0000664000076400007640000000067311226653036016554 00000000000000AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @POSTGRESQL_CFLAGS@ pgsql_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ if HAVE_PGSQL pgsql_la_SOURCES = pgsql.c pgsql_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @POSTGRESQL_LDFLAGS@ pgsqldir = $(sql_plugin_dir) pgsql_LTLIBRARIES = pgsql.la endif -include $(top_srcdir)/git.mk libpreludedb-1.0.0/plugins/sql/pgsql/Makefile.in0000664000076400007640000007207411347715644016601 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = plugins/sql/pgsql DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__installdirs = "$(DESTDIR)$(pgsqldir)" LTLIBRARIES = $(pgsql_LTLIBRARIES) @HAVE_PGSQL_TRUE@pgsql_la_DEPENDENCIES = \ @HAVE_PGSQL_TRUE@ $(top_builddir)/src/libpreludedb.la am__pgsql_la_SOURCES_DIST = pgsql.c @HAVE_PGSQL_TRUE@am_pgsql_la_OBJECTS = pgsql.lo pgsql_la_OBJECTS = $(am_pgsql_la_OBJECTS) pgsql_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(pgsql_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_PGSQL_TRUE@am_pgsql_la_rpath = -rpath $(pgsqldir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(pgsql_la_SOURCES) DIST_SOURCES = $(am__pgsql_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @POSTGRESQL_CFLAGS@ pgsql_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@ @HAVE_PGSQL_TRUE@pgsql_la_SOURCES = pgsql.c @HAVE_PGSQL_TRUE@pgsql_la_LIBADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ @POSTGRESQL_LDFLAGS@ @HAVE_PGSQL_TRUE@pgsqldir = $(sql_plugin_dir) @HAVE_PGSQL_TRUE@pgsql_LTLIBRARIES = pgsql.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/sql/pgsql/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/sql/pgsql/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pgsqlLTLIBRARIES: $(pgsql_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pgsqldir)" || $(MKDIR_P) "$(DESTDIR)$(pgsqldir)" @list='$(pgsql_LTLIBRARIES)'; test -n "$(pgsqldir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pgsqldir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pgsqldir)"; \ } uninstall-pgsqlLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pgsql_LTLIBRARIES)'; test -n "$(pgsqldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pgsqldir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pgsqldir)/$$f"; \ done clean-pgsqlLTLIBRARIES: -test -z "$(pgsql_LTLIBRARIES)" || rm -f $(pgsql_LTLIBRARIES) @list='$(pgsql_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done pgsql.la: $(pgsql_la_OBJECTS) $(pgsql_la_DEPENDENCIES) $(pgsql_la_LINK) $(am_pgsql_la_rpath) $(pgsql_la_OBJECTS) $(pgsql_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgsql.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pgsqldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-pgsqlLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pgsqlLTLIBRARIES 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 -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-pgsqlLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pgsqlLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pgsqlLTLIBRARIES install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-pgsqlLTLIBRARIES -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/Makefile.in0000664000076400007640000012745011347715644013172 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ bin_PROGRAMS = preludedb-admin$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libpreludedb-config.in \ $(top_srcdir)/bindings/perl/Makefile.PL.in \ $(top_srcdir)/bindings/python/setup.py.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ compile config.guess config.rpath config.sub depcomp \ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = libpreludedb-config bindings/perl/Makefile.PL \ bindings/python/setup.py CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_preludedb_admin_OBJECTS = preludedb-admin.$(OBJEXT) preludedb_admin_OBJECTS = $(am_preludedb_admin_OBJECTS) preludedb_admin_DEPENDENCIES = $(top_builddir)/src/libpreludedb.la preludedb_admin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(preludedb_admin_LDFLAGS) $(LDFLAGS) -o $@ 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' SCRIPTS = $(bin_SCRIPTS) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(preludedb_admin_SOURCES) DIST_SOURCES = $(preludedb_admin_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } 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 distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -I libmissing/m4 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc EXTRA_DIST = LICENSE.README HACKING.README SUBDIRS = m4 libmissing src plugins bindings docs MAINTAINERCLEANFILES = \ $(srcdir)/INSTALL \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/compile \ $(srcdir)/config.guess \ $(srcdir)/config.h.in \ $(srcdir)/config.sub \ $(srcdir)/configure.scan \ $(srcdir)/depcomp \ $(srcdir)/install-sh \ $(srcdir)/ltmain.sh \ $(srcdir)/missing \ $(srcdir)/mkinstalldirs \ $(srcdir)/omf.make \ $(srcdir)/xmldocs.make \ $(srcdir)/gtk-doc.make \ $(srcdir)/ChangeLog \ `find "$(srcdir)" -type f -name Makefile.in -print` bin_SCRIPTS = $(top_builddir)/libpreludedb-config distuninstallcheck_listfiles = find . -type f -print | grep -v 'perl' | grep -v '3pm' AM_CPPFLAGS = @PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing @LIBPRELUDE_CFLAGS@ preludedb_admin_LDFLAGS = @LIBPRELUDE_LDFLAGS@ preludedb_admin_LDADD = $(top_builddir)/src/libpreludedb.la @LIBPRELUDE_LIBS@ preludedb_admin_SOURCES = preludedb-admin.c all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --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 .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 libpreludedb-config: $(top_builddir)/config.status $(srcdir)/libpreludedb-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ bindings/perl/Makefile.PL: $(top_builddir)/config.status $(top_srcdir)/bindings/perl/Makefile.PL.in cd $(top_builddir) && $(SHELL) ./config.status $@ bindings/python/setup.py: $(top_builddir)/config.status $(top_srcdir)/bindings/python/setup.py.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 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 preludedb-admin$(EXEEXT): $(preludedb_admin_OBJECTS) $(preludedb_admin_DEPENDENCIES) @rm -f preludedb-admin$(EXEEXT) $(preludedb_admin_LINK) $(preludedb_admin_OBJECTS) $(preludedb_admin_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | 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; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-admin.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -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__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(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 a+w $(distdir) mkdir $(distdir)/_build mkdir $(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 \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -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-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-binPROGRAMS install-binSCRIPTS 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzma 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-binSCRIPTS \ 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-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS dist-hook: @if test -d "$(srcdir)/.git"; then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/COPYING0000664000076400007640000004311011226653036012136 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libpreludedb-1.0.0/config.h.in0000664000076400007640000003723611347715641013147 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define if the compiler is building for multiple architectures of Apple platforms at once. */ #undef AA_APPLE_UNIVERSAL_BUILD /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_BP_SYM_H /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. */ #undef HAVE_DECL_STRDUP /* Define to 1 if you have the declaration of `strndup', and to 0 if you don't. */ #undef HAVE_DECL_STRNDUP /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ #undef HAVE_DECL_STRNLEN /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #undef HAVE_DECL_VSNPRINTF /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and . */ #undef HAVE_MAP_ANONYMOUS /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mprotect' function. */ #undef HAVE_MPROTECT /* Define to 1 if MySQL libraries are available */ #undef HAVE_MYSQL /* mysql_real_escape_string function present */ #undef HAVE_MYSQL_REAL_ESCAPE_STRING /* Define to 1 if PostgreSQL libraries are available */ #undef HAVE_POSTGRESQL /* Define if PQserverVersion function is available */ #undef HAVE_PQSERVERVERSION /* Define to 1 if you have the `pthread_atfork' function. */ #undef HAVE_PTHREAD_ATFORK /* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ #undef HAVE_PTHREAD_MUTEX_RECURSIVE /* Define if the POSIX multithreading library has read/write locks. */ #undef HAVE_PTHREAD_RWLOCK /* Define to 1 if btowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BTOWC /* Define to 1 if dprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DPRINTF /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO /* Define to 1 if ftello is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTELLO /* Define to 1 if getdelim is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDELIM /* Define to 1 if getline is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLINE /* Define to 1 if mbrlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRLEN /* Define to 1 if mbrtowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRTOWC /* Define to 1 if mbsinit is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSINIT /* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSNRTOWCS /* Define to 1 if mbsrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSRTOWCS /* Define to 1 if memmem is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMMEM /* Define to 1 if mempcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMPCPY /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN /* Define to 1 if rawmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RAWMEMCHR /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY /* Define to 1 if stpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPNCPY /* Define to 1 if strcasestr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASESTR /* Define to 1 if strchrnul is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCHRNUL /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP /* Define to 1 if strndup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNDUP /* Define to 1 if strnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNLEN /* Define to 1 if strpbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRPBRK /* Define to 1 if strsep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSEP /* Define to 1 if strsignal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSIGNAL /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP /* Define to 1 if vdprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VDPRINTF /* Define to 1 if vsnprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VSNPRINTF /* Define to 1 if wcrtomb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCRTOMB /* Define to 1 if wcsnrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNRTOMBS /* Define to 1 if wcsrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRTOMBS /* Define to 1 if wctob is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTOB /* Define to 1 if wcwidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCWIDTH /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Have the SQLITE3 library */ #undef HAVE_SQLITE3 /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* 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 `strdup' function. */ #undef HAVE_STRDUP /* 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 `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_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_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_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* 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 version of this package. */ #undef PACKAGE_VERSION /* Define if the pthread_in_use() detection is hard. */ #undef PTHREAD_IN_USE_DETECTION_HARD /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if the POSIX multithreading library can be used. */ #undef USE_POSIX_THREADS /* Define if references to the POSIX multithreading library should be made weak. */ #undef USE_POSIX_THREADS_WEAK /* Define if the GNU Pth multithreading library can be used. */ #undef USE_PTH_THREADS /* Define if references to the GNU Pth multithreading library should be made weak. */ #undef USE_PTH_THREADS_WEAK /* Define if the old Solaris multithreading library can be used. */ #undef USE_SOLARIS_THREADS /* Define if references to the old Solaris multithreading library should be made weak. */ #undef USE_SOLARIS_THREADS_WEAK /* Define if the Win32 multithreading API can be used. */ #undef USE_WIN32_THREADS /* Version number of package */ #undef VERSION /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to long or long long if and don't define. */ #undef intmax_t /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ #undef ptrdiff_t /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to rpl_strnlen if the replacement function should be used. */ #undef strnlen /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED libpreludedb-1.0.0/HACKING.README0000664000076400007640000000155011226653036013030 00000000000000This directory and its children contain LibPreludeDB, a library for using the Prelude database. Changes: if you wish to contribute a change which is a significant one in terms of the amount of code changes, please be aware that PreludeIDS Technologies SARL wishes to retain copyright of the PreludeDB library. Therefore you will have to sign over copyright ownership of your code to PreludeIDS Technologies SARL before we can include your changes in the main source tree. Before you start modifying anything for real, you should probably join the prelude-devel mailing list and send a mail describing what you want to do and how you want to do it so you don't waste time working on something we can't integrate. This also allows us to keep track of what's being worked on so efforts aren't duplicated. Please also read the information in the file LICENSE.README. libpreludedb-1.0.0/INSTALL0000644000076400007640000003633211347715644012152 00000000000000Installation 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. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libpreludedb-1.0.0/src/0000775000076400007640000000000011347715757011770 500000000000000libpreludedb-1.0.0/src/preludedb-plugin-format.c0000664000076400007640000002016711226653036016575 00000000000000/***** * * Copyright (C) 2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include #include "preludedb.h" #include "preludedb-plugin-format-prv.h" void preludedb_plugin_format_set_check_schema_version_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_check_schema_version_func_t func) { plugin->check_schema_version = func; } void preludedb_plugin_format_set_get_alert_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_idents_func_t func) { plugin->get_alert_idents = func; } void preludedb_plugin_format_set_get_heartbeat_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_idents_func_t func) { plugin->get_heartbeat_idents = func; } void preludedb_plugin_format_set_get_message_ident_count_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_message_ident_count_func_t func) { plugin->get_message_ident_count = func; } void preludedb_plugin_format_set_get_next_message_ident_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_message_ident_func_t func) { plugin->get_next_message_ident = func; } void preludedb_plugin_format_set_destroy_message_idents_resource_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_message_idents_resource_func_t func) { plugin->destroy_message_idents_resource = func; } void preludedb_plugin_format_set_get_alert_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_func_t func) { plugin->get_alert = func; } void preludedb_plugin_format_set_get_heartbeat_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_func_t func) { plugin->get_heartbeat = func; } void preludedb_plugin_format_set_delete_alert_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_func_t func) { plugin->delete_alert = func; } void preludedb_plugin_format_set_delete_alert_from_list_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_list_func_t func) { plugin->delete_alert_from_list = func; } void preludedb_plugin_format_set_delete_alert_from_result_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_result_idents_func_t func) { plugin->delete_alert_from_result_idents = func; } void preludedb_plugin_format_set_delete_heartbeat_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_func_t func) { plugin->delete_heartbeat = func; } void preludedb_plugin_format_set_delete_heartbeat_from_list_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_list_func_t func) { plugin->delete_heartbeat_from_list = func; } void preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func) { plugin->delete_heartbeat_from_result_idents = func; } void preludedb_plugin_format_set_insert_message_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_insert_message_func_t func) { plugin->insert_message = func; } void preludedb_plugin_format_set_get_values_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_values_func_t func) { plugin->get_values = func; } void preludedb_plugin_format_set_get_next_values_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_values_func_t func) { plugin->get_next_values = func; } void preludedb_plugin_format_set_destroy_values_resource_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_values_resource_func_t func) { plugin->destroy_values_resource = func; } int preludedb_plugin_format_new(preludedb_plugin_format_t **ret) { *ret = calloc(1, sizeof(**ret)); if ( ! *ret ) return preludedb_error_from_errno(errno); return 0; } ssize_t _preludedb_plugin_format_delete_alert_from_list(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, uint64_t *idents, size_t size) { size_t i; int ret = 0; if ( plugin->delete_alert_from_list ) return plugin->delete_alert_from_list(sql, idents, size); for ( i = 0; i < size; i++ ) { ret = plugin->delete_alert(sql, idents[i]); if ( ret < 0 ) return ret; } return i; } ssize_t _preludedb_plugin_format_delete_alert_from_result_idents(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, preludedb_result_idents_t *result) { int ret; uint64_t ident; size_t count = 0; if ( plugin->delete_alert_from_result_idents ) return plugin->delete_alert_from_result_idents(sql, result); while ( (ret = preludedb_result_idents_get_next(result, &ident)) ) { ret = plugin->delete_alert(sql, ident); if ( ret < 0 ) return ret; count++; } return count; } ssize_t _preludedb_plugin_format_delete_heartbeat_from_list(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, uint64_t *idents, size_t size) { size_t i; int ret = 0; if ( plugin->delete_heartbeat_from_list ) return plugin->delete_heartbeat_from_list(sql, idents, size); for ( i = 0; i < size; i++ ) { ret = plugin->delete_heartbeat(sql, idents[i]); if ( ret < 0 ) return ret; } return i; } ssize_t _preludedb_plugin_format_delete_heartbeat_from_result_idents(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, preludedb_result_idents_t *result) { int ret; uint64_t ident; size_t count = 0; if ( plugin->delete_heartbeat_from_result_idents ) return plugin->delete_heartbeat_from_result_idents(sql, result); while ( (ret = preludedb_result_idents_get_next(result, &ident)) ) { ret = plugin->delete_heartbeat(sql, ident); if ( ret < 0 ) return ret; count++; } return count; } libpreludedb-1.0.0/src/preludedb-plugin-sql.c0000664000076400007640000003210211326045005016064 00000000000000/***** * * Copyright (C) 2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include #include #include "preludedb.h" #include "preludedb-plugin-sql.h" #if ! defined(ENOTSUP) && defined(EOPNOTSUPP) # define ENOTSUP EOPNOTSUPP #endif #define PRELUDEDB_ENOTSUP(x) preludedb_error_verbose(prelude_error_code_from_errno(ENOTSUP), "Database backend does not support '%s' operation", x) struct preludedb_plugin_sql { PRELUDE_PLUGIN_GENERIC; preludedb_plugin_sql_open_func_t open; preludedb_plugin_sql_close_func_t close; preludedb_plugin_sql_escape_func_t escape; preludedb_plugin_sql_escape_binary_func_t escape_binary; preludedb_plugin_sql_unescape_binary_func_t unescape_binary; preludedb_plugin_sql_query_func_t query; preludedb_plugin_sql_get_column_count_func_t get_column_count; preludedb_plugin_sql_get_row_count_func_t get_row_count; preludedb_plugin_sql_get_column_name_func_t get_column_name; preludedb_plugin_sql_get_column_num_func_t get_column_num; preludedb_plugin_sql_resource_destroy_func_t resource_destroy; preludedb_plugin_sql_fetch_row_func_t fetch_row; preludedb_plugin_sql_fetch_field_func_t fetch_field; preludedb_plugin_sql_build_time_constraint_string_func_t build_time_constraint_string; preludedb_plugin_sql_build_time_interval_string_func_t build_time_interval_string; preludedb_plugin_sql_build_limit_offset_string_func_t build_limit_offset_string; preludedb_plugin_sql_build_constraint_string_func_t build_constraint_string; preludedb_plugin_sql_get_operator_string_func_t get_operator_string; preludedb_plugin_sql_build_timestamp_string_func_t build_timestamp_string; }; static void bin2hex(const unsigned char *in, size_t inlen, char *out) { static const char hex[] = "0123456789ABCDEF"; while ( inlen-- ) { *(out++) = hex[*in >> 4]; *(out++) = hex[*in++ & 0x0f]; } } void preludedb_plugin_sql_set_open_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_open_func_t func) { plugin->open = func; } int _preludedb_plugin_sql_open(preludedb_plugin_sql_t *plugin, preludedb_sql_settings_t *settings, void **session) { return plugin->open(settings, session); } void preludedb_plugin_sql_set_close_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_close_func_t func) { plugin->close = func; } void _preludedb_plugin_sql_close(preludedb_plugin_sql_t *plugin, void *session) { plugin->close(session); } void preludedb_plugin_sql_set_escape_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_func_t func) { plugin->escape = func; } int _preludedb_plugin_sql_escape(preludedb_plugin_sql_t *plugin, void *session, const char *input, size_t input_size, char **output) { if ( ! plugin->escape ) return _preludedb_plugin_sql_escape_binary(plugin, session, (const unsigned char *) input, input_size, output); return plugin->escape(session, input, input_size, output); } void preludedb_plugin_sql_set_escape_binary_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_binary_func_t func) { plugin->escape_binary = func; } int _preludedb_plugin_sql_escape_binary(preludedb_plugin_sql_t *plugin, void *session, const unsigned char *input, size_t input_size, char **output) { size_t outsize; if ( plugin->escape_binary ) return plugin->escape_binary(session, input, input_size, output); outsize = (input_size * 2) + 4; if ( outsize <= input_size ) return preludedb_error(PRELUDEDB_ERROR_GENERIC); *output = malloc(outsize); if ( ! *output ) return preludedb_error_from_errno(errno); (*output)[0] = 'X'; (*output)[1] = '\''; bin2hex(input, input_size, *output + 2); (*output)[outsize - 2] = '\''; (*output)[outsize - 1] = '\0'; return 0; } void preludedb_plugin_sql_set_unescape_binary_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_unescape_binary_func_t func) { plugin->unescape_binary = func; } int _preludedb_plugin_sql_unescape_binary(preludedb_plugin_sql_t *plugin, void *session, const char *input, size_t input_size, unsigned char **output, size_t *output_size) { if ( plugin->unescape_binary ) return plugin->unescape_binary(session, input, output, output_size); *output = malloc(input_size); if ( ! *output ) return preludedb_error_from_errno(errno); memcpy(*output, input, input_size); *output_size = input_size; return 0; } void preludedb_plugin_sql_set_query_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_query_func_t func) { plugin->query = func; } int _preludedb_plugin_sql_query(preludedb_plugin_sql_t *plugin, void *session, const char *query, void **res) { return plugin->query(session, query, res); } void preludedb_plugin_sql_set_get_column_count_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_count_func_t func) { plugin->get_column_count = func; } unsigned int _preludedb_plugin_sql_get_column_count(preludedb_plugin_sql_t *plugin, void *session, void *resource) { return plugin->get_column_count(session, resource); } void preludedb_plugin_sql_set_get_row_count_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_row_count_func_t func) { plugin->get_row_count = func; } unsigned int _preludedb_plugin_sql_get_row_count(preludedb_plugin_sql_t *plugin, void *session, void *resource) { return plugin->get_row_count(session, resource); } void preludedb_plugin_sql_set_get_column_name_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_name_func_t func) { plugin->get_column_name = func; } const char *_preludedb_plugin_sql_get_column_name(preludedb_plugin_sql_t *plugin, void *session, void *resource, unsigned int column_num) { return plugin->get_column_name(session, resource, column_num); } void preludedb_plugin_sql_set_get_column_num_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_num_func_t func) { plugin->get_column_num = func; } int _preludedb_plugin_sql_get_column_num(preludedb_plugin_sql_t *plugin, void *session, void *resource, const char *column_name) { return plugin->get_column_num(session, resource, column_name); } void preludedb_plugin_sql_set_resource_destroy_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_resource_destroy_func_t func) { plugin->resource_destroy = func; } void _preludedb_plugin_sql_resource_destroy(preludedb_plugin_sql_t *plugin, void *session, void *resource) { plugin->resource_destroy(session, resource); } void preludedb_plugin_sql_set_fetch_row_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_row_func_t func) { plugin->fetch_row = func; } int _preludedb_plugin_sql_fetch_row(preludedb_plugin_sql_t *plugin, void *session, void *resource, void **row) { if ( ! plugin->fetch_row ) PRELUDEDB_ENOTSUP("fetch_row"); return plugin->fetch_row(session, resource, row); } void preludedb_plugin_sql_set_fetch_field_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_field_func_t func) { plugin->fetch_field = func; } int _preludedb_plugin_sql_fetch_field(preludedb_plugin_sql_t *plugin, void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len) { if ( ! plugin->fetch_field ) return PRELUDEDB_ENOTSUP("fetch_field"); return plugin->fetch_field(session, resource, row, column_num, value, len); } void preludedb_plugin_sql_set_build_time_constraint_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_constraint_string_func_t func) { plugin->build_time_constraint_string = func; } int _preludedb_plugin_sql_build_time_constraint_string(preludedb_plugin_sql_t *plugin, prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset) { if ( ! plugin->build_time_constraint_string ) return PRELUDEDB_ENOTSUP("build_time_constraint_string"); return plugin->build_time_constraint_string(output, field, type, operator, value, gmt_offset); } void preludedb_plugin_sql_set_build_time_interval_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_interval_string_func_t func) { plugin->build_time_interval_string = func; } int _preludedb_plugin_sql_build_time_interval_string(preludedb_plugin_sql_t *plugin, preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size) { if ( ! plugin->build_time_interval_string ) return PRELUDEDB_ENOTSUP("build_time_interval_string"); return plugin->build_time_interval_string(type, value, buf, size); } void preludedb_plugin_sql_set_build_limit_offset_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_limit_offset_string_func_t func) { plugin->build_limit_offset_string = func; } int _preludedb_plugin_sql_build_limit_offset_string(preludedb_plugin_sql_t *plugin, void *session, int limit, int offset, prelude_string_t *output) { if ( ! plugin->build_limit_offset_string ) return PRELUDEDB_ENOTSUP("build_limit_offset_string"); return plugin->build_limit_offset_string(session, limit, offset, output); } void preludedb_plugin_sql_set_build_constraint_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_constraint_string_func_t func) { plugin->build_constraint_string = func; } int _preludedb_plugin_sql_build_constraint_string(preludedb_plugin_sql_t *plugin, prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value) { if ( ! plugin->build_constraint_string ) return PRELUDEDB_ENOTSUP("build_constraint_string"); return plugin->build_constraint_string(out, field, operator, value); } void preludedb_plugin_sql_set_get_operator_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_operator_string_func_t func) { plugin->get_operator_string = func; } const char *_preludedb_plugin_sql_get_operator_string(preludedb_plugin_sql_t *plugin, idmef_criterion_operator_t operator) { return plugin->get_operator_string(operator); } void preludedb_plugin_sql_set_build_timestamp_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_timestamp_string_func_t func) { plugin->build_timestamp_string = func; } int _preludedb_plugin_sql_build_timestamp_string(preludedb_plugin_sql_t *plugin, const struct tm *lt, char *out, size_t size) { int ret; if ( plugin->build_timestamp_string ) return plugin->build_timestamp_string(lt, out, size); ret = snprintf(out, size, "'%d-%.2d-%.2d %.2d:%.2d:%.2d'", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec); return (ret < 0 || (size_t) ret >= size) ? -1 : 0; } int preludedb_plugin_sql_new(preludedb_plugin_sql_t **plugin) { *plugin = calloc(1, sizeof(**plugin)); if ( ! *plugin ) return prelude_error_from_errno(errno); return 0; } libpreludedb-1.0.0/src/preludedb-sql.c0000664000076400007640000012457511341467051014616 00000000000000/***** * * Copyright (C) 2003-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #include #include #include #include #include #include "glthread/lock.h" #include "preludedb-error.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-plugin-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" typedef enum { PRELUDEDB_SQL_STATUS_CONNECTED = 0x01, PRELUDEDB_SQL_STATUS_TRANSACTION = 0x02 } preludedb_sql_status_t; #define assert_connected(sql) \ if ( ! (sql->status & PRELUDEDB_SQL_STATUS_CONNECTED) ) { \ int __ret; \ \ __ret = preludedb_sql_connect(sql); \ if ( __ret < 0 ) { \ gl_recursive_lock_unlock(sql->mutex); \ return __ret; \ } \ } struct preludedb_sql { char *type; preludedb_sql_settings_t *settings; preludedb_plugin_sql_t *plugin; preludedb_sql_status_t status; void *session; FILE *logfile; prelude_bool_t internal_transaction_disabled; gl_recursive_lock_t mutex; }; struct preludedb_sql_table { preludedb_sql_t *sql; void *res; prelude_list_t row_list; }; struct preludedb_sql_row { prelude_list_t list; preludedb_sql_table_t *table; void *res; prelude_list_t field_list; }; struct preludedb_sql_field { prelude_list_t list; preludedb_sql_row_t *row; int num; const char *value; size_t len; }; int _preludedb_sql_transaction_start(preludedb_sql_t *sql); int _preludedb_sql_transaction_end(preludedb_sql_t *sql); int _preludedb_sql_transaction_abort(preludedb_sql_t *sql); void _preludedb_sql_enable_internal_transaction(preludedb_sql_t *sql); void _preludedb_sql_disable_internal_transaction(preludedb_sql_t *sql); extern prelude_list_t _sql_plugin_list; static inline void update_sql_from_errno(preludedb_sql_t *sql, preludedb_error_t error) { if ( preludedb_error_check(error, PRELUDEDB_ERROR_CONNECTION) ) { _preludedb_plugin_sql_close(sql->plugin, sql->session); sql->status &= ~PRELUDEDB_SQL_STATUS_CONNECTED; } } /** * preludedb_sql_new: * @new: Pointer to a sql object to initialize. * @type: Type of the database. * @settings: Settings for the choosen database. * * This function initialize the @new object, load and setup the plugin that * handle the database named @type with the configuration stored in @settings. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_new(preludedb_sql_t **new, const char *type, preludedb_sql_settings_t *settings) { *new = calloc(1, sizeof(**new)); if ( ! *new ) return preludedb_error_from_errno(errno); gl_recursive_lock_init(((*new)->mutex)); if ( ! type ) { type = preludedb_sql_settings_get_type(settings); if ( ! type ) return preludedb_error_verbose(PRELUDEDB_ERROR_INVALID_SETTINGS_STRING, "No database type specified"); } (*new)->type = strdup(type); if ( ! (*new)->type ) { free(*new); return preludedb_error_from_errno(errno); } (*new)->settings = settings; (*new)->plugin = (preludedb_plugin_sql_t *) prelude_plugin_search_by_name(&_sql_plugin_list, type); if ( ! (*new)->plugin ) { free((*new)->type); free(*new); return preludedb_error_verbose(PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN, "Could not load sql plugin '%s'", type); } if ( preludedb_sql_settings_get_log(settings) ) preludedb_sql_enable_query_logging(*new, preludedb_sql_settings_get_log(settings)); return 0; } /** * preludedb_sql_destroy: * @sql: Pointer to a sql object. * * Destroy @sql and the underlying plugin. */ void preludedb_sql_destroy(preludedb_sql_t *sql) { if ( sql->status & PRELUDEDB_SQL_STATUS_CONNECTED ) _preludedb_plugin_sql_close(sql->plugin, sql->session); if ( sql->logfile ) fclose(sql->logfile); gl_recursive_lock_destroy(sql->mutex); preludedb_sql_settings_destroy(sql->settings); free(sql->type); free(sql); } /** * preludedb_sql_enable_query_logging: * @sql: Pointer to a sql object. * @filename: Where the logs will be written. * * Log all queries in the specified file. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_sql_enable_query_logging(preludedb_sql_t *sql, const char *filename) { int fd, ret; if ( ! filename ) { sql->logfile = stdout; return 0; } sql->logfile = fopen(filename, "a"); if ( ! sql->logfile ) return preludedb_error_verbose(prelude_error_code_from_errno(errno), "Could not open '%s' for writing: %s", filename, strerror(errno)); fd = fileno(sql->logfile); ret = fcntl(fd, F_GETFD); if ( ret < 0 ) return 0; fcntl(fd, F_SETFD, ret | FD_CLOEXEC); return 0; } /** * preludedb_sql_disable_query_logging: * @sql: Pointer to a sql object. * * Disable query logging. */ void preludedb_sql_disable_query_logging(preludedb_sql_t *sql) { if ( sql->logfile && sql->logfile != stdout ) fclose(sql->logfile); sql->logfile = NULL; } static int preludedb_sql_connect(preludedb_sql_t *sql) { int ret; ret = _preludedb_plugin_sql_open(sql->plugin, sql->settings, &sql->session); if ( ret < 0 ) return ret; sql->status = PRELUDEDB_SQL_STATUS_CONNECTED; return 0; } static int preludedb_sql_table_new(preludedb_sql_table_t **new, preludedb_sql_t *sql, void *res) { *new = malloc(sizeof(**new)); if ( ! *new ) return preludedb_error_from_errno(errno); (*new)->sql = sql; (*new)->res = res; prelude_list_init(&(*new)->row_list); return 0; } /** * preludedb_sql_query: * @sql: Pointer to a sql object. * @query: The SQL query to execute. * @table: Pointer to a table where the query result will be stored if the type of query return * results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull. * * Execute a SQL query. * * Returns: the number of result or a negative value if an error occured. */ int preludedb_sql_query(preludedb_sql_t *sql, const char *query, preludedb_sql_table_t **table) { int ret; void *res; struct timeval start, end; gl_recursive_lock_lock(sql->mutex); assert_connected(sql); gettimeofday(&start, NULL); ret = _preludedb_plugin_sql_query(sql->plugin, sql->session, query, &res); if ( ret < 0 ) update_sql_from_errno(sql, ret); gettimeofday(&end, NULL); gl_recursive_lock_unlock(sql->mutex); if ( sql->logfile ) { fprintf(sql->logfile, "%fs %s\n", (end.tv_sec + (double) end.tv_usec / 1000000) - (start.tv_sec + (double) start.tv_usec / 1000000), query); fflush(sql->logfile); } if ( ret <= 0 ) return ret; ret = preludedb_sql_table_new(table, sql, res); if ( ret < 0 ) { _preludedb_plugin_sql_resource_destroy(sql->plugin, sql->session, res); return ret; } return preludedb_sql_table_get_row_count(*table); } /** * preludedb_sql_query_sprintf: * @sql: Pointer to a sql object. * @table: Pointer to a table where the query result will be stored if the type of query return * results (i.e a SELECT can results, but an INSERT never results) and if the query is sucessfull. * @format: The SQL query to execute in a printf format string. * @...: Arguments referenced in @format. * * Execute a SQL query. * * Returns: 1 if the query returns results, 0 if it does not, or negative value if an error occur. */ int preludedb_sql_query_sprintf(preludedb_sql_t *sql, preludedb_sql_table_t **table, const char *format, ...) { int ret; va_list ap; prelude_string_t *query; ret = prelude_string_new(&query); if ( ret < 0 ) return ret; va_start(ap, format); ret = prelude_string_vprintf(query, format, ap); va_end(ap); if ( ret < 0 ) goto error; ret = preludedb_sql_query(sql, prelude_string_get_string(query), table); error: prelude_string_destroy(query); return ret; } /** * preludedb_sql_insert: * @sql: Pointer to a sql object. * @table: the name of the table where to insert values. * @fields: a list of comma separated field names where the values will be inserted. * @format: The values to insert in a printf format string. * @...: Argument referenced throught @format. * * Insert values in a table. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_insert(preludedb_sql_t *sql, const char *table, const char *fields, const char *format, ...) { int ret; va_list ap; prelude_string_t *query; ret = prelude_string_new(&query); if ( ret < 0 ) return ret; ret = prelude_string_sprintf(query, "INSERT INTO %s (%s) VALUES(", table, fields); if ( ret < 0 ) goto error; va_start(ap, format); ret = prelude_string_vprintf(query, format, ap); va_end(ap); if ( ret < 0 ) goto error; ret = prelude_string_cat(query, ")"); if ( ret < 0 ) goto error; ret = preludedb_sql_query(sql, prelude_string_get_string(query), NULL); error: prelude_string_destroy(query); return ret; } /** * preludedb_sql_build_limit_offset_string: * @sql: Pointer to a sql object. * @limit: The limit value, a value inferior to zero will disable the limit. * @offset: The offset value, a value inferior to zero will disable the offset. * @output: Where the limit/offset built string will be stored. * * Build a limit/offset string for a SQL query, depending on the underlying type of database. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_build_limit_offset_string(preludedb_sql_t *sql, int limit, int offset, prelude_string_t *output) { return _preludedb_plugin_sql_build_limit_offset_string(sql->plugin, sql->session, limit, offset, output); } int _preludedb_sql_transaction_start(preludedb_sql_t *sql) { int ret; gl_recursive_lock_lock(sql->mutex); if ( sql->status & PRELUDEDB_SQL_STATUS_TRANSACTION ) { gl_recursive_lock_unlock(sql->mutex); return preludedb_error(PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION); } ret = preludedb_sql_query(sql, "BEGIN", NULL); if ( ret < 0 ) gl_recursive_lock_unlock(sql->mutex); else sql->status |= PRELUDEDB_SQL_STATUS_TRANSACTION; return ret; } /** * preludedb_sql_transaction_start: * @sql: Pointer to a sql object. * * Begin a sql transaction. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_transaction_start(preludedb_sql_t *sql) { if ( sql->internal_transaction_disabled ) return 0; return _preludedb_sql_transaction_start(sql); } int _preludedb_sql_transaction_end(preludedb_sql_t *sql) { int ret; if ( ! (sql->status & PRELUDEDB_SQL_STATUS_TRANSACTION) ) return preludedb_error(PRELUDEDB_ERROR_NOT_IN_TRANSACTION); ret = preludedb_sql_query(sql, "COMMIT", NULL); sql->status &= ~PRELUDEDB_SQL_STATUS_TRANSACTION; gl_recursive_lock_unlock(sql->mutex); return ret; } /** * preludedb_sql_transaction_end: * @sql: Pointer to a sql object. * * Finish a sql transaction (SQL COMMIT command). * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_transaction_end(preludedb_sql_t *sql) { if ( sql->internal_transaction_disabled ) return 0; return _preludedb_sql_transaction_end(sql); } int _preludedb_sql_transaction_abort(preludedb_sql_t *sql) { int ret; char *original_error = NULL; if ( ! (sql->status & PRELUDEDB_SQL_STATUS_TRANSACTION) ) return preludedb_error(PRELUDEDB_ERROR_NOT_IN_TRANSACTION); if ( _prelude_thread_get_error() ) original_error = strdup(_prelude_thread_get_error()); sql->status &= ~PRELUDEDB_SQL_STATUS_TRANSACTION; if ( original_error && ! (sql->status & PRELUDEDB_SQL_STATUS_CONNECTED) ) { ret = preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, "%s. No ROLLBACK possible due to connection closure", original_error); goto error; } ret = preludedb_sql_query(sql, "ROLLBACK", NULL); if ( ret < 0 ) { if ( original_error ) ret = preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, "%s.\nROLLBACK failed: %s", original_error, preludedb_strerror(ret)); else ret = preludedb_error_verbose(PRELUDEDB_ERROR_QUERY, "ROLLBACK failed: %s", preludedb_strerror(ret)); } error: if ( original_error ) free(original_error); gl_recursive_lock_unlock(sql->mutex); return ret; } /** * preludedb_sql_transaction_abort: * @sql: Pointer to a sql object. * * Abort a sql transaction (SQL ROLLBACK command). * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_transaction_abort(preludedb_sql_t *sql) { if ( sql->internal_transaction_disabled ) return 0; return _preludedb_sql_transaction_abort(sql); } /** * preludedb_sql_escape_fast: * @sql: Pointer to a sql object. * @input: Buffer to escape * @input_size: Buffer size. * @output: Where the new escaped buffer will be stored. * * Escape a string buffer. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_escape_fast(preludedb_sql_t *sql, const char *input, size_t input_size, char **output) { int ret; gl_recursive_lock_lock(sql->mutex); assert_connected(sql); ret = _preludedb_plugin_sql_escape(sql->plugin, sql->session, input, input_size, output); gl_recursive_lock_unlock(sql->mutex); return ret; } /** * preludedb_sql_escape: * @sql: Pointer to a sql object. * @input: Buffer to escape. * @output: Where the new escaped buffer will be stored. * * Escape a string buffer. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_escape(preludedb_sql_t *sql, const char *input, char **output) { if ( ! input ) { *output = strdup("NULL"); return *output ? 0 : preludedb_error_from_errno(errno); } return preludedb_sql_escape_fast(sql, input, strlen(input), output); } /** * preludedb_sql_escape_binary: * @sql: Pointer to a sql object. * @input: Buffer to escape. * @input_size: Buffer size. * @output: Where the new escaped buffer will be stored. * * Escape a binary buffer. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_escape_binary(preludedb_sql_t *sql, const unsigned char *input, size_t input_size, char **output) { int ret; gl_recursive_lock_lock(sql->mutex); assert_connected(sql); ret = _preludedb_plugin_sql_escape_binary(sql->plugin, sql->session, input, input_size, output); gl_recursive_lock_unlock(sql->mutex); return ret; } /** * preludedb_sql_unescape_binary: * @sql: Pointer to a sql object. * @input: Buffer to unescape. * @input_size: Buffer size. * @output: Where the new unescaped buffer will be stored. * @output_size: Size of the new unescape buffer. * * Unescape to a binary buffer. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_sql_unescape_binary(preludedb_sql_t *sql, const char *input, size_t input_size, unsigned char **output, size_t *output_size) { int ret; gl_recursive_lock_lock(sql->mutex); assert_connected(sql); ret = _preludedb_plugin_sql_unescape_binary(sql->plugin, sql->session, input, input_size, output, output_size); gl_recursive_lock_unlock(sql->mutex); return ret; } /** * preludedb_sql_table_destroy: * @table: Pointer to a table object. * * Destroy the @table object. */ void preludedb_sql_table_destroy(preludedb_sql_table_t *table) { preludedb_sql_t *sql = table->sql; preludedb_sql_row_t *row; preludedb_sql_field_t *field; prelude_list_t *tmp, *next_row, *next_field; prelude_list_for_each_safe(&table->row_list, tmp, next_row) { row = prelude_list_entry(tmp, preludedb_sql_row_t, list); prelude_list_for_each_safe(&row->field_list, tmp, next_field) { field = prelude_list_entry(tmp, preludedb_sql_field_t, list); free(field); } free(row); } _preludedb_plugin_sql_resource_destroy(sql->plugin, sql->session, table->res); free(table); } static int preludedb_sql_row_new(preludedb_sql_row_t **row, preludedb_sql_table_t *table, void *res) { *row = malloc(sizeof(**row)); if ( ! *row ) return preludedb_error_from_errno(errno); (*row)->table = table; (*row)->res = res; prelude_list_init(&(*row)->list); prelude_list_init(&(*row)->field_list); prelude_list_add_tail(&table->row_list, &(*row)->list); return 0; } static int preludedb_sql_field_new(preludedb_sql_field_t **field, preludedb_sql_row_t *row, int num, const char *value, size_t len) { *field = malloc(sizeof(**field)); if ( ! field ) return preludedb_error_from_errno(errno); (*field)->row = row; (*field)->num = num; (*field)->value = value; (*field)->len = len; prelude_list_init(&(*field)->list); prelude_list_add_tail(&row->field_list, &(*field)->list); return 0; } /** * preludedb_sql_table_get_column_name: * @table: Pointer to a table object. * @column_num: Column number. * * Get the name of the column number @column_num. * * Returns: the name of the column or NULL if the column @column_num could not be found. */ const char *preludedb_sql_table_get_column_name(preludedb_sql_table_t *table, unsigned int column_num) { return _preludedb_plugin_sql_get_column_name(table->sql->plugin, table->sql->session, table->res, column_num); } /** * preludedb_sql_table_get_column_num: * @table: Pointer to a table object. * @column_name: Column name. * * Get the number of the column named @column_name. * * Returns: the number of the column or -1 if the column @column_name could not be found. */ int preludedb_sql_table_get_column_num(preludedb_sql_table_t *table, const char *column_name) { return _preludedb_plugin_sql_get_column_num(table->sql->plugin, table->sql->session, table->res, column_name); } /** * preludedb_sql_table_get_column_count: * @table: Pointer to a table object. * * Get the the number of columns. * * Returns: the number of columns. */ unsigned int preludedb_sql_table_get_column_count(preludedb_sql_table_t *table) { return _preludedb_plugin_sql_get_column_count(table->sql->plugin, table->sql->session, table->res); } /** * preludedb_sql_table_get_column_count: * @table: Pointer to a table object. * * Get the the number of columns. * * Returns: the number of columns. */ unsigned int preludedb_sql_table_get_row_count(preludedb_sql_table_t *table) { return _preludedb_plugin_sql_get_row_count(table->sql->plugin, table->sql->session, table->res); } /** * preludedb_sql_table_fetch_row: * @table: Pointer to a table object. * @row: Pointer to the row object where the result will be stored. * * Fetch the next table's row. * * Returns: 1 if the table returns a new row, 0 if there is no more rows to fetch or * a negative value if an error occur. */ int preludedb_sql_table_fetch_row(preludedb_sql_table_t *table, preludedb_sql_row_t **row) { int ret; void *res; ret = _preludedb_plugin_sql_fetch_row(table->sql->plugin, table->sql->session, table->res, &res); if ( ret < 0 ) { update_sql_from_errno(table->sql, ret); return ret; } if ( ret == 0 ) return 0; ret = preludedb_sql_row_new(row, table, res); if ( ret < 0 ) return ret; return 1; } /** * preludedb_sql_row_fetch_field: * @row: Pointer to a row object. * @column_num: The column number of the field to be fetched. * @field: Pointer to the field object where the result will be stored. * * Fetch the field of column @column_num * * Returns: 1 if the row returns a non-empty field, 0 if it returns an empty field, or * a negative value if an error occur. */ int preludedb_sql_row_fetch_field(preludedb_sql_row_t *row, unsigned int column_num, preludedb_sql_field_t **field) { const char *value; size_t len; int ret; ret = _preludedb_plugin_sql_fetch_field(row->table->sql->plugin, row->table->sql->session, row->table->res, row->res, column_num, &value, &len); if ( ret < 0 ) { update_sql_from_errno(row->table->sql, ret); return ret; } if ( ret == 0 ) return 0; ret = preludedb_sql_field_new(field, row, column_num, value, len); if ( ret < 0 ) return ret; return 1; } /** * preludedb_sql_row_fetch_field_by_name: * @row: Pointer to a row object. * @column_name: The column name of the field to be fetched. * @field: Pointer to the field object where the result will be stored. * * Fetch the field of column @column_name * * Returns: 1 if the row returns a non-empty field, 0 if it returns an empty field, or * a negative value if an error occur. */ int preludedb_sql_row_fetch_field_by_name(preludedb_sql_row_t *row, const char *column_name, preludedb_sql_field_t **field) { int column_num; column_num = preludedb_sql_table_get_column_num(row->table, column_name); if ( column_num < 0 ) return column_num; return preludedb_sql_row_fetch_field(row, column_num, field); } /** * preludedb_sql_field_get_value: * @field: Pointer to a field object. * * Get the raw value of the field. * * Returns: field value. */ const char *preludedb_sql_field_get_value(preludedb_sql_field_t *field) { return field->value; } /** * preludedb_sql_field_get_len: * @field: Pointer to a field object. * * Get the field value length. * * Returns: field value length. */ size_t preludedb_sql_field_get_len(preludedb_sql_field_t *field) { return field->len; } /** * preludedb_sql_field_to_{int8,uint8,int16,uint16,int32,uint32,int64,uint64,float,double}: * @field: Pointer to a field object. * @value: Pointer to the output value. * * Get the typed value of @field. * * Returns: 0 on success, -1 if the wanted type does not match the field type. */ #define preludedb_sql_field_to(name, type_name, format) \ int preludedb_sql_field_to_ ## name(preludedb_sql_field_t *field, type_name *value) \ { \ int ret; \ \ ret = sscanf(preludedb_sql_field_get_value(field), format, value); \ if ( ret < 0 ) \ return preludedb_error(PRELUDEDB_ERROR_INVALID_VALUE); \ \ return 0; \ } #define preludedb_sql_field_to_int8(name, type_name, format, min, max) \ int preludedb_sql_field_to_ ## name(preludedb_sql_field_t *field, type_name *value) \ { \ int tmp, ret; \ \ ret = sscanf(preludedb_sql_field_get_value(field), format, &tmp); \ if ( ret <= 0 || tmp < min || tmp > max ) \ return preludedb_error(PRELUDEDB_ERROR_INVALID_VALUE); \ \ *value = (type_name) tmp; \ \ return 0; \ } /* * %hh is not a portable convertion specifier */ preludedb_sql_field_to_int8(int8, int8_t, "%d", PRELUDE_INT8_MIN, PRELUDE_INT8_MAX) preludedb_sql_field_to_int8(uint8, uint8_t, "%u", 0, PRELUDE_UINT8_MAX) preludedb_sql_field_to(int16, int16_t, "%hd") preludedb_sql_field_to(uint16, uint16_t, "%hu") preludedb_sql_field_to(int32, int32_t, "%d") preludedb_sql_field_to(uint32, uint32_t, "%u") preludedb_sql_field_to(int64, int64_t, "%" PRELUDE_PRId64) preludedb_sql_field_to(uint64, uint64_t, "%" PRELUDE_PRIu64) preludedb_sql_field_to(float, float, "%f") preludedb_sql_field_to(double, double, "%lf") /** * preludedb_sql_field_to_string: * @field: Pointer to a field type. * @output: Pointer to a string object where the field value will be added. * * Get the string value of @field. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_sql_field_to_string(preludedb_sql_field_t *field, prelude_string_t *output) { return prelude_string_ncat(output, field->value, field->len); } static int build_criterion_fixed_sql_time_value(preludedb_sql_t *sql, const idmef_value_t *value, char *buf, size_t size) { const idmef_time_t *time; time = idmef_value_get_time(value); if ( ! time ) return -1; return preludedb_sql_time_to_timestamp(sql, time, buf, size, NULL, 0, NULL, 0); } static int build_criterion_fixed_sql_like_value(const idmef_value_t *value, char **output) { int ret; size_t i, len; const char *input; idmef_data_t *data; prelude_string_t *outbuf; const prelude_string_t *string; prelude_bool_t escape_next = FALSE; if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_DATA ) { data = idmef_value_get_data(value); if ( ! data ) return -1; input = idmef_data_get_data(data); if ( ! input ) return -1; len = idmef_data_get_len(data); } else { string = idmef_value_get_string(value); if ( ! string ) return -1; input = prelude_string_get_string(string); if ( ! input ) return -1; len = prelude_string_get_len(string); } ret = prelude_string_new(&outbuf); if ( ret < 0 ) return ret; for ( i = 0; i < len; i++ ) { /* * Always escape %, since these are SQL specific. */ if ( *input == '%' ) prelude_string_cat(outbuf, "\\%"); /* * Convert unescaped * to % character. */ else if ( *input == '*' && ! escape_next ) prelude_string_cat(outbuf, "%"); else prelude_string_ncat(outbuf, input, 1); escape_next = (! escape_next && *input == '\\') ? TRUE : FALSE; input++; } ret = prelude_string_get_string_released(outbuf, output); prelude_string_destroy(outbuf); return ret; } static int build_criterion_fixed_sql_value(preludedb_sql_t *sql, prelude_string_t *output, const idmef_value_t *value, idmef_criterion_operator_t operator) { int ret; prelude_string_t *string; char *escaped; if ( idmef_value_get_type(value) == IDMEF_VALUE_TYPE_TIME ) { char buf[PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE]; ret = build_criterion_fixed_sql_time_value(sql, value, buf, sizeof(buf)); if ( ret < 0 ) return ret; return prelude_string_cat(output, buf); } if ( operator & IDMEF_CRITERION_OPERATOR_SUBSTR ) { char *tmp; ret = build_criterion_fixed_sql_like_value(value, &tmp); if ( ret < 0 ) return ret; ret = preludedb_sql_escape(sql, tmp, &escaped); if ( ret < 0 ) { free(tmp); return ret; } ret = prelude_string_cat(output, escaped); free(tmp); free(escaped); return ret; } ret = prelude_string_new(&string); if ( ret < 0 ) return ret; ret = idmef_value_to_string(value, string); if ( ret < 0 ) { prelude_string_destroy(string); return ret; } ret = preludedb_sql_escape(sql, prelude_string_get_string(string), &escaped); prelude_string_destroy(string); if ( ret < 0 ) return ret; ret = prelude_string_cat(output, escaped); free(escaped); return ret; } static int build_criterion_fixed_value(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t operator, const idmef_value_t *value) { int ret; prelude_string_t *value_str; ret = prelude_string_new(&value_str); if ( ret < 0 ) return ret; ret = build_criterion_fixed_sql_value(sql, value_str, value, operator); if ( ret < 0 ) goto err; ret = _preludedb_plugin_sql_build_constraint_string(sql->plugin, output, field, operator, prelude_string_get_string(value_str)); err: prelude_string_destroy(value_str); return ret; } static int build_criterion_broken_down_time_equal(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t op, const struct tm *lt) { unsigned int i; int ret, prev = 0, year, month; const struct { preludedb_sql_time_constraint_type_t type; const int *field_ptr; } tbl[] = { { PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR, &year }, { PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH, &month }, { PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY, <->tm_yday }, { PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY, <->tm_mday }, { PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY, <->tm_wday }, { PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR, <->tm_hour }, { PRELUDEDB_SQL_TIME_CONSTRAINT_MIN, <->tm_min }, { PRELUDEDB_SQL_TIME_CONSTRAINT_SEC, <->tm_sec } }; year = lt->tm_year; if ( year != -1 ) year += 1900; month = lt->tm_mon; if ( month != -1 ) month += 1; for ( i = 0; i < sizeof(tbl) / sizeof(*tbl); i++ ) { if ( *(tbl[i].field_ptr) == -1 ) continue; if ( prev++ ) { ret = prelude_string_cat(output, " AND "); if ( ret < 0 ) return ret; } ret = _preludedb_plugin_sql_build_time_constraint_string(sql->plugin, output, field, tbl[i].type, op, *tbl[i].field_ptr, 0); if ( ret < 0 ) return ret; } return 0; } static int build_criterion_broken_down_time_not_equal(preludedb_sql_t *sql, prelude_string_t *output, const char *field, const struct tm *lt) { int ret; ret = prelude_string_cat(output, "NOT("); if ( ret < 0 ) return ret; ret = build_criterion_broken_down_time_equal(sql, output, field, IDMEF_CRITERION_OPERATOR_EQUAL, lt); if ( ret < 0 ) return ret; return prelude_string_cat(output, ")"); } static int build_criterion_broken_down_time(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t op, const struct tm *time) { if ( op == IDMEF_CRITERION_OPERATOR_EQUAL ) return build_criterion_broken_down_time_equal(sql, output, field, op, time); else if ( op == IDMEF_CRITERION_OPERATOR_NOT_EQUAL ) return build_criterion_broken_down_time_not_equal(sql, output, field, time); return preludedb_error(PRELUDEDB_ERROR_QUERY); } static int build_criterion_regex(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t op, const char *regex) { int ret; char *escaped; ret = preludedb_sql_escape(sql, regex, &escaped); if ( ret < 0 ) return ret; ret = _preludedb_plugin_sql_build_constraint_string(sql->plugin, output, field, op, escaped); free(escaped); return ret; } /** * preludedb_sql_build_criterion_string: * @sql: Pointer to a sql object. * @output: Pointer to a string object, where the result content will be stored. * @field: The sql field name. * @operator: The criterion operator. * @value: The criterion value. * * Build a sql "field operator value" string. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_sql_build_criterion_string(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t operator, idmef_criterion_value_t *value) { int ret = -1; const void *vptr; idmef_criterion_value_type_t type; if ( operator == IDMEF_CRITERION_OPERATOR_NULL ) return prelude_string_sprintf(output, "%s %s", field, _preludedb_plugin_sql_get_operator_string(sql->plugin, operator)); else if ( operator == IDMEF_CRITERION_OPERATOR_NOT_NULL ) return prelude_string_sprintf(output, "%s %s", field, _preludedb_plugin_sql_get_operator_string(sql->plugin, operator)); else if ( operator & IDMEF_CRITERION_OPERATOR_NOT ) { ret = prelude_string_sprintf(output, "(%s %s OR ", field, _preludedb_plugin_sql_get_operator_string(sql->plugin, IDMEF_CRITERION_OPERATOR_NULL)); if ( ret < 0 ) return ret; } type = idmef_criterion_value_get_type(value); vptr = idmef_criterion_value_get_value(value); if ( type == IDMEF_CRITERION_VALUE_TYPE_VALUE ) ret = build_criterion_fixed_value(sql, output, field, operator, idmef_criterion_value_get_value(value)); else if ( type == IDMEF_CRITERION_VALUE_TYPE_REGEX ) ret = build_criterion_regex(sql, output, field, operator, idmef_criterion_value_get_regex(value)); else if ( type == IDMEF_CRITERION_VALUE_TYPE_BROKEN_DOWN_TIME ) ret = build_criterion_broken_down_time(sql, output, field, operator, idmef_criterion_value_get_broken_down_time(value)); if ( ret >= 0 && operator & IDMEF_CRITERION_OPERATOR_NOT ) ret = prelude_string_sprintf(output, ")"); return ret; } /** * preludedb_sql_time_from_timestamp: * @time: Pointer to a time object. * @time_buf: SQL timestamp. * @gmtoff: GMT offset. * @usec: Microseconds. * * Set an idmef time using the timestamp, GMT offset and microseconds given in input. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_sql_time_from_timestamp(idmef_time_t *time, const char *time_buf, int32_t gmtoff, uint32_t usec) { int ret; struct tm tm; memset(&tm, 0, sizeof(tm)); ret = sscanf(time_buf, "%d-%d-%d %d:%d:%d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec); if ( ret < 6 ) return preludedb_error_verbose(PRELUDEDB_ERROR_GENERIC, "Database returned an unknown time format: '%s'", time_buf); tm.tm_year -= 1900; tm.tm_mon -= 1; tm.tm_isdst = -1; idmef_time_set_sec(time, prelude_timegm(&tm)); idmef_time_set_usec(time, usec); idmef_time_set_gmt_offset(time, gmtoff); return 0; } /** * preludedb_sql_time_to_timestamp: * @time: Pointer to a time object. * @time_buf: SQL timestamp. * @time_buf_size: SQL timestamp buffer size. * @gmtoff_buf: GMT offset buffer. * @gmtoff_buf_size: GMT offset buffer size. * @usec_buf: Microseconds buffer. * @usec_buf_size: Microseconds buffer size. * * Set timestamp, GMT offset, and microseconds buffers with the idmef time object * given in input. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_sql_time_to_timestamp(preludedb_sql_t *sql, const idmef_time_t *time, char *time_buf, size_t time_buf_size, char *gmtoff_buf, size_t gmtoff_buf_size, char *usec_buf, size_t usec_buf_size) { int ret; time_t t; struct tm utc; if ( ! time ) { snprintf(time_buf, time_buf_size, "NULL"); if ( gmtoff_buf ) snprintf(gmtoff_buf, gmtoff_buf_size, "NULL"); if ( usec_buf ) snprintf(usec_buf, usec_buf_size, "NULL"); return 0; } t = idmef_time_get_sec(time); if ( ! gmtime_r(&t, &utc) ) return prelude_error_from_errno(errno); ret = _preludedb_plugin_sql_build_timestamp_string(sql->plugin, &utc, time_buf, time_buf_size); if ( ret < 0 ) return ret; if ( gmtoff_buf ) snprintf(gmtoff_buf, gmtoff_buf_size, "%d", idmef_time_get_gmt_offset(time)); if ( usec_buf ) snprintf(usec_buf, usec_buf_size, "%d", idmef_time_get_usec(time)); return 0; } /** * preludedb_sql_get_plugin_error: * @sql: Pointer to a sql object. * * Get sql plugin specific error message. * Deprecated: Use preludedb_strerror(). * * Returns: a non NULL pointer or a NULL pointer if no error is available. */ const char *preludedb_sql_get_plugin_error(preludedb_sql_t *sql) { /* * FIXME: deprecated. */ return NULL; } void _preludedb_sql_enable_internal_transaction(preludedb_sql_t *sql) { sql->internal_transaction_disabled = FALSE; } void _preludedb_sql_disable_internal_transaction(preludedb_sql_t *sql) { sql->internal_transaction_disabled = TRUE; } libpreludedb-1.0.0/src/Makefile.am0000664000076400007640000000221011330611213013705 00000000000000SUBDIRS = include AM_CPPFLAGS = @PCFLAGS@ -I$(srcdir)/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing -DSQL_PLUGIN_DIR=\"@sql_plugin_dir@\" -DFORMAT_PLUGIN_DIR=\"@format_plugin_dir@\" @LIBPRELUDE_CFLAGS@ lib_LTLIBRARIES = libpreludedb.la if HAVE_MYSQL MYSQL_OBJS=-dlopen $(top_builddir)/plugins/sql/mysql/mysql.la endif if HAVE_PGSQL PGSQL_OBJS=-dlopen $(top_builddir)/plugins/sql/pgsql/pgsql.la endif if HAVE_SQLITE3 SQLITE3_OBJS=-dlopen $(top_builddir)/plugins/sql/sqlite3/sqlite3.la endif DLOPENED_OBJS=$(MYSQL_OBJS) $(PGSQL_OBJS) $(SQLITE3_OBJS) -dlopen $(top_builddir)/plugins/format/classic/classic.la libpreludedb_la_LDFLAGS = \ -no-undefined \ -version-info @LIBPRELUDEDB_SONAME@ \ -export-symbols-regex "^preludedb_" \ $(LTLIBTHREAD) \ #$(DLOPENED_OBJS) libpreludedb_la_LIBADD = @LIBPRELUDE_LIBS@ $(LTLIBTHREAD) ../libmissing/libmissing.la libpreludedb_la_SOURCES = \ preludedb.c \ preludedb-path-selection.c \ preludedb-plugin-format.c \ preludedb-plugin-sql.c \ preludedb-sql.c \ preludedb-sql-settings.c \ preludedb-version.c \ preludedb-error.c -include $(top_srcdir)/git.mk libpreludedb-1.0.0/src/Makefile.in0000664000076400007640000010725611347715644013763 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libpreludedb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../libmissing/libmissing.la am_libpreludedb_la_OBJECTS = preludedb.lo preludedb-path-selection.lo \ preludedb-plugin-format.lo preludedb-plugin-sql.lo \ preludedb-sql.lo preludedb-sql-settings.lo \ preludedb-version.lo preludedb-error.lo libpreludedb_la_OBJECTS = $(am_libpreludedb_la_OBJECTS) libpreludedb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libpreludedb_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpreludedb_la_SOURCES) DIST_SOURCES = $(libpreludedb_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include AM_CPPFLAGS = @PCFLAGS@ -I$(srcdir)/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing -DSQL_PLUGIN_DIR=\"@sql_plugin_dir@\" -DFORMAT_PLUGIN_DIR=\"@format_plugin_dir@\" @LIBPRELUDE_CFLAGS@ lib_LTLIBRARIES = libpreludedb.la @HAVE_MYSQL_TRUE@MYSQL_OBJS = -dlopen $(top_builddir)/plugins/sql/mysql/mysql.la @HAVE_PGSQL_TRUE@PGSQL_OBJS = -dlopen $(top_builddir)/plugins/sql/pgsql/pgsql.la @HAVE_SQLITE3_TRUE@SQLITE3_OBJS = -dlopen $(top_builddir)/plugins/sql/sqlite3/sqlite3.la DLOPENED_OBJS = $(MYSQL_OBJS) $(PGSQL_OBJS) $(SQLITE3_OBJS) -dlopen $(top_builddir)/plugins/format/classic/classic.la libpreludedb_la_LDFLAGS = \ -no-undefined \ -version-info @LIBPRELUDEDB_SONAME@ \ -export-symbols-regex "^preludedb_" \ $(LTLIBTHREAD) \ #$(DLOPENED_OBJS) libpreludedb_la_LIBADD = @LIBPRELUDE_LIBS@ $(LTLIBTHREAD) ../libmissing/libmissing.la libpreludedb_la_SOURCES = \ preludedb.c \ preludedb-path-selection.c \ preludedb-plugin-format.c \ preludedb-plugin-sql.c \ preludedb-sql.c \ preludedb-sql-settings.c \ preludedb-version.c \ preludedb-error.c all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @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 " $(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)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpreludedb.la: $(libpreludedb_la_OBJECTS) $(libpreludedb_la_DEPENDENCIES) $(libpreludedb_la_LINK) -rpath $(libdir) $(libpreludedb_la_OBJECTS) $(libpreludedb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-path-selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-plugin-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-plugin-sql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-sql-settings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-sql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb-version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preludedb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ 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-libLTLIBRARIES 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES 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-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/src/include/0000775000076400007640000000000011347715760013405 500000000000000libpreludedb-1.0.0/src/include/preludedb-version.h0000664000076400007640000000220211347715704017121 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_VERSION_H #define _LIBPRELUDEDB_VERSION_H #ifdef __cplusplus extern "C" { #endif #define LIBPRELUDEDB_VERSION "1.0.0" const char *preludedb_check_version(const char *req_version); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_VERSION_H */ libpreludedb-1.0.0/src/include/preludedb.h0000664000076400007640000001027611226653036015443 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_H #define _LIBPRELUDEDB_H #include #include #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-error.h" #include "preludedb-path-selection.h" #ifdef __cplusplus extern "C" { #endif typedef struct preludedb preludedb_t; typedef struct preludedb_result_idents preludedb_result_idents_t; typedef struct preludedb_result_values preludedb_result_values_t; typedef enum { PRELUDEDB_RESULT_IDENTS_ORDER_BY_NONE = 0, PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC = 1, PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC = 2 } preludedb_result_idents_order_t; #define PRELUDEDB_ERRBUF_SIZE 512 int preludedb_init(void); void preludedb_deinit(void); int preludedb_new(preludedb_t **db, preludedb_sql_t *sql, const char *format_name, char *errbuf, size_t size); void preludedb_destroy(preludedb_t *db); const char *preludedb_get_format_name(preludedb_t *db); const char *preludedb_get_format_version(preludedb_t *db); int preludedb_set_format(preludedb_t *db, const char *format_name); preludedb_sql_t *preludedb_get_sql(preludedb_t *db); void preludedb_result_idents_destroy(preludedb_result_idents_t *result); int preludedb_result_idents_get_next(preludedb_result_idents_t *result, uint64_t *ident); void preludedb_result_values_destroy(preludedb_result_values_t *result); int preludedb_result_values_get_next(preludedb_result_values_t *result, idmef_value_t ***values); char *preludedb_get_error(preludedb_t *db, preludedb_error_t error, char *errbuf, size_t size); int preludedb_insert_message(preludedb_t *db, idmef_message_t *message); int preludedb_get_alert_idents(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); int preludedb_get_heartbeat_idents(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result); int preludedb_get_alert(preludedb_t *db, uint64_t ident, idmef_message_t **message); int preludedb_get_heartbeat(preludedb_t *db, uint64_t ident, idmef_message_t **message); int preludedb_delete_alert(preludedb_t *db, uint64_t ident); ssize_t preludedb_delete_alert_from_list(preludedb_t *db, uint64_t *idents, size_t size); ssize_t preludedb_delete_alert_from_result_idents(preludedb_t *db, preludedb_result_idents_t *result); int preludedb_delete_heartbeat(preludedb_t *db, uint64_t ident); ssize_t preludedb_delete_heartbeat_from_list(preludedb_t *db, uint64_t *idents, size_t size); ssize_t preludedb_delete_heartbeat_from_result_idents(preludedb_t *db, preludedb_result_idents_t *result); int preludedb_get_values(preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result); int preludedb_transaction_start(preludedb_t *db); int preludedb_transaction_end(preludedb_t *db); int preludedb_transaction_abort(preludedb_t *db); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_H */ libpreludedb-1.0.0/src/include/preludedb-plugin-sql.h0000664000076400007640000002350711226653036017535 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_PLUGIN_SQL_H #define _LIBPRELUDEDB_PLUGIN_SQL_H #include #ifdef __cplusplus extern "C" { #endif typedef struct preludedb_plugin_sql preludedb_plugin_sql_t; typedef int (*preludedb_plugin_sql_open_func_t)(preludedb_sql_settings_t *settings, void **session); typedef void (*preludedb_plugin_sql_close_func_t)(void *session); typedef int (*preludedb_plugin_sql_escape_func_t)(void *session, const char *input, size_t input_size, char **output); typedef int (*preludedb_plugin_sql_escape_binary_func_t)(void *session, const unsigned char *input, size_t input_size, char **output); typedef int (*preludedb_plugin_sql_unescape_binary_func_t)(void *session, const char *input, unsigned char **output, size_t *output_size); typedef int (*preludedb_plugin_sql_query_func_t)(void *session, const char *query, void **res); typedef unsigned int (*preludedb_plugin_sql_get_column_count_func_t)(void *session, void *resource); typedef unsigned int (*preludedb_plugin_sql_get_row_count_func_t)(void *session, void *resource); typedef const char *(*preludedb_plugin_sql_get_column_name_func_t)(void *session, void *resource, unsigned int column_num); typedef int (*preludedb_plugin_sql_get_column_num_func_t)(void *session, void *resource, const char *column_name); typedef void (*preludedb_plugin_sql_resource_destroy_func_t)(void *session, void *resource); typedef int (*preludedb_plugin_sql_fetch_row_func_t)(void *session, void *resource, void **row); typedef int (*preludedb_plugin_sql_fetch_field_func_t)(void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len); typedef int (*preludedb_plugin_sql_build_time_constraint_string_func_t)(prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset); typedef int (*preludedb_plugin_sql_build_time_interval_string_func_t)(preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size); typedef int (*preludedb_plugin_sql_build_limit_offset_string_func_t)(void *session, int limit, int offset, prelude_string_t *output); typedef int (*preludedb_plugin_sql_build_constraint_string_func_t)(prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value); typedef const char *(*preludedb_plugin_sql_get_operator_string_func_t)(idmef_criterion_operator_t operator); typedef int (*preludedb_plugin_sql_build_timestamp_string_func_t)(const struct tm *t, char *out, size_t size); void preludedb_plugin_sql_set_open_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_open_func_t func); int _preludedb_plugin_sql_open(preludedb_plugin_sql_t *plugin, preludedb_sql_settings_t *settings, void **session); void preludedb_plugin_sql_set_close_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_close_func_t func); void _preludedb_plugin_sql_close(preludedb_plugin_sql_t *plugin, void *session); void preludedb_plugin_sql_set_escape_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_func_t func); int _preludedb_plugin_sql_escape(preludedb_plugin_sql_t *plugin, void *session, const char *input, size_t input_size, char **output); void preludedb_plugin_sql_set_escape_binary_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_escape_binary_func_t func); int _preludedb_plugin_sql_escape_binary(preludedb_plugin_sql_t *plugin, void *session, const unsigned char *input, size_t input_size, char **output); void preludedb_plugin_sql_set_unescape_binary_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_unescape_binary_func_t func); int _preludedb_plugin_sql_unescape_binary(preludedb_plugin_sql_t *plugin, void *session, const char *input, size_t input_size, unsigned char **output, size_t *output_size); void preludedb_plugin_sql_set_query_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_query_func_t func); int _preludedb_plugin_sql_query(preludedb_plugin_sql_t *plugin, void *session, const char *query, void **res); void preludedb_plugin_sql_set_get_column_count_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_count_func_t func); unsigned int _preludedb_plugin_sql_get_column_count(preludedb_plugin_sql_t *plugin, void *session, void *resource); void preludedb_plugin_sql_set_get_row_count_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_row_count_func_t func); unsigned int _preludedb_plugin_sql_get_row_count(preludedb_plugin_sql_t *plugin, void *session, void *resource); void preludedb_plugin_sql_set_get_column_name_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_name_func_t func); const char *_preludedb_plugin_sql_get_column_name(preludedb_plugin_sql_t *plugin, void *session, void *resource, unsigned int column_num); void preludedb_plugin_sql_set_get_column_num_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_column_num_func_t func); int _preludedb_plugin_sql_get_column_num(preludedb_plugin_sql_t *plugin, void *session, void *resource, const char *column_name); void preludedb_plugin_sql_set_resource_destroy_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_resource_destroy_func_t func); void _preludedb_plugin_sql_resource_destroy(preludedb_plugin_sql_t *plugin, void *session, void *resource); void preludedb_plugin_sql_set_fetch_row_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_row_func_t func); int _preludedb_plugin_sql_fetch_row(preludedb_plugin_sql_t *plugin, void *session, void *resource, void **row); void preludedb_plugin_sql_set_fetch_field_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_fetch_field_func_t func); int _preludedb_plugin_sql_fetch_field(preludedb_plugin_sql_t *plugin, void *session, void *resource, void *row, unsigned int column_num, const char **value, size_t *len); void preludedb_plugin_sql_set_build_time_constraint_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_constraint_string_func_t func); int _preludedb_plugin_sql_build_time_constraint_string(preludedb_plugin_sql_t *plugin, prelude_string_t *output, const char *field, preludedb_sql_time_constraint_type_t type, idmef_criterion_operator_t operator, int value, int gmt_offset); void preludedb_plugin_sql_set_build_time_interval_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_time_interval_string_func_t func); int _preludedb_plugin_sql_build_time_interval_string(preludedb_plugin_sql_t *plugin, preludedb_sql_time_constraint_type_t type, int value, char *buf, size_t size); void preludedb_plugin_sql_set_build_limit_offset_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_limit_offset_string_func_t func); int _preludedb_plugin_sql_build_limit_offset_string(preludedb_plugin_sql_t *plugin, void *session, int limit, int offset, prelude_string_t *output); void preludedb_plugin_sql_set_build_constraint_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_constraint_string_func_t func); int _preludedb_plugin_sql_build_constraint_string(preludedb_plugin_sql_t *plugin, prelude_string_t *out, const char *field, idmef_criterion_operator_t operator, const char *value); void preludedb_plugin_sql_set_get_operator_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_get_operator_string_func_t func); const char *_preludedb_plugin_sql_get_operator_string(preludedb_plugin_sql_t *plugin, idmef_criterion_operator_t operator); void preludedb_plugin_sql_set_build_timestamp_string_func(preludedb_plugin_sql_t *plugin, preludedb_plugin_sql_build_timestamp_string_func_t func); int _preludedb_plugin_sql_build_timestamp_string(preludedb_plugin_sql_t *plugin, const struct tm *t, char *out, size_t size); int preludedb_plugin_sql_new(preludedb_plugin_sql_t **plugin); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_PLUGIN_SQL_H */ libpreludedb-1.0.0/src/include/preludedb-sql-settings.h0000664000076400007640000000663111226653036020076 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_SQL_SETTINGS_H #define _LIBPRELUDEDB_SQL_SETTINGS_H #ifdef __cplusplus extern "C" { #endif #define PRELUDEDB_SQL_SETTING_HOST "host" #define PRELUDEDB_SQL_SETTING_PORT "port" #define PRELUDEDB_SQL_SETTING_NAME "name" #define PRELUDEDB_SQL_SETTING_USER "user" #define PRELUDEDB_SQL_SETTING_PASS "pass" #define PRELUDEDB_SQL_SETTING_TYPE "type" #define PRELUDEDB_SQL_SETTING_FILE "file" #define PRELUDEDB_SQL_SETTING_LOG "log" typedef struct preludedb_sql_settings preludedb_sql_settings_t; int preludedb_sql_settings_new(preludedb_sql_settings_t **settings); int preludedb_sql_settings_new_from_string(preludedb_sql_settings_t **settings, const char *str); void preludedb_sql_settings_destroy(preludedb_sql_settings_t *settings); int preludedb_sql_settings_set(preludedb_sql_settings_t *settings, const char *name, const char *value); int preludedb_sql_settings_set_from_string(preludedb_sql_settings_t *settings, const char *str); const char *preludedb_sql_settings_get(const preludedb_sql_settings_t *settings, const char *name); int preludedb_sql_settings_set_host(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_host(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_port(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_port(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_name(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_name(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_user(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_user(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_pass(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_pass(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_log(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_log(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_type(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_type(const preludedb_sql_settings_t *settings); int preludedb_sql_settings_set_file(preludedb_sql_settings_t *settings, const char *value); const char *preludedb_sql_settings_get_file(const preludedb_sql_settings_t *settings); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_SQL_SETTINGS_H */ libpreludedb-1.0.0/src/include/preludedb-error.h0000664000076400007640000000576211226653036016576 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_ERROR_H #define _LIBPRELUDEDB_ERROR_H #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDEDB_ERROR_NO_ERROR = 0, PRELUDEDB_ERROR_GENERIC = 1, PRELUDEDB_ERROR_INVALID_SETTINGS_STRING = 2, PRELUDEDB_ERROR_CONNECTION = 3, PRELUDEDB_ERROR_QUERY = 4, PRELUDEDB_ERROR_INVALID_COLUMN_NUM = 5, PRELUDEDB_ERROR_INVALID_COLUMN_NAME = 6, PRELUDEDB_ERROR_INVALID_VALUE = 7, PRELUDEDB_ERROR_INVALID_VALUE_TYPE = 8, PRELUDEDB_ERROR_UNKNOWN_SQL_PLUGIN = 9, PRELUDEDB_ERROR_UNKNOWN_FORMAT_PLUGIN = 10, PRELUDEDB_ERROR_ALREADY_IN_TRANSACTION = 11, PRELUDEDB_ERROR_NOT_IN_TRANSACTION = 12, PRELUDEDB_ERROR_INVALID_MESSAGE_IDENT = 13, PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING = 14, PRELUDEDB_ERROR_INVALID_OBJECT_SELECTION = 15, PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_OLD = 16, PRELUDEDB_ERROR_SCHEMA_VERSION_TOO_RECENT = 17, PRELUDEDB_ERROR_SCHEMA_VERSION_INVALID = 18, PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN = 19, PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN = 20 } preludedb_error_code_t; typedef prelude_error_t preludedb_error_t; static inline preludedb_error_t preludedb_error(preludedb_error_code_t error) { return (preludedb_error_t) prelude_error_make(PRELUDE_ERROR_SOURCE_PRELUDEDB, error); } static inline preludedb_error_t preludedb_error_verbose(preludedb_error_code_t error, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = prelude_error_verbose_make_v(PRELUDE_ERROR_SOURCE_PRELUDEDB, error, fmt, ap); va_end(ap); return ret; } static inline prelude_bool_t preludedb_error_check(preludedb_error_t error, preludedb_error_code_t code) { return (prelude_error_get_source(error) == PRELUDE_ERROR_SOURCE_PRELUDEDB && prelude_error_get_code(error) == code); } static inline preludedb_error_t preludedb_error_from_errno(int err) { return prelude_error_from_errno(err); } const char *preludedb_strerror(preludedb_error_t error); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_ERROR_H */ libpreludedb-1.0.0/src/include/preludedb-plugin-format-prv.h0000664000076400007640000000476111226653036021034 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_PLUGIN_FORMAT_PRV_H #define _LIBPRELUDEDB_PLUGIN_FORMAT_PRV_H #include "preludedb-plugin-format.h" struct preludedb_plugin_format { PRELUDE_PLUGIN_GENERIC; preludedb_plugin_format_check_schema_version_func_t check_schema_version; preludedb_plugin_format_get_alert_idents_func_t get_alert_idents; preludedb_plugin_format_get_heartbeat_idents_func_t get_heartbeat_idents; preludedb_plugin_format_get_message_ident_count_func_t get_message_ident_count; preludedb_plugin_format_get_next_message_ident_func_t get_next_message_ident; preludedb_plugin_format_destroy_message_idents_resource_func_t destroy_message_idents_resource; preludedb_plugin_format_get_alert_func_t get_alert; preludedb_plugin_format_get_heartbeat_func_t get_heartbeat; preludedb_plugin_format_delete_alert_func_t delete_alert; preludedb_plugin_format_delete_alert_from_list_func_t delete_alert_from_list; preludedb_plugin_format_delete_alert_from_result_idents_func_t delete_alert_from_result_idents; preludedb_plugin_format_delete_heartbeat_func_t delete_heartbeat; preludedb_plugin_format_delete_heartbeat_from_list_func_t delete_heartbeat_from_list; preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t delete_heartbeat_from_result_idents; preludedb_plugin_format_insert_message_func_t insert_message; preludedb_plugin_format_get_values_func_t get_values; preludedb_plugin_format_get_next_values_func_t get_next_values; preludedb_plugin_format_destroy_values_resource_func_t destroy_values_resource; }; #endif libpreludedb-1.0.0/src/include/Makefile.am0000664000076400007640000000060211226653036015350 00000000000000includedir = $(prefix)/include/libpreludedb include_HEADERS = \ preludedb-path-selection.h \ preludedb-plugin-sql.h \ preludedb-plugin-format.h \ preludedb-sql-settings.h \ preludedb-sql.h \ preludedb-version.h \ preludedb-error.h \ preludedb.h nodist_include_HEADERS = preludedb-version.h noinst_HEADERS = preludedb-plugin-format-prv.h -include $(top_srcdir)/git.mk libpreludedb-1.0.0/src/include/preludedb-plugin-format.h0000664000076400007640000002063211226653036020222 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_PLUGIN_FORMAT_H #define _LIBPRELUDEDB_PLUGIN_FORMAT_H #include #ifdef __cplusplus extern "C" { #endif typedef struct preludedb_plugin_format preludedb_plugin_format_t; typedef int (*preludedb_plugin_format_check_schema_version_func_t)(const char *version); typedef int (*preludedb_plugin_format_get_alert_idents_func_t)(preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); typedef int (*preludedb_plugin_format_get_heartbeat_idents_func_t)(preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res); typedef size_t (*preludedb_plugin_format_get_message_ident_count_func_t)(void *res); typedef int (*preludedb_plugin_format_get_next_message_ident_func_t)(void *res, uint64_t *ident); typedef void (*preludedb_plugin_format_destroy_message_idents_resource_func_t)(void *res); typedef int (*preludedb_plugin_format_get_alert_func_t)(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); typedef int (*preludedb_plugin_format_get_heartbeat_func_t)(preludedb_sql_t *sql, uint64_t ident, idmef_message_t **message); typedef int (*preludedb_plugin_format_delete_alert_func_t)(preludedb_sql_t *sql, uint64_t ident); typedef ssize_t (*preludedb_plugin_format_delete_alert_from_list_func_t)(preludedb_sql_t *sql, uint64_t *idents, size_t size); typedef ssize_t (*preludedb_plugin_format_delete_alert_from_result_idents_func_t)(preludedb_sql_t *sql, preludedb_result_idents_t *results); typedef int (*preludedb_plugin_format_delete_heartbeat_func_t)(preludedb_sql_t *sql, uint64_t ident); typedef ssize_t (*preludedb_plugin_format_delete_heartbeat_from_list_func_t)(preludedb_sql_t *sql, uint64_t *idents, size_t size); typedef ssize_t (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t)(preludedb_sql_t *sql, preludedb_result_idents_t *results); typedef int (*preludedb_plugin_format_insert_message_func_t)(preludedb_sql_t *sql, idmef_message_t *message); typedef int (*preludedb_plugin_format_get_values_func_t)(preludedb_sql_t *sql, preludedb_path_selection_t *selection, idmef_criteria_t *criteria, int distinct, int limit, int offset, void **res); typedef int (*preludedb_plugin_format_get_next_values_func_t)(void *res, preludedb_path_selection_t *selection, idmef_value_t ***values); typedef void (*preludedb_plugin_format_destroy_values_resource_func_t)(void *res); void preludedb_plugin_format_set_check_schema_version_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_check_schema_version_func_t func); void preludedb_plugin_format_set_get_alert_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_idents_func_t func); void preludedb_plugin_format_set_get_heartbeat_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_idents_func_t func); void preludedb_plugin_format_set_get_message_ident_count_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_message_ident_count_func_t func); void preludedb_plugin_format_set_get_next_message_ident_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_message_ident_func_t func); void preludedb_plugin_format_set_destroy_message_idents_resource_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_message_idents_resource_func_t func); void preludedb_plugin_format_set_get_alert_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_alert_func_t func); void preludedb_plugin_format_set_get_heartbeat_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_heartbeat_func_t func); void preludedb_plugin_format_set_delete_alert_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_func_t func); void preludedb_plugin_format_set_delete_alert_from_list_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_list_func_t func); void preludedb_plugin_format_set_delete_alert_from_result_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_alert_from_result_idents_func_t func); ssize_t _preludedb_plugin_format_delete_alert_from_list(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, uint64_t *idents, size_t size); ssize_t _preludedb_plugin_format_delete_alert_from_result_idents(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, preludedb_result_idents_t *result); void preludedb_plugin_format_set_delete_heartbeat_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_func_t func); void preludedb_plugin_format_set_delete_heartbeat_from_list_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_list_func_t func); void preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func); ssize_t _preludedb_plugin_format_delete_heartbeat_from_list(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, uint64_t *idents, size_t size); ssize_t _preludedb_plugin_format_delete_heartbeat_from_result_idents(preludedb_plugin_format_t *plugin, preludedb_sql_t *sql, preludedb_result_idents_t *result); void preludedb_plugin_format_set_insert_message_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_insert_message_func_t func); void preludedb_plugin_format_set_get_values_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_values_func_t func); void preludedb_plugin_format_set_get_next_values_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_get_next_values_func_t func); void preludedb_plugin_format_set_destroy_values_resource_func(preludedb_plugin_format_t *plugin, preludedb_plugin_format_destroy_values_resource_func_t func); int preludedb_plugin_format_new(preludedb_plugin_format_t **ret); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_PLUGIN_FORMAT_H */ libpreludedb-1.0.0/src/include/Makefile.in0000664000076400007640000006607311347715644015407 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ 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@ target_triplet = @target@ subdir = src/include DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/preludedb-version.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = preludedb-version.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \ $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(prefix)/include/libpreludedb infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = \ preludedb-path-selection.h \ preludedb-plugin-sql.h \ preludedb-plugin-format.h \ preludedb-sql-settings.h \ preludedb-sql.h \ preludedb-version.h \ preludedb-error.h \ preludedb.h nodist_include_HEADERS = preludedb-version.h noinst_HEADERS = preludedb-plugin-format-prv.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): preludedb-version.h: $(top_builddir)/config.status $(srcdir)/preludedb-version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ 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)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ 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)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-nodist_includeHEADERS 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-includeHEADERS uninstall-nodist_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-includeHEADERS \ uninstall-nodist_includeHEADERS -include $(top_srcdir)/git.mk # 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: libpreludedb-1.0.0/src/include/preludedb-sql.h0000664000076400007640000001406311226653036016236 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_SQL_H #define _LIBPRELUDEDB_SQL_H #include #ifdef __cplusplus extern "C" { #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #define PRELUDEDB_SQL_TIMESTAMP_STRING_SIZE 128 typedef enum { PRELUDEDB_SQL_TIME_CONSTRAINT_YEAR, PRELUDEDB_SQL_TIME_CONSTRAINT_MONTH, PRELUDEDB_SQL_TIME_CONSTRAINT_YDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_MDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_WDAY, PRELUDEDB_SQL_TIME_CONSTRAINT_HOUR, PRELUDEDB_SQL_TIME_CONSTRAINT_MIN, PRELUDEDB_SQL_TIME_CONSTRAINT_SEC } preludedb_sql_time_constraint_type_t; typedef struct preludedb_sql preludedb_sql_t; typedef struct preludedb_sql_table preludedb_sql_table_t; typedef struct preludedb_sql_row preludedb_sql_row_t; typedef struct preludedb_sql_field preludedb_sql_field_t; int preludedb_sql_new(preludedb_sql_t **new, const char *type, preludedb_sql_settings_t *settings); void preludedb_sql_destroy(preludedb_sql_t *sql); int preludedb_sql_enable_query_logging(preludedb_sql_t *sql, const char *filename); void preludedb_sql_disable_query_logging(preludedb_sql_t *sql); int preludedb_sql_query(preludedb_sql_t *sql, const char *query, preludedb_sql_table_t **table); int preludedb_sql_query_sprintf(preludedb_sql_t *sql, preludedb_sql_table_t **table, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); int preludedb_sql_insert(preludedb_sql_t *sql, const char *table, const char *fields, const char *format, ...) __attribute__ ((__format__ (__printf__, 4, 5))); int preludedb_sql_build_limit_offset_string(preludedb_sql_t *sql, int limit, int offset, prelude_string_t *output); int preludedb_sql_transaction_start(preludedb_sql_t *sql); int preludedb_sql_transaction_end(preludedb_sql_t *sql); int preludedb_sql_transaction_abort(preludedb_sql_t *sql); int preludedb_sql_escape_fast(preludedb_sql_t *sql, const char *input, size_t input_size, char **output); int preludedb_sql_escape(preludedb_sql_t *sql, const char *input, char **output); int preludedb_sql_escape_binary(preludedb_sql_t *sql, const unsigned char *input, size_t input_size, char **output); int preludedb_sql_unescape_binary(preludedb_sql_t *sql, const char *input, size_t input_size, unsigned char **output, size_t *output_size); void preludedb_sql_table_destroy(preludedb_sql_table_t *table); const char *preludedb_sql_table_get_column_name(preludedb_sql_table_t *table, unsigned int column_num); int preludedb_sql_table_get_column_num(preludedb_sql_table_t *table, const char *column_name); unsigned int preludedb_sql_table_get_column_count(preludedb_sql_table_t *table); unsigned int preludedb_sql_table_get_row_count(preludedb_sql_table_t *table); int preludedb_sql_table_fetch_row(preludedb_sql_table_t *table, preludedb_sql_row_t **row); int preludedb_sql_row_fetch_field(preludedb_sql_row_t *row, unsigned int column_num, preludedb_sql_field_t **field); int preludedb_sql_row_fetch_field_by_name(preludedb_sql_row_t *row, const char *column_name, preludedb_sql_field_t **field); const char *preludedb_sql_field_get_value(preludedb_sql_field_t *field); size_t preludedb_sql_field_get_len(preludedb_sql_field_t *field); int preludedb_sql_field_to_int8(preludedb_sql_field_t *field, int8_t *value); int preludedb_sql_field_to_uint8(preludedb_sql_field_t *field, uint8_t *value); int preludedb_sql_field_to_int16(preludedb_sql_field_t *field, int16_t *value); int preludedb_sql_field_to_uint16(preludedb_sql_field_t *field, uint16_t *value); int preludedb_sql_field_to_int32(preludedb_sql_field_t *field, int32_t *value); int preludedb_sql_field_to_uint32(preludedb_sql_field_t *field, uint32_t *value); int preludedb_sql_field_to_int64(preludedb_sql_field_t *field, int64_t *value); int preludedb_sql_field_to_uint64(preludedb_sql_field_t *field, uint64_t *value); int preludedb_sql_field_to_float(preludedb_sql_field_t *field, float *value); int preludedb_sql_field_to_double(preludedb_sql_field_t *field, double *value); int preludedb_sql_field_to_string(preludedb_sql_field_t *field, prelude_string_t *output); int preludedb_sql_build_criterion_string(preludedb_sql_t *sql, prelude_string_t *output, const char *field, idmef_criterion_operator_t operator, idmef_criterion_value_t *value); int preludedb_sql_time_from_timestamp(idmef_time_t *time, const char *time_buf, int32_t gmtoff, uint32_t usec); int preludedb_sql_time_to_timestamp(preludedb_sql_t *sql, const idmef_time_t *time, char *time_buf, size_t time_buf_size, char *gmtoff_buf, size_t gmtoff_buf_size, char *usec_buf, size_t usec_buf_size); /* * Deprecated, use preludedb_strerror() */ const char *preludedb_sql_get_plugin_error(preludedb_sql_t *sql); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_SQL_H */ libpreludedb-1.0.0/src/include/preludedb-path-selection.h0000664000076400007640000000517011226653036020355 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_OBJECT_SELECTION_H #define _LIBPRELUDEDB_OBJECT_SELECTION_H #ifdef __cplusplus extern "C" { #endif typedef enum { PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN = 0x01, PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX = 0x02, PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG = 0x04, PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD = 0x08, PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT = 0x10, PRELUDEDB_SELECTED_OBJECT_GROUP_BY = 0x20, PRELUDEDB_SELECTED_OBJECT_ORDER_ASC = 0x40, PRELUDEDB_SELECTED_OBJECT_ORDER_DESC = 0x80 } preludedb_selected_path_flags_t; typedef struct preludedb_path_selection preludedb_path_selection_t; typedef struct preludedb_selected_path preludedb_selected_path_t; int preludedb_selected_path_new(preludedb_selected_path_t **selected_path, idmef_path_t *path, int flags); int preludedb_selected_path_new_string(preludedb_selected_path_t **selected_path, const char *str); void preludedb_selected_path_destroy(preludedb_selected_path_t *selected_path); idmef_path_t *preludedb_selected_path_get_path(preludedb_selected_path_t *selected_path); preludedb_selected_path_flags_t preludedb_selected_path_get_flags(preludedb_selected_path_t *selected_path); int preludedb_path_selection_new(preludedb_path_selection_t **path_selection); void preludedb_path_selection_destroy(preludedb_path_selection_t *path_selection); void preludedb_path_selection_add(preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); preludedb_selected_path_t *preludedb_path_selection_get_next(preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path); size_t preludedb_path_selection_get_count(preludedb_path_selection_t *path_selection); #ifdef __cplusplus } #endif #endif /* ! _LIBPRELUDEDB_OBJECT_SELECTION_H */ libpreludedb-1.0.0/src/include/preludedb-version.h.in0000664000076400007640000000220611226653036017525 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #ifndef _LIBPRELUDEDB_VERSION_H #define _LIBPRELUDEDB_VERSION_H #ifdef __cplusplus extern "C" { #endif #define LIBPRELUDEDB_VERSION "@VERSION@" const char *preludedb_check_version(const char *req_version); #ifdef __cplusplus } #endif #endif /* _LIBPRELUDEDB_VERSION_H */ libpreludedb-1.0.0/src/preludedb.c0000664000076400007640000004713311326045005014005 00000000000000/***** * * Copyright (C) 2003-2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include "preludedb-error.h" #include "preludedb-sql-settings.h" #include "preludedb-sql.h" #include "preludedb-path-selection.h" #include "preludedb.h" #include "preludedb-plugin-format.h" #include "preludedb-plugin-format-prv.h" #define PRELUDEDB_PLUGIN_SYMBOL "preludedb_plugin_init" struct preludedb { char *format_version; preludedb_sql_t *sql; preludedb_plugin_format_t *plugin; }; struct preludedb_result_idents { preludedb_t *db; void *res; }; struct preludedb_result_values { preludedb_t *db; preludedb_path_selection_t *selection; void *res; }; int _preludedb_sql_transaction_start(preludedb_sql_t *sql); int _preludedb_sql_transaction_end(preludedb_sql_t *sql); int _preludedb_sql_transaction_abort(preludedb_sql_t *sql); void _preludedb_sql_enable_internal_transaction(preludedb_sql_t *sql); void _preludedb_sql_disable_internal_transaction(preludedb_sql_t *sql); static int libpreludedb_refcount = 0; PRELUDE_LIST(_sql_plugin_list); static PRELUDE_LIST(plugin_format_list); int preludedb_init(void) { int ret; if ( libpreludedb_refcount++ > 0 ) return 0; ret = prelude_init(NULL, NULL); if ( ret < 0 ) return ret; ret = access(FORMAT_PLUGIN_DIR, F_OK); if ( ret < 0 ) return preludedb_error_verbose(PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN, "could not access format plugin directory '%s'", FORMAT_PLUGIN_DIR); ret = prelude_plugin_load_from_dir(&plugin_format_list, FORMAT_PLUGIN_DIR, PRELUDEDB_PLUGIN_SYMBOL, NULL, NULL, NULL); if ( ret < 0 ) return ret; ret = access(SQL_PLUGIN_DIR, F_OK); if ( ret < 0 ) return preludedb_error_verbose(PRELUDEDB_ERROR_CANNOT_LOAD_SQL_PLUGIN, "could not access sql plugin directory '%s'", SQL_PLUGIN_DIR); ret = prelude_plugin_load_from_dir(&_sql_plugin_list, SQL_PLUGIN_DIR, PRELUDEDB_PLUGIN_SYMBOL, NULL, NULL, NULL); if ( ret < 0 ) return ret; return 0; } void preludedb_deinit(void) { prelude_list_t *iter; prelude_plugin_generic_t *pl; if ( --libpreludedb_refcount > 0 ) return; iter = NULL; while ( (pl = prelude_plugin_get_next(&_sql_plugin_list, &iter)) ) { prelude_plugin_unload(pl); free(pl); } iter = NULL; while ( (pl = prelude_plugin_get_next(&plugin_format_list, &iter)) ) { prelude_plugin_unload(pl); free(pl); } prelude_deinit(); } static int preludedb_autodetect_format(preludedb_t *db) { preludedb_sql_table_t *table; preludedb_sql_row_t *row; preludedb_sql_field_t *format_name; preludedb_sql_field_t *format_version; int ret; ret = preludedb_sql_query(db->sql, "SELECT name, version from _format", &table); if ( ret <= 0 ) return (ret < 0) ? ret : -1; ret = preludedb_sql_table_fetch_row(table, &row); if ( ret < 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 0, &format_name); if ( ret < 0 ) goto error; ret = preludedb_set_format(db, preludedb_sql_field_get_value(format_name)); if ( ret < 0 ) goto error; ret = preludedb_sql_row_fetch_field(row, 1, &format_version); if ( ret < 0 ) goto error; ret = db->plugin->check_schema_version(preludedb_sql_field_get_value(format_version)); if ( ret < 0 ) goto error; db->format_version = strdup(preludedb_sql_field_get_value(format_version)); if ( ! db->format_version ) ret = prelude_error_from_errno(errno); error: preludedb_sql_table_destroy(table); return ret; } /** * preludedb_new: * @db: Pointer to a db object to initialize. * @sql: Pointer to a sql object. * @format_name: Format name of the underlying database, if NULL the format will be automatically detected * @errbuf: Buffer that will be set to an error message if an error occur. * @size: size of @errbuf. * * This function initialize the @db object and detect the format of the underlying database if no format name * is given. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_new(preludedb_t **db, preludedb_sql_t *sql, const char *format_name, char *errbuf, size_t size) { int ret; *db = calloc(1, sizeof (**db)); if ( ! *db ) { ret = preludedb_error_from_errno(errno); snprintf(errbuf, size, "%s", preludedb_strerror(ret)); return ret; } (*db)->sql = sql; if ( format_name ) ret = preludedb_set_format(*db, format_name); else ret = preludedb_autodetect_format(*db); if ( ret < 0 ) { if ( errbuf ) preludedb_get_error(*db, ret, errbuf, size); if ( (*db)->format_version ) free((*db)->format_version); free(*db); } return ret; } /** * preludedb_destroy: * @db: Pointer to a db object. * * Destroy @db object and the underlying @sql object given as argument to preludedb_new. */ void preludedb_destroy(preludedb_t *db) { preludedb_sql_destroy(db->sql); free(db->format_version); free(db); } /** * preludedb_get_format_name: * @db: Pointer to a db object. * * Returns: the format name currently used by the @db object. */ const char *preludedb_get_format_name(preludedb_t *db) { return prelude_plugin_get_name(db->plugin); } /** * preludedb_get_format_version: * @db: Pointer to a db object. * * Returns: the format version currently used by the @db object. */ const char *preludedb_get_format_version(preludedb_t *db) { return db->format_version; } /** * preludedb_set_format: * @db: Pointer to a db object. * @format_name: New format to use. * * Change the current format plugin. * * Returns: 0 on success or negative value if an error occur. */ int preludedb_set_format(preludedb_t *db, const char *format_name) { db->plugin = (preludedb_plugin_format_t *) prelude_plugin_search_by_name(&plugin_format_list, format_name); if ( ! db->plugin ) return preludedb_error_verbose(PRELUDEDB_ERROR_CANNOT_LOAD_FORMAT_PLUGIN, "could not find format plugin '%s'", format_name); return 0; } /** * preludedb_get_sql: * @db: Pointer to a db object. * * Returns: a pointer to the underlying sql object. */ preludedb_sql_t *preludedb_get_sql(preludedb_t *db) { return db->sql; } /** * preludedb_get_error: * @db: Pointer to a db object. * @error: Error code to build the error string from. * @errbuf: Buffer where the error message will be stored, * @size: size of this buffer must be PRELUDEDB_ERRBUF_SIZE. * * Build an error message from the error code given as argument and from * the sql plugin error string (if any) if the error code is db related. * * Returns: a pointer to the error string or NULL if an error occured. */ char *preludedb_get_error(preludedb_t *db, preludedb_error_t error, char *errbuf, size_t size) { int ret; preludedb_error_t tmp; tmp = preludedb_error(prelude_error_get_code(error)); ret = snprintf(errbuf, size, "%s: %s", preludedb_strerror(tmp), preludedb_strerror(error)); if ( ret < 0 || (size_t) ret >= size ) return NULL; return errbuf; } /** * preludedb_insert_message: * @db: Pointer to a db object. * @message: Pointer to an IDMEF message. * * Insert an IDMEF message into the database. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_insert_message(preludedb_t *db, idmef_message_t *message) { return db->plugin->insert_message(db->sql, message); } /** * preludedb_result_idents_destroy: * @result: Pointer to an idents result object. * * Destroy the @result object. */ void preludedb_result_idents_destroy(preludedb_result_idents_t *result) { result->db->plugin->destroy_message_idents_resource(result->res); free(result); } /** * preludedb_result_idents_get_next: * @result: Pointer to an idents result object. * @ident: Pointer to an ident where the next ident will be stored. * * Retrieve the next ident from the idents result object. * * Returns: 1 if an ident is available, 0 if there is no more idents available or * a negative value if an error occur. */ int preludedb_result_idents_get_next(preludedb_result_idents_t *result, uint64_t *ident) { return result->db->plugin->get_next_message_ident(result->res, ident); } /** * preludedb_result_values_destroy: * @result: Pointer to a result values object. * * Destroy the @result object. */ void preludedb_result_values_destroy(preludedb_result_values_t *result) { result->db->plugin->destroy_values_resource(result->res); free(result); } /** * preludedb_result_values_get_next: * @result: Pointer to a values result object. * @values: Pointer to a values array where the next row of values will be stored. * * Retrieve the next values row from the values result object. * * Returns: the number of returned values, 0 if there are no values or a negative value if an * error occur. */ int preludedb_result_values_get_next(preludedb_result_values_t *result, idmef_value_t ***values) { return result->db->plugin->get_next_values(result->res, result->selection, values); } static int preludedb_get_message_idents(preludedb_t *db, idmef_criteria_t *criteria, int (*get_idents)(preludedb_sql_t *sql, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, void **res), int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result) { int ret; *result = calloc(1, sizeof(**result)); if ( ! *result ) return preludedb_error_from_errno(errno); (*result)->db = db; ret = get_idents(db->sql, criteria, limit, offset, order, &(*result)->res); if ( ret <= 0 ) free(*result); return ret; } /** * preludedb_get_alert_idents: * @db: Pointer to a db object. * @criteria: Pointer to an idmef criteria. * @limit: Limit of results or -1 if no limit. * @offset: Offset in results or -1 if no offset. * @order: Result order. * @result: Idents result. * * Returns: the number of result or a negative value if an error occured. */ int preludedb_get_alert_idents(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result) { return preludedb_get_message_idents(db, criteria, db->plugin->get_alert_idents, limit, offset, order, result); } /** * preludedb_get_heartbeat_idents: * @db: Pointer to a db object. * @criteria: Pointer to an idmef criteria. * @limit: Limit of results or -1 if no limit. * @offset: Offset in results or -1 if no offset. * @order: Result order. * @result: Idents result. * * Returns: the number of result or a negative value if an error occured. */ int preludedb_get_heartbeat_idents(preludedb_t *db, idmef_criteria_t *criteria, int limit, int offset, preludedb_result_idents_order_t order, preludedb_result_idents_t **result) { return preludedb_get_message_idents(db, criteria, db->plugin->get_heartbeat_idents, limit, offset, order, result); } /** * preludedb_get_alert: * @db: Pointer to a db object. * @ident: Internal database ident of the alert. * @message: Pointer to an idmef message object where the retrieved message will be stored. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_get_alert(preludedb_t *db, uint64_t ident, idmef_message_t **message) { return db->plugin->get_alert(db->sql, ident, message); } /** * preludedb_get_heartbeat: * @db: Pointer to a db object. * @ident: Internal database ident of the heartbeat. * @message: Pointer to an idmef message object where the retrieved message will be stored. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_get_heartbeat(preludedb_t *db, uint64_t ident, idmef_message_t **message) { return db->plugin->get_heartbeat(db->sql, ident, message); } /** * preludedb_delete_alert: * @db: Pointer to a db object. * @ident: Internal database ident of the alert. * * Delete an alert. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_delete_alert(preludedb_t *db, uint64_t ident) { return db->plugin->delete_alert(db->sql, ident); } /** * preludedb_delete_alert_from_list: * @db: Pointer to a db object. * @idents: Pointer to an array of idents. * @size: Size of @idents. * * Delete all alerts from ident stored within @idents. * * Returns: the number of alert deleted on success, or a negative value if an error occur. */ ssize_t preludedb_delete_alert_from_list(preludedb_t *db, uint64_t *ident, size_t size) { if ( size == 0 ) return 0; return _preludedb_plugin_format_delete_alert_from_list(db->plugin, db->sql, ident, size); } /** * preludedb_delete_alert_from_result_idents: * @db: Pointer to a db object. * @result: Pointer to an idents result object. * * Delete all alert from ident stored within @result. * * Returns: the number of alert deleted on success, or a negative value if an error occur. */ ssize_t preludedb_delete_alert_from_result_idents(preludedb_t *db, preludedb_result_idents_t *result) { return _preludedb_plugin_format_delete_alert_from_result_idents(db->plugin, db->sql, result); } /** * preludedb_delete_heartbeat: * @db: Pointer to a db object. * @ident: Internal database ident of the heartbeat. * * Delete an heartbeat. * * Returns: 0 on success, or a negative value if an error occur. */ int preludedb_delete_heartbeat(preludedb_t *db, uint64_t ident) { return db->plugin->delete_heartbeat(db->sql, ident); } /** * preludedb_delete_heartbeat_from_list: * @db: Pointer to a db object. * @idents: Pointer to an array of idents. * @size: Size of @idents. * * Delete all heartbeat from ident stored within @idents. * * Returns: the number of heartbeat deleted on success, or a negative value if an error occur. */ ssize_t preludedb_delete_heartbeat_from_list(preludedb_t *db, uint64_t *idents, size_t size) { if ( size == 0 ) return 0; return _preludedb_plugin_format_delete_heartbeat_from_list(db->plugin, db->sql, idents, size); } /** * preludedb_delete_heartbeat_from_result_idents: * @db: Pointer to a db object. * @result: Pointer to an idents result object. * * Delete all heartbeat from ident stored within @result. * * Returns: the number of heartbeat deleted on success, or a negative value if an error occur. */ ssize_t preludedb_delete_heartbeat_from_result_idents(preludedb_t *db, preludedb_result_idents_t *result) { return _preludedb_plugin_format_delete_heartbeat_from_result_idents(db->plugin, db->sql, result); } /** * preludedb_get_values: * @db: Pointer to a db object. * @path_selection: Pointer to a path selection. * @criteria: Pointer to a criteria object. * @distinct: Get distinct or not distinct result rows. * @limit: Limit of results or -1 if no limit. * @offset: Offset in results or -1 if no offset. * @result: Values result. * * Returns: the number of result or a negative value if an error occured. */ int preludedb_get_values(preludedb_t *db, preludedb_path_selection_t *path_selection, idmef_criteria_t *criteria, prelude_bool_t distinct, int limit, int offset, preludedb_result_values_t **result) { int ret; *result = calloc(1, sizeof (**result)); if ( ! *result ) return preludedb_error_from_errno(errno); (*result)->db = db; (*result)->selection = path_selection; ret = db->plugin->get_values(db->sql, path_selection, criteria, distinct, limit, offset, &(*result)->res); if ( ret <= 0 ) free(*result); return ret; } /** * preludedb_transaction_start: * @db: Pointer to a #preludedb_t object. * * Begin a transaction using @db object. Internal transaction * handling will be disabled until preludedb_transaction_end() * or preludedb_transaction_abort() is called. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_transaction_start(preludedb_t *db) { int ret; ret = _preludedb_sql_transaction_start(db->sql); if ( ret < 0 ) return ret; _preludedb_sql_disable_internal_transaction(db->sql); return ret; } /** * preludedb_transaction_end: * @db: Pointer to a #preludedb_t object. * * Terminate a sql transaction (SQL COMMIT command) initiated * with preludedb_transaction_start(). Internal transaction * handling will be enabled again once this function return. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_transaction_end(preludedb_t *db) { int ret; ret = _preludedb_sql_transaction_end(db->sql); _preludedb_sql_enable_internal_transaction(db->sql); if ( ret < 0 ) return ret; return ret; } /** * preludedb_transaction_abort: * @db: Pointer to a #preludedb_t object. * * Abort a sql transaction (SQL ROLLBACK command) initiated * with preludedb_transaction_start(). Internal transaction * handling will be enabled again once this function return. * * Returns: 0 on success or a negative value if an error occur. */ int preludedb_transaction_abort(preludedb_t *db) { int ret; ret = _preludedb_sql_transaction_abort(db->sql); _preludedb_sql_enable_internal_transaction(db->sql); if ( ret < 0 ) return ret; return ret; } libpreludedb-1.0.0/src/preludedb-sql-settings.c0000664000076400007640000001554011226653036016445 00000000000000/***** * * Copyright (C) 2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include "preludedb-error.h" #include "preludedb-sql-settings.h" struct preludedb_sql_settings { prelude_hash_t *hash; }; static inline void skip_spaces(const char **str) { while ( isspace((int) **str) ) (*str)++; } int preludedb_sql_settings_new(preludedb_sql_settings_t **settings) { int ret; *settings = malloc(sizeof(**settings)); if ( ! *settings ) return prelude_error_from_errno(errno); ret = prelude_hash_new(&(*settings)->hash, NULL, NULL, free, free); if ( ret < 0 ) free(*settings); return ret; } int preludedb_sql_settings_new_from_string(preludedb_sql_settings_t **settings, const char *str) { int ret; ret = preludedb_sql_settings_new(settings); if ( ret < 0 ) return ret; ret = preludedb_sql_settings_set_from_string(*settings, str); if ( ret < 0 ) preludedb_sql_settings_destroy(*settings); return ret; } void preludedb_sql_settings_destroy(preludedb_sql_settings_t *settings) { prelude_hash_destroy(settings->hash); free(settings); } int preludedb_sql_settings_set(preludedb_sql_settings_t *settings, const char *name, const char *value) { char *n, *v; n = strdup(name); if ( ! n ) return preludedb_error_from_errno(errno); v = strdup(value); if ( ! v ) { free(n); return preludedb_error_from_errno(errno); } return prelude_hash_set(settings->hash, n, v); } static int get_name(const char **str, char **name) { const char *start; skip_spaces(str); if ( **str == '\0' ) return 0; start = *str; while ( isalnum((int) **str) || **str == '_' ) (*str)++; if ( **str != '=' || *str == start ) return preludedb_error(PRELUDEDB_ERROR_INVALID_SETTINGS_STRING); *name = strndup(start, *str - start); (*str)++; return *name ? (*str - start - 1) : preludedb_error_from_errno(errno); } static int get_value(const char **str, char **value) { int escaped = 0, cnt; char end_of_string = ' '; *value = calloc(strlen(*str) + 1, 1); if ( ! *value ) return preludedb_error_from_errno(errno); if ( **str == '\'' || **str == '"' ) { end_of_string = **str; (*str)++; } cnt = 0; while ( **str ) { if ( escaped ) { (*value)[cnt++] = **str; escaped = 0; } else if ( **str == '\\' ) { escaped = 1; } else if ( **str == end_of_string ) { (*str)++; break; } else { (*value)[cnt++] = **str; } (*str)++; } if ( **str == '\0' && (end_of_string == '\'' || end_of_string == '"') ) { free(*value); return preludedb_error(PRELUDEDB_ERROR_INVALID_SETTINGS_STRING); } return cnt; } int preludedb_sql_settings_set_from_string(preludedb_sql_settings_t *settings, const char *str) { int ret; char *name = NULL, *value; while ( (ret = get_name(&str, &name)) > 0 ) { ret = get_value(&str, &value); if ( ret < 0 ) return ret; ret = prelude_hash_set(settings->hash, name, value); if ( ret < 0 ) return ret; } return ret; } const char *preludedb_sql_settings_get(const preludedb_sql_settings_t *settings, const char *name) { return prelude_hash_get(settings->hash, name); } /* * Convenient functions for client/server databases. */ #define convenient_functions(name, key, default) \ int preludedb_sql_settings_set_ ## name(preludedb_sql_settings_t *settings, const char *value) \ { \ return preludedb_sql_settings_set(settings, key, value); \ } \ \ \ \ const char *preludedb_sql_settings_get_ ## name(const preludedb_sql_settings_t *settings) \ { \ const char *value; \ \ value = preludedb_sql_settings_get(settings, key); \ \ return value ? value : default; \ } convenient_functions(host, PRELUDEDB_SQL_SETTING_HOST, "localhost") convenient_functions(port, PRELUDEDB_SQL_SETTING_PORT, NULL) convenient_functions(name, PRELUDEDB_SQL_SETTING_NAME, "prelude") convenient_functions(user, PRELUDEDB_SQL_SETTING_USER, NULL) convenient_functions(pass, PRELUDEDB_SQL_SETTING_PASS, NULL) convenient_functions(type, PRELUDEDB_SQL_SETTING_TYPE, NULL) convenient_functions(file, PRELUDEDB_SQL_SETTING_FILE, NULL) convenient_functions(log, PRELUDEDB_SQL_SETTING_LOG, NULL) libpreludedb-1.0.0/src/preludedb-path-selection.c0000664000076400007640000001632211326045005016716 00000000000000/***** * * Copyright (C) 2003-2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include #include #include #include #include #include "preludedb-error.h" #include "preludedb-path-selection.h" struct preludedb_selected_path { prelude_list_t list; idmef_path_t *path; preludedb_selected_path_flags_t flags; }; struct preludedb_path_selection { prelude_list_t list; size_t count; }; int preludedb_selected_path_new(preludedb_selected_path_t **selected_path, idmef_path_t *path, int flags) { *selected_path = calloc(1, sizeof (**selected_path)); if ( ! *selected_path ) return preludedb_error_from_errno(errno); (*selected_path)->path = path; (*selected_path)->flags = flags; return 0; } static int parse_filter(const char *str, size_t len) { unsigned int i; struct { const char *name; int flag; } filter_table[] = { { "group_by", PRELUDEDB_SELECTED_OBJECT_GROUP_BY }, { "order_desc", PRELUDEDB_SELECTED_OBJECT_ORDER_DESC }, { "order_asc", PRELUDEDB_SELECTED_OBJECT_ORDER_ASC } }; for ( i = 0; i < sizeof(filter_table) / sizeof(*filter_table); i++ ) { if ( strncmp(str, filter_table[i].name, len) == 0 ) return filter_table[i].flag; } return preludedb_error_verbose(PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING, "Invalid path filter string '%s'", str); } static int parse_filters(const char *str) { int flags = 0, ret; const char *start, *end; start = str; while ( (end = strchr(start, ',')) ) { ret = parse_filter(start, end - start); if ( ret < 0 ) return ret; flags |= ret; start = end + 1; } ret = parse_filter(start, strlen(start)); return (ret < 0) ? ret : (flags | ret); } static int parse_function(const char *str) { unsigned int i; struct { const char *name; size_t len; int flag; } function_table[] = { { "min(", 4, PRELUDEDB_SELECTED_OBJECT_FUNCTION_MIN }, { "max(", 4, PRELUDEDB_SELECTED_OBJECT_FUNCTION_MAX }, { "avg(", 4, PRELUDEDB_SELECTED_OBJECT_FUNCTION_AVG }, { "std(", 4, PRELUDEDB_SELECTED_OBJECT_FUNCTION_STD }, { "count(", 6, PRELUDEDB_SELECTED_OBJECT_FUNCTION_COUNT } }; for ( i = 0; i < sizeof(function_table) / sizeof(*function_table); i++ ) { if ( strncmp(str, function_table[i].name, function_table[i].len) == 0 ) return function_table[i].flag; } return 0; } static int parse_path(const char *str, size_t len, idmef_path_t **path) { char buf[len + 1]; if ( len + 1 < len ) return -1; memcpy(buf, str, len); buf[len] = 0; return idmef_path_new_fast(path, buf); } int preludedb_selected_path_new_string(preludedb_selected_path_t **selected_path, const char *str) { int ret, flags = 0; idmef_path_t *path; const char *filters, *start, *end; filters = strchr(str, '/'); if ( filters ) { ret = parse_filters(filters + 1); if ( ret < 0 ) return ret; flags |= ret; } ret = parse_function(str); if ( ret < 0 ) return ret; if ( ret ) { flags |= ret; if ( ! (start = strchr(str, '(')) || ! (end = strrchr(str, ')')) ) return preludedb_error(PRELUDEDB_ERROR_INVALID_SELECTED_OBJECT_STRING); ret = parse_path(start + 1, end - (start + 1), &path); } else { if ( filters ) ret = parse_path(str, filters - str, &path); else ret = idmef_path_new_fast(&path, str); } if ( ret < 0 ) return ret; ret = preludedb_selected_path_new(selected_path, path, flags); if ( ret < 0 ) idmef_path_destroy(path); return ret; } void preludedb_selected_path_destroy(preludedb_selected_path_t *selected_path) { idmef_path_destroy(selected_path->path); free(selected_path); } idmef_path_t *preludedb_selected_path_get_path(preludedb_selected_path_t *selected_path) { return selected_path->path; } preludedb_selected_path_flags_t preludedb_selected_path_get_flags(preludedb_selected_path_t *selected_path) { return selected_path->flags; } int preludedb_path_selection_new(preludedb_path_selection_t **path_selection) { *path_selection = calloc(1, sizeof(**path_selection)); if ( ! *path_selection ) return preludedb_error_from_errno(errno); (*path_selection)->count = 0; prelude_list_init(&(*path_selection)->list); return 0; } void preludedb_path_selection_destroy(preludedb_path_selection_t *path_selection) { prelude_list_t *ptr, *next; preludedb_selected_path_t *selected_path; prelude_list_for_each_safe(&path_selection->list, ptr, next) { selected_path = prelude_list_entry(ptr, preludedb_selected_path_t, list); preludedb_selected_path_destroy(selected_path); } free(path_selection); } void preludedb_path_selection_add(preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path) { path_selection->count++; prelude_list_add_tail(&path_selection->list, &selected_path->list); } preludedb_selected_path_t *preludedb_path_selection_get_next(preludedb_path_selection_t *path_selection, preludedb_selected_path_t *selected_path) { return prelude_list_get_next(&path_selection->list, selected_path, preludedb_selected_path_t, list); } size_t preludedb_path_selection_get_count(preludedb_path_selection_t *path_selection) { return path_selection->count; } libpreludedb-1.0.0/src/preludedb-version.c0000664000076400007640000000336411226653036015476 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Yoann Vandoorselaere * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include #include #include "preludedb-version.h" #include "config.h" const char *preludedb_check_version(const char *req_version) { int ret; int major, minor, micro; int rq_major, rq_minor, rq_micro; if ( ! req_version ) return VERSION; ret = sscanf(VERSION, "%d.%d.%d", &major, &minor, µ); if ( ret != 3 ) return NULL; ret = sscanf(req_version, "%d.%d.%d", &rq_major, &rq_minor, &rq_micro); if ( ret != 3 ) return NULL; if ( major > rq_major || (major == rq_major && minor > rq_minor) || (major == rq_major && minor == rq_minor && micro > rq_micro) || (major == rq_major && minor == rq_minor && micro == rq_micro) ) { return VERSION; } return NULL; } libpreludedb-1.0.0/src/preludedb-error.c0000664000076400007640000000457411326045005015136 00000000000000/***** * * Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. * Author: Nicolas Delon * * This file is part of the PreludeDB library. * * 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; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * *****/ #include "config.h" #include #include "preludedb-error.h" const char *preludedb_strerror(preludedb_error_t error) { static const char *error_strings[] = { "Successful", "Unknown generic error", "Invalid SQL settings string", "Connection error", "Query error", "Invalid column num", "Invalid column name", "Invalid value", "Invalid value type", "Unknown sql plugin", "Unknown format plugin", "Already in transaction", "Not in transaction", "Invalid message ident", "Invalid selected path string", "Invalid path selection", "Database schema version too old", "Database schema version too recent", "Database schema version invalid", "Cannot load sql plugin", "Cannot load format plugin" }; if ( prelude_error_is_verbose(error) ) return _prelude_thread_get_error(); if ( prelude_error_get_source(error) == PRELUDE_ERROR_SOURCE_PRELUDEDB ) { preludedb_error_code_t code; code = prelude_error_get_code(error); if ( code >= sizeof(error_strings) / sizeof(*error_strings) ) return NULL; return error_strings[code]; } return prelude_strerror(error); } libpreludedb-1.0.0/aclocal.m40000664000076400007640000011550711347715634012764 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. 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, 2003, 2005, 2006, 2007, 2008 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.11' 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.11.1], [], [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.11.1])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, 2003, 2005 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # 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. # serial 10 # 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", "GCJ", or "OBJC". # 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 ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" 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'. 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 8's {/usr,}/bin/sh. touch 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 ;; 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, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 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"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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. # serial 16 # 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. # 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.62])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], [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], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [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([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. 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)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl 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 ]) 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, 2003, 2005, 2008 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}" != 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, 2005 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. # serial 2 # 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])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 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. # serial 4 # 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 ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # 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 supports --run. # If it does, 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 --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 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_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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. # serial 4 # _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])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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 ( 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 rm -f conftest.file 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 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)]) # Copyright (C) 2001, 2003, 2005 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, 2008 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. # serial 2 # _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, 2005 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. # serial 2 # _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. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. 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([libmissing/m4/00gnulib.m4]) m4_include([libmissing/m4/alloca.m4]) m4_include([libmissing/m4/errno_h.m4]) m4_include([libmissing/m4/extensions.m4]) m4_include([libmissing/m4/float_h.m4]) m4_include([libmissing/m4/gnulib-common.m4]) m4_include([libmissing/m4/gnulib-comp.m4]) m4_include([libmissing/m4/gnulib-tool.m4]) m4_include([libmissing/m4/include_next.m4]) m4_include([libmissing/m4/intmax_t.m4]) m4_include([libmissing/m4/inttypes_h.m4]) m4_include([libmissing/m4/lib-ld.m4]) m4_include([libmissing/m4/lib-link.m4]) m4_include([libmissing/m4/lib-prefix.m4]) m4_include([libmissing/m4/lock.m4]) m4_include([libmissing/m4/longlong.m4]) m4_include([libmissing/m4/memchr.m4]) m4_include([libmissing/m4/mmap-anon.m4]) m4_include([libmissing/m4/multiarch.m4]) m4_include([libmissing/m4/onceonly.m4]) m4_include([libmissing/m4/printf.m4]) m4_include([libmissing/m4/size_max.m4]) m4_include([libmissing/m4/snprintf.m4]) m4_include([libmissing/m4/stddef_h.m4]) m4_include([libmissing/m4/stdint.m4]) m4_include([libmissing/m4/stdint_h.m4]) m4_include([libmissing/m4/stdio_h.m4]) m4_include([libmissing/m4/strdup.m4]) m4_include([libmissing/m4/string_h.m4]) m4_include([libmissing/m4/strndup.m4]) m4_include([libmissing/m4/strnlen.m4]) m4_include([libmissing/m4/thread.m4]) m4_include([libmissing/m4/threadlib.m4]) m4_include([libmissing/m4/time_h.m4]) m4_include([libmissing/m4/time_r.m4]) m4_include([libmissing/m4/vasnprintf.m4]) m4_include([libmissing/m4/vsnprintf.m4]) m4_include([libmissing/m4/warn-on-use.m4]) m4_include([libmissing/m4/wchar.m4]) m4_include([libmissing/m4/wchar_t.m4]) m4_include([libmissing/m4/wint_t.m4]) m4_include([libmissing/m4/xsize.m4]) m4_include([libmissing/m4/yield.m4]) m4_include([m4/as-ac-expand.m4]) m4_include([m4/ax_c_check_flag.m4]) m4_include([m4/ax_ld_check_flag.m4]) m4_include([m4/ax_lib_mysql.m4]) m4_include([m4/ax_lib_postgresql.m4]) m4_include([m4/ax_lib_sqlite3.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/libprelude.m4]) 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]) libpreludedb-1.0.0/ChangeLog0000664000076400007640000141626011347715767012706 00000000000000# Generated by Makefile. Do not edit. commit 0364971e171bc634c0ac6028bf758ec2aeee2859 Author: Yoann Vandoorselaere Date: Tue Mar 16 15:55:31 2010 +0100 Update NEWS, bump version NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 9c038260b90c3607a76276f628d9353b159c5baa Author: Yoann Vandoorselaere Date: Fri Jan 29 17:56:08 2010 +0100 Update NEWS, bump version INSTALL | 97 +++++++++++++++++++++++++++++++++------- NEWS | 25 ++++++++++ configure.in | 10 ++-- docs/api/libpreludedb-decl.txt | 2 +- 4 files changed, 111 insertions(+), 23 deletions(-) commit 3c9f4ebed4695392da975602422e2390e8254829 Author: Yoann Vandoorselaere Date: Fri Jan 29 17:53:54 2010 +0100 Update GnuLib code arg-nonnull.h | 26 + config.rpath | 2 +- libmissing/Makefile.am | 318 +- libmissing/alloca.in.h | 4 +- libmissing/asnprintf.c | 2 +- libmissing/errno.in.h | 2 +- libmissing/float+.h | 2 +- libmissing/float.in.h | 2 +- libmissing/getpagesize.c | 39 - libmissing/glthread/lock.c | 436 +- libmissing/glthread/lock.h | 2 +- libmissing/glthread/threadlib.c | 20 +- libmissing/m4/00gnulib.m4 | 2 +- libmissing/m4/alloca.m4 | 3 +- libmissing/m4/errno_h.m4 | 2 +- libmissing/m4/extensions.m4 | 22 +- libmissing/m4/float_h.m4 | 2 +- libmissing/m4/getpagesize.m4 | 29 - libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-common.m4 | 35 +- libmissing/m4/gnulib-comp.m4 | 24 +- libmissing/m4/gnulib-tool.m4 | 2 +- libmissing/m4/include_next.m4 | 80 +- libmissing/m4/intmax_t.m4 | 3 +- libmissing/m4/inttypes_h.m4 | 2 +- libmissing/m4/lib-ld.m4 | 8 +- libmissing/m4/lib-link.m4 | 2 +- libmissing/m4/lib-prefix.m4 | 2 +- libmissing/m4/lock.m4 | 2 +- libmissing/m4/longlong.m4 | 66 +- libmissing/m4/memchr.m4 | 10 +- libmissing/m4/mmap-anon.m4 | 2 +- libmissing/m4/multiarch.m4 | 2 +- libmissing/m4/onceonly.m4 | 3 +- libmissing/m4/printf.m4 | 2 +- libmissing/m4/size_max.m4 | 2 +- libmissing/m4/snprintf.m4 | 2 +- libmissing/m4/stddef_h.m4 | 45 + libmissing/m4/stdint.m4 | 14 +- libmissing/m4/stdint_h.m4 | 2 +- libmissing/m4/stdio_h.m4 | 121 +- libmissing/m4/strdup.m4 | 2 +- libmissing/m4/string_h.m4 | 66 +- libmissing/m4/strndup.m4 | 48 +- libmissing/m4/strnlen.m4 | 3 +- libmissing/m4/thread.m4 | 2 +- libmissing/m4/threadlib.m4 | 15 +- libmissing/m4/time_h.m4 | 22 +- libmissing/m4/time_r.m4 | 21 +- libmissing/m4/unistd_h.m4 | 83 - libmissing/m4/vasnprintf.m4 | 2 +- libmissing/m4/vsnprintf.m4 | 2 +- libmissing/m4/warn-on-use.m4 | 45 + libmissing/m4/wchar.m4 | 100 +- libmissing/m4/wchar_t.m4 | 2 +- libmissing/m4/wint_t.m4 | 2 +- libmissing/m4/xsize.m4 | 2 +- libmissing/m4/yield.m4 | 2 +- libmissing/memchr.c | 26 +- libmissing/printf-args.c | 211 +- libmissing/printf-args.h | 55 +- libmissing/printf-parse.c | 940 +++--- libmissing/printf-parse.h | 21 +- libmissing/size_max.h | 2 +- libmissing/snprintf.c | 12 +- libmissing/stddef.in.h | 86 + libmissing/stdint.in.h | 10 +- libmissing/stdio-write.c | 48 +- libmissing/stdio.in.h | 849 +++-- libmissing/strdup.c | 4 +- libmissing/string.in.h | 360 +- libmissing/strndup.c | 4 +- libmissing/strnlen.c | 2 +- libmissing/tests/Makefile.am | 80 +- libmissing/tests/glthread/thread.c | 34 +- libmissing/tests/glthread/thread.h | 2 +- libmissing/tests/glthread/yield.h | 2 +- libmissing/tests/intprops.h | 50 +- libmissing/tests/macros.h | 64 + libmissing/tests/signature.h | 48 + libmissing/tests/test-alloca-opt.c | 2 +- libmissing/tests/test-errno.c | 2 +- libmissing/tests/test-lock.c | 58 +- libmissing/tests/test-memchr.c | 71 +- libmissing/tests/test-snprintf.c | 46 +- libmissing/tests/test-stddef.c | 38 + libmissing/tests/test-stdint.c | 4 +- libmissing/tests/test-stdio.c | 11 +- libmissing/tests/test-string.c | 4 +- libmissing/tests/test-time.c | 10 +- libmissing/tests/test-unistd.c | 56 - libmissing/tests/test-vasnprintf.c | 23 +- libmissing/tests/test-vsnprintf.c | 46 +- libmissing/tests/test-wchar.c | 10 +- libmissing/tests/verify.h | 6 +- libmissing/tests/zerosize-ptr.h | 10 +- libmissing/time.in.h | 34 +- libmissing/time_r.c | 2 +- libmissing/unistd.in.h | 578 --- libmissing/vasnprintf.c | 8063 ++++++++++++++++++------------------ libmissing/vasnprintf.h | 17 +- libmissing/vsnprintf.c | 12 +- libmissing/wchar.in.h | 121 +- libmissing/xsize.h | 2 +- src/Makefile.am | 2 +- warn-on-use.h | 75 + 106 files changed, 6968 insertions(+), 7012 deletions(-) commit fb152c4c92e96a2d5a26e4307300deefbfd5e1b4 Author: Yoann Vandoorselaere Date: Fri Jan 29 11:04:35 2010 +0100 Correctly compare table name for IDMEFTime field The old implementation could use the CreateTime table, in place of the DetectTime table, when asked for the table handling a detect_time element. plugins/format/classic/classic-sql-join.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3ef573868ba897dcfc817876894dd326e6964de8 Author: Yoann Vandoorselaere Date: Thu Jan 21 13:32:58 2010 +0100 Force upgrading copied count before next database retrieval This fix a problem where the offset was not correctly calculated when retrieving alert to be copied, when the previous number of events copied didn't exceed events_per_transaction. preludedb-admin.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) commit b834aa8015f1fe529cb108bf9342f0fd152f5f8a Author: Yoann Vandoorselaere Date: Thu Jan 21 13:02:53 2010 +0100 Do not account for EOF return in loaded messages statistics preludedb-admin.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 8fd6982cab2c0eb6bbe1e269296cc7929f53bb55 Author: Yoann Vandoorselaere Date: Thu Jan 21 11:43:13 2010 +0100 Error return propagation fix Correctly propagate error return on prelude_msg_read() error, fix a possible crash in case of invalid input message. preludedb-admin.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e8ee0396b926e1edae26f69cf61d4cd2d3e24435 Author: Yoann Vandoorselaere Date: Thu Jan 21 10:52:39 2010 +0100 Fix events deletion/move bugs When deleting events without specifying the --count parameters, only half of the events would be deleted. When moving alert, only half of the alert would be moved. preludedb-admin.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit b7d60fbb66c09f0a188b5ce6387ed53c5efdcce7 Author: Yoann Vandoorselaere Date: Thu Jan 21 09:39:57 2010 +0100 Fixes some warnings uncovered by -Wextra plugins/format/classic/classic-delete.c | 5 ++--- plugins/format/classic/classic-get.c | 2 +- plugins/format/classic/classic-path-resolve.c | 2 +- plugins/format/classic/classic-sql-select.c | 2 +- plugins/sql/mysql/mysql.c | 4 ++-- plugins/sql/pgsql/pgsql.c | 8 +++++--- plugins/sql/sqlite3/sqlite3.c | 5 +++-- preludedb-admin.c | 2 +- src/preludedb-error.c | 2 +- src/preludedb-path-selection.c | 4 ++-- src/preludedb-plugin-sql.c | 2 +- src/preludedb-sql.c | 4 ++-- src/preludedb.c | 2 +- 13 files changed, 23 insertions(+), 21 deletions(-) commit 3cd795ae63fee8a95b05f8f925200aab42e9d26c Author: Yoann Vandoorselaere Date: Thu Jan 21 09:26:01 2010 +0100 Whitespace police plugins/format/classic/classic-delete.c | 152 +- plugins/format/classic/classic-get.c | 3192 +++++++++++++++--------------- src/preludedb-error.c | 36 +- 3 files changed, 1690 insertions(+), 1690 deletions(-) commit 658a85e55df3cc7b4d123cb612df6be02814aa7d Author: Yoann Vandoorselaere Date: Tue Jan 19 15:46:35 2010 +0100 Fixes insertion failure for ProcessEnv plugins/format/classic/classic-insert.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ee268850d6f44f8cb2cc1594f7ec954282a7858a Author: Yoann Vandoorselaere Date: Wed Jul 15 09:50:54 2009 +0200 Update NEWS, bump version NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit b659b5dbaba9fdd0f0253d7056253dc472c77dca Author: Yoann Vandoorselaere Date: Wed Jul 15 09:48:23 2009 +0200 libpreludedb distribution was missing SWIG generated bindings bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 89656057ba31c69ab0395243ff8a4c83d6952107 Author: Yoann Vandoorselaere Date: Mon Jul 13 17:40:05 2009 +0200 Remove deprecated bindings/perl/generate.sh | 3 --- bindings/python/generate.sh | 3 --- 2 files changed, 0 insertions(+), 6 deletions(-) commit 470ece71bf055781f77bb4e38ba605b68498651c Author: Yoann Vandoorselaere Date: Mon Jul 13 11:53:14 2009 +0200 Update NEWS, bump version number NEWS | 11 +++++++++++ configure.in | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 1bbcbf3dbe5b78305050c443406fc1295f3dd136 Author: Yoann Vandoorselaere Date: Mon Jul 13 11:34:02 2009 +0200 Pass make distcheck again bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c03dd0f03f8cdfe9b05a5f8018ddb1c52740f9f5 Author: Yoann Vandoorselaere Date: Mon Jul 13 11:21:17 2009 +0200 Update gtk-doc, documentation docs/api/libpreludedb-decl.txt | 840 ++++++++++++++++++++-------------------- gtk-doc.make | 47 ++- 2 files changed, 455 insertions(+), 432 deletions(-) commit c1233caa1df20652c75ef4fec6539da8779c0007 Author: Yoann Vandoorselaere Date: Mon Jul 13 11:20:43 2009 +0200 Fix compilation warning plugins/sql/mysql/mysql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit df9cb12498651abfa53ee456c92d1f82da6aff7b Author: Yoann Vandoorselaere Date: Mon Jul 13 10:49:54 2009 +0200 Update MySQL, PostgreSQL, and SQLite3 detection method Update to newer detection method based on Autoconf Macros Archives macros. This should fixes a number of detection problem (64 bits libdir), and make it easier to cross compile libpreludedb. configure.in | 145 ++++++------------------------------- m4/ax_lib_mysql.m4 | 145 +++++++++++++++++++++++++++++++++++++ m4/ax_lib_postgresql.m4 | 152 ++++++++++++++++++++++++++++++++++++++ m4/ax_lib_sqlite3.m4 | 153 +++++++++++++++++++++++++++++++++++++++ plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/pgsql/Makefile.am | 4 +- plugins/sql/sqlite3/Makefile.am | 2 +- 7 files changed, 476 insertions(+), 127 deletions(-) commit ea29614ae5ac2acc345bacb7404632f2d50a86dc Author: Yoann Vandoorselaere Date: Mon Jul 13 10:36:06 2009 +0200 Update autoconf generated files INSTALL | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 86 insertions(+), 21 deletions(-) commit 29461dbe823796af968db56c2408fbdb3efa2c8f Author: Yoann Vandoorselaere Date: Mon Jul 13 09:35:19 2009 +0200 Remove libmissing.h dependency We used to have a single libmissing header including all GnuLib headers file. Now that GnuLib provides replacement for default system headers, there is no need to include "libmissing.h" in source code anymore. plugins/format/classic/classic-delete.c | 2 +- plugins/format/classic/classic-get.c | 2 +- plugins/format/classic/classic-insert.c | 1 - plugins/format/classic/classic-path-resolve.c | 1 - plugins/format/classic/classic-sql-join.c | 2 +- plugins/format/classic/classic-sql-select.c | 2 +- plugins/format/classic/classic.c | 2 +- plugins/sql/mysql/mysql.c | 1 - plugins/sql/pgsql/pgsql.c | 1 - plugins/sql/sqlite3/sqlite3.c | 1 - src/include/Makefile.am | 2 +- src/include/libmissing.h | 33 ------------------------- src/preludedb-path-selection.c | 1 - src/preludedb-sql-settings.c | 1 - src/preludedb-sql.c | 1 - src/preludedb.c | 1 - 16 files changed, 6 insertions(+), 48 deletions(-) commit 4ec573b0304d10d66792f22b56e372a1c3a703b4 Author: Yoann Vandoorselaere Date: Fri Jul 10 14:27:04 2009 +0200 GnuLib update libmissing/Makefile.am | 95 +++++++- libmissing/errno.in.h | 7 +- libmissing/getpagesize.c | 39 +++ libmissing/m4/errno_h.m4 | 5 +- libmissing/m4/getpagesize.m4 | 29 ++ libmissing/m4/gnulib-comp.m4 | 16 + libmissing/m4/include_next.m4 | 32 ++- libmissing/m4/lib-link.m4 | 7 +- libmissing/m4/memchr.m4 | 86 ++++++ libmissing/m4/mmap-anon.m4 | 59 ++++ libmissing/m4/size_max.m4 | 17 +- libmissing/m4/stdio_h.m4 | 5 +- libmissing/m4/string_h.m4 | 6 +- libmissing/m4/unistd_h.m4 | 83 ++++++ libmissing/memchr.c | 172 ++++++++++++ libmissing/memchr.valgrind | 14 + libmissing/stdio.in.h | 20 ++- libmissing/string.in.h | 17 +- libmissing/tests/Makefile.am | 19 ++- libmissing/tests/test-memchr.c | 130 +++++++++ libmissing/tests/test-stdio.c | 8 +- libmissing/tests/test-string.c | 8 +- libmissing/tests/test-unistd.c | 56 ++++ libmissing/tests/zerosize-ptr.h | 68 +++++ libmissing/unistd.in.h | 578 +++++++++++++++++++++++++++++++++++++++ 25 files changed, 1548 insertions(+), 28 deletions(-) commit d1190f4b40007040c853e9d6b859a4dafc962756 Author: Yoann Vandoorselaere Date: Wed May 13 11:52:08 2009 +0200 Fix regression introduced in libpreludedb 0.9.15: libpreludedb-config --plugin-dir would return incorrect result. configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit d15d1cd066f5d5da409c6b0472de6766a2517bcc Author: Yoann Vandoorselaere Date: Tue May 12 18:43:48 2009 +0200 Add autogenerated file to the repository. 0 files changed, 0 insertions(+), 0 deletions(-) commit 540d9f3cec220325ba3a434b31411813256af769 Author: Yoann Vandoorselaere Date: Tue May 12 18:37:19 2009 +0200 Documentation update. docs/api/libpreludedb-decl.txt | 618 ++++++++++++++++++++-------------------- 1 files changed, 309 insertions(+), 309 deletions(-) commit 4e8cf7a6d525e1a21d5a3761a56147fc830c2a7b Author: Yoann Vandoorselaere Date: Tue May 12 17:15:04 2009 +0200 Automatic gitignore generation. Makefile.am | 23 ++++ bindings/Makefile.am | 11 ++- docs/Makefile.am | 2 + docs/api/Makefile.am | 2 + docs/manpages/Makefile.am | 2 + git.mk | 183 ++++++++++++++++++++++++++++ libmissing/Makefile.am | 2 + libmissing/tests/Makefile.am | 2 + m4/Makefile.am | 8 ++ plugins/Makefile.am | 2 + plugins/format/Makefile.am | 2 + plugins/format/classic/Makefile.am | 2 + plugins/format/classic/include/Makefile.am | 2 + plugins/sql/Makefile.am | 2 + plugins/sql/mysql/Makefile.am | 2 + plugins/sql/pgsql/Makefile.am | 2 + plugins/sql/sqlite3/Makefile.am | 2 + src/Makefile.am | 2 + src/include/Makefile.am | 2 + 19 files changed, 254 insertions(+), 1 deletions(-) commit 931654dd6509992d872b6a155d070cb70a67858e Author: Yoann Vandoorselaere Date: Tue May 12 16:59:11 2009 +0200 Update autogenerated file. INSTALL | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) commit 34b478bfa015db5ed64f5b53706e764826b8fb94 Author: Yoann Vandoorselaere Date: Tue May 12 16:58:52 2009 +0200 Automatically generate ChangeLog from git history. ChangeLog | 1839 +---------------------------------------------------------- Makefile.am | 13 + 2 files changed, 16 insertions(+), 1836 deletions(-) commit 8feffb192e83e004e042c2c048ab9bbe8198a9b5 Author: Yoann Vandoorselaere Date: Tue May 12 15:10:21 2009 +0200 Update GnuLib code, add missing GnuLib generated files. config.rpath | 672 ++++++++++++++++++++++++++++++ libmissing/Makefile.am | 226 +++++------ libmissing/errno.in.h | 155 +++++++ libmissing/float.in.h | 6 +- libmissing/glthread/lock.c | 5 + libmissing/glthread/lock.h | 6 +- libmissing/glthread/threadlib.c | 7 +- libmissing/m4/00gnulib.m4 | 30 ++ libmissing/m4/alloca.m4 | 6 +- libmissing/m4/eoverflow.m4 | 70 ---- libmissing/m4/errno_h.m4 | 112 +++++ libmissing/m4/extensions.m4 | 32 ++- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-common.m4 | 41 ++- libmissing/m4/gnulib-comp.m4 | 26 +- libmissing/m4/include_next.m4 | 99 ++++- libmissing/m4/intmax_t.m4 | 16 +- libmissing/m4/inttypes_h.m4 | 12 +- libmissing/m4/lib-ld.m4 | 14 +- libmissing/m4/lib-link.m4 | 56 ++- libmissing/m4/lib-prefix.m4 | 91 +++-- libmissing/m4/lock.m4 | 8 +- libmissing/m4/longlong.m4 | 8 +- libmissing/m4/malloc.m4 | 41 -- libmissing/m4/multiarch.m4 | 65 +++ libmissing/m4/printf.m4 | 249 ++++++++---- libmissing/m4/size_max.m4 | 14 +- libmissing/m4/stdint.m4 | 95 ++++- libmissing/m4/stdint_h.m4 | 12 +- libmissing/m4/stdio_h.m4 | 140 +++++--- libmissing/m4/stdlib_h.m4 | 47 --- libmissing/m4/strdup.m4 | 26 +- libmissing/m4/string_h.m4 | 9 +- libmissing/m4/strndup.m4 | 8 +- libmissing/m4/strnlen.m4 | 8 +- libmissing/m4/thread.m4 | 6 +- libmissing/m4/threadlib.m4 | 51 ++-- libmissing/m4/unistd_h.m4 | 63 --- libmissing/m4/vasnprintf.m4 | 56 ++- libmissing/m4/wchar.m4 | 62 +++- libmissing/m4/wchar_t.m4 | 10 +- libmissing/m4/wint_t.m4 | 10 +- libmissing/m4/xsize.m4 | 6 +- libmissing/m4/yield.m4 | 8 +- libmissing/malloc.c | 57 --- libmissing/stdint.in.h | 123 ++++-- libmissing/stdio-write.c | 148 +++++++ libmissing/stdio.in.h | 122 ++++++ libmissing/stdlib.in.h | 240 ----------- libmissing/string.in.h | 10 +- libmissing/tests/Makefile.am | 39 +-- libmissing/tests/glthread/thread.c | 256 ++++++------ libmissing/tests/glthread/thread.h | 23 +- libmissing/tests/test-EOVERFLOW.c | 32 -- libmissing/tests/test-errno.c | 117 ++++++ libmissing/tests/test-lock.c | 56 +++- libmissing/tests/test-stdlib.c | 37 -- libmissing/tests/test-unistd.c | 44 -- libmissing/tests/test-wchar.c | 6 +- libmissing/time.in.h | 6 +- libmissing/unistd.in.h | 340 --------------- libmissing/vasnprintf.c | 796 +++++++++++++++++++++++++++++++++--- libmissing/wchar.in.h | 225 ++++++++++- link-warning.h | 28 ++ plugins/format/classic/Makefile.am | 2 +- plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/pgsql/Makefile.am | 2 +- plugins/sql/sqlite3/Makefile.am | 2 +- src/Makefile.am | 2 +- 69 files changed, 3675 insertions(+), 1728 deletions(-) commit 408ca1ff428fcec96c3d1da0e2f8fd62a929fe01 Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:59 2008 +0000 Tags 0.9.15.1 commit 6cf60a6d1e69baf41228f113d6a663228402c676 Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:39 2008 +0000 Update NEWS, bump version NEWS | 5 +++++ configure.in | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 3cac3c8ff98b1dba737933e0d6c4b5d331cc3b2b Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:37 2008 +0000 Fix handling of the offset parameter. preludedb-admin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 17cd0b646ce73b1f1ad433d974d44187c94fdd56 Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:35 2008 +0000 Add a THREAD_SUPPORT argument to AM_PATH_LIBPRELUDEDB() m4/libpreludedb.m4 | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) commit 1f0e69fcf0c32c25f36a44e33eb00f56879c46ce Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:32 2008 +0000 Add optional --thread option, to pull thread dependencies. libpreludedb-config.in | 43 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 36 insertions(+), 7 deletions(-) commit dea95231adde83c79de358786e9710b4aa755f11 Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:29 2008 +0000 Explicitly disable libprelude thread dependencie. configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f6f266ed31562e305869c844a676934ce89e1e47 Author: Yoann Vandoorselaere Date: Tue Sep 9 12:20:27 2008 +0000 Update from libprelude. m4/libprelude.m4 | 46 +++++++++++++++++++++++++++------------------- 1 files changed, 27 insertions(+), 19 deletions(-) commit e1572b8a7af7c0bf4cc395305f94ddec6dbf1273 Author: Yoann Vandoorselaere Date: Wed Aug 27 14:04:32 2008 +0000 Update NEWS, doc, bump version number. NEWS | 17 +++++++++++++++++ configure.in | 6 +++--- docs/api/libpreludedb-decl.txt | 27 +-------------------------- docs/api/tmpl/libpreludedb-unused.sgml | 24 ++++++++++++++++++++++++ docs/api/tmpl/preludedb-plugin-format.sgml | 24 ------------------------ 5 files changed, 45 insertions(+), 53 deletions(-) commit c53c47d660d7b4f904b4ee74323766b18515653c Author: Yoann Vandoorselaere Date: Wed Aug 27 13:50:27 2008 +0000 Add tests subdir. libmissing/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit d64277db38e5b82d923edf19342515e06eea21dc Author: Yoann Vandoorselaere Date: Wed Aug 27 13:46:47 2008 +0000 Add missing m4 macros. m4/ax_c_check_flag.m4 | 90 ++++++++++++++++++++++++++++++++++++++++++++ m4/ax_ld_check_flag.m4 | 98 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 0 deletions(-) commit c5774ec9d956a10c814df35c766614d7b5c5a91f Author: Yoann Vandoorselaere Date: Wed Aug 27 13:38:36 2008 +0000 Add missing m4 macro. m4/as-ac-expand.m4 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) commit e0c11c84f604b6293807c9e38d88b89b91e5e8b4 Author: Yoann Vandoorselaere Date: Wed Aug 27 13:36:46 2008 +0000 Update GnuLib code. libmissing/Makefile.am | 2 ++ libmissing/m4/string_h.m4 | 4 +++- libmissing/m4/thread.m4 | 3 +++ libmissing/string.in.h | 12 ++++++++++++ libmissing/tests/test-lock.c | 3 +++ 5 files changed, 23 insertions(+), 1 deletions(-) commit 52e69fe20cde0380272cfa8731a808db8c588ffa Author: Yoann Vandoorselaere Date: Wed Aug 27 13:36:42 2008 +0000 Build system cleanup. Makefile.am | 5 +- configure.in | 180 +++++++++++++++++++---------------- m4/ax_cflags_gcc_option.m4 | 183 ------------------------------------ m4/gtk-doc.m4 | 4 +- plugins/format/classic/Makefile.am | 2 +- plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/pgsql/Makefile.am | 2 +- plugins/sql/sqlite3/Makefile.am | 2 +- src/Makefile.am | 5 +- 9 files changed, 107 insertions(+), 278 deletions(-) commit efd3eb1a3fda21fcb560220d462d4dc8f0213635 Author: Yoann Vandoorselaere Date: Wed Aug 27 13:36:38 2008 +0000 Add description for the count command, describe more db settings arguments. preludedb-admin.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 9f872d210c8cab23d067f7d31a39abc16d847691 Author: Yoann Vandoorselaere Date: Wed Aug 27 13:36:36 2008 +0000 Whitespace police. NEWS | 354 +++++++++++++++++++++++++++++++++--------------------------------- 1 files changed, 177 insertions(+), 177 deletions(-) commit 6778986e3d773315b6c6765066687ce9dc77af76 Author: Yoann Vandoorselaere Date: Tue Aug 19 15:20:30 2008 +0000 Add missing tests. libmissing/glthread/lock.c | 1053 +++++++++++++++++++++++++++++++++++++++ libmissing/glthread/lock.h | 927 ++++++++++++++++++++++++++++++++++ libmissing/glthread/threadlib.c | 69 +++ 3 files changed, 2049 insertions(+), 0 deletions(-) commit f652acf811c34890fd8d0d53762119af8503414e Author: Yoann Vandoorselaere Date: Tue Aug 19 15:12:52 2008 +0000 Add GnuLib unit-tests. Makefile.am | 3 +++ configure.in | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) commit e9ce210f002e3b9bfef68dbc92193512f8e38eb8 Author: Yoann Vandoorselaere Date: Tue Aug 19 15:12:49 2008 +0000 Update GnuLib code, update lock.h inclusion path, add LTLIBTHREAD to LDFLAGS. libmissing/Makefile.am | 27 +- libmissing/lock.c | 938 -------------------------- libmissing/lock.h | 1105 ------------------------------ libmissing/m4/extensions.m4 | 6 +- libmissing/m4/gnulib-cache.m4 | 15 +- libmissing/m4/gnulib-common.m4 | 30 +- libmissing/m4/gnulib-comp.m4 | 102 ++- libmissing/m4/gnulib-tool.m4 | 28 +- libmissing/m4/include_next.m4 | 4 +- libmissing/m4/lock.m4 | 313 +-------- libmissing/m4/onceonly.m4 | 90 +++ libmissing/m4/onceonly_2_57.m4 | 86 --- libmissing/m4/printf.m4 | 1309 ++++++++++++++++++++++++++++++++++++ libmissing/m4/snprintf.m4 | 15 +- libmissing/m4/stdint.m4 | 20 +- libmissing/m4/stdio_h.m4 | 14 +- libmissing/m4/stdlib_h.m4 | 9 +- libmissing/m4/string_h.m4 | 2 + libmissing/m4/strndup.m4 | 8 +- libmissing/m4/thread.m4 | 15 + libmissing/m4/threadlib.m4 | 314 +++++++++ libmissing/m4/vasnprintf.m4 | 3 +- libmissing/m4/vsnprintf.m4 | 15 +- libmissing/m4/yield.m4 | 19 + libmissing/snprintf.c | 7 +- libmissing/stdio.in.h | 20 + libmissing/stdlib.in.h | 34 +- libmissing/string.in.h | 16 + libmissing/tests/Makefile.am | 196 ++++++ libmissing/tests/glthread/thread.c | 206 ++++++ libmissing/tests/glthread/thread.h | 369 ++++++++++ libmissing/tests/glthread/yield.h | 121 ++++ libmissing/tests/intprops.h | 77 +++ libmissing/tests/test-EOVERFLOW.c | 32 + libmissing/tests/test-alloca-opt.c | 62 ++ libmissing/tests/test-lock.c | 554 +++++++++++++++ libmissing/tests/test-snprintf.c | 72 ++ libmissing/tests/test-stdint.c | 360 ++++++++++ libmissing/tests/test-stdio.c | 30 + libmissing/tests/test-stdlib.c | 37 + libmissing/tests/test-string.c | 27 + libmissing/tests/test-time.c | 29 + libmissing/tests/test-unistd.c | 44 ++ libmissing/tests/test-vasnprintf.c | 128 ++++ libmissing/tests/test-vsnprintf.c | 85 +++ libmissing/tests/test-wchar.c | 27 + libmissing/tests/verify.h | 140 ++++ libmissing/vasnprintf.c | 279 ++++++--- libmissing/vsnprintf.c | 7 +- libmissing/wchar.in.h | 11 +- src/Makefile.am | 3 +- src/preludedb-sql.c | 2 +- 52 files changed, 4869 insertions(+), 2593 deletions(-) commit 9624d2edef0cd71d556036e56938e3bdd8ed216b Author: Yoann Vandoorselaere Date: Tue Aug 19 14:53:53 2008 +0000 Check PostgreSQL version and use new escape method if possible to avoid a warning. configure.in | 6 ++++++ plugins/sql/pgsql/pgsql.c | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 828a54a429f9c8c05396f25c3ae336491ed56638 Author: Yoann Vandoorselaere Date: Tue Aug 19 14:53:50 2008 +0000 Whitespace police. configure.in | 70 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 35 insertions(+), 35 deletions(-) commit 50f9becca2ba9c256f120d08af48296dde665707 Author: Yoann Vandoorselaere Date: Tue Aug 19 14:41:58 2008 +0000 Add a count command, printing the result of a COUNT() on the database. Do not fetch more than 'events-per-transaction' idents at once, work in a loop (fix #220, refs #305). Code cleanup, improved handling of interrupted transaction. preludedb-admin.c | 288 +++++++++++++++++++++++++++++++++++------------------ 1 files changed, 192 insertions(+), 96 deletions(-) commit 38e83215263cec9cdf56ee3103f4919db0a3a43f Author: Yoann Vandoorselaere Date: Tue Aug 19 14:41:56 2008 +0000 Update gtk-doc files. gtk-doc.make | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) commit 510d28efe2d1c99626fe88e5ab1b6f3a8a66fec3 Author: Yoann Vandoorselaere Date: Tue Aug 19 14:41:54 2008 +0000 Whitespace police. plugins/format/classic/classic-sql-select.c | 220 +++++++++++++------------- 1 files changed, 110 insertions(+), 110 deletions(-) commit 03cbd9eb84d3f421b4b1114e4cc86957592ddf5d Author: Yoann Vandoorselaere Date: Tue Aug 19 14:41:51 2008 +0000 Whitespace police. plugins/format/classic/classic-sql-join.c | 386 ++++++++++++++-------------- 1 files changed, 193 insertions(+), 193 deletions(-) commit 00232f5f713369be20e6bbab0bcfa3e8b19a47a1 Author: Yoann Vandoorselaere Date: Tue Aug 19 14:41:47 2008 +0000 Whitespace police. plugins/format/classic/classic-path-resolve.c | 346 ++++++++++++------------ 1 files changed, 173 insertions(+), 173 deletions(-) commit a0653e72c6938dccb012a8b1b9aef1685b35771f Author: Yoann Vandoorselaere Date: Fri Jul 18 16:26:54 2008 +0000 Include patch from Uwe Schwartz , fixing SQLite and MySQL detection under MacOSX. Fix #296. configure.in | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit c8c587480b2c3972b64965970b628413c679a004 Author: Sebastien Tricaud Date: Wed Apr 16 12:03:58 2008 +0000 changed manpage to new use docs/manpages/preludedb-admin.1 | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit d8ba0546dfd55bff66e5d8a576f6820665b00fcc Author: Yoann Vandoorselaere Date: Thu Mar 27 15:30:32 2008 +0000 Update gtk-doc.make. gtk-doc.make | 33 ++++++++++++++++++++++++++------- 1 files changed, 26 insertions(+), 7 deletions(-) commit 7dc760cee1c1863ab0e682f7b36d18fc0c776343 Author: Yoann Vandoorselaere Date: Thu Mar 27 15:30:23 2008 +0000 Update gnulib code. libmissing/Makefile.am | 19 ++++----- libmissing/alloca.in.h | 4 +- libmissing/m4/absolute-header.m4 | 49 ------------------------ libmissing/m4/alloca.m4 | 8 +--- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-comp.m4 | 3 +- libmissing/m4/include_next.m4 | 7 ++- libmissing/m4/lib-link.m4 | 66 +++++++++++++++++++++++--------- libmissing/m4/string_h.m4 | 10 ++++- libmissing/m4/time_r.m4 | 6 ++- libmissing/m4/unistd_h.m4 | 6 ++- libmissing/m4/vasnprintf.m4 | 20 +++++++++- libmissing/printf-parse.c | 40 +++++++++++++++++++- libmissing/stdio.in.h | 4 +- libmissing/string.in.h | 78 ++++++++++++++++++++++++++++++-------- libmissing/unistd.in.h | 22 ++++++++++- libmissing/vasnprintf.c | 55 +++++++++++++++++---------- libmissing/vasnprintf.h | 4 +- libmissing/xsize.h | 4 +- 19 files changed, 266 insertions(+), 141 deletions(-) commit 98ab0ed10307a9eeb5996451ebe5fdee68bdda49 Author: Yoann Vandoorselaere Date: Tue Feb 5 11:16:13 2008 +0000 Only use E'value' mode of escaping if PostgreSQL server version is higher or equal than 8.2.0. plugins/sql/pgsql/pgsql.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 5fc347765517c24c39ed98fdb039906e1e8c058e Author: Yoann Vandoorselaere Date: Thu Jan 3 10:59:21 2008 +0000 Update NEWS, bump version number. NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 747cb4e3072bada00fe62b8e0de3e83d38bbad0a Author: Yoann Vandoorselaere Date: Thu Jan 3 10:59:12 2008 +0000 Gnulib code update. libmissing/Makefile.am | 7 +++++++ libmissing/m4/stdlib_h.m4 | 7 ++++++- libmissing/m4/string_h.m4 | 3 +++ libmissing/m4/unistd_h.m4 | 1 + libmissing/stdint.in.h | 10 ++++++++-- libmissing/stdlib.in.h | 25 ++++++++++++++++++++++++- libmissing/string.in.h | 5 ++++- libmissing/unistd.in.h | 5 ++++- 8 files changed, 57 insertions(+), 6 deletions(-) commit 73305d7b4529a1b4a8d004f9007d3e8bceec0bca Author: Yoann Vandoorselaere Date: Wed Jan 2 12:46:29 2008 +0000 Drop 'NOT NULL' constraint with a separate query (Fix #271). Thanks to Pierre Chifflier for pointing this out. plugins/format/classic/pgsql-update-14-7.sql | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 55e8408711050b38ef7bd378635e5e1b5b5d9f83 Author: Yoann Vandoorselaere Date: Wed Dec 19 15:32:31 2007 +0000 Update NEWS, bump version number. NEWS | 25 +++++++++++++++++++++++++ configure.in | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) commit 7c47b4f30e7b1e464c1b0d0bc5e72733ad471eac Author: Yoann Vandoorselaere Date: Wed Dec 19 15:21:39 2007 +0000 Configure the BINDINGS_CC variable, not modified by GnuLib autoconfiguration. configure.in | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit e9cf7b9eb9d5b9a482b0020d13fed567081fd299 Author: Yoann Vandoorselaere Date: Wed Dec 19 15:20:03 2007 +0000 Add missing sqlite-update-14-7.sql. Distribute schema update 14.7. Propagate CC variable for bindings compilation. bindings/Makefile.am | 6 +++--- plugins/format/classic/Makefile.am | 5 ++++- plugins/format/classic/sqlite-update-14-7.sql | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) commit 581882da626033fdc2ce73ce767fe98f21fcbfcb Author: Yoann Vandoorselaere Date: Tue Dec 18 11:22:33 2007 +0000 Use the GnuLib "lock" module to provide portable recursive mutex access different architecture. We now ensure that a single query or transaction is held at a time. src/preludedb-sql.c | 90 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 66 insertions(+), 24 deletions(-) commit f25667e90f216af52034fa58d033d5e58b81cc53 Author: Yoann Vandoorselaere Date: Tue Dec 18 11:22:06 2007 +0000 Add missing GnuLib module. libmissing/lock.c | 938 ++++++++++++++++++++++++++++++++++++ libmissing/lock.h | 1105 +++++++++++++++++++++++++++++++++++++++++++ libmissing/m4/lib-ld.m4 | 110 +++++ libmissing/m4/lib-link.m4 | 709 +++++++++++++++++++++++++++ libmissing/m4/lib-prefix.m4 | 185 ++++++++ libmissing/m4/lock.m4 | 316 ++++++++++++ 6 files changed, 3363 insertions(+), 0 deletions(-) commit a92087c4807b2232580717fc0139cc936fa6777e Author: Yoann Vandoorselaere Date: Tue Dec 18 11:19:12 2007 +0000 Update GnuLib code, include the lock module. libmissing/Makefile.am | 31 +- libmissing/alloca.in.h | 2 +- libmissing/asnprintf.c | 2 +- libmissing/dummy.c | 42 -- libmissing/float+.h | 2 +- libmissing/float.in.h | 2 +- libmissing/m4/float_h.m4 | 4 +- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-common.m4 | 45 ++- libmissing/m4/gnulib-comp.m4 | 81 ++++- libmissing/m4/intmax_t.m4 | 12 +- libmissing/m4/longlong.m4 | 75 +++- libmissing/m4/stdio_h.m4 | 15 +- libmissing/m4/stdlib_h.m4 | 4 +- libmissing/m4/string_h.m4 | 2 - libmissing/m4/ulonglong.m4 | 51 --- libmissing/m4/unistd_h.m4 | 6 +- libmissing/m4/vasnprintf.m4 | 52 +++- libmissing/m4/wint_t.m4 | 2 +- libmissing/malloc.c | 2 +- libmissing/printf-args.c | 2 +- libmissing/printf-args.h | 2 +- libmissing/printf-parse.c | 25 +- libmissing/printf-parse.h | 2 +- libmissing/size_max.h | 2 +- libmissing/snprintf.c | 2 +- libmissing/stdint.in.h | 7 +- libmissing/stdio.in.h | 2 +- libmissing/stdlib.in.h | 9 + libmissing/strdup.c | 2 +- libmissing/string.in.h | 47 +-- libmissing/strndup.c | 2 +- libmissing/strnlen.c | 2 +- libmissing/time.in.h | 2 +- libmissing/time_r.c | 2 +- libmissing/unistd.in.h | 57 +++- libmissing/vasnprintf.c | 890 +++++++++++++++++++++++++++++++++++----- libmissing/vasnprintf.h | 2 +- libmissing/vsnprintf.c | 2 +- libmissing/wchar.in.h | 2 +- libmissing/xsize.h | 2 +- 41 files changed, 1179 insertions(+), 322 deletions(-) commit f2579bce080c9476fd38c132ea4ade085b5dd0be Author: Yoann Vandoorselaere Date: Tue Nov 27 14:18:43 2007 +0000 Fix a problem handling offset when using the "load" command. Additionnally, do not compute statistics by storing the number of useconds elapsed, since the statistics counter would wrap arround with long operation. preludedb-admin.c | 114 +++++++++++++++++++++++++++++++++++----------------- 1 files changed, 77 insertions(+), 37 deletions(-) commit 642d5d510b89b5e1ef024ef60c436d8574422c79 Author: Yoann Vandoorselaere Date: Fri Nov 2 13:25:12 2007 +0000 Use TEXT in place of VARCHAR for alert.assessment.impact.description (fix #265). plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-7.sql | 6 ++++++ plugins/format/classic/mysql.sql | 4 ++-- plugins/format/classic/pgsql-update-14-7.sql | 6 ++++++ plugins/format/classic/pgsql.sql | 4 ++-- plugins/format/classic/sqlite.sql | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) commit 706cdc84d16a879c0bfcb60bf8258cfe03c30561 Author: Yoann Vandoorselaere Date: Mon Oct 29 13:36:01 2007 +0000 Fix OpenBSD compilation issue, thanks Alexandre Anriot for pointing out this (fix #227). src/preludedb-plugin-sql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit bdf468e120b1797f4cb22232481af02eb7a0809a Author: Yoann Vandoorselaere Date: Thu Oct 25 13:23:45 2007 +0000 Update GnuLib code. libmissing/Makefile.am | 146 +++++++++-- libmissing/alloca.in.h | 54 ++++ libmissing/alloca_.h | 54 ---- libmissing/dummy.c | 10 +- libmissing/float.in.h | 58 ++++ libmissing/float_.h | 59 ---- libmissing/m4/absolute-header.m4 | 49 ++++ libmissing/m4/extensions.m4 | 52 +++- libmissing/m4/gnulib-comp.m4 | 55 +++- libmissing/m4/longlong.m4 | 13 +- libmissing/m4/malloc.m4 | 41 +++ libmissing/m4/stdint.m4 | 4 +- libmissing/m4/stdio_h.m4 | 11 +- libmissing/m4/stdlib_h.m4 | 35 +++ libmissing/m4/string_h.m4 | 3 + libmissing/m4/strndup.m4 | 6 +- libmissing/m4/strnlen.m4 | 6 +- libmissing/m4/time_h.m4 | 2 +- libmissing/m4/ulonglong.m4 | 13 +- libmissing/m4/unistd_h.m4 | 56 ++++ libmissing/malloc.c | 57 ++++ libmissing/printf-parse.c | 2 +- libmissing/stdint.in.h | 513 ++++++++++++++++++++++++++++++++++ libmissing/stdint_.h | 508 ---------------------------------- libmissing/stdio.in.h | 382 ++++++++++++++++++++++++++ libmissing/stdio_.h | 312 --------------------- libmissing/stdlib.in.h | 176 ++++++++++++ libmissing/string.in.h | 563 ++++++++++++++++++++++++++++++++++++++ libmissing/string_.h | 548 ------------------------------------- libmissing/time.in.h | 114 ++++++++ libmissing/time_.h | 114 -------- libmissing/unistd.in.h | 262 ++++++++++++++++++ libmissing/vasnprintf.c | 45 +++- libmissing/wchar.in.h | 82 ++++++ libmissing/wchar_.h | 82 ------ 35 files changed, 2720 insertions(+), 1767 deletions(-) commit 18e81ba546d6944abf4f6e490e826d110293dcb8 Author: Yoann Vandoorselaere Date: Thu Oct 11 09:03:30 2007 +0000 Handle case where an offset is set, but no limit were specified. plugins/sql/mysql/mysql.c | 3 +++ plugins/sql/pgsql/pgsql.c | 5 ++++- plugins/sql/sqlite3/sqlite3.c | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) commit e16d16c7385a9910cbd29d9a5cb00c79b2692d84 Author: Yoann Vandoorselaere Date: Thu Oct 11 09:03:24 2007 +0000 Whitespace police. plugins/sql/sqlite3/sqlite3.c | 114 ++++++++++++++++++++-------------------- 1 files changed, 57 insertions(+), 57 deletions(-) commit d7c38decdbdb33551893c599eaa7322a61639fc0 Author: Yoann Vandoorselaere Date: Thu Oct 11 09:01:02 2007 +0000 Whitespace police. plugins/sql/pgsql/pgsql.c | 46 ++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 23 deletions(-) commit 3d85bf5f7eb096ffbe9db58a7284c3934b0c4e8b Author: Yoann Vandoorselaere Date: Wed Sep 12 13:52:40 2007 +0000 Prevent MySQL session from timing out after 8 hours of inactivity. Upon connection to the MySQL server, set the wait_timeout session variable to 31536000 seconds (365 days). plugins/sql/mysql/mysql.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 2d7b91e08e033c29937ab0af9d76b6c433c4eadb Author: Yoann Vandoorselaere Date: Wed Sep 12 13:48:17 2007 +0000 Whitespace police. plugins/sql/mysql/mysql.c | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) commit caefe944dbf6774217592c65104b10614d770dbe Author: Yoann Vandoorselaere Date: Thu Sep 6 17:35:10 2007 +0000 Fix postgreSQL warning when inseting binary data. plugins/sql/pgsql/pgsql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit aadc9eb19401878f9e390e677faa46c25117cdb9 Author: Yoann Vandoorselaere Date: Thu Sep 6 17:35:04 2007 +0000 Allow Python thread to run, while entering libpreludedb C function. Avoid Python thread from stalling while blocking libpreludedb function are waiting. bindings/libpreludedb_python.i | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 1eb62b3c5081f048ea747007f484b277a36121db Author: Yoann Vandoorselaere Date: Mon Aug 20 15:37:25 2007 +0000 Update NEWS, documentation, bump version number. NEWS | 25 +++++++++++++++++++++++++ configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 8 ++++---- 3 files changed, 31 insertions(+), 6 deletions(-) commit 853bc7439c1d1ee84aeb6cc5fd7f43f54166bca9 Author: Yoann Vandoorselaere Date: Mon Aug 20 15:37:19 2007 +0000 Make comparison for the type of operation case insensitive. Fix a typo. preludedb-admin.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit c332c96689f955f15b5a702d2306b97c5a80ef32 Author: Yoann Vandoorselaere Date: Thu Aug 16 12:15:04 2007 +0000 Update GnuLib code, include missing files (fix #250). libmissing/float+.h | 148 ++++++++++++ libmissing/float_.h | 59 +++++ libmissing/m4/float_h.m4 | 19 ++ libmissing/m4/include_next.m4 | 107 +++++++++ libmissing/m4/stdint.m4 | 395 ++++++++++++++++++++++++++++++++ libmissing/m4/ulonglong.m4 | 48 ++++ libmissing/m4/wchar.m4 | 54 +++++ libmissing/stdint_.h | 508 +++++++++++++++++++++++++++++++++++++++++ libmissing/wchar_.h | 82 +++++++ 9 files changed, 1420 insertions(+), 0 deletions(-) commit 8f468f509b32a859fa79844a5e95e60f189334b8 Author: Yoann Vandoorselaere Date: Fri Aug 10 12:12:42 2007 +0000 Give the delete table a decent size. Make count and offset 64 bits, in place of 32 bits. Stop processing on certain error. Correct preludedb-admin print example, and improve error message on invalid message type. preludedb-admin.c | 89 ++++++++++++++++++++++++++++------------------------ 1 files changed, 48 insertions(+), 41 deletions(-) commit 371cdb5da1a3095b9c1f9e98cf459631ef74a6a9 Author: Yoann Vandoorselaere Date: Fri Aug 10 12:12:33 2007 +0000 Update GnuLib code. libmissing/Makefile.am | 127 ++- libmissing/alloca_.h | 8 +- libmissing/m4/absolute-header.m4 | 44 - libmissing/m4/gnulib-cache.m4 | 2 + libmissing/m4/gnulib-comp.m4 | 14 +- libmissing/m4/longdouble.m4 | 31 - libmissing/m4/stdio_h.m4 | 42 +- libmissing/m4/string_h.m4 | 5 +- libmissing/m4/time_h.m4 | 4 +- libmissing/m4/vasnprintf.m4 | 137 ++- libmissing/m4/wint_t.m4 | 2 +- libmissing/printf-args.c | 56 +- libmissing/printf-args.h | 28 +- libmissing/printf-parse.c | 83 +- libmissing/printf-parse.h | 115 ++- libmissing/snprintf.h | 29 - libmissing/stdio_.h | 126 ++- libmissing/string_.h | 24 +- libmissing/time_.h | 19 +- libmissing/vasnprintf.c | 2955 +++++++++++++++++++++++++++++++++++--- 20 files changed, 3462 insertions(+), 389 deletions(-) commit 2399d76f7c87daa6d9584a20b0e107cbb9602e82 Author: Yoann Vandoorselaere Date: Fri Aug 10 12:12:16 2007 +0000 Whitespace police. src/preludedb-sql.c | 184 +++++++++++++++++++++++++------------------------- 1 files changed, 92 insertions(+), 92 deletions(-) commit d76560a6ce0697b135e67e03c0bf41e57149c3b9 Author: Yoann Vandoorselaere Date: Fri Aug 10 12:11:56 2007 +0000 Whitespace police. src/preludedb-sql-settings.c | 154 +++++++++++++++++++++--------------------- 1 files changed, 77 insertions(+), 77 deletions(-) commit e03ba52c0d57eda3f0c40864dffa1b1b4591749c Author: Yoann Vandoorselaere Date: Fri Aug 10 12:11:47 2007 +0000 Whitespace police. src/preludedb-plugin-sql.c | 54 ++++++++++++++++++++++---------------------- 1 files changed, 27 insertions(+), 27 deletions(-) commit e14a5355972af7174ff7b44f20b9ba12a3424bd7 Author: Yoann Vandoorselaere Date: Fri Aug 10 12:11:33 2007 +0000 Whitespace police. src/preludedb-plugin-format.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) commit fb6de82a906cb1a5e6df433150d99c64d4bbbeaf Author: Yoann Vandoorselaere Date: Fri Aug 10 12:11:23 2007 +0000 Whitespace police. src/preludedb-path-selection.c | 224 ++++++++++++++++++++-------------------- 1 files changed, 112 insertions(+), 112 deletions(-) commit bd051d68e4895906fa28c0f9f0a76a24f4778686 Author: Yoann Vandoorselaere Date: Fri Jul 6 15:41:52 2007 +0000 Add mising docs/manpages/Makefile.am. docs/manpages/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit a6b13a54504530ab60dfeb4ba1fef7cc7ead51b6 Author: Yoann Vandoorselaere Date: Fri Jul 6 15:41:30 2007 +0000 Update. gtk-doc.make | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit b899bf33967f84d03da08a50ef81619a8bcff983 Author: Yoann Vandoorselaere Date: Sat Jun 9 07:29:13 2007 +0000 preludedb-admin manpage, by Pierre Chifflier (fix #230). configure.in | 1 + docs/Makefile.am | 2 +- docs/manpages/preludedb-admin.1 | 93 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletions(-) commit 85824ce61165b4452f0a05fd84991a1740f20cb7 Author: Yoann Vandoorselaere Date: Sat Jun 9 07:28:59 2007 +0000 Whitespace police. src/include/preludedb.h | 32 +++--- src/preludedb.c | 332 +++++++++++++++++++++++----------------------- 2 files changed, 182 insertions(+), 182 deletions(-) commit fc001483e8dbcc852b28823486fd3ebba77b9557 Author: Yoann Vandoorselaere Date: Thu Jun 7 09:19:06 2007 +0000 Fix sqlite-update-14-5.sql, thanks to Pierre Chifflier . plugins/format/classic/sqlite-update-14-5.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 25bfcb95c932628620a84231ee0040a1c92f14ed Author: Yoann Vandoorselaere Date: Wed Jun 6 12:48:29 2007 +0000 Speedup / simplify PostgreSQL update, although this require newer PgSQL version. plugins/format/classic/pgsql-update-14-6.sql | 28 ++++--------------------- 1 files changed, 5 insertions(+), 23 deletions(-) commit ed003665ff18555160aa94913688e5509e48a948 Author: Yoann Vandoorselaere Date: Tue Jun 5 11:30:32 2007 +0000 Fix multiple preludedb-admin issues All command now take a type argument (value should be alert or heartbeat), This is done to have a coherent implementation of the --offset and --count options. Fix --offset with the load command. Whitespace police. preludedb-admin.c | 509 +++++++++++++++++++++++++---------------------------- 1 files changed, 244 insertions(+), 265 deletions(-) commit d743859eea4ecc13e9df5e013903ca584907fa0a Author: Yoann Vandoorselaere Date: Tue Jun 5 08:08:50 2007 +0000 Revert to schema version 14.6, which is not yet released (we previously bumped to 14.7 - that was not needed). plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql.sql | 2 +- plugins/format/classic/pgsql-update-14-6.sql | 35 ++++++++++++++++++++++++ plugins/format/classic/pgsql-update-14-7.sql | 37 -------------------------- plugins/format/classic/pgsql.sql | 2 +- 5 files changed, 38 insertions(+), 40 deletions(-) commit 319218d78ceef35bc1216b2c31850c752c14e977 Author: Yoann Vandoorselaere Date: Sat May 26 06:28:43 2007 +0000 Patch by Pierre Chifflier , fixing type conversions preventing PostgreSQL to use indexes (fix #225). Additionally, update schema version number to 14.7. plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql.sql | 2 +- plugins/format/classic/mysql2pgsql.sh | 2 +- plugins/format/classic/pgsql-update-14-7.sql | 37 ++++++++++++++ plugins/format/classic/pgsql.sql | 70 +++++++++++++------------- 5 files changed, 75 insertions(+), 38 deletions(-) commit bec7116b56f776fde6e391e8cfba8f8f481a0c68 Author: Yoann Vandoorselaere Date: Tue May 22 08:49:35 2007 +0000 Fix compilation on system without ENOTSUP (fix #227): Include modified patch from Alexandre Anriot . src/preludedb-plugin-sql.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 2448e136849fb5f6f8c595a9fa5e865d16cf6d8b Author: Yoann Vandoorselaere Date: Tue May 22 08:49:32 2007 +0000 More warnings. configure.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e9e8ff515ea1ecbf7c3cea755f3176db11ebae81 Author: Yoann Vandoorselaere Date: Tue May 22 08:49:27 2007 +0000 Slight optimisation: cache path count. src/preludedb-path-selection.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) commit ac660eef3e3210b16f3c6d8307606483ff2ca67a Author: Yoann Vandoorselaere Date: Wed May 2 12:55:55 2007 +0000 Fix column name. plugins/format/classic/pgsql-update-14-6.sql | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 58e2045b5acc6c46fcabe635573d86f33ffb587a Author: Yoann Vandoorselaere Date: Wed May 2 12:37:06 2007 +0000 Track change in pgsql/sqlite. plugins/format/classic/pgsql.sql | 522 +++++++++++++++++++++++++++++++++++++ plugins/format/classic/sqlite.sql | 485 ++++++++++++++++++++++++++++++++++ 2 files changed, 1007 insertions(+), 0 deletions(-) commit 4792353ab6bf8d1c7363bfab15d60537c99ea620 Author: Yoann Vandoorselaere Date: Wed May 2 12:36:59 2007 +0000 Bump schema version. Source and Target now use a 16 bits index (required for CorrelationAlert with large number of source/target). Correlation alert now use a 32 bits index (required to link large number of Alert together). plugins/format/classic/Makefile.am | 5 ++- plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-6.sql | 29 ++++++++++++++++- plugins/format/classic/mysql.sql | 44 +++++++++++++------------- plugins/format/classic/pgsql-update-14-6.sql | 25 ++++++++++++++ 5 files changed, 80 insertions(+), 25 deletions(-) commit 236f78baa6c025df292fa1c4a03364da6c3d8369 Author: Yoann Vandoorselaere Date: Wed May 2 12:36:52 2007 +0000 Fix some convertion. plugins/format/classic/mysql-update-14-6.sql | 2 ++ plugins/format/classic/mysql2pgsql.sh | 6 +++--- plugins/format/classic/pgsql-update-14-6.sql | 9 +++++++++ plugins/format/classic/sqlite-update-14-6.sql | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) commit 974734120dc70c7133ee23681a5b75eb079446fc Author: Yoann Vandoorselaere Date: Sat Apr 14 10:42:35 2007 +0000 Module path migration: move /trunk/libpreludedb /libpreludedb/trunk commit 9c3a46a4f8c46de0756530a2254070ee47bec47e Author: Yoann Vandoorselaere Date: Sat Mar 17 15:19:38 2007 +0000 Update NEWS, doc. Bump version number. NEWS | 25 ++++++++++++++++++++++++- configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 4 ++-- 3 files changed, 28 insertions(+), 5 deletions(-) commit eeba8ab0f098497f1c0e197d67f2cf7590588daf Author: Yoann Vandoorselaere Date: Sat Mar 17 12:11:46 2007 +0000 Update GnuLib code. libmissing/Makefile.am | 79 ++++++- libmissing/dummy.c | 16 ++- libmissing/m4/gnulib-comp.m4 | 15 +- libmissing/m4/minmax.m4 | 41 ---- libmissing/m4/snprintf.m4 | 24 ++- libmissing/m4/stdio_h.m4 | 43 ++++ libmissing/m4/string_h.m4 | 46 ++-- libmissing/m4/time_h.m4 | 76 +++++++ libmissing/m4/time_r.m4 | 10 +- libmissing/m4/vasnprintf.m4 | 31 ++- libmissing/m4/vsnprintf.m4 | 24 ++- libmissing/minmax.h | 60 ----- libmissing/snprintf.c | 7 +- libmissing/stdio_.h | 192 ++++++++++++++++ libmissing/string_.h | 183 +++++++++++----- libmissing/time_.h | 107 +++++++++ libmissing/time_r.c | 4 +- libmissing/time_r.h | 52 ----- libmissing/vasnprintf.c | 512 +++++++++++++++++++++++++++++++++++++++++- libmissing/vasnprintf.h | 10 +- libmissing/vsnprintf.c | 7 +- libmissing/vsnprintf.h | 31 --- src/include/libmissing.h | 5 +- 23 files changed, 1263 insertions(+), 312 deletions(-) commit e32aa1966c56621a5f7e41e621200fa03efc546b Author: Yoann Vandoorselaere Date: Sat Mar 17 10:33:39 2007 +0000 Patch from Rob Holand : The \? and + syntax for sed is not supported using "basic regular expressions" on at least Darwin and DragonFly BSD (I didn't test other OS). You can use the \{0,1\} and \{1,\} syntax to achieve the desired result. plugins/format/classic/mysql2pgsql.sh | 6 +++--- plugins/format/classic/mysql2sqlite.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 233cafa668d343dd32259176b5dda174b0710884 Author: Yoann Vandoorselaere Date: Sat Mar 17 09:43:43 2007 +0000 Fix a field shift bug that happened after trying to retrieve an empty time field. plugins/format/classic/classic.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) commit e5a5f68f5536a6cd908a12f218e972eab215d019 Author: Yoann Vandoorselaere Date: Fri Mar 16 18:06:58 2007 +0000 Handle case-insensitive regex using lower(). plugins/sql/sqlite3/sqlite3.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 86baa2c01b3a5d5950072f1ed41a02d4bdcfa1b5 Author: Yoann Vandoorselaere Date: Fri Mar 16 16:53:40 2007 +0000 Function declaration fix. src/include/preludedb-path-selection.h | 2 +- src/preludedb-path-selection.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 692b7c3f48d0c259362b1d676dc667518c7598cd Author: Yoann Vandoorselaere Date: Fri Mar 16 16:46:23 2007 +0000 Check format string if the compiler support it. src/include/preludedb-sql.h | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) commit b9eb4f22eb3d335cee5c0b40c251024339c9914a Author: Yoann Vandoorselaere Date: Fri Mar 16 16:45:21 2007 +0000 When a given SQL function is not implemented by the driver, return an error with the missing function. src/preludedb-plugin-sql.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) commit 16f070a0d73aca17908a6cedb223e8aa9065694b Author: Yoann Vandoorselaere Date: Fri Mar 16 16:44:00 2007 +0000 Doc update. src/preludedb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 587487f8c06ff2c1b2ccfdf3c873e73b1fa51332 Author: Yoann Vandoorselaere Date: Fri Mar 16 16:43:29 2007 +0000 Make preludedb_sql_query() return the number of rows instead of 1. Ability to build LIKE value from AdditionalData. src/preludedb-sql.c | 41 ++++++++++++++++++++++++++++++----------- 1 files changed, 30 insertions(+), 11 deletions(-) commit 5ed6913e069157161ec0c47ceb34b6728d25fe81 Author: Yoann Vandoorselaere Date: Fri Mar 16 15:56:18 2007 +0000 Implement loading of multiple file. Improved error/information reporting. preludedb-admin.c | 117 ++++++++++++++++++++++++++++------------------------ 1 files changed, 63 insertions(+), 54 deletions(-) commit 9884dc61ed4f2c7c09b67b4967b20decf28bc8a0 Author: Yoann Vandoorselaere Date: Fri Mar 16 14:47:14 2007 +0000 Implement Python only preludedb_get_values2, preludedb_get_heartbeat_idents2, preludedb_get_alert_idents2. Return rows and number of rows in a tupple. bindings/libpreludedb_python.i | 102 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 102 insertions(+), 0 deletions(-) commit 628ee985fbe60fd65ccb2ace5ffb230a17dfdc23 Author: Yoann Vandoorselaere Date: Fri Mar 16 11:08:30 2007 +0000 Fix insertion issue for ProcessArg and File Linkage. plugins/format/classic/classic-insert.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 94f707c8d9d3f001470ff4e2b7b9d584d655ffe2 Author: Yoann Vandoorselaere Date: Tue Mar 6 21:09:53 2007 +0000 Fix error handling. plugins/format/classic/classic-get.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) commit 39de088c79b43d615b28fbc84968ef6f2a13574a Author: Yoann Vandoorselaere Date: Mon Feb 19 10:27:33 2007 +0000 Make sure we have an exception to process. This fix a crash with Python bindings upon signal reception. Fix #200. bindings/libpreludedb_python.i | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 75c1e95ff7cabb3cb3a69d1f73065ac247317465 Author: Yoann Vandoorselaere Date: Wed Feb 7 16:05:04 2007 +0000 Update NEWS. Bump version number. NEWS | 7 +++++++ configure.in | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 3e052759eaf9d58aa89ab823d78f04792930ad73 Author: Yoann Vandoorselaere Date: Wed Feb 7 14:29:00 2007 +0000 Update GnuLib code. libmissing/Makefile.am | 64 +++++- libmissing/m4/absolute-header.m4 | 44 ++++ libmissing/m4/gnulib-common.m4 | 22 ++ libmissing/m4/gnulib-comp.m4 | 38 +--- libmissing/m4/strdup.m4 | 11 +- libmissing/m4/string_h.m4 | 80 +++++++ libmissing/m4/strndup.m4 | 9 +- libmissing/m4/strnlen.m4 | 14 +- libmissing/m4/wint_t.m4 | 14 +- libmissing/printf-args.c | 12 +- libmissing/printf-args.h | 26 +- libmissing/printf-parse.c | 20 +- libmissing/strdup.c | 8 +- libmissing/strdup.h | 39 ---- libmissing/string_.h | 467 ++++++++++++++++++++++++++++++++++++++ libmissing/strndup.c | 8 +- libmissing/strndup.h | 32 --- libmissing/strnlen.c | 4 +- libmissing/strnlen.h | 32 --- libmissing/vasnprintf.c | 36 ++-- src/include/libmissing.h | 3 +- 21 files changed, 775 insertions(+), 208 deletions(-) commit f9979f90421296d3de515cc53fab5f81171c9ae4 Author: Yoann Vandoorselaere Date: Wed Feb 7 14:28:33 2007 +0000 Correct libmissing inclusion path. plugins/format/classic/Makefile.am | 2 +- plugins/sql/mysql/Makefile.am | 4 ++-- plugins/sql/pgsql/Makefile.am | 2 +- plugins/sql/sqlite3/Makefile.am | 2 +- src/Makefile.am | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 27140a6978a450a47ed08417b312e9fc0207d95a Author: Yoann Vandoorselaere Date: Wed Feb 7 14:12:13 2007 +0000 Fix copy / move operation. preludedb-admin.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) commit 1fb11c35ae460d91178163133d70b74bb75c4382 Author: Yoann Vandoorselaere Date: Wed Feb 7 14:07:55 2007 +0000 Fix possible NULL free(). plugins/sql/sqlite3/sqlite3.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 24db0addb87a48c214d74d03ebbc3ca837ad9e6e Author: Yoann Vandoorselaere Date: Mon Jan 8 13:34:28 2007 +0000 Version bump. NEWS | 7 ++++++- configure.in | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) commit beb163f8a1c816f7ac865999bc9f11bc99c1d9f7 Author: Yoann Vandoorselaere Date: Mon Jan 8 13:23:53 2007 +0000 Fix make installation error when Perl bindings are disabled. bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4273738e9ec2999ec003a07b2952b5dcc815d8d8 Author: Yoann Vandoorselaere Date: Fri Jan 5 17:20:54 2007 +0000 Forgot to update NEWS. NEWS | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) commit 3dd55f6b5dc11f6742b3b0b851e2021d43d2d531 Author: Yoann Vandoorselaere Date: Fri Jan 5 17:17:17 2007 +0000 Update NEWS, documentation, Gnulib code. Bump version number. configure.in | 4 ++-- libmissing/Makefile.am | 2 +- libmissing/m4/gnulib-cache.m4 | 2 +- libmissing/m4/gnulib-comp.m4 | 28 +++++++++++++++++++++++++++- 4 files changed, 31 insertions(+), 5 deletions(-) commit fb67aaece41e17d4c89bbba6833f5ccc5de4a814 Author: Yoann Vandoorselaere Date: Fri Jan 5 17:13:28 2007 +0000 Fix make -j compilation. New configure --with-perl-installdirs flags: might be used to override default site perl installation. bindings/Makefile.am | 34 +++++++++++++++------------------- configure.in | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 19 deletions(-) commit d1ba937f985dc5d3fb83215bb50173ae7e0a6ecc Author: Yoann Vandoorselaere Date: Thu Jan 4 21:46:18 2007 +0000 Small definition fix. plugins/sql/mysql/mysql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 148e166757b9a940a49c7ad95cfec7d55600391f Author: Yoann Vandoorselaere Date: Sat Dec 30 14:57:31 2006 +0000 Ignore inline keyword to prevent error with old SWIG version. Prevent preludedb_error_t redefinition error. bindings/libpreludedb.i | 3 +++ docs/api/libpreludedb-decl.txt | 10 +--------- docs/api/libpreludedb-sections.txt | 1 - docs/api/tmpl/libpreludedb-unused.sgml | 9 +++++++++ docs/api/tmpl/preludedb-sql.sgml | 9 --------- 5 files changed, 13 insertions(+), 19 deletions(-) commit 8af470fac935adb497737f19b4b2761790b6c6da Author: Yoann Vandoorselaere Date: Fri Dec 29 12:51:17 2006 +0000 Ooops. src/preludedb-sql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d9dacbd965b7de5ff8ccddd1fc3890115918144b Author: Yoann Vandoorselaere Date: Fri Dec 29 12:46:24 2006 +0000 Make preludedb_sql_status_t a private bitfield, so that we can store multiple state. x src/include/preludedb-sql.h | 8 +---- src/preludedb-sql.c | 73 +++++++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 41 deletions(-) commit 7e21c2819b1f6acd6c01cd7d9d191f0e0d385d93 Author: Yoann Vandoorselaere Date: Fri Dec 29 12:43:59 2006 +0000 Generate bindings for the error handling API. bindings/libpreludedb.i | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit 18067e6413e7a22732f5fefec5d7cd402bce4cad Author: Yoann Vandoorselaere Date: Wed Dec 27 12:44:15 2006 +0000 Don't duplicate call to update_sql_from_errno() and assert_connected, for function which call preludedb_sql_query() and preludedb_sql_escape(). src/preludedb-sql.c | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-) commit de8f023ea8897cb8630d7e0fe329ac36ea6aaa23 Author: Yoann Vandoorselaere Date: Tue Dec 26 14:29:12 2006 +0000 Fix possible memory leak on query error with transaction enabled. In case ROLLBACK fail, provide the original error as well as the ROLLBACK error. src/preludedb-sql.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) commit de9b8d30a4f31d787dea92735ff748e190ed8f8c Author: Yoann Vandoorselaere Date: Thu Dec 21 09:06:38 2006 +0000 Small Perl/Python detection improvement. Fix #182. configure.in | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) commit 1b51637e71ba5df2856b1ed30b61746b00e54daa Author: Yoann Vandoorselaere Date: Wed Dec 20 20:33:59 2006 +0000 Update GnuLib code, NEWS, documentation. Version bump. NEWS | 13 +++++++++++++ configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 2 +- libmissing/strdup.h | 12 +++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) commit b290f98e0c647b9fe122102bb35610805e986b2e Author: Yoann Vandoorselaere Date: Wed Dec 20 17:50:06 2006 +0000 Enable -no-cpp-precomp on Dawin. Add a few check. configure.in | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) commit b2f3d48b5264f09522b0bef3b08f58abf56beed3 Author: Yoann Vandoorselaere Date: Wed Dec 20 17:49:19 2006 +0000 Remove deprecated, unportable inttypes.h inclusion. Fixe time.h inclusion. plugins/format/classic/classic-delete.c | 2 -- plugins/format/classic/classic-get.c | 1 - plugins/format/classic/classic-insert.c | 1 - plugins/format/classic/classic.c | 1 - plugins/sql/mysql/mysql.c | 2 -- plugins/sql/pgsql/pgsql.c | 2 -- plugins/sql/sqlite3/sqlite3.c | 1 - src/preludedb-sql.c | 14 +++++++++++--- src/preludedb.c | 1 - 9 files changed, 11 insertions(+), 14 deletions(-) commit f1c0cdab056419c81caaafeacc7e462171daa807 Author: Yoann Vandoorselaere Date: Sun Dec 17 10:08:23 2006 +0000 Missing regexp include (no longer included from libmissing). plugins/sql/sqlite3/sqlite3.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3209101d8ba4210de0ffee8951ee4d6f4b24928e Author: Yoann Vandoorselaere Date: Sun Dec 17 10:05:42 2006 +0000 Update. src/include/libmissing.h | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-) commit 350d4d472fa855efd29402990f2c86f53ddd5c3f Author: Yoann Vandoorselaere Date: Sun Dec 17 09:57:09 2006 +0000 Update GnuLib code, remove un-needed dependencies. libmissing/Makefile.am | 164 +- libmissing/alloca.c | 489 ----- libmissing/dummy.c | 30 + libmissing/gettext.h | 242 --- libmissing/m4/absolute-header.m4 | 44 - libmissing/m4/alloca.m4 | 28 +- libmissing/m4/codeset.m4 | 21 - libmissing/m4/eoverflow.m4 | 12 +- libmissing/m4/extensions.m4 | 64 +- libmissing/m4/gnulib-cache.m4 | 4 +- libmissing/m4/gnulib-comp.m4 | 87 +- libmissing/m4/longlong.m4 | 32 +- libmissing/m4/mbchar.m4 | 23 - libmissing/m4/mbiter.m4 | 17 - libmissing/m4/mbrtowc.m4 | 31 - libmissing/m4/memchr.m4 | 18 - libmissing/m4/regex.m4 | 199 -- libmissing/m4/signed.m4 | 18 - libmissing/m4/size_max.m4 | 76 +- libmissing/m4/ssize_t.m4 | 21 - libmissing/m4/stdbool.m4 | 115 - libmissing/m4/stdint.m4 | 361 ---- libmissing/m4/strcase.m4 | 39 - libmissing/m4/vasnprintf.m4 | 11 +- libmissing/m4/wcwidth.m4 | 30 - libmissing/malloc.c | 35 - libmissing/mbchar.c | 36 - libmissing/mbchar.h | 478 ----- libmissing/mbuiter.h | 203 -- libmissing/memchr.c | 201 -- libmissing/printf-args.c | 4 +- libmissing/printf-args.h | 10 +- libmissing/printf-parse.c | 25 +- libmissing/regcomp.c | 3858 --------------------------------- libmissing/regex.c | 71 - libmissing/regex.h | 668 ------ libmissing/regex_internal.c | 1742 --------------- libmissing/regex_internal.h | 865 -------- libmissing/regexec.c | 4398 -------------------------------------- libmissing/stdbool_.h | 115 - libmissing/stdint_.h | 456 ---- libmissing/strcase.h | 48 - libmissing/strcasecmp.c | 103 - libmissing/strdup.c | 4 +- libmissing/strncasecmp.c | 63 - libmissing/strnlen1.c | 36 - libmissing/strnlen1.h | 40 - libmissing/vasnprintf.c | 12 +- libmissing/wcwidth.h | 77 - 49 files changed, 296 insertions(+), 15428 deletions(-) commit b39e98fab3d6cffdf4fa394c555515fa45518141 Author: Yoann Vandoorselaere Date: Sun Dec 17 08:25:59 2006 +0000 Map ssize_t to avoid a memory leak when calling preludedb_delete_alert|heartbeat_from_list(). bindings/libpreludedb_python.i | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) commit 3f8160f25830ffb898a8b05a67540d7e2453ff11 Author: Yoann Vandoorselaere Date: Mon Nov 13 17:18:38 2006 +0000 Print the filename... Not the file descriptor. src/preludedb-sql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 339f49816abc4f2f1a5c11b87d86c5c0f86573ac Author: Yoann Vandoorselaere Date: Fri Oct 27 16:30:55 2006 +0000 Apply modified patch from Alexandre Anriot : avoid using GNU sed extension. plugins/format/classic/mysql2sqlite.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4663eed4708290fc68f9233efd750ab60148571a Author: Yoann Vandoorselaere Date: Fri Oct 6 13:56:03 2006 +0000 Update NEWS, documentation. Version bump. NEWS | 9 +++ configure.in | 4 +- docs/api/libpreludedb-decl.txt | 6 +- docs/api/libpreludedb-sections.txt | 12 ++++ docs/api/tmpl/preludedb-plugin-format.sgml | 78 ++++++++++++++++++++++++++++ docs/api/tmpl/preludedb.sgml | 42 +++++++++++++++ 6 files changed, 146 insertions(+), 5 deletions(-) commit 6efd5200706e5448c32ae3c3217ee4fa3593d9c5 Author: Yoann Vandoorselaere Date: Thu Oct 5 15:41:42 2006 +0000 Fix parameter name. src/include/preludedb.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 71d0d2ebf9e37bc6b1c56c2c49bff83a5e00059e Author: Yoann Vandoorselaere Date: Thu Oct 5 12:34:12 2006 +0000 Update gnulib code. libmissing/Makefile.am | 79 ++++++- libmissing/alloca.c | 4 +- libmissing/asnprintf.c | 6 +- libmissing/m4/absolute-header.m4 | 44 ++++ libmissing/m4/codeset.m4 | 6 +- libmissing/m4/extensions.m4 | 42 ++-- libmissing/m4/gnulib-cache.m4 | 2 + libmissing/m4/gnulib-comp.m4 | 6 + libmissing/m4/intmax_t.m4 | 6 +- libmissing/m4/inttypes_h.m4 | 6 +- libmissing/m4/longlong.m4 | 6 +- libmissing/m4/mbchar.m4 | 13 +- libmissing/m4/regex.m4 | 38 +++- libmissing/m4/restrict.m4 | 38 ---- libmissing/m4/signed.m4 | 7 +- libmissing/m4/stdint.m4 | 361 ++++++++++++++++++++++++++++++ libmissing/m4/stdint_h.m4 | 6 +- libmissing/m4/strdup.m4 | 6 +- libmissing/m4/strndup.m4 | 9 +- libmissing/m4/strnlen.m4 | 6 +- libmissing/m4/time_r.m4 | 4 +- libmissing/malloc.c | 7 +- libmissing/mbchar.c | 6 +- libmissing/mbchar.h | 5 +- libmissing/memchr.c | 4 +- libmissing/printf-args.c | 4 +- libmissing/printf-parse.c | 6 +- libmissing/regex.c | 4 +- libmissing/regex_internal.c | 121 ++++++++-- libmissing/regex_internal.h | 4 +- libmissing/snprintf.c | 14 +- libmissing/stdint_.h | 456 ++++++++++++++++++++++++++++++++++++++ libmissing/strcasecmp.c | 6 +- libmissing/strdup.c | 9 +- libmissing/strncasecmp.c | 6 +- libmissing/strndup.c | 43 +--- libmissing/strndup.h | 20 +- libmissing/strnlen.c | 4 +- libmissing/strnlen1.c | 23 +- libmissing/strnlen1.h | 17 +- libmissing/time_r.c | 4 +- libmissing/vasnprintf.c | 26 +-- libmissing/vsnprintf.c | 35 +++- src/include/libmissing.h | 21 +- 44 files changed, 1241 insertions(+), 299 deletions(-) commit 89d3a6ab6ee431d2cd53e7c2474cf5963d574b4d Author: Yoann Vandoorselaere Date: Tue Sep 12 10:27:23 2006 +0000 plugins/format/classic/pgsql-update-14-5.sql | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 29a07e230a454ac16e90867469bb6f9f8cb4f2b7 Author: Yoann Vandoorselaere Date: Mon Sep 11 15:08:33 2006 +0000 Only export symbol starting with preludedb_ src/Makefile.am | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 79a89b8be6c765c9ba88287f0594073db2df22ef Author: Yoann Vandoorselaere Date: Mon Sep 11 15:07:36 2006 +0000 Verbose error reporting in case of libpreludedb initialization failure. preludedb-admin.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit c0d95b6fb1c51119c5b8bf1ca6894a5b0261b588 Author: Yoann Vandoorselaere Date: Fri Aug 11 16:05:22 2006 +0000 Warning fix. preludedb-admin.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit feb50aa0944c9ab52e5f1cd2b245cdead250c97c Author: Yoann Vandoorselaere Date: Fri Aug 11 15:16:10 2006 +0000 Update documentation, GnuLib code, NEWS. Bump version number. NEWS | 14 +++ configure.in | 10 +- docs/api/libpreludedb-decl.txt | 68 +++++++++++- docs/api/tmpl/preludedb-plugin-format.sgml | 4 + gtk-doc.make | 12 +- libmissing/Makefile.am | 7 +- libmissing/gettext.h | 166 +++++++++++++++++++++++++++- libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 4 +- libmissing/m4/mbchar.m4 | 6 +- libmissing/m4/onceonly_2_57.m4 | 12 +- libmissing/m4/regex.m4 | 9 +- libmissing/m4/strndup.m4 | 14 ++- libmissing/m4/time_r.m4 | 2 +- libmissing/m4/wcwidth.m4 | 12 ++- libmissing/mbchar.h | 121 ++++++++++++++++++++ libmissing/printf-args.c | 10 ++- libmissing/regex.h | 11 +-- libmissing/regex_internal.c | 26 +++-- libmissing/regex_internal.h | 5 +- libmissing/snprintf.c | 32 ++++-- libmissing/wcwidth.h | 9 ++- 22 files changed, 486 insertions(+), 71 deletions(-) commit a171c4d9fbb0f62808319e64f8094b5dd5b45243 Author: Yoann Vandoorselaere Date: Fri Aug 11 14:55:49 2006 +0000 Datatype fixes. Error handling fixes. preludedb-admin.c | 46 ++++++++++++++++++++++++++-------------------- 1 files changed, 26 insertions(+), 20 deletions(-) commit 704a00a5cdbe18735a7c77806711d4e25e43afb8 Author: Yoann Vandoorselaere Date: Fri Aug 11 14:55:09 2006 +0000 Handle empty result idents case. plugins/format/classic/classic-delete.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit 1637c78988faef5c486a03f4a9b3b1052b5da4b0 Author: Yoann Vandoorselaere Date: Fri Aug 11 14:54:34 2006 +0000 Return 0 if preludedb_delete_alert|heartbeat_from_list() size argument is 0. src/preludedb.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit 0e03e8b48a7921cc24ca7e23d471beb0f11bb4ac Author: Yoann Vandoorselaere Date: Fri Aug 11 14:31:53 2006 +0000 Build compatibility fix for SWIG > 1.3.27. bindings/libpreludedb_python.i | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 2c32643ae1655f588e597971c00cd21b339ce86a Author: Yoann Vandoorselaere Date: Fri Aug 11 13:22:27 2006 +0000 Improved statistic handling. Use preludedb_alert|heartbeat_delete_from_list() to benefit from list deletion performance improvement. preludedb-admin.c | 378 +++++++++++++++++++++++++++-------------------------- 1 files changed, 192 insertions(+), 186 deletions(-) commit 1e55c0435e46234d912a53c37beb5c4d912d45a0 Author: Yoann Vandoorselaere Date: Fri Aug 11 13:20:20 2006 +0000 Delete from list function return ssize_t src/include/preludedb.h | 8 ++++---- src/preludedb.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit fc28ff6d3f8ba6b558f792167a6484f7818c6435 Author: Yoann Vandoorselaere Date: Fri Aug 11 10:11:45 2006 +0000 Code documentation fixes: alert->heartbeat. src/preludedb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit ec82223508786cfa1b9d8a218d4619eae906d73b Author: Yoann Vandoorselaere Date: Fri Aug 11 09:48:56 2006 +0000 Implement an idea from Lex van Roon to make it possible to delete a list of ident in a given table, rather than iterating ident and droping one ident per table at a time. This introduce 4 new API function: - preludedb_delete_alert_from_list() / preludedb_delete_heartbeat_from_list() - preludedb_delete_alert_from_result_idents() / preludedb_delete_heartbeat_from_result_idents() Implement workaround to revert to the old implementation in case the format plugin in use does not export the necessary function. Using these function to delete list of alert/heartbeat increase delete time by about 3000%. These functions still need to be hooked in preludedb-admin and prewikka so that the user might see the deletion performance improvement. bindings/libpreludedb_python.i | 21 ++ plugins/format/classic/classic-delete.c | 273 ++++++++++++++++++----- plugins/format/classic/classic.c | 9 +- plugins/format/classic/include/classic-delete.h | 8 + src/include/preludedb-plugin-format-prv.h | 4 + src/include/preludedb-plugin-format.h | 32 +++- src/include/preludedb.h | 9 + src/preludedb-plugin-format.c | 114 ++++++++++ src/preludedb.c | 65 ++++++- 9 files changed, 478 insertions(+), 57 deletions(-) commit 1865f49bd1f3dd0564cbca7e4e62eaf38638a332 Author: Yoann Vandoorselaere Date: Wed Aug 2 06:25:44 2006 +0000 Fix --with-(perl|python|swig) detection path ordering configure.in | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 1ee9323a571479d32209d2aa551481475dd26a75 Author: Yoann Vandoorselaere Date: Wed Aug 2 06:18:49 2006 +0000 Coding style fixes. src/preludedb-sql-settings.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 635a916af7e722efdd2a6c8207eeac47bcc6a0be Author: Yoann Vandoorselaere Date: Wed Aug 2 06:14:35 2006 +0000 Coding styles fixes. Error reporting fixes. src/preludedb-sql.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit f88a762b86f8f461d4501bcb9ba3cbe710166a88 Author: Yoann Vandoorselaere Date: Wed Aug 2 06:09:13 2006 +0000 Slight optimisations. Improved error reporting. Coding style fixes. src/preludedb-path-selection.c | 86 +++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 48 deletions(-) commit 3eb7976847fcfb6b6c75db739e5b11a50527970a Author: Yoann Vandoorselaere Date: Wed Aug 2 05:54:49 2006 +0000 Verbose error reporting on logfile open problem src/preludedb-sql.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 3b8a6cd2036807f7c66587567bfd8485a7cd2e8e Author: Yoann Vandoorselaere Date: Wed Aug 2 05:53:43 2006 +0000 Fix warnings. plugins/format/classic/classic-insert.c | 3 ++- plugins/sql/sqlite3/sqlite3.c | 4 ++-- src/preludedb-plugin-sql.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 55688ef553351d9e209cf5f27d8cb35900dd262f Author: Yoann Vandoorselaere Date: Thu Jul 27 10:28:40 2006 +0000 Since we don't generate binding for prelude-inttypes, bind prelude_bool_t manually. bindings/libpreludedb.i | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 34a48ccec0934be4230af7b75198ceb38d69b860 Author: Yoann Vandoorselaere Date: Tue Jul 4 08:33:05 2006 +0000 Bump version number, update NEWS/documentation. NEWS | 5 +++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit d81e94a5fccd3f2472edaa3dbc03987464625579 Author: Yoann Vandoorselaere Date: Mon Jul 3 05:53:22 2006 +0000 Update GnuLib code libmissing/Makefile.am | 15 +++++++++ libmissing/alloca_.h | 26 ++++++++------- libmissing/m4/gnulib-comp.m4 | 3 ++ libmissing/m4/longlong.m4 | 39 ++++++++++++++++++----- libmissing/m4/size_max.m4 | 45 ++++++++++++++------------- libmissing/m4/ssize_t.m4 | 21 ++++++++++++ libmissing/m4/wcwidth.m4 | 26 +++++++++++++++ libmissing/mbchar.h | 4 ++- libmissing/size_max.h | 6 +++- libmissing/wcwidth.h | 70 ++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 210 insertions(+), 45 deletions(-) commit 6fd0a04f4fc4810911208f922c0a836c4f225208 Author: Yoann Vandoorselaere Date: Mon Jul 3 05:52:22 2006 +0000 Patch from Christian Wiese : update MySQL template schema version (fix #159) plugins/format/classic/mysql.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a22c0d36c626c52a88f4ee9b0c9b26a70bba1324 Author: Yoann Vandoorselaere Date: Tue Jun 6 08:46:07 2006 +0000 Update GnuLib code, documentation, NEWS. Bump version number. NEWS | 18 + configure.in | 4 +- docs/api/libpreludedb-decl.txt | 2 +- docs/api/tmpl/preludedb-plugin-sql.sgml | 3 - libmissing/Makefile.am | 12 +- libmissing/m4/extensions.m4 | 3 + libmissing/m4/gnulib-cache.m4 | 3 +- libmissing/m4/gnulib-comp.m4 | 5 +- libmissing/m4/longdouble.m4 | 7 +- libmissing/m4/regex.m4 | 8 +- libmissing/m4/stdbool.m4 | 4 +- libmissing/m4/strndup.m4 | 36 ++- libmissing/m4/time_r.m4 | 3 +- libmissing/printf-args.c | 21 +- libmissing/regcomp.c | 627 ++++++++++++++++------------- libmissing/regex.c | 7 +- libmissing/regex.h | 500 +++++++++-------------- libmissing/regex_internal.c | 271 +++++++------ libmissing/regex_internal.h | 195 ++++------ libmissing/regexec.c | 669 +++++++++++++++++-------------- libmissing/strndup.c | 4 +- 21 files changed, 1244 insertions(+), 1158 deletions(-) commit 53af12f93200992ff3a0a32f9f3646fdc437e39c Author: Yoann Vandoorselaere Date: Tue Jun 6 08:42:36 2006 +0000 Fix pgsql requirement check configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e619b38a332e672c6a3a4cc2e086195752438dd2 Author: Yoann Vandoorselaere Date: Tue Jun 6 08:25:02 2006 +0000 Update requirement, fix sqlite3/pgsql detection configure.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit a358cd4a30e8082e5a11074084f288c3eacfc49c Author: Yoann Vandoorselaere Date: Fri Jun 2 08:48:56 2006 +0000 Use --with instead of --enable for activating different component. Sanitisation work configure.in | 255 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 130 insertions(+), 125 deletions(-) commit 475ba1397aceac1aa59b2c31f0ccf3ecf5b92d1b Author: Yoann Vandoorselaere Date: Fri Jun 2 07:43:51 2006 +0000 Update libprelude* m4 m4/libprelude.m4 | 6 +++--- m4/libpreludedb.m4 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit ecdf1c27540e167cbffbfc529dbf0449deba6999 Author: Yoann Vandoorselaere Date: Fri Jun 2 07:38:56 2006 +0000 Add update code for constraint check. plugins/format/classic/pgsql-update-14-5.sql | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 99caf1902b27a8c31aaaa2e02145a0799c5000cb Author: Yoann Vandoorselaere Date: Thu Jun 1 15:38:23 2006 +0000 Update for 14-5 plugins/format/classic/Makefile.am | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 583639aab5074e217bbb6272d632392c2dc53c6a Author: Yoann Vandoorselaere Date: Thu Jun 1 14:49:04 2006 +0000 Some more fixes. plugins/format/classic/classic-insert.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit d3ea5b1fb281a6975bfd13dd6ed19f096fd72fc6 Author: Yoann Vandoorselaere Date: Thu Jun 1 14:27:04 2006 +0000 Always use prelude_escape_binary() when we're inserting additional data. This is important even in case we're inserting a string, since the database field might be of a type that require binary kind of escaping. Fix #143. plugins/format/classic/classic-insert.c | 31 ++++++++++++------------------- 1 files changed, 12 insertions(+), 19 deletions(-) commit d80cef0ee99a2d1aa29da563fb559b27bbd45295 Author: Yoann Vandoorselaere Date: Thu Jun 1 14:25:23 2006 +0000 Remove deprecated code. plugins/sql/pgsql/pgsql.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) commit d84f39edfed8a945fa5ffeeeaddf93387c53e5ec Author: Yoann Vandoorselaere Date: Wed Apr 26 09:48:30 2006 +0000 PostgreSQL typing fix. plugins/format/classic/pgsql-update-14-5.sql | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 43da98073db04f258b526e677aed87736b146c92 Author: Yoann Vandoorselaere Date: Fri Apr 21 09:13:59 2006 +0000 Update for IDMEFv16 SnmpService class modification. Fix a bug where Service->ip_version would not be read from database. plugins/format/classic/classic-get.c | 39 ++++++++++++++++-------- plugins/format/classic/classic-insert.c | 22 +++++++------ plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-5.sql | 6 ++++ plugins/format/classic/mysql.sql | 4 ++- plugins/format/classic/pgsql-update-14-5.sql | 6 ++++ plugins/format/classic/sqlite-update-14-5.sql | 25 ++++++++++++++++ 7 files changed, 79 insertions(+), 25 deletions(-) commit bc89d514ed8354b57a90aa4859019351df8259a4 Author: Yoann Vandoorselaere Date: Wed Apr 19 12:24:13 2006 +0000 Fix warning plugins/sql/pgsql/pgsql.c | 66 ++++++++++++++++++++++---------------------- 1 files changed, 33 insertions(+), 33 deletions(-) commit 47c08769b528ed3d79e81390196b88f569eaa53c Author: Yoann Vandoorselaere Date: Mon Apr 10 12:35:12 2006 +0000 Return meaningful error in case of parsing problem. src/preludedb-sql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f5aaef0fa5eac6a7ea338bee46c54e1e54e96b48 Author: Yoann Vandoorselaere Date: Mon Apr 10 12:33:15 2006 +0000 Upon connection to the database, set default date style to ISO (SET DATESTYLE TO 'ISO'). This is needed since libpreludedb assume ISO format to parse database timestamp. Not doing this resulted in error when trying to read data from postgreSQL database if the user used specific lc_time setting in postgresql.conf. Fix #140. plugins/sql/pgsql/pgsql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dd6be853e9783e65dce82f7059fd869a4539c290 Author: Yoann Vandoorselaere Date: Thu Mar 30 09:38:51 2006 +0000 Update documentation, Gnulib code. Bump version number. NEWS | 9 +++++++++ configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 6 +++--- libmissing/m4/regex.m4 | 36 ++++++++++++++++++------------------ libmissing/time_r.c | 8 -------- 5 files changed, 32 insertions(+), 31 deletions(-) commit 8a21a148c7c54b9df54ec228293633d50f024d06 Author: Yoann Vandoorselaere Date: Thu Mar 30 09:01:46 2006 +0000 Replace --disable-global-transaction with --events-per-transaction. Restore global transaction on insert, but add a default global limit of 1000 events per transaction. preludedb-admin.c | 83 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 61 insertions(+), 22 deletions(-) commit 4f74c354962082c289b44d17e20cd199468d0c3e Author: Yoann Vandoorselaere Date: Wed Mar 29 13:38:23 2006 +0000 Formatting tweak. src/preludedb-sql.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c32edbff2852ec900aabd375fd55cc7eef77bc8a Author: Yoann Vandoorselaere Date: Wed Mar 29 08:47:57 2006 +0000 Flush the log descriptor. src/preludedb-sql.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 18b4ad38a33e207c5a6d42a9827bd5244a91a815 Author: Yoann Vandoorselaere Date: Tue Mar 28 17:25:13 2006 +0000 Disable global transaction on insertion since it might get to heavy on memory. preludedb-admin.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) commit 8504edfd73f6e0fafbf0ef595016044ccbb59b25 Author: Yoann Vandoorselaere Date: Fri Mar 24 17:54:10 2006 +0000 Update NEWS, bump version number. NEWS | 24 ++++++++++++++++++++++++ configure.in | 8 ++++---- docs/api/libpreludedb-decl.txt | 21 ++++++++++++++++++--- docs/api/libpreludedb-sections.txt | 3 +++ docs/api/tmpl/preludedb.sgml | 27 +++++++++++++++++++++++++++ gtk-doc.make | 12 ++++++------ 6 files changed, 82 insertions(+), 13 deletions(-) commit b75c3d76ebe7e60e66d0b1ac465ccaba507fdacd Author: Yoann Vandoorselaere Date: Fri Mar 24 16:58:32 2006 +0000 Dynamic PostgreSQL schema generation (this fix certain inefficient datatype that were used in the old version). Update schema would be hard to do for all postgreSQL version, thus using preludedb-admin copy for the update is required. plugins/format/classic/Makefile.am | 8 +- plugins/format/classic/mysql2pgsql.sh | 22 ++ plugins/format/classic/pgsql.sql | 520 --------------------------------- 3 files changed, 28 insertions(+), 522 deletions(-) commit c72ddc000e4940cad564612a5105146f192768e2 Author: Yoann Vandoorselaere Date: Fri Mar 24 15:25:27 2006 +0000 Fix invalid query, reported when using PostgreSQL. plugins/format/classic/classic-get.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit b49ee18fcf1438c5803a02706f36502af45a216e Author: Yoann Vandoorselaere Date: Fri Mar 24 10:06:43 2006 +0000 Use a global transaction surrounding all database operation rather than a per events transaction. Also add a --disable-global-transaction option to cancel this behavior. preludedb-admin.c | 43 +++++++++++++++++++++++++++++++------------ 1 files changed, 31 insertions(+), 12 deletions(-) commit e4db32aa25f518b4fd4664cfd2754ad0ea877ddb Author: Yoann Vandoorselaere Date: Thu Mar 23 10:20:46 2006 +0000 Wrap insert and delete in one big transaction. Should speed up preludedb-admin operation. preludedb-admin.c | 63 ++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 48 insertions(+), 15 deletions(-) commit b931ad50c920d777b3ef46e6809979422c632164 Author: Yoann Vandoorselaere Date: Wed Mar 22 17:45:00 2006 +0000 Update GnuLib code. libmissing/m4/regex.m4 | 41 +++++++++-------------------------------- libmissing/regex.h | 14 ++++++++------ libmissing/time_r.c | 14 +------------- libmissing/time_r.h | 21 ++++++++------------- 4 files changed, 26 insertions(+), 64 deletions(-) commit 069ce06e479a4ec3cdc4de3698504769232a5dad Author: Yoann Vandoorselaere Date: Wed Mar 22 17:42:36 2006 +0000 Newer API permitting the caller to override default transaction handling (useful to speed up batch processing of events). src/include/preludedb.h | 10 ++++ src/preludedb-sql.c | 115 ++++++++++++++++++++++++++++++++++------------- src/preludedb.c | 84 ++++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+), 31 deletions(-) commit d21288b344f0d6623cc7653c20c4a4b804049ceb Author: Yoann Vandoorselaere Date: Tue Mar 21 16:25:24 2006 +0000 We can't conditionally define the size of uint64_t since the typedef are directly handled by swig when generating the resulting source code. Thus revert to statically mapping int64_t to long long since it seem to work for everyone. bindings/libpreludedb.i | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) commit 7247b5f7d8612ed3552f641d4f13caee2da48ffd Author: Yoann Vandoorselaere Date: Mon Mar 20 16:47:46 2006 +0000 Wrap preludedb_check_version(). bindings/libpreludedb.i | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 510f7e38df1d606f8fc11caf12a9fe3ccc9e93a2 Author: Yoann Vandoorselaere Date: Mon Mar 20 15:40:41 2006 +0000 Use new IDMEF_LIST_APPEND primitive, require libprelude 0.9.6. configure.in | 2 +- plugins/format/classic/classic-get.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) commit de60ad6224985eb90ac80ea2d357f5f91faba428 Author: Yoann Vandoorselaere Date: Thu Mar 16 09:59:48 2006 +0000 Add libprelude dependencie, since these plugin depend on libprelude symbols. plugins/sql/mysql/Makefile.am | 4 ++-- plugins/sql/pgsql/Makefile.am | 4 ++-- plugins/sql/sqlite3/Makefile.am | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 24cb595e53c18c53eca856799a4f42827d022f8a Author: Yoann Vandoorselaere Date: Wed Mar 8 11:54:09 2006 +0000 Update GnuLib code, NEWS, bump version number. NEWS | 11 +++++++++++ configure.in | 2 +- libmissing/m4/extensions.m4 | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) commit 3cb387b0cad4f1bda174d776201c05865b9de17e Author: Yoann Vandoorselaere Date: Wed Mar 8 11:27:45 2006 +0000 Update base schema version number to 14.4, thanks to Sebastien Tricaud for reporting this. plugins/format/classic/mysql.sql | 2 +- plugins/format/classic/pgsql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5928739d221383cc5276330ecef6f29ba720624e Author: Yoann Vandoorselaere Date: Mon Mar 6 11:41:47 2006 +0000 Prelude_AdditionalData data field is not NULL. plugins/format/classic/Makefile.am | 5 ++++- plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-4.sql | 2 ++ plugins/format/classic/mysql.sql | 3 ++- plugins/format/classic/pgsql-update-14-4.sql | 2 ++ plugins/format/classic/pgsql.sql | 3 ++- plugins/format/classic/sqlite-update-14-4.sql | 20 ++++++++++++++++++++ 7 files changed, 33 insertions(+), 4 deletions(-) commit bc53a048e9230b825c887c94e95a98cb9199c28e Author: Yoann Vandoorselaere Date: Mon Mar 6 10:26:15 2006 +0000 Set libprelude include path. bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 57d9906cec1c47ba2c238f78d72be63bae8d61ba Author: Yoann Vandoorselaere Date: Mon Mar 6 10:25:36 2006 +0000 Rely on prelude-inttypes.h for type mapping. bindings/libpreludedb.i | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit 06a8edb3d24d5b514907fdd5348fb12f2cde929c Author: Yoann Vandoorselaere Date: Mon Mar 6 10:24:30 2006 +0000 Fix query time calculation. src/preludedb-sql.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit 54f65e740ae01d858217b3e5732f2e76a735c8dc Author: Yoann Vandoorselaere Date: Tue Feb 28 09:29:42 2006 +0000 Revert [7799], replace it with a configure time check. Fix PostgreSQL compile issue (#136). configure.in | 4 ++++ plugins/sql/pgsql/pgsql.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit dfb18de1663f06dd54adea9da4a82be6ba95603f Author: Yoann Vandoorselaere Date: Wed Feb 22 21:45:43 2006 +0000 Bump version to 0.9.5.1, bug fix release. NEWS | 5 +++++ configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit 56e3416524faa6e83c27dbe62d9b90544cbfa3be Author: Yoann Vandoorselaere Date: Wed Feb 22 21:42:47 2006 +0000 Correctly read database schema version. plugins/format/classic/classic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e24da3028439bb6b8f36f6f8912dee36395c6cb7 Author: Yoann Vandoorselaere Date: Wed Feb 22 18:19:34 2006 +0000 Update NEWS, documentation, bump version number. NEWS | 14 ++++++++++++++ configure.in | 4 ++-- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) commit 3863f38b45a0758006bb9e651b2c4f3554eac0c9 Author: Yoann Vandoorselaere Date: Wed Feb 22 18:13:34 2006 +0000 Use %g for double formatting. plugins/format/classic/classic.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 0fa9fa06e0a22e0c9d7561fcd2500ab5ecfaade5 Author: Yoann Vandoorselaere Date: Wed Feb 22 17:51:53 2006 +0000 Only start incrementing count when we are at the provided offset. preludedb-admin.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) commit 4373964996f5be2cda06516590bf783a80c4afd1 Author: Yoann Vandoorselaere Date: Wed Feb 22 17:45:59 2006 +0000 Remove unused typemap. bindings/libpreludedb_python.i | 62 ---------------------------------------- 1 files changed, 0 insertions(+), 62 deletions(-) commit a8f8bbe01ccc354e1d4adf937df3bee8a9377725 Author: Yoann Vandoorselaere Date: Wed Feb 22 17:41:43 2006 +0000 Remove unreachable code. plugins/format/classic/classic.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit e0e4b166c823edc8185d138a385703d3bc3de47a Author: Yoann Vandoorselaere Date: Wed Feb 22 17:35:10 2006 +0000 Fix a possible leak. Make schema version error verbose. plugins/format/classic/classic.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) commit 16a7306520eb6539053cc0ca014fa6d1594f75e7 Author: Yoann Vandoorselaere Date: Sun Feb 19 22:27:08 2006 +0000 Define type within libpreludedb.i to avoid duplication. bindings/libpreludedb.i | 35 +++++++++++++++++++++++++++++++++++ bindings/libpreludedb_perl.i | 35 ----------------------------------- bindings/libpreludedb_python.i | 35 ----------------------------------- 3 files changed, 35 insertions(+), 70 deletions(-) commit 25ddd248f0ca912e5792700de0f014980e243132 Author: Yoann Vandoorselaere Date: Sun Feb 19 22:16:14 2006 +0000 Remove unused definition. src/preludedb-sql.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 18cf360223b1bc5bb7c21753c7372dcd3b856e2f Author: Yoann Vandoorselaere Date: Sat Feb 18 01:49:03 2006 +0000 Fix important memory leak on Python preludedb_result_values_get_next(). bindings/libpreludedb_python.i | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit b8c7eb94de74c5a1bb49a565696c0826e09188a6 Author: Yoann Vandoorselaere Date: Tue Feb 14 12:42:56 2006 +0000 Include message count on error. preludedb-admin.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit ef916b944ddf48e6c072afbfe4941b3cf04ff0cf Author: Yoann Vandoorselaere Date: Tue Feb 14 01:28:35 2006 +0000 Include patch from Emmanuel Saracco to fix PostgreSQL header path. plugins/sql/pgsql/pgsql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9cdab2f9156faf3ec654a7e1afd5aec75579664d Author: Yoann Vandoorselaere Date: Wed Feb 8 11:28:44 2006 +0000 Update documentation, NEWS, bump version number NEWS | 23 +++++++++++++++++++++++ configure.in | 10 +++++----- docs/api/libpreludedb-decl.txt | 22 ++++++---------------- docs/api/libpreludedb-sections.txt | 5 +---- docs/api/tmpl/libpreludedb-unused.sgml | 16 ++++++++++++++++ docs/api/tmpl/preludedb-error.sgml | 8 ++++---- docs/api/tmpl/preludedb-plugin-sql.sgml | 21 ++------------------- 7 files changed, 57 insertions(+), 48 deletions(-) commit f7ea6529741fe9a1b67e3ce1ffb6180b33939841 Author: Yoann Vandoorselaere Date: Wed Feb 8 11:02:57 2006 +0000 Update GnuLib code. libmissing/m4/extensions.m4 | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) commit 15eb07778e861c9e1d3533af02696d905d5fee34 Author: Yoann Vandoorselaere Date: Wed Feb 8 10:55:17 2006 +0000 More fix for #129. src/preludedb-sql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 3b6e9319b3c5fd406c6652a40110aecdd5a98efc Author: Yoann Vandoorselaere Date: Wed Feb 8 10:45:28 2006 +0000 Cleanup, fix #129. src/preludedb-sql.c | 44 ++++++++++++++++++++++++-------------------- 1 files changed, 24 insertions(+), 20 deletions(-) commit 9cc58bc1651eb6dce641b9410395f0ea8c5f2210 Author: Yoann Vandoorselaere Date: Tue Feb 7 15:09:21 2006 +0000 Remove old bindings workaround used to catch preludedb error. This is un-needed since the latest error handling change introducing preludedb_strerror(). Error handling from bindings now work as expected. bindings/libpreludedb_perl.i | 17 ---- bindings/libpreludedb_python.i | 169 +--------------------------------------- 2 files changed, 2 insertions(+), 184 deletions(-) commit c66ba825f049658addfafbb2eebce2bac584c7d8 Author: Yoann Vandoorselaere Date: Tue Feb 7 15:03:07 2006 +0000 Restore preludedb_sql_plugin_get_error() for API compatibility purpose. Mark it as deprecated. src/include/preludedb-sql.h | 7 ++++++- src/preludedb-sql.c | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletions(-) commit 3c4b81d6f3230f709cba80f6ace6cfcd1eb36496 Author: Yoann Vandoorselaere Date: Tue Feb 7 14:56:28 2006 +0000 Fix unused. preludedb-admin.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 29654feba144ca462fdd6405e81318720ff007c8 Author: Yoann Vandoorselaere Date: Tue Feb 7 13:51:23 2006 +0000 Use preludedb_strerror() in place of errbuf. preludedb-admin.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) commit a023cb7c7d5a0fdf333acc3178dc0bda56201465 Author: Yoann Vandoorselaere Date: Tue Feb 7 13:49:05 2006 +0000 Check whether errbuf is set. src/preludedb.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit b6592d4524ee9520d5a3b6b0b0876f7050d931e6 Author: Yoann Vandoorselaere Date: Tue Feb 7 13:47:35 2006 +0000 Rework error handling plugin API, so that it is suitable for any kind of driver, and provide more control over what's going on. The library API remain compatible, although the caller might now use preludedb_strerror() in order to get a detailed error instead of relying on errbuf or preludedb_get_error(). plugins/sql/mysql/mysql.c | 85 +++++++++++++++++++----------------- plugins/sql/pgsql/pgsql.c | 61 +++++++++++++------------- plugins/sql/sqlite3/sqlite3.c | 41 +++++++---------- src/include/preludedb-plugin-sql.h | 9 +--- src/include/preludedb-sql.h | 2 - src/preludedb-plugin-sql.c | 21 +-------- src/preludedb-sql.c | 81 ++++++++++++++-------------------- src/preludedb.c | 25 +++-------- 8 files changed, 137 insertions(+), 188 deletions(-) commit ed718d2efdb2c7c178d7a1e546d5fdb1f637bf51 Author: Yoann Vandoorselaere Date: Tue Feb 7 13:40:56 2006 +0000 Untabify. src/preludedb-sql.c | 642 +++++++++++++++++++++++++------------------------- 1 files changed, 321 insertions(+), 321 deletions(-) commit 381d16f92f5ec262c719f87035b339fd6f3b5bba Author: Yoann Vandoorselaere Date: Tue Feb 7 02:13:31 2006 +0000 Handle NULL logfile. src/preludedb-sql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0894c3605db721b2c99d91a420482ad8843652c1 Author: Yoann Vandoorselaere Date: Tue Feb 7 01:58:24 2006 +0000 Documentation update. docs/api/libpreludedb-decl.txt | 584 ++++++++++++++++------------ docs/api/libpreludedb-sections.txt | 54 ++- docs/api/tmpl/preludedb-plugin-format.sgml | 195 ++++++---- docs/api/tmpl/preludedb-plugin-sql.sgml | 355 ++++++++++++++---- docs/api/tmpl/preludedb-sql-settings.sgml | 26 ++ docs/api/tmpl/preludedb-sql.sgml | 1 + 6 files changed, 819 insertions(+), 396 deletions(-) commit eaca1c0be3da3267c40fe14792ef9180b13eb586 Author: Yoann Vandoorselaere Date: Tue Feb 7 01:58:08 2006 +0000 Implement "move" command. Make argument to --query-logging option optional: if no argument is provided, logging happen on stdout. "-" is also decoded as stdout. preludedb-admin.c | 154 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 114 insertions(+), 40 deletions(-) commit ab9b4738b1323c44559f939ebfb83e133c95a9c1 Author: Yoann Vandoorselaere Date: Tue Feb 7 01:57:02 2006 +0000 If argument is NULL, log to stdout. src/preludedb-sql.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) commit 3ff3b84d250731e847fee7d69e818175fb0cf511 Author: Yoann Vandoorselaere Date: Mon Feb 6 15:54:07 2006 +0000 Log query time. src/preludedb-sql.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) commit 117ed71fecc97e90826bcee6b86d55c2b795291e Author: Yoann Vandoorselaere Date: Mon Feb 6 12:16:07 2006 +0000 Dynamic plugin allocation, since plugin structure is now opaque. plugins/format/classic/classic-insert.c | 15 +++--- plugins/format/classic/classic.c | 45 +++++++++------- plugins/sql/mysql/mysql.c | 51 ++++++++++-------- plugins/sql/pgsql/pgsql.c | 56 ++++++++++++-------- plugins/sql/sqlite3/sqlite3.c | 87 ++++++++++--------------------- 5 files changed, 120 insertions(+), 134 deletions(-) commit 84c20125fbe42c505ab93e165644f6b9e6c86ed5 Author: Yoann Vandoorselaere Date: Mon Feb 6 12:15:31 2006 +0000 Add sqlite3 plugin to list of dlopened object (for pre-opening support). Make the plugins structure opaque, so that better binary compatibility is achieved. Add extern C declaration to all public header files. Modify preludedb_sql_time_to_timestamp() so that it take a preludedb_sql_t object as input, since the timestamp format depend on the implementation. Implement default fallback for escape, timestamp function. Verbose error reporting. src/Makefile.am | 10 +- src/include/Makefile.am | 2 +- src/include/preludedb-plugin-format-prv.h | 48 ++++ src/include/preludedb-plugin-format.h | 118 +++++---- src/include/preludedb-plugin-sql.h | 187 +++++++++----- src/include/preludedb-sql.h | 12 +- src/preludedb-plugin-format.c | 139 +++++++++++ src/preludedb-plugin-sql.c | 387 +++++++++++++++++++++++++++++ src/preludedb-sql.c | 133 ++++------ src/preludedb.c | 28 ++- 10 files changed, 849 insertions(+), 215 deletions(-) commit 5dc29d8229387d280e7baf0eb3a7d9908bc324ec Author: Yoann Vandoorselaere Date: Sun Feb 5 22:15:53 2006 +0000 Add extern C. src/include/preludedb-path-selection.h | 8 ++++++++ src/include/preludedb-sql-settings.h | 9 +++++++++ 2 files changed, 17 insertions(+), 0 deletions(-) commit b6ad85657ee9dafee9e6dae7008926037c21fceb Author: Yoann Vandoorselaere Date: Sun Feb 5 22:15:25 2006 +0000 Add extern C. Fix recursive header inclusion. src/include/preludedb-version.h.in | 8 ++++++++ src/include/preludedb.h | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) commit a257771e6a1c57f2d382268fd5139811d4ba8a4e Author: Yoann Vandoorselaere Date: Sun Feb 5 22:14:40 2006 +0000 Verbose error handling. src/preludedb-error.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit f0f480a0fa99385501780b89fc9f49017cd7aadc Author: Yoann Vandoorselaere Date: Sun Feb 5 22:14:16 2006 +0000 Implement preludedb_error_verbose(). Add extern C. src/include/preludedb-error.h | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) commit a6bbb28be34668458a805ca7f8c85b9881083c31 Author: Yoann Vandoorselaere Date: Sun Feb 5 22:00:36 2006 +0000 Update gnulib code. libmissing/m4/stdbool.m4 | 31 +++++++++++++++++++++++++++++-- libmissing/stdbool_.h | 38 ++++++++++++++++++++++++++++++-------- libmissing/strndup.c | 23 ++++++++++++++++++----- libmissing/strnlen.c | 27 ++++++--------------------- libmissing/vasnprintf.c | 46 ++++++++++++++++++++++++---------------------- 5 files changed, 107 insertions(+), 58 deletions(-) commit bf73bc3e8013e9c99a54f39d79b22d0b7523b76c Author: Yoann Vandoorselaere Date: Thu Feb 2 14:19:13 2006 +0000 Fix cast. plugins/format/classic/classic-get.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 2a31db4128fbf29a0e162f3216e87158eed5ed37 Author: Yoann Vandoorselaere Date: Thu Feb 2 13:46:53 2006 +0000 Do not mangle the pos argument (resulting in it being uninitialized) for IDMEF function that support it. This fix a bug where retrieved object where un-ordered. plugins/format/classic/classic-get.c | 87 ++++++++++++++++++++++++---------- 1 files changed, 61 insertions(+), 26 deletions(-) commit a891a01b83f306f2f76e1c605219d5f2e8d45f06 Author: Yoann Vandoorselaere Date: Thu Feb 2 12:21:32 2006 +0000 Enforce list ordering. plugins/format/classic/classic-get.c | 58 +++++++++++++++++++++++----------- 1 files changed, 39 insertions(+), 19 deletions(-) commit cf6bb290688a2b1687996caccc159efe4b4ac1ea Author: Yoann Vandoorselaere Date: Mon Jan 16 12:40:26 2006 +0000 Version bump. INSTALL | 69 ++++++++++++++++++++++------------------ NEWS | 14 ++++++++ configure.in | 6 ++-- docs/api/libpreludedb-decl.txt | 14 ++++++++ 4 files changed, 69 insertions(+), 34 deletions(-) commit e99708159ba4904faf77a83c2607d2cb52442173 Author: Yoann Vandoorselaere Date: Mon Jan 16 12:30:45 2006 +0000 Update gnulib code. libmissing/Makefile.am | 53 +- libmissing/alloca.c | 491 +++++ libmissing/gettext.h | 78 + libmissing/m4/codeset.m4 | 21 + libmissing/m4/gnulib-cache.m4 | 6 +- libmissing/m4/gnulib-comp.m4 | 41 +- libmissing/m4/mbchar.m4 | 20 + libmissing/m4/mbiter.m4 | 17 + libmissing/m4/mbrtowc.m4 | 31 + libmissing/m4/memchr.m4 | 18 + libmissing/m4/regex.m4 | 187 ++ libmissing/m4/stdbool.m4 | 88 + libmissing/m4/strcase.m4 | 39 + libmissing/malloc.c | 36 + libmissing/mbchar.c | 38 + libmissing/mbchar.h | 352 ++++ libmissing/mbuiter.h | 203 ++ libmissing/memchr.c | 201 ++ libmissing/regcomp.c | 3779 +++++++++++++++++++++++++++++++++++ libmissing/regex.c | 68 + libmissing/regex.h | 769 ++++++++ libmissing/regex_internal.c | 1656 ++++++++++++++++ libmissing/regex_internal.h | 915 +++++++++ libmissing/regexec.c | 4333 +++++++++++++++++++++++++++++++++++++++++ libmissing/stdbool_.h | 93 + libmissing/strcase.h | 48 + libmissing/strcasecmp.c | 105 + libmissing/strncasecmp.c | 65 + libmissing/strnlen1.c | 39 + libmissing/strnlen1.h | 41 + 30 files changed, 13826 insertions(+), 5 deletions(-) commit dff7456c82cf0065d2a9f0cee8040aa60c44babe Author: Yoann Vandoorselaere Date: Mon Jan 16 12:30:21 2006 +0000 Remove hard dependencies, use libmissing provided dependencie/fallback rather. plugins/sql/sqlite3/sqlite3.c | 1 - src/include/libmissing.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletions(-) commit d6e488071c22b86b9839a2aa4de3738a30698715 Author: Yoann Vandoorselaere Date: Sat Jan 14 09:43:29 2006 +0000 Included modified SQLite3 patch from Rob Holland , which implement the REGEXP operator, and SQLite3 compatible time constraint. plugins/sql/sqlite3/sqlite3.c | 106 +++++++++++++++++++++++------------------ 1 files changed, 60 insertions(+), 46 deletions(-) commit 04a3740f86eefb686ff67006f1fbf975fae16d4c Author: Yoann Vandoorselaere Date: Sat Jan 14 08:26:09 2006 +0000 Fix sqlite3 check. configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 764992cb2224335fb0c018d5b51eae9dfe6eb006 Author: Yoann Vandoorselaere Date: Thu Jan 12 20:22:57 2006 +0000 Correctly use prelude_option_read() return value as the index for un-handled arguments. preludedb-admin.c | 66 +++++++++++++++++++++++++++------------------------- 1 files changed, 34 insertions(+), 32 deletions(-) commit 9c0fbe80ec4a6a96680b47c952fdf47a1098dbfe Author: Rob Holand Date: Wed Jan 11 18:34:12 2006 +0000 working extract code plugins/sql/sqlite3/sqlite3.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 98e2d268e61252fd4b96a04faf0fdae51f7a690e Author: Yoann Vandoorselaere Date: Tue Jan 10 08:52:48 2006 +0000 Automatic sqlite.sql generation. plugins/format/classic/Makefile.am | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) commit 13ad7cc80094c37e49cf3e5de0dd57aa558716fb Author: Yoann Vandoorselaere Date: Mon Jan 9 15:32:40 2006 +0000 Fix mysql2sqlite.sh plugins/format/classic/mysql2sqlite.sh | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 5d7b444f6c461af755f65e2ab775c3784fb2dfb3 Author: Yoann Vandoorselaere Date: Mon Jan 9 15:31:00 2006 +0000 Slight cleanup. plugins/sql/sqlite3/sqlite3.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) commit 5e062bad10d674f54a26477d7356d6f8560d5a1c Author: Yoann Vandoorselaere Date: Tue Jan 3 23:41:19 2006 +0000 Clearly state that linking from a GPL compatible program is okay. LICENSE.README | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit bdd541cb21f9ee81ae0ed94edfc269015175fd54 Author: Yoann Vandoorselaere Date: Wed Dec 21 10:09:43 2005 +0000 New experimental SQLite3 plugin, original implementation by Rob Holland , with further work done by me. configure.in | 46 +++ plugins/format/classic/Makefile.am | 15 +- plugins/format/classic/mysql2sqlite.sh | 13 + plugins/sql/Makefile.am | 2 +- plugins/sql/sqlite3/Makefile.am | 11 + plugins/sql/sqlite3/sqlite3.c | 620 ++++++++++++++++++++++++++++++++ 6 files changed, 704 insertions(+), 3 deletions(-) commit 43c41a34aece249dcced79d5e588922dcd50e87a Author: Yoann Vandoorselaere Date: Fri Dec 16 18:20:41 2005 +0000 Use db_error() for accurate error reporting. preludedb-admin.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) commit 828e2d2725850bc3c1aa004bdd894fb33cdfa150 Author: Yoann Vandoorselaere Date: Fri Dec 16 17:35:33 2005 +0000 Oops src/preludedb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 95b5b40c44de33e26c1010f01701cd78971f7dae Author: Yoann Vandoorselaere Date: Fri Dec 16 17:33:06 2005 +0000 Don't return NULL incase the buffer is too small. Truncate the error instead. src/preludedb.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 7d2edf114f9e9e302f84eccab7949d885ee651d7 Author: Yoann Vandoorselaere Date: Fri Dec 16 11:17:54 2005 +0000 Implement "file" setting, for file based database (sqlite for example). src/include/preludedb-sql-settings.h | 4 ++++ src/preludedb-sql-settings.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) commit 34c13d5dc4519b38208265bcc2e5e4ccb7ae51f6 Author: Yoann Vandoorselaere Date: Fri Dec 16 11:14:54 2005 +0000 Avoid un-necessary call to strlen(). src/preludedb-sql.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) commit b18b2296ec846d707b25582ea76476b4a5e4e1b5 Author: Yoann Vandoorselaere Date: Wed Dec 14 10:14:32 2005 +0000 Schema sanitization and cleanup from Rob Holland . plugins/format/classic/mysql.sql | 123 +++++++++++++++++++------------------- plugins/format/classic/pgsql.sql | 103 ++++++++++++++++---------------- 2 files changed, 113 insertions(+), 113 deletions(-) commit d9ec22cb726b1c77c9b11f08c2b6fc9014db1f00 Author: Yoann Vandoorselaere Date: Mon Dec 12 09:28:13 2005 +0000 Bump version number, update NEWS, documentation. NEWS | 7 +++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit e18309dede223e3feb0bee5cf2f66f59b503729f Author: Yoann Vandoorselaere Date: Mon Dec 12 09:16:30 2005 +0000 Set library soname. configure.in | 9 +++++++++ src/Makefile.am | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) commit 637e1b415276c58de3487b4e8c1f0dde56b88f4d Author: Yoann Vandoorselaere Date: Tue Dec 6 19:40:07 2005 +0000 Fix character escape issue with multiple consecutive backslash. Keep a consistant state. src/preludedb-sql.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) commit 12c767d395a6687a62e19b6dd818d6b5af494a55 Author: Yoann Vandoorselaere Date: Mon Nov 28 14:23:51 2005 +0000 Update NEWS. Bump version number. NEWS | 14 ++++++++++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- libmissing/m4/gnulib-comp.m4 | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) commit c00be489418d01976d390c0dce097941f1eab111 Author: Yoann Vandoorselaere Date: Mon Nov 28 14:04:21 2005 +0000 Fix command help, and allow the save command to be used without specifying an output filename. preludedb-admin.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) commit b6ab92119acdfd9c628c40fa5dd8a94c747149ee Author: Yoann Vandoorselaere Date: Sun Nov 27 12:59:17 2005 +0000 For automated build. autogen.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 10804d320f09c599789abc264e5cb4623f697128 Author: Yoann Vandoorselaere Date: Wed Nov 16 16:07:40 2005 +0000 Fix path. src/include/preludedb.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit a1a212edb5314fd3471c246d104b8a1a374bf2bd Author: Yoann Vandoorselaere Date: Wed Nov 16 16:04:24 2005 +0000 Include standard libpreludedb headers. src/include/preludedb.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 12f9a445edf0c7b459e6c3fbde8a97547bfdac3c Author: Yoann Vandoorselaere Date: Sun Nov 13 13:01:59 2005 +0000 Make sure we return PRELUDEDB_ERROR_CONNECTION when the SQL query function return a server connection problem. So that the upper layer can trigger reconnection to the database. plugins/sql/mysql/mysql.c | 29 +++++++++++++++++++++++++++-- plugins/sql/pgsql/pgsql.c | 4 +++- 2 files changed, 30 insertions(+), 3 deletions(-) commit d858d2a380f12a7a1001d5ead6afd45b6a06b756 Author: Yoann Vandoorselaere Date: Sun Nov 13 12:30:21 2005 +0000 Untabify. plugins/sql/mysql/mysql.c | 312 ++++++++++++++++++++++---------------------- plugins/sql/pgsql/pgsql.c | 312 ++++++++++++++++++++++---------------------- 2 files changed, 312 insertions(+), 312 deletions(-) commit 8e7d697da718bacc1808b95987734a3b1751ff96 Author: Yoann Vandoorselaere Date: Thu Nov 3 12:37:52 2005 +0000 Make the delete command safer to use: forbid deletion until a criteria is provided. preludedb-admin.c | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) commit 1dbff223cfb5bb1cd139f5bec8ab97360f73696d Author: Yoann Vandoorselaere Date: Sat Oct 8 09:10:03 2005 +0000 Oops bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c07424f51f7a1b47dc0044014ba1061aab3c0114 Author: Yoann Vandoorselaere Date: Sat Oct 8 09:03:20 2005 +0000 Patch from Daniel Black to workaround invalid library run path added through MakeMaker? generated Makefile. bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 787bc8ae05c7d6b459b9465c739b384f4746bf26 Author: Yoann Vandoorselaere Date: Fri Oct 7 13:53:17 2005 +0000 Patch from Daniel Black to fix Perl bindings Makefile generated with DESTDIR appended twice. bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 05e9bd0d1164582beda487b1c0f9810f2718536c Author: Yoann Vandoorselaere Date: Mon Oct 3 09:14:47 2005 +0000 Patch from Daniel Black to workaround invalid library run path added through MakeMaker generated Makefile. bindings/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit a6637d4b2c1267daa8d92b1cbfd56e952a51215f Author: Yoann Vandoorselaere Date: Tue Sep 20 20:10:24 2005 +0000 Bump to 0.9.0 NEWS | 7 +++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit 06cdd614be9122f9b9fedff3593002859f65180c Author: Yoann Vandoorselaere Date: Mon Sep 19 20:38:09 2005 +0000 Update GnuLib code. libmissing/m4/gnulib-cache.m4 | 3 +-- libmissing/m4/gnulib-comp.m4 | 2 -- libmissing/strndup.c | 2 +- libmissing/strnlen.c | 2 +- libmissing/time_r.c | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) commit 14e7c345aab64ed8b5fb8925e678c836f21d870f Author: Yoann Vandoorselaere Date: Sun Sep 18 20:35:30 2005 +0000 More arguments checkings. bindings/libpreludedb_perl.i | 65 +++++++++++++++++++++++++++------------ bindings/libpreludedb_python.i | 56 +++++++++++++++++++++++++--------- 2 files changed, 86 insertions(+), 35 deletions(-) commit 13f707e51359f96b9239087c6d576b57e65dcba2 Author: Yoann Vandoorselaere Date: Thu Sep 15 17:40:30 2005 +0000 Version bump. NEWS | 12 ++++++++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 7 +------ docs/api/tmpl/libpreludedb-unused.sgml | 9 +++++++++ docs/api/tmpl/preludedb-error.sgml | 10 ---------- 5 files changed, 23 insertions(+), 17 deletions(-) commit 4e59dad796190626beb80a112c701324aa4e05be Author: Yoann Vandoorselaere Date: Thu Sep 15 12:58:09 2005 +0000 Fix warnings. src/preludedb-sql-settings.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6893aacc48bace28cc884a4cb87fabe100efcace Author: Yoann Vandoorselaere Date: Thu Sep 15 12:52:32 2005 +0000 Include config.h src/preludedb-error.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9a1cbe051ed6b632d23f81954b77b5768f08fde8 Author: Yoann Vandoorselaere Date: Thu Sep 15 12:52:07 2005 +0000 Fix warning. src/include/preludedb-error.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dc3d11b0e45e278d7a78050afad0d8664246f23a Author: Yoann Vandoorselaere Date: Thu Sep 15 12:51:35 2005 +0000 Include libmissing.h plugins/format/classic/classic-delete.c | 2 ++ plugins/format/classic/classic-get.c | 2 ++ plugins/format/classic/classic-sql-join.c | 2 ++ plugins/format/classic/classic-sql-select.c | 2 ++ plugins/format/classic/classic.c | 2 ++ 5 files changed, 10 insertions(+), 0 deletions(-) commit af964c5f15a9b2154aa216f302242139cecd8a54 Author: Yoann Vandoorselaere Date: Thu Sep 15 11:58:29 2005 +0000 Compiler used to build Perl module might be different than compiler used to build libprelude. bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a00287424a237bb0ad06f4ae1de5f6fc62ae16be Author: Yoann Vandoorselaere Date: Wed Sep 14 15:01:46 2005 +0000 Build fixes. bindings/perl/Makefile.PL.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c67165ef0ee39361e4332768d7ff070c5d06a8ce Author: Yoann Vandoorselaere Date: Mon Sep 12 14:41:17 2005 +0000 Slight improvement. autogen.sh | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) commit fac1214828ac3821310f551f02e8cceaeb23c69c Author: Yoann Vandoorselaere Date: Thu Sep 8 21:47:49 2005 +0000 Trick to avoid overwritting exception on error. bindings/libpreludedb_python.i | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) commit 2cdc9f3972477c4fb99fc53e15f09e8cc15cd277 Author: Yoann Vandoorselaere Date: Wed Sep 7 12:52:31 2005 +0000 Enforce --lgpl use when calling gnulib-tool. libmissing/Makefile.am | 9 +++- libmissing/alloca_.h | 6 +- libmissing/asnprintf.c | 8 ++-- libmissing/m4/gnulib-cache.m4 | 29 ++++++++++++ libmissing/m4/gnulib-comp.m4 | 95 +++++++++++++++++++++++++++++++++++++++++ libmissing/m4/gnulib-tool.m4 | 33 ++++++++++++++ libmissing/m4/gnulib.m4 | 54 ----------------------- libmissing/m4/minmax.m4 | 17 ++++--- libmissing/minmax.h | 8 ++-- libmissing/printf-args.c | 8 ++-- libmissing/printf-args.h | 8 ++-- libmissing/printf-parse.c | 8 ++-- libmissing/printf-parse.h | 8 ++-- libmissing/size_max.h | 8 ++-- libmissing/snprintf.c | 8 ++-- libmissing/snprintf.h | 8 ++-- libmissing/strdup.c | 8 ++-- libmissing/strdup.h | 8 ++-- libmissing/strndup.c | 8 ++-- libmissing/strndup.h | 8 ++-- libmissing/strnlen.c | 8 ++-- libmissing/strnlen.h | 8 ++-- libmissing/time_r.c | 8 ++-- libmissing/time_r.h | 8 ++-- libmissing/vasnprintf.c | 8 ++-- libmissing/vasnprintf.h | 8 ++-- libmissing/vsnprintf.c | 8 ++-- libmissing/vsnprintf.h | 8 ++-- libmissing/xsize.h | 8 ++-- src/include/libmissing.h | 1 + 30 files changed, 266 insertions(+), 154 deletions(-) commit 1a5bd62d48848755548413910ba994412a0041ab Author: Yoann Vandoorselaere Date: Wed Sep 7 12:52:03 2005 +0000 Some reformatting. preludedb-admin.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c06ee3f8bf664193c694cb9c91963da6592b65f6 Author: Yoann Vandoorselaere Date: Mon Sep 5 16:39:31 2005 +0000 - Stats beautification. - Fix saving of alerts. - Fix help. preludedb-admin.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) commit 5db7dd0faa6965cfc5cc51f03345ec1f573f414e Author: Yoann Vandoorselaere Date: Mon Sep 5 09:12:07 2005 +0000 Add Copyright / License notice. HACKING.README | 16 ++++++++++++++++ LICENSE.README | 19 +++++++++++++++++++ Makefile.am | 1 + 3 files changed, 36 insertions(+), 0 deletions(-) commit dbd31b9d46677cb62421b83a7a8fdb9b09cb38cc Author: Yoann Vandoorselaere Date: Thu Aug 25 02:02:35 2005 +0000 Bump version number NEWS | 7 +++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit 95254184afc0f506d6609652be331c8edf3f4289 Author: Yoann Vandoorselaere Date: Thu Aug 25 01:41:49 2005 +0000 Remove pthread dependencies. bindings/libpreludedb.i | 1 - src/preludedb-sql.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit 6a974733dbd85d3e2ae6dfe46db5c5f75cc338df Author: Yoann Vandoorselaere Date: Thu Aug 25 01:41:27 2005 +0000 Update GnuLib code. libmissing/m4/gnulib.m4 | 3 +++ libmissing/m4/onceonly_2_57.m4 | 4 ++-- libmissing/m4/strndup.m4 | 6 ++---- libmissing/m4/strnlen.m4 | 10 +++++++--- libmissing/strndup.c | 10 +++------- libmissing/strnlen.h | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 49 insertions(+), 16 deletions(-) commit 9304f9a44a45324b14683b17c5df3ed8cfd4297c Author: Yoann Vandoorselaere Date: Wed Aug 24 15:44:10 2005 +0000 Make sure we link correctly the Perl bindings to libpreludedb. bindings/Makefile.am | 2 +- bindings/perl/Makefile.PL.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit fd37f89a54fb7558e100b1ca5dcdf1d35b82faad Author: Yoann Vandoorselaere Date: Sun Aug 21 23:32:05 2005 +0000 Fix broken compare. plugins/format/classic/classic-path-resolve.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 775015125de2b00b6c334966aa29a198dd488b0d Author: Yoann Vandoorselaere Date: Sun Aug 21 17:48:22 2005 +0000 Get rid of the gtk-doc dependencies for generating the configure script. gtk-doc.make | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153 insertions(+), 0 deletions(-) commit c58998745522a9bb9aff4f2f9ad139a115e5c69f Author: Yoann Vandoorselaere Date: Sun Aug 21 17:35:49 2005 +0000 Add gtk-doc.m4, to avoid external dependencies. m4/gtk-doc.m4 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) commit fae94009a914aa1c079e2e21e103eeddee0b28c3 Author: Yoann Vandoorselaere Date: Sun Aug 21 11:06:17 2005 +0000 Empty additional data are valid. plugins/format/classic/classic-get.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit 30b76c89c80fd2632d04b27755273349316d2fe5 Author: Yoann Vandoorselaere Date: Sun Aug 21 11:03:30 2005 +0000 Oops, use prelude_error_get_code(). plugins/format/classic/classic-sql-join.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4b68c13543d421d7947db0582da5805519571df9 Author: Yoann Vandoorselaere Date: Sun Aug 21 11:02:29 2005 +0000 Remove deprecated. configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 790fa357fcbf33d193886c7d2a19f8e7658d7249 Author: Yoann Vandoorselaere Date: Sat Aug 20 17:56:18 2005 +0000 Cleanup resolve_indexes() factor out some code. plugins/format/classic/classic-sql-join.c | 49 ++++++++++++++++------------- 1 files changed, 27 insertions(+), 22 deletions(-) commit ffec9fe5d9af71d3ebfa85ec5e2f1d698f8bca39 Author: Yoann Vandoorselaere Date: Sat Aug 20 17:54:16 2005 +0000 Forgot to commit old version bump. NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit d4bb1a11fbb7c23ed4269e89a51a667ebba47d91 Author: Yoann Vandoorselaere Date: Wed Aug 17 08:35:15 2005 +0000 Explicit link from preludedb-admin to libprelude. Makefile.am | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 014cac81cb52a32538d988853281f353c418d48b Author: Yoann Vandoorselaere Date: Tue Aug 16 23:26:54 2005 +0000 Version bump. NEWS | 22 ++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 161 +++++++++++++---------------- docs/api/libpreludedb-sections.txt | 25 ++--- docs/api/tmpl/libpreludedb-unused.sgml | 127 +++++++++++++++++++++++ docs/api/tmpl/preludedb-plugin-sql.sgml | 146 ++------------------------ docs/api/tmpl/preludedb-sql-settings.sgml | 52 +++++++++ docs/api/tmpl/preludedb-sql.sgml | 9 -- 8 files changed, 289 insertions(+), 255 deletions(-) commit 8b9c7e23d7a57e078542d65e9ae18ca505c10eef Author: Yoann Vandoorselaere Date: Tue Aug 16 23:11:54 2005 +0000 Make sure the path have a minimum depth of 2. plugins/format/classic/classic-sql-join.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit e28cc881a93b4903fdf3c5fd4d4767d02ade4d24 Author: Yoann Vandoorselaere Date: Tue Aug 16 16:43:28 2005 +0000 Fix typos. bindings/libpreludedb_python.i | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a6dee5f52ed1ec760944143247f96436b6fad16f Author: Rob Holand Date: Tue Aug 16 12:48:22 2005 +0000 Allow useful exceptions to be raised on preludedb errors bindings/libpreludedb_python.i | 138 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 137 insertions(+), 1 deletions(-) commit a5a26b427d9263a027f278ea529ac667d5a0e3b1 Author: Yoann Vandoorselaere Date: Tue Aug 16 10:46:41 2005 +0000 Re-establish signal handler for older *nix. Print statistics on SIGQUIT. preludedb-admin.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit f23678cde0ff55687a4323265503de5f14c9be14 Author: Yoann Vandoorselaere Date: Tue Aug 16 09:55:04 2005 +0000 Fix error check. preludedb-admin.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c9ad056d2f7dc37abdcedc7394fa1cf29f6ecf5c Author: Yoann Vandoorselaere Date: Tue Aug 16 09:07:04 2005 +0000 Fix FileAccess_Permission insertion. plugins/format/classic/classic-insert.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit ebe5303d738db3e14d6ad736c92315c469ae1f3f Author: Yoann Vandoorselaere Date: Tue Aug 16 08:52:31 2005 +0000 Get user_id tty when retrieving user_id. plugins/format/classic/classic-get.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit d3293556ee2c82af172b7e9592bb1e9e5b0b1c91 Author: Yoann Vandoorselaere Date: Mon Aug 15 19:53:01 2005 +0000 Always pre-process substr. src/preludedb-sql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6238aec400f6726a72e267d5aac741437b84f6f5 Author: Yoann Vandoorselaere Date: Mon Aug 15 19:41:50 2005 +0000 Always dump stats on success. preludedb-admin.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit e02270c89cf45362dc46cd5ac018ba4f29cdb5e1 Author: Yoann Vandoorselaere Date: Mon Aug 15 19:00:57 2005 +0000 Fine grained libprelude operator now allow us to have similar behavior between different database implementation. MySQL: Default match become case insensitive, Implement REGEX matching. Implement case insensitive behavior for regexp/substr operation. PostgreSQL: Implement case insensitive behavior for the support operators, implement regexp() matching. Fix invalid UTC offset applied to broken down time match. plugins/sql/mysql/mysql.c | 64 +++++++++++++++------ plugins/sql/pgsql/pgsql.c | 69 +++++++++++++++++------ src/include/preludedb-plugin-sql.h | 7 +- src/include/preludedb-sql.h | 2 - src/preludedb-sql.c | 109 +++++++++++++++++++----------------- 5 files changed, 160 insertions(+), 91 deletions(-) commit 0c27b1e05a8d112ac3f2376895cb7c34e7e9ec91 Author: Yoann Vandoorselaere Date: Mon Aug 15 17:11:49 2005 +0000 Improve error reporting. preludedb-admin.c | 69 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 42 insertions(+), 27 deletions(-) commit 1143dee5f6cebfaa98787ee28ffca88fc50e894d Author: Yoann Vandoorselaere Date: Mon Aug 15 16:24:57 2005 +0000 Dump more statistics. Implement a print() command. Bug fixes. preludedb-admin.c | 272 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 230 insertions(+), 42 deletions(-) commit e9b7d7fa79fec7b79199facc26f86d04bffe5372 Author: Rob Holand Date: Mon Aug 15 13:31:00 2005 +0000 fix include paths preludedb-admin.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit df985e8c71d4d31ec7ee6bc35734d327835b231d Author: Yoann Vandoorselaere Date: Mon Aug 15 12:52:44 2005 +0000 Fix include path. Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit cd4600bff4ea0a1205a5e175da96d7004a180f77 Author: Yoann Vandoorselaere Date: Fri Aug 12 08:36:25 2005 +0000 Move idmef_criterion_operator_t to database operator translation to the SQL plugins, since these operator are not portable accross database. Implement the regex operator (which is different accros implementation and could not be done without this change). plugins/sql/mysql/mysql.c | 35 ++++++++++++++- plugins/sql/pgsql/pgsql.c | 32 +++++++++++++- src/include/preludedb-plugin-sql.h | 87 +++++++++++++++++++++-------------- src/include/preludedb-sql.h | 2 +- src/preludedb-sql.c | 33 +++----------- 5 files changed, 123 insertions(+), 66 deletions(-) commit 8a71d8853e76a56e05103ed6e5d0a2fecb6e9fbe Author: Yoann Vandoorselaere Date: Wed Aug 10 10:37:59 2005 +0000 Handle SIGINT and SIGTERM so that the current transaction is terminated before processing the signal. Print a specific message when exiting because we were interupted by a signal, and provide the necessary offset to be used to resume the transaction. Add a --offset option, to skip processing of events until the provided offset is reached. This is useful for resuming failed/interupted transaction. Implement the offset and count limit to the load operation. Fix memory leak on database copy. preludedb-admin.c | 132 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 97 insertions(+), 35 deletions(-) commit 2904bf4e96a22e47832f1b63df7713ce1dbc2ac2 Author: Yoann Vandoorselaere Date: Mon Aug 8 21:14:22 2005 +0000 New preludedb-admin tool. Allow save/load/delete/copy of PreludeDB database. Makefile.am | 5 +- preludedb-admin.c | 639 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 643 insertions(+), 1 deletions(-) commit 15031149de1e2e83474804908c92a594b425c339 Author: Yoann Vandoorselaere Date: Mon Aug 8 21:12:47 2005 +0000 Handle type/query logging provided from SQL settings. src/preludedb-sql.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit 569e3f96ddb2ed69520d9099da18098251f96e67 Author: Yoann Vandoorselaere Date: Mon Aug 8 21:11:40 2005 +0000 Fix broken user/pass defaulting to "prelude". This forbid the user to have, for example, an empty database password. Plus this is not intuitive for the user. Provide a way to set the type of database through preludedb_sql_settings_t. Ditto for the query logging feature. src/include/preludedb-sql-settings.h | 8 ++++++++ src/preludedb-sql-settings.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 236bc04a5bd3ce9027a50894586b3cd6d60b704d Author: Yoann Vandoorselaere Date: Tue Aug 2 10:42:55 2005 +0000 Include missing schema. Bump version number. NEWS | 5 +++++ configure.in | 2 +- plugins/format/classic/Makefile.am | 5 +++-- plugins/format/classic/mysql-update-14-3.sql | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) commit 196e151f76e7e853a293f32773546b681f573fd1 Author: Yoann Vandoorselaere Date: Mon Aug 1 21:37:10 2005 +0000 Update documentation, NEWS. Bump version number. NEWS | 11 +++++++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- docs/api/tmpl/preludedb-error.sgml | 3 +++ docs/api/tmpl/preludedb-path-selection.sgml | 3 +++ docs/api/tmpl/preludedb-plugin-format.sgml | 3 +++ docs/api/tmpl/preludedb-plugin-sql.sgml | 3 +++ docs/api/tmpl/preludedb-sql-settings.sgml | 3 +++ docs/api/tmpl/preludedb-sql.sgml | 3 +++ docs/api/tmpl/preludedb-version.sgml | 3 +++ docs/api/tmpl/preludedb.sgml | 3 +++ 11 files changed, 37 insertions(+), 2 deletions(-) commit 59aa5f7eb28bf5848ea50008a0461c9422fc183f Author: Yoann Vandoorselaere Date: Mon Aug 1 16:40:31 2005 +0000 Remode prelude-db-create reference. Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 68cb74c9a2a0b20f94ffa3c877ec5994d69f6157 Author: Yoann Vandoorselaere Date: Mon Aug 1 16:39:54 2005 +0000 Remove obsolete prelude-db-create script. configure.in | 3 - prelude-db-create.sh.in | 405 ----------------------------------------------- 2 files changed, 0 insertions(+), 408 deletions(-) commit 49d7a24100ed92e2b658496ff4468dcd890d38dc Author: Yoann Vandoorselaere Date: Mon Aug 1 16:35:08 2005 +0000 Update GnuLib code. libmissing/Makefile.am | 5 ++--- libmissing/m4/gnulib.m4 | 3 ++- libmissing/m4/size_max.m4 | 10 +++++----- libmissing/size_max.h | 27 +++++++++++++++++++++++++++ libmissing/time_r.h | 13 ++++++++++++- 5 files changed, 48 insertions(+), 10 deletions(-) commit cf0c360c2d40035d50ae81973e74a15204f0faf2 Author: Yoann Vandoorselaere Date: Mon Aug 1 16:31:02 2005 +0000 Rename Prelude_SNMPService to Prelude_SnmpService to avoid special case at place where we use this table. Fix SNMP table insertion error. Fix libpreludedb mapping for IDMEF FileAccess->permission member. Fix libpreludedb mapping for IDMEF WebService->arg member. Bump classic version to 14.3. Include MySQL and PostgreSQL schema upgrade by Sebastien Tricaud . plugins/format/classic/classic-delete.c | 2 +- plugins/format/classic/classic-get.c | 2 +- plugins/format/classic/classic-insert.c | 4 +- plugins/format/classic/classic-path-resolve.c | 32 ++++++++++++++++++++++++- plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-3.sql | 3 ++ plugins/format/classic/mysql.sql | 6 ++-- plugins/format/classic/pgsql-update-14-3.sql | 3 ++ plugins/format/classic/pgsql.sql | 6 ++-- 9 files changed, 48 insertions(+), 12 deletions(-) commit 6d978394ab1c5d452c72971fbf7936da5238b04c Author: Yoann Vandoorselaere Date: Mon Aug 1 14:50:39 2005 +0000 Set FD_CLOEXEC on preludedb logfile. src/preludedb-sql.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) commit 928b2f652bb8b38f9a68b064e3d1fe47d0cad1a1 Author: Yoann Vandoorselaere Date: Fri Jul 22 11:18:52 2005 +0000 Escape '%' character, since the caller is expected to use '*'. src/preludedb-sql.c | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-) commit 746c3a59bd1d7eaa7789ee355a621bc7e0fda262 Author: Yoann Vandoorselaere Date: Mon Jul 11 15:17:55 2005 +0000 Forgot to check in rc8 bump. NEWS | 13 +++++++++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) commit 992729e9aae214984bc0b63d6fc7bb399bd5be12 Author: Yoann Vandoorselaere Date: Thu Jul 7 16:05:43 2005 +0000 Update GnuLib code. Include time_r module. libmissing/Makefile.am | 10 +++++- libmissing/m4/extensions.m4 | 30 ++++++++++++++++++ libmissing/m4/gnulib.m4 | 8 ++++- libmissing/m4/restrict.m4 | 38 +++++++++++++++++++++++ libmissing/m4/time_r.m4 | 38 +++++++++++++++++++++++ libmissing/time_r.c | 69 +++++++++++++++++++++++++++++++++++++++++++ libmissing/time_r.h | 46 ++++++++++++++++++++++++++++ src/include/libmissing.h | 28 +++++++++++++++++ 8 files changed, 263 insertions(+), 4 deletions(-) commit 18a5b1db737254d6fecbd45c50c46cdf951f8d4e Author: Yoann Vandoorselaere Date: Sun Jul 3 10:52:44 2005 +0000 Workaround MakeMaker issue where generated Perl Makefile would be invalid when UTF-8 is enabled. bindings/Makefile.am | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) commit db5680d6604322165cf107cf6a8db76e70e9dbe1 Author: Yoann Vandoorselaere Date: Fri Jul 1 08:35:08 2005 +0000 Build/Link libmissing. Makefile.am | 2 +- configure.in | 1 + src/Makefile.am | 2 +- src/include/Makefile.am | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) commit a36ace390420e87567f4020ff71248bf2cc4c597 Author: Yoann Vandoorselaere Date: Fri Jul 1 08:24:11 2005 +0000 Support GnuLib for portability. Makefile.am | 2 +- configure.in | 20 +- libmissing/Makefile.am | 74 ++ libmissing/alloca_.h | 52 ++ libmissing/asnprintf.c | 37 + libmissing/m4/alloca.m4 | 42 ++ libmissing/m4/eoverflow.m4 | 64 ++ libmissing/m4/gnulib.m4 | 46 ++ libmissing/m4/intmax_t.m4 | 61 ++ libmissing/m4/inttypes_h.m4 | 26 + libmissing/m4/longdouble.m4 | 28 + libmissing/m4/longlong.m4 | 23 + libmissing/m4/minmax.m4 | 38 + libmissing/m4/onceonly_2_57.m4 | 86 +++ libmissing/m4/signed.m4 | 17 + libmissing/m4/size_max.m4 | 59 ++ libmissing/m4/snprintf.m4 | 15 + libmissing/m4/stdint_h.m4 | 26 + libmissing/m4/strdup.m4 | 17 + libmissing/m4/strndup.m4 | 23 + libmissing/m4/strnlen.m4 | 25 + libmissing/m4/vasnprintf.m4 | 58 ++ libmissing/m4/vsnprintf.m4 | 15 + libmissing/m4/wchar_t.m4 | 20 + libmissing/m4/wint_t.m4 | 20 + libmissing/m4/xsize.m4 | 13 + libmissing/minmax.h | 60 ++ libmissing/printf-args.c | 118 ++++ libmissing/printf-args.h | 136 ++++ libmissing/printf-parse.c | 536 +++++++++++++++ libmissing/printf-parse.h | 74 ++ libmissing/snprintf.c | 60 ++ libmissing/snprintf.h | 29 + libmissing/strdup.c | 56 ++ libmissing/strdup.h | 29 + libmissing/strndup.c | 55 ++ libmissing/strndup.h | 30 + libmissing/strnlen.c | 48 ++ libmissing/vasnprintf.c | 901 +++++++++++++++++++++++++ libmissing/vasnprintf.h | 77 +++ libmissing/vsnprintf.c | 58 ++ libmissing/vsnprintf.h | 31 + libmissing/xsize.h | 108 +++ plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic-insert.c | 3 + plugins/format/classic/classic-path-resolve.c | 3 + plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/mysql/mysql.c | 5 +- plugins/sql/pgsql/Makefile.am | 2 +- plugins/sql/pgsql/pgsql.c | 1 + src/Makefile.am | 2 +- src/include/libmissing.h | 11 + src/preludedb-path-selection.c | 3 + src/preludedb-sql-settings.c | 26 +- src/preludedb-sql.c | 2 + src/preludedb.c | 5 +- 56 files changed, 3345 insertions(+), 35 deletions(-) commit 06edfde3637b8728e773edc5adbc388eb4ecefdd Author: Yoann Vandoorselaere Date: Sun Jun 19 16:16:33 2005 +0000 Fix PRELUDE_PRIu64 usage. plugins/format/classic/classic-get.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 778e572bf0aa690563aad2d8d92eba03cb13bd21 Author: Yoann Vandoorselaere Date: Fri Jun 10 12:56:07 2005 +0000 gcc4 shut up. plugins/format/classic/classic-get.c | 2 +- plugins/format/classic/classic-insert.c | 4 ++-- plugins/format/classic/classic.c | 3 ++- plugins/sql/mysql/mysql.c | 2 +- src/preludedb-sql-settings.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) commit 509e5e0d6215a4eabdaee328eb72257883f108ea Author: Yoann Vandoorselaere Date: Fri Jun 10 12:55:45 2005 +0000 gcc4 shut up. Fix a possible memory leak. plugins/sql/pgsql/pgsql.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 5693cc43c478257d129a18743dccb1662b444111 Author: Yoann Vandoorselaere Date: Fri Jun 10 12:54:49 2005 +0000 Remove file installed in platform specific prefix. bindings/python/setup.py.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 5028ed9412a99ed0940afc639c92ede4ccb015ba Author: Yoann Vandoorselaere Date: Fri Jun 3 11:43:48 2005 +0000 Remove debug spew. src/preludedb-sql.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit bbfc09a64fe191850d253b3d8ec73c9b336c7fe6 Author: Yoann Vandoorselaere Date: Thu Jun 2 17:38:19 2005 +0000 Handle broken down criteria match. src/preludedb-sql.c | 117 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 110 insertions(+), 7 deletions(-) commit 604a252e30cf3768ea159268060f0612b5650170 Author: Yoann Vandoorselaere Date: Thu Jun 2 08:01:57 2005 +0000 Improve error reporing in case plugin directory does not exist. src/preludedb.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit cc3d253accdf0d427cd94c852b5c91f3b1acb8d7 Author: Yoann Vandoorselaere Date: Wed Jun 1 08:05:48 2005 +0000 Forgot to commit last libpreludedb version bump. NEWS | 5 +++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit f7428369affe3b9b6872390482a54c6831f41b5e Author: Yoann Vandoorselaere Date: Mon May 30 14:11:27 2005 +0000 Missing comma. plugins/format/classic/classic-delete.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ed04747a7f3b32703aca406749f0a915daa3e972 Author: Yoann Vandoorselaere Date: Mon May 30 14:09:34 2005 +0000 Bump version number. Update docs. NEWS | 22 ++++++++++++++++++++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) commit 05831c4146ebd24def6faa92c52619f0b839da2e Author: Yoann Vandoorselaere Date: Mon May 30 07:39:13 2005 +0000 Untabify. src/preludedb-sql-settings.c | 62 +++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 31 deletions(-) commit 87bfb3cb355af9107984de71379ad8c5ff991048 Author: Yoann Vandoorselaere Date: Mon May 30 07:38:40 2005 +0000 Fix warnings. Cleanup. src/preludedb-sql-settings.c | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) commit e3f75aaf12b63957b1acdfa9e4de97bd0bf95e20 Author: Yoann Vandoorselaere Date: Mon May 30 06:38:37 2005 +0000 Cleanup default_table_name_resolver(), make it faster. Use time_without_usec_field_name_resolver() for Prelude_File time member. plugins/format/classic/classic-path-resolve.c | 57 ++++++++++++++++-------- 1 files changed, 38 insertions(+), 19 deletions(-) commit 250cd79ac86620951c792d1d3866cb75e9a328cd Author: Yoann Vandoorselaere Date: Sun May 29 15:04:13 2005 +0000 Fix warnings. src/preludedb-sql.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit daa271663107b48cac106eb6f7ad58657c494e2c Author: Yoann Vandoorselaere Date: Thu May 26 16:56:36 2005 +0000 Patch from Cedric Foll , that should reduce DELETE operation by a factor of 2. plugins/format/classic/classic-delete.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) commit 0ab0316af2910a0f4feddd0f0532f43ceab4e868 Author: Yoann Vandoorselaere Date: Thu May 19 10:49:15 2005 +0000 Patch from Nicolas Delon, fixing DetectTime SQL join generation. DetectTime has no parent_type. plugins/format/classic/classic-sql-join.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit feb064203b40923b786cebc73b7b573904da980c Author: Yoann Vandoorselaere Date: Wed May 18 16:49:06 2005 +0000 Remove duplicate inode_number get. Handle file_type insertion. plugins/format/classic/classic-insert.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) commit 512804c36339f2a1f8df1e0d1629a16ce4f7a935 Author: Yoann Vandoorselaere Date: Wed May 18 16:47:27 2005 +0000 Handle file_type get. s/and/AND/. plugins/format/classic/classic-get.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit b8c195f5da1c31cc712b2eed2438500ee59a24e6 Author: Yoann Vandoorselaere Date: Wed May 18 16:46:33 2005 +0000 Update. plugins/format/classic/Makefile.am | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit c1ea555d0be53a05e06732d77ebf560e06bc04eb Author: Sebastien Tricaud Date: Wed May 18 16:41:44 2005 +0000 database upgrade and missing fields added to pgsql.sql ChangeLog | 8 + plugins/format/classic/classic.c | 2 +- plugins/format/classic/mysql-update-14-2.sql | 29 +++ plugins/format/classic/mysql.sql | 5 +- plugins/format/classic/pgsql-update-14-2.sql | 295 ++++++++++++++++++++++++++ plugins/format/classic/pgsql.sql | 115 +++++----- 6 files changed, 393 insertions(+), 61 deletions(-) commit a00eb7c7306215f17f5637ccb9b6383dadcfb6a4 Author: Yoann Vandoorselaere Date: Wed May 18 15:35:38 2005 +0000 Fix portability problem with generated request. PostgreSQL might fail if the operator is not separated from operand. plugins/format/classic/classic-sql-join.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6315f2bba9cc969e7e15d4907323889cd4c1b7ac Author: Yoann Vandoorselaere Date: Thu May 12 15:45:42 2005 +0000 Remove trailing \n from PgSQL error return. plugins/sql/pgsql/pgsql.c | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) commit b93eac614c903dcb5ba2ea33678cc7e663a043a0 Author: Yoann Vandoorselaere Date: Mon May 9 08:09:05 2005 +0000 Avoid not portable %hh convertion specifier. plugins/format/classic/classic-insert.c | 14 +++++++++++- src/preludedb-sql.c | 37 +++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 8 deletions(-) commit eb05e2a3aecbc2eee3e9f1da5eadcce6dbe259d9 Author: Yoann Vandoorselaere Date: Sat Apr 23 12:11:48 2005 +0000 Fix insertion of Prelude_FileAccess. plugins/format/classic/classic-insert.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 7a32e8d784b7f9338487dd5b3d619d88d0bd8160 Author: Nicolas Delon Date: Tue Apr 19 14:39:01 2005 +0000 fix bad indexes plugins/format/classic/mysql.sql | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) commit ed6b53aab22364d7d77822b31c504eae117aac03 Author: Yoann Vandoorselaere Date: Sun Apr 17 23:10:29 2005 +0000 Bump version number, update documentation. NEWS | 15 +++++++++++++++ configure.in | 7 ++++--- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) commit 5af875120bae895afb9ebe396686ef77fab5bf8f Author: Nicolas Delon Date: Thu Apr 14 16:07:43 2005 +0000 fix duplicated code plugins/format/classic/classic-get.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) commit 039a881efc81681b2f9a0532142621463282fdf5 Author: Nicolas Delon Date: Thu Apr 14 09:17:42 2005 +0000 fix returned values plugins/format/classic/classic-insert.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) commit 3b2734eddc8b608dab3a67eda4641bba838eb895 Author: Nicolas Delon Date: Thu Apr 14 09:13:07 2005 +0000 bug fix: confidence is a float, not an integer plugins/format/classic/classic-insert.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f7b077de33e794a6c00f3164ba82988770026e19 Author: Nicolas Delon Date: Wed Apr 13 06:36:51 2005 +0000 fix bad quoting (thanks to Ruben Alonso <1rualons@rigel.deusto.es> for pointing that out) plugins/format/classic/pgsql-update-14-1.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ad0dd980183a11feab4a36dd57f34325b372f0bf Author: Nicolas Delon Date: Tue Apr 12 16:05:40 2005 +0000 update schema version plugins/format/classic/pgsql.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit af3f4558a33eba1049e570a0f36331e286b01ee3 Author: Nicolas Delon Date: Tue Apr 12 15:37:39 2005 +0000 bug fix: gmtoff and usec fields were inverted while building the query string, that lead to bad usec/gmtoff values when doing a preludedb_get_values plugins/format/classic/classic-path-resolve.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c4168080ac8a03e89f1e33849811a9d6b0997b64 Author: Nicolas Delon Date: Tue Apr 12 09:22:04 2005 +0000 bug fix: forgot to insert checksum index in Prelude_Checksum table plugins/format/classic/classic-insert.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit b8ae18088fb5167ae6b5b146b16a48163f2d992e Author: Nicolas Delon Date: Sun Apr 10 17:58:11 2005 +0000 bug fix: forgot to update the schema version plugins/format/classic/mysql.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0792802e47a0ec4b9803d7ee4860e773d1daa687 Author: Yoann Vandoorselaere Date: Sun Apr 10 00:50:50 2005 +0000 Update API documentation, NEWS. Bump version number. NEWS | 29 +++++++++++++++++---- configure.in | 3 +- docs/api/libpreludedb-decl.txt | 37 +++++++++++++++++++++++++-- docs/api/libpreludedb-sections.txt | 7 ++++- docs/api/tmpl/libpreludedb-unused.sgml | 8 ++++++ docs/api/tmpl/preludedb-error.sgml | 5 ++++ docs/api/tmpl/preludedb-plugin-format.sgml | 18 +++++++++++++ docs/api/tmpl/preludedb.sgml | 26 +++++++++++++++++++- 8 files changed, 121 insertions(+), 12 deletions(-) commit 035bbae4c2bf36a674ef10eb7df8404fd73b73ff Author: Yoann Vandoorselaere Date: Sat Apr 9 22:48:59 2005 +0000 Fix MySQL header check. configure.in | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) commit b2691331cde8708e6bca6bf724bea2ce4e1fc513 Author: Nicolas Delon Date: Sat Apr 9 20:49:30 2005 +0000 bug fix, bad function call src/preludedb-sql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d05b15df40f6374aa2756afc78437ca420147010 Author: Nicolas Delon Date: Sat Apr 9 12:13:48 2005 +0000 manually define libprelude structures used by libpreludedb so that we are sure that the will be wrapped in libprelude and libpreludedb the same way (we got incompatibility errors between libprelude and libpreludedb with swig 1.3.24) bindings/libpreludedb.i | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit ce7bef459298a735da07ec51bc86005c5da038cb Author: Yoann Vandoorselaere Date: Fri Apr 8 10:16:07 2005 +0000 Fix GnuIsm... bindings/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 3d2e23e06cece3f33c52b37301c4a2c4622e0f50 Author: Nicolas Delon Date: Thu Apr 7 11:53:43 2005 +0000 fix filenames plugins/format/classic/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9ffb22887500cb86068911d668c775aeadaf3305 Author: Nicolas Delon Date: Thu Apr 7 11:49:23 2005 +0000 add schema version check add error codes for plugin load failure plugins/format/classic/classic.c | 25 ++++++++++++ plugins/format/classic/mysql-rc3_rc4.sql | 1 - plugins/format/classic/mysql-update-14-1.sql | 2 + plugins/format/classic/pgsql-update-14-1.sql | 1 + src/include/preludedb-error.h | 8 +++- src/include/preludedb-plugin-format.h | 4 ++ src/include/preludedb.h | 3 +- src/preludedb-error.c | 7 +++- src/preludedb-sql.c | 2 +- src/preludedb.c | 54 +++++++++++++++++++------- 10 files changed, 88 insertions(+), 19 deletions(-) commit 33f9dc1f3f99eaea85c13899594a9427b677c2ce Author: Nicolas Delon Date: Wed Apr 6 18:26:12 2005 +0000 dist and install the new upgrade script plugins/format/classic/Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit cf3ae7d7df6593729a33edfffd743907e8d37cc4 Author: Nicolas Delon Date: Wed Apr 6 18:23:44 2005 +0000 add an update script to fix the missing info value in the enum field of Prelude_Impact.severity plugins/format/classic/mysql-rc3_rc4.sql | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit cdf8e2e7258e49d2e7948f978639b86c9494c3c8 Author: Nicolas Delon Date: Wed Apr 6 18:17:58 2005 +0000 bug fix: forgot the 'info' value of severity plugins/format/classic/mysql.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f4b3dbc00c4ba02d6162fab9c5e4289e120d8749 Author: Yoann Vandoorselaere Date: Wed Apr 6 16:55:20 2005 +0000 Fit plugins system change (version handling / re-entrancy). plugins/format/classic/classic.c | 18 +++++++++----- plugins/sql/mysql/mysql.c | 18 +++++++++----- plugins/sql/pgsql/pgsql.c | 22 ++++++++++------- src/preludedb-sql.c | 6 ++++- src/preludedb.c | 46 +++++++++++++++++-------------------- 5 files changed, 61 insertions(+), 49 deletions(-) commit 8e66d52a339571577c7e499e40f53d97487014de Author: Nicolas Delon Date: Tue Apr 5 20:20:38 2005 +0000 fixes src/include/preludedb.h | 2 +- src/preludedb.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit 4e6cbb4a98dcfd919f7186a20aedbeb4b4ec990d Author: Yoann Vandoorselaere Date: Tue Apr 5 19:35:33 2005 +0000 Fix libpreludedb detection. m4/libpreludedb.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1d4fa991564984c0bf0436bc702ebc4e04bc165d Author: Nicolas Delon Date: Tue Apr 5 18:38:03 2005 +0000 add preludedb_init/preludedb_deinit to do plugins loading/unloading safely bindings/libpreludedb_python.i | 31 ++++++++++++++++++ src/include/preludedb.h | 2 + src/preludedb-sql.c | 35 +------------------- src/preludedb.c | 69 +++++++++++++++++++++++++++------------- 4 files changed, 81 insertions(+), 56 deletions(-) commit e59fda3ffa6b8408411ecbd41695e04a3c8f9a4d Author: Yoann Vandoorselaere Date: Tue Apr 5 16:46:16 2005 +0000 Update. README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 48667f48d84bcf4377ce4d506542b7d76886a0c7 Author: Nicolas Delon Date: Tue Apr 5 11:09:52 2005 +0000 remove preludedb-version.h dependancy, it caused the bindings to be always regenerated after the ./configure step (as preludedb-version.h is generated from preludedb-version.h.in) bindings/Makefile.am | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit dfe90ab9eebc1d4df6d7d74b7072fb938eb31209 Author: Nicolas Delon Date: Fri Apr 1 14:22:44 2005 +0000 fix schema for mysql 3.23, it does not seem to support index length when the index is directly created in the table, thanks to Michael Kiessling for pointing this out and for debugging help plugins/format/classic/mysql.sql | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 076cc966dbc4cc0e67f648dcebb6e33038e8439a Author: Yoann Vandoorselaere Date: Thu Mar 31 21:33:15 2005 +0000 Bump to 0.9.0-rc3. NEWS | 5 +++++ configure.in | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit eee383e8fc5c51c529dcc1d0d739da948204d87c Author: Yoann Vandoorselaere Date: Thu Mar 31 20:31:17 2005 +0000 Fix Debian specific PgSQL plugin loading problem. plugins/sql/pgsql/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d348bc68dc2b290aa07ce5b0eea2d35ea326bb8b Author: Yoann Vandoorselaere Date: Thu Mar 31 17:52:19 2005 +0000 Bump version to libpreludedb-0.9.0-rc2. Update NEWS. NEWS | 13 +++++++++++-- configure.in | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) commit 7e6b98b7c7501fe6e4fd297ab848feb5dc1cd6c2 Author: Nicolas Delon Date: Thu Mar 31 17:14:39 2005 +0000 fix library link path order, CFLAGS propagation and perl make clean bindings/Makefile.am | 2 +- bindings/perl/Makefile.PL.in | 6 +++--- bindings/python/setup.py.in | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 7f39cd8a5bb17e92aedea57970409954477d9e91 Author: Nicolas Delon Date: Tue Mar 29 16:17:28 2005 +0000 add a version field to the _format table so that we can keep track of different versions of the same format plugins/format/classic/mysql.sql | 5 +++-- plugins/format/classic/pgsql.sql | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit fbfe6d9dc491649c51f5ac43e6325fef64859e0b Author: Yoann Vandoorselaere Date: Tue Mar 29 13:47:17 2005 +0000 Fix schema location. configure.in | 2 ++ plugins/format/classic/Makefile.am | 9 ++------- prelude-db-create.sh.in | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) commit 5c1c228fc4541bb81f30a50d27ad7286770aa769 Author: Yoann Vandoorselaere Date: Tue Mar 29 09:18:32 2005 +0000 Update INSTALL INSTALL | 61 +++++++++++++++++++++++++++---------------------------------- 1 files changed, 27 insertions(+), 34 deletions(-) commit 67a7c968cf7ba0eb9b2ec2621783299d4e728cc1 Author: Yoann Vandoorselaere Date: Tue Mar 29 08:31:48 2005 +0000 Bump version to 0.9.0-rc1. Update NEWS file. NEWS | 4 ++++ configure.in | 2 +- docs/api/libpreludedb-decl.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) commit 3c4a0797a7e8cd27ba90136c67aa4f1fd7039d15 Author: Yoann Vandoorselaere Date: Tue Mar 29 08:29:01 2005 +0000 Print uptodate information, thanks to Sebastien Tricaud for pointing this out. prelude-db-create.sh.in | 28 ++++++++++------------------ 1 files changed, 10 insertions(+), 18 deletions(-) commit 64e967f9278d91aa0e13ebda4336bca677381c07 Author: Nicolas Delon Date: Tue Mar 29 01:49:09 2005 +0000 fixes README | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit c80dfe9fddbbdf6c8bea389a309e93229e239e77 Author: Yoann Vandoorselaere Date: Sun Mar 27 00:04:05 2005 +0000 Use PRELUDE_PRIu* instead of PRIu* bindings/libpreludedb_perl.i | 4 +- docs/api/libpreludedb-decl.txt | 2 +- plugins/format/classic/classic-delete.c | 90 +++++++++++++++--------------- plugins/format/classic/classic-get.c | 72 ++++++++++++------------ plugins/format/classic/classic-insert.c | 70 ++++++++++++------------ src/preludedb-sql.c | 4 +- 6 files changed, 121 insertions(+), 121 deletions(-) commit e204f819504fa8d4b791eaefe2a60cda7af5ca3b Author: Nicolas Delon Date: Sat Mar 26 13:16:56 2005 +0000 bug fix, analyzerid is now an optional string field plugins/format/classic/pgsql.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 23f934da78a7b5a869372194d75a7dc6c1b2ed5c Author: Nicolas Delon Date: Sat Mar 26 12:58:10 2005 +0000 * plugins/sql/pgsql/pgsql.c: cleanup row fetch handling * plugins/format/classic/mysql.sql: fixes * plugins/format/classic/pgsql.sql: update schema to the last classic plugin changes plugins/format/classic/mysql.sql | 4 +- plugins/format/classic/pgsql.sql | 120 ++++++++++++++++++++------------------ plugins/sql/pgsql/pgsql.c | 104 +++++++++++++++++---------------- 3 files changed, 119 insertions(+), 109 deletions(-) commit 705c9a57831a8ebc5f59d59ea8d3dcbef5c48b26 Author: Yoann Vandoorselaere Date: Sat Mar 26 12:10:46 2005 +0000 Include prelude.h bindings/libpreludedb.i | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d335c0138d13b4f0700ece548a437a1a238c5a37 Author: Nicolas Delon Date: Fri Mar 25 20:14:44 2005 +0000 remove debug message src/preludedb.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) commit d4f45b11b58ce9890d3757d95d6b78697b4f7971 Author: Nicolas Delon Date: Fri Mar 25 19:37:21 2005 +0000 minor fixes bindings/libpreludedb_perl.i | 2 +- bindings/libpreludedb_python.i | 3 --- 2 files changed, 1 insertions(+), 4 deletions(-) commit 02322a348140fddc87bfc5c2648577b742b6c9cd Author: Nicolas Delon Date: Fri Mar 25 19:25:38 2005 +0000 update plugin contact stuff plugins/format/classic/classic.c | 6 ++++-- plugins/sql/mysql/mysql.c | 2 +- plugins/sql/pgsql/pgsql.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit f3cbeece057ec91004ec5ac1236aa18a5cdeb70a Author: Nicolas Delon Date: Fri Mar 25 19:15:44 2005 +0000 add README file README | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) commit c34e2786deafe0d8a649654610982ddd7f9eb8fa Author: Yoann Vandoorselaere Date: Fri Mar 25 19:05:56 2005 +0000 ======================================================== libpreludedb-0.9.0-svn archives ready for distribution: libpreludedb-0.9.0-svn.tar.gz ======================================================== configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dbc7efd0b6eeb742827d9e18ed069abe64e2d0c8 Author: Nicolas Delon Date: Fri Mar 25 18:54:07 2005 +0000 transfert copyrights to PreludeIDS Technologies plugins/format/classic/classic-delete.c | 6 +++--- plugins/format/classic/classic-get.c | 6 +++--- plugins/format/classic/classic-insert.c | 7 +++---- plugins/format/classic/classic-path-resolve.c | 6 +++--- plugins/format/classic/classic-sql-join.c | 6 +++--- plugins/format/classic/classic-sql-select.c | 6 +++--- plugins/format/classic/classic.c | 6 +++--- plugins/format/classic/include/classic-delete.h | 6 +++--- plugins/format/classic/include/classic-get.h | 6 +++--- .../format/classic/include/classic-path-resolve.h | 6 +++--- plugins/format/classic/include/classic-sql-join.h | 6 +++--- .../format/classic/include/classic-sql-select.h | 6 +++--- plugins/sql/mysql/mysql.c | 8 +++----- plugins/sql/pgsql/pgsql.c | 7 +++---- src/include/preludedb-error.h | 6 +++--- src/include/preludedb-path-selection.h | 6 +++--- src/include/preludedb-plugin-format.h | 7 +++---- src/include/preludedb-plugin-sql.h | 7 +++---- src/include/preludedb-sql-settings.h | 6 +++--- src/include/preludedb-sql.h | 6 +++--- src/include/preludedb-version.h.in | 6 +++--- src/include/preludedb.h | 6 +++--- src/preludedb-error.c | 6 +++--- src/preludedb-path-selection.c | 6 +++--- src/preludedb-sql-settings.c | 6 +++--- src/preludedb-sql.c | 7 +++---- src/preludedb-version.c | 6 +++--- src/preludedb.c | 13 +++++++++---- 28 files changed, 90 insertions(+), 92 deletions(-) commit 702a5357938b4713c16fb8a8c185af105f5b5a76 Author: Yoann Vandoorselaere Date: Fri Mar 25 18:41:13 2005 +0000 Update INSTALL file. Update libpreludedb.m4. Remove un-needed libtool.m4. INSTALL | 11 +- m4/libpreludedb.m4 | 2 +- m4/libtool.m4 | 6108 ---------------------------------------------------- 3 files changed, 9 insertions(+), 6112 deletions(-) commit 1ff8710d37a91477eac00126a1be26fc6a335bbb Author: Yoann Vandoorselaere Date: Fri Mar 25 18:28:51 2005 +0000 Cleanup perl file. Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 9babdd996d7eecf024bc9d1d1f70a828730d757e Author: Yoann Vandoorselaere Date: Fri Mar 25 18:26:03 2005 +0000 Restore LDFLAGS. m4/libpreludedb.m4 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 550594ce020f3b0b9d538bb361a76e6cbb5959a0 Author: Yoann Vandoorselaere Date: Fri Mar 25 18:22:55 2005 +0000 Update. m4/libprelude.m4 | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit e86001f7839cf0a3e57da96a9a464532a4d08c73 Author: Yoann Vandoorselaere Date: Fri Mar 25 18:21:51 2005 +0000 Fix distcheck. src/include/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit c059ffc9851d16f7e911bec0f6da92bea0b7b7ad Author: Yoann Vandoorselaere Date: Fri Mar 25 18:20:59 2005 +0000 Output cleanup. configure.in | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) commit 515f1d6516a6b5ea33198fae60f47be3df199e05 Author: Yoann Vandoorselaere Date: Fri Mar 25 18:20:41 2005 +0000 Fix distcheck. bindings/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4c824518bea173c2dfd5a513dd1b41160d4a5827 Author: Nicolas Delon Date: Fri Mar 25 17:46:13 2005 +0000 fix perl bindings bindings/Makefile.am | 2 +- bindings/libpreludedb.i | 319 +-------------------------- bindings/libpreludedb_perl.i | 191 ++++++++++++++++ bindings/libpreludedb_python.i | 266 ++++++++++++++++++++++ bindings/perl/PreludeDB.pm | 475 +--------------------------------------- 5 files changed, 470 insertions(+), 783 deletions(-) commit e46366f303b2c12bf3a51ff007a89d1f8bfdc4fd Author: Yoann Vandoorselaere Date: Thu Mar 24 12:17:34 2005 +0000 Fix warnings. plugins/format/classic/classic-path-resolve.c | 14 +++++++------- plugins/format/classic/classic.c | 2 +- .../format/classic/include/classic-path-resolve.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) commit 0293f8e5271c8f9d9f7cd0342c99e5a30d0f071b Author: Yoann Vandoorselaere Date: Thu Mar 24 12:05:03 2005 +0000 Correct gtk-doc support. docs/api/Makefile.am | 196 +----- docs/api/libpreludedb-decl.txt | 893 +++++++++++++++++++++++++++ docs/api/libpreludedb-docs.sgml | 20 + docs/api/libpreludedb-sections.txt | 207 +++++++ docs/api/tmpl/preludedb-error.sgml | 72 +++ docs/api/tmpl/preludedb-path-selection.sgml | 134 ++++ docs/api/tmpl/preludedb-plugin-format.sgml | 256 ++++++++ docs/api/tmpl/preludedb-plugin-sql.sgml | 328 ++++++++++ docs/api/tmpl/preludedb-sql-settings.sgml | 210 +++++++ docs/api/tmpl/preludedb-sql.sgml | 494 +++++++++++++++ docs/api/tmpl/preludedb-version.sgml | 32 + docs/api/tmpl/preludedb.sgml | 242 ++++++++ 12 files changed, 2923 insertions(+), 161 deletions(-) commit c40a7a516a235c6ccf8f51b5a1d51a42018a68cb Author: Yoann Vandoorselaere Date: Thu Mar 24 12:01:34 2005 +0000 Fix gtk-doc support. Makefile.am | 2 ++ autogen.sh | 1 + configure.in | 36 +----------------------------------- 3 files changed, 4 insertions(+), 35 deletions(-) commit 88e390fa133ae54843e7ede03174a5c0203b580b Author: Yoann Vandoorselaere Date: Tue Mar 22 00:36:16 2005 +0000 Don't use linked object unless you got a very good reason to do so. plugins/format/classic/classic-sql-join.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 93b590006a51a7a16925c7d12828a3804dea3bed Author: Nicolas Delon Date: Tue Mar 15 13:52:00 2005 +0000 bug fix: the output buffer must be allocated dynamically src/preludedb-sql.c | 47 ++++++++++++++++++++++++++++------------------- 1 files changed, 28 insertions(+), 19 deletions(-) commit e21f591be2760b4f35cb266d0cc405e15ca69ed2 Author: Nicolas Delon Date: Mon Mar 14 19:08:44 2005 +0000 bug fix: handle '(' and ')' in selected_path strings src/preludedb-path-selection.c | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) commit 09e67f40ad3766fc70c83df1ba7b12adebf8dfc9 Author: Nicolas Delon Date: Mon Mar 14 14:57:15 2005 +0000 remove deprecated reference to IDMEF_TIME_MAX_STRING_SIZE plugins/format/classic/classic-insert.c | 14 +++++++------- src/include/preludedb-sql.h | 2 ++ src/preludedb-sql.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) commit 0c37187b72389e0d53c03e7299687801345a1c3f Author: Nicolas Delon Date: Mon Mar 14 14:08:09 2005 +0000 support for -1 list special indexes plugins/format/classic/classic-get.c | 35 ++-- plugins/format/classic/classic-insert.c | 404 +++++++++++++++++++++-------- plugins/format/classic/classic-sql-join.c | 37 ++-- plugins/format/classic/mysql.sql | 2 +- 4 files changed, 340 insertions(+), 138 deletions(-) commit 8a9f6b1603489ddd520c5a831392246d1f4ff725 Author: Nicolas Delon Date: Mon Mar 14 08:36:40 2005 +0000 bind stuff related to libpreludedb sql layer bindings/libpreludedb.i | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) commit ac3697a63c23c782fe8c6b8c9999f3ea7ff30412 Author: Nicolas Delon Date: Sun Mar 13 17:31:11 2005 +0000 filenames/structures/functions naming cleanup for the classic plugin plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic-delete.c | 129 ++ plugins/format/classic/classic-get.c | 2111 +++++++++++++++++++ plugins/format/classic/classic-insert.c | 1854 +++++++++++++++++ plugins/format/classic/classic-path-resolve.c | 400 ++++ plugins/format/classic/classic-sql-join.c | 373 ++++ plugins/format/classic/classic-sql-select.c | 186 ++ plugins/format/classic/classic.c | 132 +- plugins/format/classic/idmef-db-delete.c | 129 -- plugins/format/classic/idmef-db-get.c | 2113 -------------------- plugins/format/classic/idmef-db-insert.c | 1854 ----------------- plugins/format/classic/idmef-db-path.c | 976 --------- plugins/format/classic/include/Makefile.am | 2 +- plugins/format/classic/include/classic-delete.h | 31 + plugins/format/classic/include/classic-get.h | 31 + plugins/format/classic/include/classic-insert.h | 30 + .../format/classic/include/classic-path-resolve.h | 39 + plugins/format/classic/include/classic-sql-join.h | 43 + .../format/classic/include/classic-sql-select.h | 39 + plugins/format/classic/include/db-path.h | 54 - plugins/format/classic/include/idmef-db-delete.h | 31 - plugins/format/classic/include/idmef-db-get.h | 31 - plugins/format/classic/include/idmef-db-insert.h | 31 - plugins/format/classic/include/idmef-db-path.h | 53 - plugins/format/classic/include/idmef-db-select.h | 50 - 25 files changed, 5318 insertions(+), 5406 deletions(-) commit 8863cdfee718ab1d38af0bdb85e17bafed18f234 Author: Nicolas Delon Date: Sat Mar 12 16:09:54 2005 +0000 process retrieved data as string if it is not in specified format plugins/format/classic/idmef-db-get.c | 37 +++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 11 deletions(-) commit fddb294e14743d4f98d38e6c887b98b843e63970 Author: Nicolas Delon Date: Fri Mar 11 19:49:10 2005 +0000 fit libprelude changes on idmef_criterion_value replace idmef-db-select.c/db-path.c/schema.txt by idmef-db-path.c that semi-automatically analyze idmef-path objects to build parts of sql queries, this mapper now supports index for lists plugins/format/classic/Makefile.am | 5 +- plugins/format/classic/classic.c | 234 +++++- plugins/format/classic/db-path.c | 482 ----------- plugins/format/classic/idmef-db-delete.c | 2 +- plugins/format/classic/idmef-db-get.c | 40 +- plugins/format/classic/idmef-db-insert.c | 405 ++++++---- plugins/format/classic/idmef-db-path.c | 976 ++++++++++++++++++++++ plugins/format/classic/idmef-db-select.c | 1064 ------------------------ plugins/format/classic/include/idmef-db-path.h | 53 ++ plugins/format/classic/mysql.sql | 120 ++-- plugins/format/classic/schema.txt | 209 ----- plugins/sql/mysql/mysql.c | 28 +- plugins/sql/pgsql/pgsql.c | 28 +- src/include/preludedb-plugin-sql.h | 2 +- src/include/preludedb-sql.h | 4 +- src/preludedb-path-selection.c | 2 +- src/preludedb-sql.c | 358 +------- 17 files changed, 1647 insertions(+), 2365 deletions(-) commit 55201ec5b48aed04adbf0cea7261e134bd991a76 Author: Nicolas Delon Date: Fri Mar 4 12:40:26 2005 +0000 bug fix plugins/format/classic/idmef-db-get.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) commit 839a8a033e419fef4223bd736f3995fbe3edae59 Author: Nicolas Delon Date: Fri Mar 4 11:01:10 2005 +0000 fit libprelude changes on analyzers handling plugins/format/classic/idmef-db-get.c | 98 +++++++++++++++--------------- plugins/format/classic/idmef-db-insert.c | 38 ++++++------ plugins/format/classic/mysql.sql | 4 +- plugins/format/classic/pgsql.sql | 58 +++++++++--------- plugins/format/classic/schema.txt | 57 +++++------------ 5 files changed, 115 insertions(+), 140 deletions(-) commit 9fd768ba8ab19566d45241995cb34a98f39d9ab6 Author: Yoann Vandoorselaere Date: Fri Mar 4 09:27:38 2005 +0000 Modification for new kind of analyzer chaining. To be modified by Nicolas. plugins/format/classic/idmef-db-get.c | 25 ++++++-------- plugins/format/classic/idmef-db-insert.c | 52 ++++++++++++++++++++---------- plugins/format/classic/mysql.sql | 2 +- plugins/format/classic/pgsql.sql | 6 ++-- 4 files changed, 49 insertions(+), 36 deletions(-) commit 8b5e15979993af1aa16ef83c6858b91327799a8f Author: Nicolas Delon Date: Mon Feb 28 19:46:30 2005 +0000 forgot a function plugins/format/classic/idmef-db-select.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 4adae72471ddd7c88a34f040461032fafd7b8581 Author: Nicolas Delon Date: Mon Feb 28 17:24:46 2005 +0000 support for heartbeat-interval when retrieving alerts plugins/format/classic/idmef-db-get.c | 44 +++++++++++++++++++++++++++----- plugins/format/classic/schema.txt | 2 + 2 files changed, 39 insertions(+), 7 deletions(-) commit dd4eb711ceebe7e2d562cc57fe29271d0be8a32a Author: Yoann Vandoorselaere Date: Mon Feb 28 16:24:43 2005 +0000 Fix warning. plugins/format/classic/idmef-db-get.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit eab8520119431e07c8f6da97f69598fdf1446cb2 Author: Nicolas Delon Date: Mon Feb 28 16:14:24 2005 +0000 bug fix: check messageid field validity plugins/format/classic/idmef-db-get.c | 30 ++++++------------------------ 1 files changed, 6 insertions(+), 24 deletions(-) commit ab06521c179463fccefa59f052195da870d6975a Author: Yoann Vandoorselaere Date: Mon Feb 28 13:51:49 2005 +0000 Implement new IDMEFv14 attribute. Ident are now string. Update schema. plugins/format/classic/idmef-db-get.c | 31 ++-- plugins/format/classic/idmef-db-insert.c | 281 ++++++++++++++++++++---------- plugins/format/classic/mysql.sql | 30 ++-- plugins/format/classic/pgsql.sql | 21 ++- 4 files changed, 233 insertions(+), 130 deletions(-) commit ecb14b0b50c1ad0b8f19bb69353152389d646477 Author: Nicolas Delon Date: Mon Feb 28 10:25:17 2005 +0000 save last error message (if any) when doing a rollback so that we can retrieve the error message that triggered the rollback even if the sql backend clear the error buffer while doing the rollback query src/preludedb-sql.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) commit f56dd271e3cb6210e4ef8fcd8a642db958852b82 Author: Nicolas Delon Date: Fri Feb 25 10:07:20 2005 +0000 improve tables indexes plugins/format/classic/mysql.sql | 38 ++++++++++++++++++++------------------ plugins/format/classic/pgsql.sql | 29 +++++++++++++++-------------- 2 files changed, 35 insertions(+), 32 deletions(-) commit 1a627e596efa00a9868b8ad96432b3c1b5fc90f4 Author: Nicolas Delon Date: Thu Feb 24 11:14:58 2005 +0000 support for alert.analyzer.analyzer.* paths plugins/format/classic/schema.txt | 35 ++++++++++++++++++++++++++++++----- 1 files changed, 30 insertions(+), 5 deletions(-) commit 553ff5e048ca3355dd4227214fac9ddddd2c096e Author: Nicolas Delon Date: Tue Feb 22 16:50:46 2005 +0000 bug fix: gmt offset are signed integers NOT unsigned plugins/format/classic/classic.c | 4 ++-- plugins/format/classic/idmef-db-get.c | 4 ++-- plugins/format/classic/mysql.sql | 14 +++++++------- src/include/preludedb-sql.h | 2 +- src/preludedb-sql.c | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) commit b86d65163c7b0b1865f16a7c17ff605304f6a919 Author: Nicolas Delon Date: Tue Feb 22 16:27:11 2005 +0000 don't generate proxy classes, we don't need them bindings/Makefile.am | 2 +- bindings/python/preludedb.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) commit 61318b73371bccb17a2f47689a8f656c08c6d48a Author: Nicolas Delon Date: Tue Feb 22 15:39:18 2005 +0000 code cleanup: rewrite schema.txt parser plugins/format/classic/db-path.c | 334 ++++++++++++-------------------------- 1 files changed, 104 insertions(+), 230 deletions(-) commit cd403569d0f488a6783a126adc5610db3a61bef2 Author: Nicolas Delon Date: Tue Feb 22 15:27:32 2005 +0000 bug fix for idmef_time field retrieval plugins/format/classic/classic.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) commit 638461236990833f9c6e1e834a29967770d65e75 Author: Nicolas Delon Date: Tue Feb 22 15:09:46 2005 +0000 bug fix, forgot to increment Py_None, it led to a python exception when its refcount reach 0 bindings/libpreludedb.i | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 6c00223bb89801c668f04889ee6a7ad248244b41 Author: Nicolas Delon Date: Wed Feb 16 18:09:13 2005 +0000 bug fix src/preludedb-sql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a39c3dfc21d22ab47f74aa91ffef8329ee1a7ca9 Author: Nicolas Delon Date: Wed Feb 16 17:07:01 2005 +0000 for get_values replace right join by left join, it fix some applications problems when dealing with NULL field plugins/format/classic/idmef-db-select.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) commit d49f017a869e1e918cd4bd5dd903889d87c5e147 Author: Nicolas Delon Date: Wed Feb 16 14:37:18 2005 +0000 bug fix, forgot a whitespace plugins/format/classic/idmef-db-select.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ef468bbfc6d8b333df485e88eee012d057298c45 Author: Yoann Vandoorselaere Date: Wed Feb 16 03:51:33 2005 +0000 Fix mysql/pgsql detection when MYSQL_CONFIG / PG_CONFIG are set. configure.in | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 293ec384059171d057620c4407532d5e0e34fa21 Author: Yoann Vandoorselaere Date: Wed Feb 16 02:31:26 2005 +0000 Fix API doc generation. Remove debugging stuff. src/include/preludedb.h | 2 +- src/preludedb-sql-settings.c | 15 +++++++-------- src/preludedb-sql.c | 8 +++++--- src/preludedb.c | 14 +++++++++----- 4 files changed, 22 insertions(+), 17 deletions(-) commit 5773fecf009c5709a8cc6f6f81c0a6bfa646d414 Author: Yoann Vandoorselaere Date: Wed Feb 16 01:52:55 2005 +0000 Remove deprecated definition. plugins/format/classic/idmef-db-select.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit bcc13bc356733b91e700fa625c4fd70de3e2385e Author: Yoann Vandoorselaere Date: Wed Feb 16 01:51:21 2005 +0000 remove deprecated idmef-util.h header inclusion; plugins/format/classic/idmef-db-insert.c | 1 - plugins/format/classic/idmef-db-select.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) commit 28c8046901d8cbd9ae4b59c1e4143b1af81daf0a Author: Yoann Vandoorselaere Date: Wed Feb 16 01:50:11 2005 +0000 remove deprecated idmef-util.h header file inclusion. src/preludedb-sql.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit fb98b5a04c340a8df9d3abe2cc637abb5fc0761d Author: Yoann Vandoorselaere Date: Wed Feb 16 01:37:04 2005 +0000 r7589@arwen (orig r5134): yoann | 2005-02-16 02:36:18 +0100 Fit libprelude API change. plugins/format/classic/classic.c | 48 ++++++++-------- plugins/sql/mysql/mysql.c | 59 ++++++++++---------- plugins/sql/pgsql/pgsql.c | 111 ++++++++++++++++++-------------------- src/preludedb-sql.c | 4 +- src/preludedb.c | 6 ++- 5 files changed, 114 insertions(+), 114 deletions(-) commit e6574ae402fbddc76b119bfcaace5765a48e2ff6 Author: Yoann Vandoorselaere Date: Mon Feb 14 19:15:48 2005 +0000 Merge back pre-0-9-api-cleanup into trunk. INSTALL | 52 +- bindings/Makefile.am | 4 +- bindings/libpreludedb.i | 177 ++++++- bindings/python/preludedb.py | 182 ------- m4/libpreludedb.m4 | 14 +- plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic.c | 54 +- plugins/format/classic/db-object.c | 590 --------------------- plugins/format/classic/db-path.c | 608 ++++++++++++++++++++++ plugins/format/classic/idmef-db-get.c | 403 +++++++-------- plugins/format/classic/idmef-db-insert.c | 17 +- plugins/format/classic/idmef-db-select.c | 537 ++++++++++---------- plugins/format/classic/include/Makefile.am | 2 +- plugins/format/classic/include/db-object.h | 54 -- plugins/format/classic/include/db-path.h | 54 ++ plugins/format/classic/include/idmef-db-select.h | 2 +- plugins/sql/mysql/mysql.c | 26 +- plugins/sql/pgsql/pgsql.c | 17 +- src/Makefile.am | 2 +- src/include/Makefile.am | 2 +- src/include/preludedb-error.h | 4 +- src/include/preludedb-object-selection.h | 58 -- src/include/preludedb-path-selection.h | 59 +++ src/include/preludedb-plugin-format.h | 4 +- src/include/preludedb-plugin-sql.h | 2 +- src/include/preludedb-sql-settings.h | 4 +- src/include/preludedb.h | 35 +- src/preludedb-error.c | 4 +- src/preludedb-object-selection.c | 286 ---------- src/preludedb-path-selection.c | 277 ++++++++++ src/preludedb-sql-settings.c | 40 +- src/preludedb-sql.c | 50 +- src/preludedb.c | 312 +++++++----- 33 files changed, 1980 insertions(+), 1954 deletions(-) commit f43f06d33b6064c1541e780e4c64485c6a637f8d Author: Nicolas Delon Date: Thu Feb 10 14:32:19 2005 +0000 remove outdated copyrights src/include/preludedb-plugin-format.h | 1 - src/include/preludedb-plugin-sql.h | 1 - src/include/preludedb-sql.h | 1 - src/include/preludedb.h | 1 - src/preludedb-sql.c | 1 - src/preludedb.c | 1 - 6 files changed, 0 insertions(+), 6 deletions(-) commit 7bda76c921b3dd2b91e8abf9cf79ad154cb0533a Author: Nicolas Delon Date: Sat Feb 5 03:48:47 2005 +0000 bug fix: check value before attempting to destroy it bindings/python/preludedb.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 6c3a61771ff7b567582a282c4f8bea2941b2e37e Author: Nicolas Delon Date: Sat Feb 5 03:03:59 2005 +0000 backport bug fix [5004] from pre-0-9-api-cleanup branch plugins/format/classic/classic.c | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) commit b2eacb341e58d6937d9a25cad82cb7a058a1b358 Author: Nicolas Delon Date: Sat Feb 5 03:02:51 2005 +0000 check if the function returns no result src/preludedb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1b9a825b08a5850ca3d052bb240f76dc38125af0 Author: Nicolas Delon Date: Mon Jan 24 00:09:07 2005 +0000 bug fix, rename indexes to avoid conflicting names plugins/format/classic/pgsql.sql | 46 +++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 23 deletions(-) commit d75d672e344e5eaab7ee86c9d8f82ba49681e959 Author: Nicolas Delon Date: Sun Jan 23 11:43:33 2005 +0000 update the list of APIs to bind bindings/Makefile.am | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 089feb6b6850378148782dda3cd765eb9f0c0a4e Author: Nicolas Delon Date: Sun Jan 23 01:36:32 2005 +0000 * src/include/preludedb-error.h: * src/preludedb-error.c: * src/preludedb.c: * plugins/sql/mysql/mysql.c: * plugins/sql/pgsql/pgsql.c: drop the two PRELUDEDB_ERROR_CANNOT_CONNECT and PRELUDEDB_ERROR_DISCONNECTED error codes and replace them by a single error code PRELUDEDB_ERROR_CONNECTION that is more generic * src/preludedb-sql.c: * src/preludedb.c: * src/include/preludedb.h: * src/include/preludedb-sql.h rework connection system, connection (and reconnection in case where disconnection happen) is now done automatically and transparently done in preludedb-sql layer. bug fixes bindings/python/preludedb.py | 9 ----- plugins/sql/mysql/mysql.c | 2 +- plugins/sql/pgsql/pgsql.c | 2 +- src/include/preludedb-error.h | 27 +++++++-------- src/include/preludedb-sql.h | 3 -- src/include/preludedb.h | 5 --- src/preludedb-error.c | 3 +- src/preludedb-sql.c | 72 ++++++++++++++++------------------------- src/preludedb.c | 27 --------------- 9 files changed, 44 insertions(+), 106 deletions(-) commit 0f834e92ca08252a0b24679e92dbc5dd5a23f659 Author: Nicolas Delon Date: Sat Jan 22 22:43:05 2005 +0000 document part of the preludedb main API src/preludedb.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 82 insertions(+), 6 deletions(-) commit 21bc208a61660d496dc1d5ecd5b4933d0cb98af9 Author: Nicolas Delon Date: Sat Jan 22 18:56:40 2005 +0000 fix documentation errors for functions that can return three types of value (1 for results, 0 for no results or a negative value for errors) src/preludedb-sql.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) commit cab0c6240f090e7fb9d866ff879c0443f6c90605 Author: Nicolas Delon Date: Sat Jan 22 17:25:20 2005 +0000 import gtk-doc documentation system from libprelude Makefile.am | 2 +- configure.in | 42 +++++++++++ docs/Makefile.am | 1 + docs/api/Makefile.am | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 238 insertions(+), 1 deletions(-) commit 3bbfaa74f6a090de77998126af50afd242d0395b Author: Nicolas Delon Date: Fri Jan 21 15:17:29 2005 +0000 in preludedb_new, let the caller create his sql object, it allows him to have more control on it and ease error handling update python bindings accordingly bindings/libpreludedb.i | 12 ++++++++++++ bindings/python/preludedb.py | 20 ++++++++++++++------ src/include/preludedb.h | 3 +-- src/preludedb.c | 28 ++-------------------------- 4 files changed, 29 insertions(+), 34 deletions(-) commit d6e61956abaecd4f0e9f2bd1cdf669fa6bed00f5 Author: Nicolas Delon Date: Thu Jan 20 19:44:39 2005 +0000 merge the libpreludedb-api-rework back into trunk README | 66 - bindings/Makefile.am | 6 +- bindings/libpreludedb.i | 126 +- bindings/python/preludedb.py | 527 +---- configure.in | 2 +- plugins/filters/Makefile.am | 5 - plugins/filters/skeleton/Makefile.am | 6 - plugins/filters/skeleton/skeleton.c | 163 -- plugins/format/classic/classic.c | 467 ++--- plugins/format/classic/db-object.c | 198 ++- plugins/format/classic/idmef-db-delete.c | 192 +- plugins/format/classic/idmef-db-get.c | 2417 ++++++++++------------ plugins/format/classic/idmef-db-insert.c | 1069 +++++----- plugins/format/classic/idmef-db-select.c | 304 ++- plugins/format/classic/include/idmef-db-delete.h | 4 +- plugins/format/classic/include/idmef-db-get.h | 10 +- plugins/format/classic/include/idmef-db-insert.h | 2 +- plugins/format/classic/include/idmef-db-select.h | 19 +- plugins/format/classic/mysql.sql | 15 +- plugins/format/classic/pgsql.sql | 772 ++++--- plugins/format/classic/schema.txt | 2 +- plugins/format/new/idmef-db-output.c | 401 ---- plugins/sql/mysql/mysql.c | 639 ++----- plugins/sql/pgsql/pgsql.c | 601 ++---- src/Makefile.am | 19 +- src/db-connection-data.c | 92 - src/db-connection.c | 97 - src/db-interface-string.c | 137 -- src/db-interface.c | 546 ----- src/db-message-cache.c | 310 --- src/db-message-ident.c | 72 - src/db-object-selection.c | 270 --- src/db.c | 107 - src/format-plugins.c | 81 - src/include/Makefile.am | 32 +- src/include/db-connection-data.h | 40 - src/include/db-connection.h | 40 - src/include/db-interface-string.h | 29 - src/include/db-interface.h | 103 - src/include/db-message-cache.h | 37 - src/include/db-message-ident.h | 36 - src/include/db-object-selection.h | 54 - src/include/db-type.h | 34 - src/include/db.h.in | 33 - src/include/param-string.h | 32 - src/include/plugin-filter.h | 88 - src/include/plugin-format.h | 120 -- src/include/plugin-sql.h | 164 -- src/include/preludedb-error.h | 73 + src/include/preludedb-object-selection.h | 58 + src/include/preludedb-plugin-format.h | 99 + src/include/preludedb-plugin-sql.h | 97 + src/include/preludedb-sql-settings.h | 62 + src/include/preludedb-sql.h | 120 ++ src/include/preludedb-version.h.in | 31 + src/include/preludedb.h | 87 + src/include/sql-connection-data.h | 60 - src/include/sql.h | 123 -- src/param-string.c | 221 -- src/preludedb-error.c | 60 + src/preludedb-object-selection.c | 286 +++ src/preludedb-sql-settings.c | 238 +++ src/preludedb-sql.c | 1535 ++++++++++++++ src/preludedb-version.c | 56 + src/preludedb.c | 422 ++++ src/sql-connection-data.c | 202 -- src/sql-plugins.c | 75 - src/sql.c | 1335 ------------ 68 files changed, 6404 insertions(+), 9422 deletions(-) commit 8e47bb8d464dd9f6035c6f025e4448f190edef0d Author: Yoann Vandoorselaere Date: Fri Dec 31 16:35:59 2004 +0000 Update. m4/libtool.m4 | 471 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 276 insertions(+), 195 deletions(-) commit fa076da84e42168996439bc5a2aa7f236ea6fa5e Author: Nicolas Delon Date: Thu Dec 30 22:54:32 2004 +0000 fit last libprelude API changes plugins/format/classic/idmef-db-insert.c | 18 ++++++++++-- src/sql.c | 42 ++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 11 deletions(-) commit 8afba82359a27acc9adf34742c705b8009aa2a49 Author: Rob Holand Date: Thu Dec 23 11:31:02 2004 +0000 don't try and clean perl stuff up if we did --disable-perl bindings/Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 7f08193562d9f3bc7d6d8c34bce9513f344ab0c8 Author: Nicolas Delon Date: Mon Dec 20 02:39:42 2004 +0000 rename byte in byte-string in mysql.sql to conform last IDMEF changes make the sql layer handle the length of a field, that fix a bug happening when binary data contains a NULL byte. plugins/format/classic/idmef-db-get.c | 4 +- plugins/format/classic/mysql.sql | 2 +- plugins/sql/mysql/mysql.c | 49 +++++++++++++++++++++------------ plugins/sql/pgsql/pgsql.c | 33 ++++++++-------------- src/include/plugin-sql.h | 11 +++----- src/include/sql.h | 1 + src/sql.c | 39 +++++++++++++++++--------- 7 files changed, 76 insertions(+), 63 deletions(-) commit e68268bca67c471378aef6b4987bf824eb574341 Author: Nicolas Delon Date: Sun Dec 19 16:44:51 2004 +0000 bug fix: classification is not mandatory plugins/format/classic/idmef-db-insert.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit c742e1c6fae36db21e09f70ebd7fb1310272b180 Author: Nicolas Delon Date: Fri Dec 17 06:11:20 2004 +0000 fit additional data API changes plugins/format/classic/idmef-db-get.c | 131 ++++++++++++++++++++++-------- plugins/format/classic/idmef-db-insert.c | 77 ++++++++++-------- 2 files changed, 139 insertions(+), 69 deletions(-) commit 25c2d1c9c6ed2ecd19a3f0f5e1c52eaffd639987 Author: Yoann Vandoorselaere Date: Fri Dec 17 02:23:05 2004 +0000 Fit prelude-msgbuf API change. src/db-message-cache.c | 28 ++++++++++------------------ 1 files changed, 10 insertions(+), 18 deletions(-) commit 4fe674c58588e29c78315a4d9c67d825709a6f90 Author: Nicolas Delon Date: Sat Dec 11 02:57:02 2004 +0000 fix memory leak plugins/format/classic/idmef-db-insert.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 9fdd7415cee6f7d3e0b8ac4023968a29a0e65afc Author: Nicolas Delon Date: Thu Dec 9 14:05:27 2004 +0000 fix bad sql table field name plugins/format/classic/idmef-db-get.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7e8c1849f1a306babefde0d4f0bbe5a7f2684325 Author: Nicolas Delon Date: Wed Dec 8 18:54:14 2004 +0000 port delete code to the last schema changes INSTALL | 2 +- plugins/format/classic/idmef-db-delete.c | 91 +++++++++++++++--------------- 2 files changed, 47 insertions(+), 46 deletions(-) commit 76a85662e462114d5d8c7ec5a19013ab62acdfc9 Author: Nicolas Delon Date: Wed Dec 8 11:03:22 2004 +0000 handle missing field file.ident, file.fstype and file.checksum.* plugins/format/classic/idmef-db-get.c | 87 +++++++++++++++++++++++++++++---- 1 files changed, 77 insertions(+), 10 deletions(-) commit 421dfc3010f7630055cb8d369b81c204c5cc2cb7 Author: Nicolas Delon Date: Sun Dec 5 17:47:26 2004 +0000 support for name field in idmef_analyzer plugins/format/classic/idmef-db-get.c | 17 ++++++++++------- plugins/format/classic/idmef-db-insert.c | 16 +++++++++++----- plugins/format/classic/mysql.sql | 1 + plugins/format/classic/schema.txt | 2 ++ 4 files changed, 24 insertions(+), 12 deletions(-) commit b5965cb220bfec0c7717b781c72e0dd3adc2ab6f Author: Yoann Vandoorselaere Date: Sun Dec 5 12:53:02 2004 +0000 Use idmef_message_read() instead of calling idmef_alert_read() / idmef_heartbeat_read() manually. src/db-message-cache.c | 73 +++++++---------------------------------------- 1 files changed, 11 insertions(+), 62 deletions(-) commit 62c17fe6ebdedaf7d5b01ef2462f756e2fa43784 Author: Yoann Vandoorselaere Date: Sun Dec 5 11:57:11 2004 +0000 Remove deprecated header inclusion. Kill some warnings. plugins/format/classic/idmef-db-delete.c | 1 - plugins/format/classic/idmef-db-get.c | 1 - plugins/format/classic/idmef-db-insert.c | 7 ++----- plugins/format/classic/idmef-db-select.c | 6 +++--- plugins/sql/pgsql/pgsql.c | 1 - src/db.c | 2 -- src/sql.c | 4 ++-- 7 files changed, 7 insertions(+), 15 deletions(-) commit e86510cd40eee8fd929b849196aaaf7e8089cba5 Author: Nicolas Delon Date: Sat Dec 4 16:46:38 2004 +0000 handle usec and gmtoff fields for idmef_time retrieved in get_values, these two fields are not supported when idmef_time is retrieved in a function like "max" plugins/format/classic/classic.c | 23 +++++- plugins/format/classic/db-object.c | 28 ++++++- plugins/format/classic/idmef-db-select.c | 122 ++++++++++++++-------------- plugins/format/classic/include/db-object.h | 4 + plugins/format/classic/schema.txt | 14 ++-- 5 files changed, 119 insertions(+), 72 deletions(-) commit e0a3d13df80fb87891be669465309b1a463cc749 Author: Yoann Vandoorselaere Date: Fri Dec 3 18:27:15 2004 +0000 Fit latest libprelude API change. INSTALL | 2 +- plugins/format/classic/classic.c | 3 --- plugins/format/classic/idmef-db-insert.c | 3 --- plugins/sql/pgsql/pgsql.c | 4 ---- src/db-message-cache.c | 2 +- src/db.c | 2 -- src/include/plugin-format.h | 4 +--- src/include/plugin-sql.h | 3 --- src/sql-plugins.c | 5 ----- 9 files changed, 3 insertions(+), 25 deletions(-) commit 5ecfa01eb20a5052a95ceeb876b880d9fdd28908 Author: Yoann Vandoorselaere Date: Thu Dec 2 18:12:09 2004 +0000 Merge idmef-v12-work change back in trunk. plugins/format/classic/classic.c | 90 ++- plugins/format/classic/idmef-db-get.c | 872 +++++++++++----------- plugins/format/classic/idmef-db-insert.c | 1201 +++++++++++++++++------------ plugins/format/classic/idmef-db-select.c | 51 +- plugins/format/classic/mysql.sql | 668 +++++++++-------- plugins/format/classic/schema.txt | 354 +++++---- src/db-message-cache.c | 4 +- src/include/sql.h | 7 + src/sql.c | 99 +++- 9 files changed, 1905 insertions(+), 1441 deletions(-) commit bbae36427599859ba2a7e5c6935433caa795dc9f Author: Yoann Vandoorselaere Date: Sun Nov 21 04:32:03 2004 +0000 Link to libpreludedb, so we don't end up with undefined reference.. plugins/sql/mysql/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9bfea90732f0f9340f1eaf1f8820e4425a9ae942 Author: Nicolas Delon Date: Tue Nov 9 16:15:26 2004 +0000 use full path of perl and python found by AC_PATH_PROG configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit a5e231e39e685b65654cfb172f6832d643e9120a Author: Nicolas Delon Date: Tue Nov 9 16:04:01 2004 +0000 restore perl and python detection code that have been removed by a bad guy (me) configure.in | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit fcc04fa6707951ac5a7d81d7be5e87a2dec0f807 Author: Nicolas Delon Date: Tue Nov 9 13:01:30 2004 +0000 make the compilation of the generated .c files depending on the wrapped .h files bindings/Makefile.am | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 55fbf76b1cd6de4b7f870153af9cd28e78d45c60 Author: Yoann Vandoorselaere Date: Tue Nov 9 02:27:20 2004 +0000 Use prelude-string instead of idmef-string. plugins/format/classic/idmef-db-get.c | 16 ++-- plugins/format/classic/idmef-db-insert.c | 12 +- plugins/format/classic/idmef-db-select.c | 199 ++++++++++++++++-------------- plugins/format/new/idmef-db-output.c | 2 +- plugins/sql/mysql/mysql.c | 20 ++-- plugins/sql/pgsql/pgsql.c | 18 ++-- src/include/plugin-sql.h | 2 +- src/include/sql.h | 7 +- src/sql.c | 48 ++++---- 9 files changed, 168 insertions(+), 156 deletions(-) commit 89ae5c4be5be32cf5450a201b556171fff8e2c06 Author: Yoann Vandoorselaere Date: Mon Nov 1 16:22:19 2004 +0000 Update for idmef message read/write api change. src/db-message-cache.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit aaf6a0ecd0a8f2b3fcf4f20df065aa55059fcd1c Author: Yoann Vandoorselaere Date: Mon Nov 1 14:50:46 2004 +0000 Fit IDMEF message read API change. src/db-message-cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e67895410208b4028d0963e45528b301c7d26f36 Author: Nicolas Delon Date: Thu Oct 28 15:00:03 2004 +0000 bug fix: group by idents while fetching message ident list, this avoid possible ident duplication INSTALL | 2 +- plugins/format/classic/classic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 62f4e59908e3f57e740698b2e3d363e395692aa3 Author: Yoann Vandoorselaere Date: Thu Oct 21 13:25:59 2004 +0000 Disable dlpreopening for plugins since it give a redondant dependencie problem... Will try to find a workaround later. Makefile.am | 2 +- src/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 802f8ec82e2c3e788af63739c6257fb97e245480 Author: Yoann Vandoorselaere Date: Wed Oct 20 19:29:16 2004 +0000 Use libpreludedb.la in order to link classic with libpreludedb. plugins/format/classic/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dac3981b2d54d67aec06e216f6053b9f8dd01437 Author: Nicolas Delon Date: Wed Oct 20 19:10:03 2004 +0000 fix bad library path plugins/format/classic/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3addc2c5bf0f2b54f54dfc1c90823899493422e1 Author: Nicolas Delon Date: Tue Oct 19 22:48:19 2004 +0000 bug fix: a blank space was missing plugins/format/classic/classic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6cf6e065e27e93475718b812dc97d0348fdbf699 Author: Yoann Vandoorselaere Date: Tue Oct 19 13:39:33 2004 +0000 Use @LIBPRELUDE_CFLAGS@ bindings/perl/Makefile.PL.in | 2 +- bindings/python/setup.py.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 08b65ec862dd43d68c6669e8121c0fe6c3937c9a Author: Yoann Vandoorselaere Date: Tue Oct 19 00:43:02 2004 +0000 src/include/db.h | 33 --------------------------------- 1 files changed, 0 insertions(+), 33 deletions(-) commit 62d4fbea543677623ee7e30e83137745ce6fc08b Author: Yoann Vandoorselaere Date: Tue Oct 19 00:13:10 2004 +0000 Add missing header file. src/include/db.h | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) commit df9a9f5e5bf56649e02156db7b40502127fee2fa Author: Yoann Vandoorselaere Date: Tue Oct 19 00:11:53 2004 +0000 Remove swig generated source code. bindings/perl/PreludeDB.c | 3674 ------------------------------------------ bindings/python/_preludedb.c | 2491 ---------------------------- 2 files changed, 0 insertions(+), 6165 deletions(-) commit 293a86b0ae9dd050f00ba029f2089bd24d223e93 Author: Yoann Vandoorselaere Date: Tue Oct 19 00:10:23 2004 +0000 Revert previous commit enabling -export-dynamic, and link the classic format plugin to libprelude and libpreludedb. plugins/format/classic/Makefile.am | 5 +++-- src/Makefile.am | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 884d967aeab87348f98e4245ef10ab42b6a631f6 Author: Yoann Vandoorselaere Date: Tue Oct 19 00:01:58 2004 +0000 Add missing space. bindings/python/setup.py.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 44bfe0821d66285b6b3c416f6d987bbcffa715c8 Author: Yoann Vandoorselaere Date: Mon Oct 18 23:57:14 2004 +0000 Update to more recent swig, python and perl detection scheme. configure.in | 67 +++++++++++++++++---------------------------------------- 1 files changed, 20 insertions(+), 47 deletions(-) commit adba552dd85301fa65050f52d338c4530f657191 Author: Yoann Vandoorselaere Date: Mon Oct 18 23:56:39 2004 +0000 Port the bindings build system work done in libprelude to libpreludedb, so that bindings compile and install correctly. bindings/Makefile.am | 75 +++++++++++++++++++++++++++++++++++++- bindings/perl/Makefile.PL.in | 45 +++++++++++++++++++++++ bindings/perl/Makefile.am | 27 -------------- bindings/python/Makefile.am | 26 ------------- bindings/python/setup.py.in | 82 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 201 insertions(+), 54 deletions(-) commit ee4fdaeddef4453ed9f9b1a6b51987fd6ffbc9b4 Author: Yoann Vandoorselaere Date: Mon Oct 18 23:55:00 2004 +0000 Add mysql.sql, pgsql.sql, schema.txt to EXTRA_DIST, and create the uninstall-local target to remove them to fix make distcheck. plugins/format/classic/Makefile.am | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 8c0e38a3dd2bd78fa5d582e7acfb1fb3495a62fc Author: Yoann Vandoorselaere Date: Mon Oct 18 23:49:40 2004 +0000 Fix unresolved symbols. Untabify. plugins/format/classic/idmef-db-insert.c | 635 +++++++++++++++--------------- 1 files changed, 318 insertions(+), 317 deletions(-) commit abd19e0c0d88b2672fa4f5c918b305e6c0312f1e Author: Yoann Vandoorselaere Date: Mon Oct 18 23:23:36 2004 +0000 Add missing libtool.m4 m4/libtool.m4 | 6027 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 6027 insertions(+), 0 deletions(-) commit 554b962f2aa2d55abe29c2d9f9132719951efdc2 Author: Yoann Vandoorselaere Date: Mon Oct 18 23:21:09 2004 +0000 Fix link ordering. bindings/perl/Makefile.am | 2 +- bindings/python/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 85d12390e746123e26c5710adba2a25b1ed91aa2 Author: Yoann Vandoorselaere Date: Mon Oct 18 21:38:14 2004 +0000 Re activate -export-dynamic, which is needed for libpreludedb plugin. src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f7d4077cae41b3ee1de80f01f3349f07f6f78ffc Author: Yoann Vandoorselaere Date: Mon Oct 18 19:39:12 2004 +0000 Include missing stdio.h. src/db-connection.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f3c9cbac33309fe77abc0813ac47305008317e5a Author: Yoann Vandoorselaere Date: Sat Oct 16 13:25:00 2004 +0000 Slight variable substitution fix. configure.in | 6 ++++-- libpreludedb-config.in | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit 9a32f439032c75ad3c0b60994331b1194d8b87e7 Author: Yoann Vandoorselaere Date: Thu Oct 14 12:09:58 2004 +0000 Quote version string. src/include/db.h.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9d6d2153e22960897fcc01861fd2cd40deeed238 Author: Yoann Vandoorselaere Date: Thu Oct 14 11:46:25 2004 +0000 Commit missing file. plugins/format/classic/include/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 84ef1cf7a8739ccaec4f226eedd795c97ad4ef17 Author: Yoann Vandoorselaere Date: Thu Oct 14 11:35:21 2004 +0000 Generate db.h from db.h.in, and substitute LIBPRELUDEDB_VERSION with the version number provided to automake. This fix a configure error with SVN snapshots where the headers LIBPRELUDEDB_VERSION version was different from the autoconf provided version. Thanks to Jochen Schlick for pointing the problem. configure.in | 1 + src/include/Makefile.am | 3 ++- src/include/db.h | 33 --------------------------------- src/include/db.h.in | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 34 deletions(-) commit e2115c0581d84ce9e35d2cd28778313a58b38215 Author: Yoann Vandoorselaere Date: Mon Oct 11 00:07:35 2004 +0000 Several build fix. Fixed libpreludedb-config so that static linking work. Provide libpreludedb.m4 INSTALL | 131 +++++++++++++++++-------- Makefile.am | 3 +- acinclude.m4 | 149 ----------------------------- autogen.sh | 9 +- configure.in | 29 +++--- libpreludedb-config.in | 8 +- m4/Makefile.am | 2 + m4/ax_cflags_gcc_option.m4 | 183 ++++++++++++++++++++++++++++++++++++ m4/libprelude.m4 | 168 +++++++++++++++++++++++++++++++++ m4/libpreludedb.m4 | 168 +++++++++++++++++++++++++++++++++ plugins/Makefile.am | 2 +- plugins/format/classic/Makefile.am | 4 +- plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/pgsql/Makefile.am | 2 +- src/Makefile.am | 4 +- src/db.c | 30 ++++++ src/format-plugins.c | 2 +- src/include/db.h | 3 + src/sql-plugins.c | 1 - src/sql.c | 1 - 20 files changed, 678 insertions(+), 223 deletions(-) commit 6b7bfc4179404e36bf556c2d5f96ebb230ce36f9 Author: Yoann Vandoorselaere Date: Mon Sep 20 16:01:14 2004 +0000 Fix format string when printing 64 bits integer on 64 bit system. bindings/libpreludedb.i | 4 +- bindings/perl/PreludeDB.c | 1228 +++++++++++++++++++++++---------------------- 2 files changed, 633 insertions(+), 599 deletions(-) commit 93cb049a92b6e299ac251703be8733a4833829dc Author: Yoann Vandoorselaere Date: Mon Sep 20 15:56:52 2004 +0000 Fix format string when printing 64 bits integer on 64 bit system. plugins/format/classic/classic.c | 2 +- plugins/format/classic/idmef-db-delete.c | 92 +++++++++++++++--------------- plugins/format/classic/idmef-db-get.c | 74 ++++++++++++------------ plugins/format/classic/idmef-db-insert.c | 69 +++++++++++----------- src/db-message-cache.c | 2 +- src/sql.c | 4 +- 6 files changed, 122 insertions(+), 121 deletions(-) commit ac5e6a1f4c27a78729428f8990afa3444be1fc73 Author: Yoann Vandoorselaere Date: Mon Sep 20 11:45:45 2004 +0000 Remove invalid dependency. plugins/format/classic/Makefile.am | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 197e9e281f0b959b3faf6b9b4ad0410ba3378d07 Author: Yoann Vandoorselaere Date: Sun Sep 19 16:44:38 2004 +0000 dlpreopening support. Makefile.am | 2 +- plugins/format/classic/classic.c | 6 +++++- plugins/sql/mysql/mysql.c | 5 ++++- plugins/sql/pgsql/pgsql.c | 3 ++- src/Makefile.am | 11 +++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) commit 0318067bbaf707f31a90dc75a7af53ebc044a425 Author: Nicolas Delon Date: Fri Jul 23 15:09:48 2004 +0000 raise an exception when an {alert,heartbeat}/{delete,get} fail bindings/python/preludedb.py | 42 +++++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 11 deletions(-) commit aa4742372f389622d7a9a0234aeb2352a448ef83 Author: Yoann Vandoorselaere Date: Fri Jul 16 10:10:47 2004 +0000 Fix leak on error in prelude_db_interface_new(). src/db-interface.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) commit 96000f180b88750b45903e6450b794645c4c71b4 Author: Yoann Vandoorselaere Date: Tue Jul 13 22:17:49 2004 +0000 Fix a leak on connection error. src/sql.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 7ef6f891b3065249922ba791e49e9fdbd9b94bd5 Author: Yoann Vandoorselaere Date: Tue Jun 29 13:25:36 2004 +0000 * plugins/sql/mysql/mysql.c: include instead of , as we already have the mysql include directory in the include path. plugins/sql/mysql/mysql.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) commit 3576343b40ed3b42f4e7d96f6d0da9f42c75579d Author: Yoann Vandoorselaere Date: Fri Jun 25 09:33:12 2004 +0000 revert SQL schema modification. They didn't meant to be commited plugins/format/classic/mysql.sql | 3 --- plugins/format/classic/pgsql.sql | 3 --- 2 files changed, 0 insertions(+), 6 deletions(-) commit 5629245d3f679c2c8119d97ba9828c54ef28066c Author: Yoann Vandoorselaere Date: Fri Jun 25 09:10:10 2004 +0000 Applied patch from Rodolphe Ortalo : Apparently, in order to build and install the latest libprelude an libpreludedb from a _separate_ build directory (as in: cd libprelude && mkdir build && cd build && ../configure && make) one needs to apply the following modifications to some Makefile.am: see attached patches. Note the distinction between $(top_srcdir), $(top_builddir), $(srcdir) and . [$(builddir) in fact] in automake. Makefile.am | 2 +- bindings/perl/Makefile.am | 4 ++-- bindings/python/Makefile.am | 4 ++-- plugins/format/classic/Makefile.am | 8 ++++---- plugins/format/classic/mysql.sql | 3 +++ plugins/format/classic/pgsql.sql | 3 +++ 6 files changed, 15 insertions(+), 9 deletions(-) commit aa6ba7f93f27b388a550dbd0f05c37801f6fd170 Author: Nicolas Delon Date: Tue Jun 22 14:40:47 2004 +0000 bug fix for heartbeat handling bindings/python/preludedb.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit eacb5ddaf5037a88cd61a7257cb4bbb0884ac125 Author: Yoann Vandoorselaere Date: Tue Jun 15 13:21:21 2004 +0000 * dev/prelude/svn/trunk/libpreludedb/plugins/format/classic/mysql.sql: use unique index on analyzerid+alert_ident to insure we don't insert the same things twice. * dev/prelude/svn/trunk/libpreludedb/plugins/format/classic/pgsql.sql (): ditto... Need to be tested. plugins/format/classic/mysql.sql | 3 ++- plugins/format/classic/pgsql.sql | 4 ++++ 2 files changed, 6 insertions(+), 1 deletions(-) commit 0506f03e267933518fdb1664671e288ad4d35958 Author: Nicolas Delon Date: Tue Jun 1 11:27:53 2004 +0000 * bindings/perl/PreludeDB.c: regenerate the bindings with swig 1.3.19 bindings/perl/PreludeDB.c | 1218 ++++++++++++++++++++++----------------------- 1 files changed, 592 insertions(+), 626 deletions(-) commit d98eb4d76f63aa6b4e28e41537c32b6a73f52018 Author: Yoann Vandoorselaere Date: Mon May 31 11:32:11 2004 +0000 * libpreludedb/configure.in (libprelude_db_cflags): expand prefix. configure.in | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) commit 2f02d4fab4d6f3b017f8aa7a94e0aa72c89e33cc Author: Nicolas Delon Date: Fri May 28 08:59:58 2004 +0000 * support for alerts/heartbeats identified by the unique analzerid/{alert,heartbeat}_ident pair plugins/format/classic/classic.c | 100 +++++++++++++++++++++- plugins/format/classic/idmef-db-delete.c | 43 +--------- plugins/format/classic/idmef-db-get.c | 58 ++----------- plugins/format/classic/idmef-db-insert.c | 80 ++++++++++++++++-- plugins/format/classic/include/idmef-db-delete.h | 6 +- plugins/format/classic/include/idmef-db-get.h | 2 + plugins/format/classic/mysql.sql | 12 ++- plugins/format/classic/schema.txt | 4 +- 8 files changed, 192 insertions(+), 113 deletions(-) commit 21cd4a14fc3594a743a80aa61b9bc7f4e433d891 Author: Nicolas Delon Date: Thu May 27 21:47:12 2004 +0000 * update perl binding to the underlying C API bindings/perl/PreludeDB.pm | 41 ++--------------------------------------- 1 files changed, 2 insertions(+), 39 deletions(-) commit 9da9218568045f11efebb9d7e086cf116fbc59f8 Author: Nicolas Delon Date: Thu May 27 21:41:51 2004 +0000 * fit last API changes of the underlying prelude_db_interface_get_{alert,heartbeat} C functions bindings/python/preludedb.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 065214b12ff42686f92aa55371928077e51a665d Author: Yoann Vandoorselaere Date: Mon May 24 17:40:27 2004 +0000 * libpreludedb/configure.in: generate prelude-db-create.sh. * libpreludedb/prelude-db-create.sh.in: move and rename from prelude-manager. Adapt to libpreludedb. * libpreludedb/Makefile.am: install prelude-db-create.sh. * libpreludedb/plugins/format/classic/Makefile.am (install-data-local): install SQL schema. Makefile.am | 2 +- configure.in | 4 +- plugins/format/classic/Makefile.am | 1 + prelude-db-create.sh.in | 413 ++++++++++++++++++++++++++++++++++++ 4 files changed, 418 insertions(+), 2 deletions(-) commit 8ad24eeca7211a910ee36555e8b9aee209fcc416 Author: Yoann Vandoorselaere Date: Sun May 23 18:06:03 2004 +0000 * libpreludedb/plugins/format/classic/pgsql.sql: Support 64 bits unsigned int idents. plugins/format/classic/pgsql.sql | 126 +++++++++++++++++++------------------- 1 files changed, 63 insertions(+), 63 deletions(-) commit e27b9f51c88a60e48ca2d321a259e3a8d7ce9496 Author: Yoann Vandoorselaere Date: Sun May 23 17:56:14 2004 +0000 port to new prelude-list.h API bindings/libpreludedb.i | 2 +- bindings/perl/PreludeDB.c | 2 +- bindings/python/_preludedb.c | 2 +- plugins/format/classic/db-object.c | 29 +++++++++-------- plugins/format/classic/idmef-db-insert.c | 1 - plugins/format/classic/idmef-db-select.c | 43 +++++++++++++------------ plugins/sql/mysql/mysql.c | 1 - plugins/sql/pgsql/pgsql.c | 1 - src/db-interface-string.c | 1 - src/db-interface.c | 6 +--- src/db-object-selection.c | 24 +++++++------- src/sql-plugins.c | 2 +- src/sql.c | 51 ++++++++++++++++------------- 13 files changed, 83 insertions(+), 82 deletions(-) commit 67f6d2c985ae7d37b2e9787c800c75e5ef2940ee Author: Yoann Vandoorselaere Date: Sun May 23 11:55:18 2004 +0000 * libpreludedb/plugins/format/classic/classic.c: remove a lot of obsolete code. * db-interface.c (prelude_db_interface_get_alert): (prelude_db_interface_get_heartbeat): remove obsoleted object_list parameter. * bindings: updated. bindings/perl/PreludeDB.c | 77 ++++++--------- bindings/python/_preludedb.c | 67 ++++++------- plugins/format/classic/classic.c | 200 +------------------------------------- src/db-interface.c | 10 +- src/include/db-interface.h | 6 +- src/include/plugin-format.h | 10 +- 6 files changed, 74 insertions(+), 296 deletions(-) commit eef52f9458159f1eac67ec26e986587607dc835f Author: Yoann Vandoorselaere Date: Sat May 22 22:53:47 2004 +0000 use BIGINT UNSIGNED for ident plugins/format/classic/mysql.sql | 126 +++++++++++++++++++------------------- 1 files changed, 63 insertions(+), 63 deletions(-) commit 6bc2c291155673f61b34abba69c5f762a20b48a1 Author: Yoann Vandoorselaere Date: Sat May 22 13:15:46 2004 +0000 Regenerated bindings bindings/perl/PreludeDB.c | 1316 ++++++++++++++++++++++-------------------- bindings/python/_preludedb.c | 372 +++++++----- 2 files changed, 916 insertions(+), 772 deletions(-) commit d9473488e6207683c58cfac064fbd8606b21a7e7 Author: Yoann Vandoorselaere Date: Sat May 22 13:15:29 2004 +0000 * libpreludedb/src/sql.c: fit latest API change. (build_criterion_fixed_sql_like_value): cleanup parser, fix a possible off by one. (prelude_sql_idmef_relation_to_string): new relation naming, use a loop to find the matching relation. * libpreludedb/plugins/format/classic/idmef-db-select.c remove old/unused code. (criteria_to_sql:) update to work with new idmef-criteria implementation. plugins/format/classic/classic.c | 12 +-- plugins/format/classic/idmef-db-select.c | 200 +++++------------------------- plugins/sql/mysql/mysql.c | 2 +- plugins/sql/pgsql/pgsql.c | 2 +- src/db-interface.c | 4 +- src/include/db-interface.h | 2 +- src/include/plugin-sql.h | 2 +- src/include/sql.h | 4 +- src/sql.c | 153 ++++++++++------------- 9 files changed, 107 insertions(+), 274 deletions(-) commit 6575838fb8da7bc3325cc51fd96cfd6a462473cb Author: Yoann Vandoorselaere Date: Sat May 22 09:05:00 2004 +0000 Merge pgsql plugins-instances port plugins/sql/pgsql/pgsql.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) commit d90ef6fb1816750d270a8f52852996d9cd5c3262 Author: Yoann Vandoorselaere Date: Fri May 21 17:59:13 2004 +0000 Merge back plugins-instances change into trunk plugins/format/classic/classic.c | 12 +-- plugins/format/classic/idmef-db-insert.c | 5 +- plugins/sql/mysql/mysql.c | 9 +- src/db-interface.c | 4 +- src/db.c | 21 +--- src/filter-plugins.c | 202 ------------------------------ src/format-plugins.c | 4 +- src/include/dispatch.h | 16 --- src/include/plugin-format.h | 10 ++- src/include/plugin-sql.h | 12 ++- src/sql-plugins.c | 10 +- src/sql.c | 4 +- 12 files changed, 39 insertions(+), 270 deletions(-) commit fdb0c2b7482dae836d87318c3c19c2a88696bde9 Author: Nicolas Delon Date: Sun May 16 12:11:18 2004 +0000 fix a compilation error in the case libpreludedb is compiled without Perl/Python support bindings/perl/Makefile.am | 4 +++- bindings/python/Makefile.am | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7a1bfddebf7bb870907e82090a734294b80c2571 Author: Nicolas Delon Date: Mon May 10 16:23:37 2004 +0000 bug fix (it could lead to a crash) bindings/python/preludedb.py | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) commit fc59cf776591ec0ec7cfb1ebb188995386c62997 Author: Nicolas Delon Date: Thu Apr 1 09:42:55 2004 +0000 * plugins/format/classic/mysql.sql: * plugins/format/classic/pgsql.sql: bug fix, the service_ident field was missing in table Prelude_WebService plugins/format/classic/mysql.sql | 1 + plugins/format/classic/pgsql.sql | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit 1ff4c2060d1345fda9512894dd4c46a32170a247 Author: Nicolas Delon Date: Mon Mar 29 19:53:53 2004 +0000 * bindings/python/preludedb.py: bug fix bindings/python/preludedb.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b7e41c4265d6f8590b21ec77b6f0b3a733493289 Author: Nicolas Delon Date: Wed Mar 24 22:28:42 2004 +0000 * libpreludedb/configure.in: fix wrong installation paths for libpreludedb (bindings were installed in libprelude path instead of libpreludedb) * libpreludedb/bindings/python/preludedb.py: * libpreludedb/bindings/perl/PreludeDB.pm: support of db message insertion for perl and python bindings bindings/perl/PreludeDB.pm | 8 ++++++++ bindings/python/preludedb.py | 5 +++++ configure.in | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) commit 75f44721f6258556f3de21b217a6a960dc235435 Author: Yoann Vandoorselaere Date: Sat Mar 6 20:46:32 2004 +0000 * dev/prelude/svn/trunk/libpreludedb/plugins/format/classic/idmef-db-get.c (get_target): use idmef_target_decoy_to_numeric(). (get_source): use idmef_source_spoofed_to_numeric(). * dev/prelude/svn/trunk/libpreludedb/plugins/format/classic/idmef-db-insert.c (insert_target): use idmef_target_decoy_to_string(). (insert_source): use idmef_source_spoofed_to_string(). plugins/format/classic/idmef-db-get.c | 4 ++-- plugins/format/classic/idmef-db-insert.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3fc11d48086afe63900d6a320278cd4652316242 Author: Yoann Vandoorselaere Date: Fri Mar 5 19:11:16 2004 +0000 * db-message-cache.c (msg_to_heartbeat): idmef_recv_heartbeat() -> idmef_read_heartbeat(). (msg_to_alert): idmef_recv_alert() -> idmef_read_alert(). (write_message_to_cache): idmef_send_message() -> idmef_write_message(). src/db-message-cache.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 5124e6c78ebc990d04103916990fe5ad45c3922e Author: Yoann Vandoorselaere Date: Fri Mar 5 19:06:25 2004 +0000 Fit libprelude IDMEF API change. plugins/format/classic/classic.c | 2 +- plugins/format/classic/idmef-db-insert.c | 34 +++++++++------------ plugins/format/classic/include/idmef-db-insert.h | 4 +- src/db-message-cache.c | 4 +- src/include/plugin-format.h | 2 +- 5 files changed, 21 insertions(+), 25 deletions(-) commit 27a0e40d36c80f5c59354602d0e7cd2726f15a0c Author: Yoann Vandoorselaere Date: Fri Mar 5 19:06:04 2004 +0000 remove deprecated autoconf file. Fix call to AC_DEFINE to shutup autoconf. acconfig.h | 8 -------- configure.in | 2 +- 2 files changed, 1 insertions(+), 9 deletions(-) commit 7636e62ca12462c4f2a18177c83fe83e37daf6f7 Author: Yoann Vandoorselaere Date: Thu Feb 12 22:53:20 2004 +0000 * configure.in: correct test for python/perl. ChangeLog | 4 ++ configure.in | 106 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 59 insertions(+), 51 deletions(-) commit 64cee2a574f84d603f69c00d24a6de94d4c9c5c8 Author: Yoann Vandoorselaere Date: Fri Feb 6 00:46:15 2004 +0000 * plugins/format/classic/idmef-db-insert.c (insert_additional_data): use the size returned by idmef_additionaldata_data_to_string(). ChangeLog | 5 +++++ plugins/format/classic/idmef-db-insert.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit 63056581bb1cc7cbd0c02bbf9f3ce52fbc30bf55 Author: Yoann Vandoorselaere Date: Tue Feb 3 10:20:17 2004 +0000 * plugins/sql/pgsql/pgsql.c (db_build_time_constraint): * plugins/sql/mysql/mysql.c (db_build_time_constraint): remove call to prelude_get_gmt_offset(). gmt_offset is already provided as an argument, and so it make no sense to compute it again. Fix re-declaration of gmt_offset. * src/sql.c (build_time_constraint, build_criterion_hour): update call to prelude_get_gmt_offset() to fit API change. * plugins/format/classic/idmef-db-insert.c (insert_additional_data): back to using idmef_additionaldata_data_to_string(), which should now work better. ChangeLog | 9 +++++++++ plugins/sql/mysql/mysql.c | 7 +------ plugins/sql/pgsql/pgsql.c | 4 ---- src/sql.c | 13 +++++++------ 4 files changed, 17 insertions(+), 16 deletions(-) commit cf296bbdf25dade85b6c064b2683c5671d23e654 Author: Yoann Vandoorselaere Date: Tue Feb 3 00:20:01 2004 +0000 * plugins/format/classic/idmef-db-insert.c (insert_additional_data): back to using idmef_additionaldata_data_to_string(), which should now work better. ChangeLog | 6 +++++ plugins/format/classic/idmef-db-insert.c | 33 +++++++++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-) commit 3f7c29f88902e199452ba900c58236cf364bc0b0 Author: Nicolas Delon Date: Sun Feb 1 16:33:05 2004 +0000 * bindings/python/preludedb.py: (PreludeDB.get_values) bug fixes: wrong test for tmp, and destroy function call of the wrong variable ChangeLog | 7 +++++++ bindings/python/preludedb.py | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 4a94bb56653e6b402a493e992a2f516efe051428 Author: Yoann Vandoorselaere Date: Sat Jan 31 13:04:29 2004 +0000 * plugins/format/classic/idmef-db-insert.c (insert_additional_data): remove call to idmef_additionaldata_data_to_string(). This function does absolutly nothing useful, and it's removal is pending. Use prelude_sql_escape_fast(). ChangeLog | 7 +++++++ plugins/format/classic/idmef-db-insert.c | 15 +++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) commit ac4be614665a70c9b8583a345d722e59cf49f53f Author: Yoann Vandoorselaere Date: Fri Jan 30 13:08:37 2004 +0000 * plugins/sql/mysql/mysql.c (db_escape): s/string/buf/ ChangeLog | 5 +++++ plugins/sql/mysql/mysql.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 9710ed309096e624dc966a26734495b0d6e5ffb8 Author: Nicolas Delon Date: Fri Jan 30 07:44:20 2004 +0000 * src/sql.c: (build_criterion_timestamp) bug fix, handle the "<=" relation correctly ChangeLog | 6 ++++++ src/sql.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 037b39788ae65565a6aa83987c87a22431712bc6 Author: Yoann Vandoorselaere Date: Wed Jan 28 19:06:57 2004 +0000 * src/sql.c (prelude_sql_escape_fast): implement. Same as prelude_sql_escape() but take a size as argument. * plugins/sql/pgsql/pgsql.c (db_escape): * plugins/sql/mysql/mysql.c (db_escape): now take a len argument. We doesn't compute len by ourself anymore. ChangeLog | 11 +++++++++++ plugins/sql/mysql/mysql.c | 8 +++----- plugins/sql/pgsql/pgsql.c | 6 ++---- src/include/plugin-sql.h | 2 +- src/include/sql.h | 1 + src/sql.c | 22 ++++++++++++++++++---- 6 files changed, 36 insertions(+), 14 deletions(-) commit 6b4696c94073f30fc67bc4c4d7b7bc9e362b65b1 Author: Nicolas Delon Date: Sun Jan 25 18:11:53 2004 +0000 Add support of time manipulation functions to pgsql ChangeLog | 1 + plugins/sql/mysql/mysql.c | 2 +- plugins/sql/pgsql/pgsql.c | 103 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletions(-) commit fb46d68228f65b99f05b1e1636bdbaf3060f8928 Author: Nicolas Delon Date: Sun Jan 25 17:46:15 2004 +0000 * bindings/perl/PreludeDB.c: regenerated * bindings/python/_preludedb.c: regenerated * bindings/python/preludedb.py: add support for prelude_db_interface_get_*_ident_list_len * src/db-interface.c: * src/include/db-interface.h: * src/include/plugin-format.h: * plugins/format/classic/classic.c: add the ability to get the len of a db message ident list * plugins/format/classic/classic.c: (classic_get_values) bug fix, convert from UTC to localtime the time fields retrieved * plugins/format/classic/idmef-db-select.c: * src/sql.c: * src/include/sql.h: * src/include/plugin-sql.h * plugins/sql/mysql/mysql.c: add support for idmef-criterion-value ChangeLog | 28 ++ bindings/perl/PreludeDB.c | 216 +++++++++++++- bindings/python/_preludedb.c | 133 ++++++++- bindings/python/preludedb.py | 19 +- plugins/format/classic/classic.c | 91 +++++-- plugins/format/classic/idmef-db-select.c | 40 ++- plugins/sql/mysql/mysql.c | 103 +++++++ src/db-interface.c | 16 + src/include/db-interface.h | 4 + src/include/plugin-format.h | 8 + src/include/plugin-sql.h | 24 ++- src/include/sql.h | 5 + src/sql.c | 470 +++++++++++++++++++++++++++++- 13 files changed, 1090 insertions(+), 67 deletions(-) commit f8a2c4106c5b0c565589601d8cf273cb90581e1a Author: Stephane Loeuillet Date: Fri Jan 23 14:55:27 2004 +0000 change parent_type fields from VARCHAR(1) to ENUM('S','T','H','A') in mysql schema plugins/format/classic/mysql.sql | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) commit a2c686b8e09cd12ec9b8c858d0a547f700a43ecc Author: Stephane Loeuillet Date: Thu Jan 22 18:40:42 2004 +0000 add keys to speed up piwi when database starts to be huge plugins/format/classic/mysql.sql | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) commit c3b04aca771e434a9a28c02957886cd79effb04f Author: Stephane Loeuillet Date: Fri Jan 16 21:03:20 2004 +0000 indent fix only, no content change tabs in .sql files are evil, replace by plain spaces plugins/format/classic/pgsql.sql | 48 +++++++++++++++++++------------------- 1 files changed, 24 insertions(+), 24 deletions(-) commit 18868747ae8f92a0873e0045206798f0c79a889c Author: Nicolas Delon Date: Wed Jan 14 21:53:54 2004 +0000 * plugins/format/classic/pgsql.sql: bug fix, switch all time field in TIMESTAMP type (instead of VARCHAR or DATE types) * plugins/sql/pgsql/pgsql.c: (db_field_fetch) (db_field_fetch_by_name) bug fix, return NULL if the field contains NULL ChangeLog | 11 +++++++++++ plugins/format/classic/pgsql.sql | 14 +++++++------- plugins/sql/pgsql/pgsql.c | 15 ++++++++------- 3 files changed, 26 insertions(+), 14 deletions(-) commit 9d43884e3f64616bf41ba213ab5a18f3018d7e6f Author: Yoann Vandoorselaere Date: Wed Jan 14 18:24:53 2004 +0000 * plugins/sql/pgsql/pgsql.c (db_escape): checking the wrong variable is bad for your health. ChangeLog | 5 +++++ plugins/sql/pgsql/pgsql.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit a6c093d12ca282d6884d9398f7fe52d4d965b87a Author: Nicolas Delon Date: Sun Jan 11 20:24:58 2004 +0000 test plugins/format/classic/db-object.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 709d7ab664653731fbc0236927f2ba109ea3ce75 Author: Nicolas Delon Date: Sun Jan 11 17:29:19 2004 +0000 * bindings/python/preludedb.py: (PreludeDB.__get_message) bug fix, return None if the underlying C function returns NULL * plugins/format/classic/idmef-db-get.c: (get_userid) bug fix, did not check correctly the return value of a get_uint32 (get_user) (get_process) bug fix, forgot to set table to NULL after destroying it that could lead to a double free (get_alert) (get_heartbeat) check if the alert/heartbeat is present in the DB before trying to fetch it instead of returning an empty idmef_message if it is not present ChangeLog | 20 ++++++++++++ bindings/python/preludedb.py | 3 ++ plugins/format/classic/idmef-db-get.c | 54 ++++++++++++++++++++++++++++++++- 3 files changed, 76 insertions(+), 1 deletions(-) commit 4840f10c5ffa1e818c09ba40c91fe7c937166198 Author: Nicolas Delon Date: Sat Jan 10 08:10:48 2004 +0000 * bindings/perl/PreludeDB.pm: (get_message_ident_list) bug fix for criteria argument retrieval ChangeLog | 6 ++++++ bindings/perl/PreludeDB.pm | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit 3441f5e48d38634b430084cb89afd322685f5899 Author: Nicolas Delon Date: Wed Jan 7 22:36:13 2004 +0000 Make yoann happy ;) plugins/format/classic/classic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 107306b81182dac12ad6f2259c8ab23b3ea57b65 Author: Nicolas Delon Date: Wed Jan 7 16:49:49 2004 +0000 * plugins/format/classic/classic.c: (get_message) fit idmef_message changes ChangeLog | 6 ++++++ plugins/format/classic/classic.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit 93be93dec40a341c3314a59fc964443a20339ec6 Author: Nicolas Delon Date: Fri Jan 2 21:55:23 2004 +0000 * plugins/format/classic/idmef-db-get.c: (get_timestamp) use idmef_time_set_db_timestamp (*) handle correctly NULL value: don't create empty object for NULL value anymore cleanup ChangeLog | 10 + plugins/format/classic/idmef-db-get.c | 973 +++++++++++---------------------- 2 files changed, 338 insertions(+), 645 deletions(-) commit ff62956b08e557fe3b7a8462d8a9dd5af416a816 Author: Nicolas Delon Date: Thu Jan 1 23:18:39 2004 +0000 * plugins/format/classic/idmef-db-insert.c: (insert_inode) (insert_file) bug fix: insertion failed if there was no *time fields fit idmef_time_get_db_timestamp changes (insert_additional_data) bug fix: insertion failed if the len of the data embedded in additional_data was superior to 1024 bytes fit idmef_additionaldata_data_to_string changes (insert_createtime) (insert_detecttime) (insert_analyzertime) fit idmef_time_get_db_timestamp changes ChangeLog | 20 ++++- plugins/format/classic/idmef-db-insert.c | 166 ++++++++++-------------------- 2 files changed, 72 insertions(+), 114 deletions(-) commit c340ec031e03f6bc3ed602a784073d1f117a3219 Author: Yoann Vandoorselaere Date: Wed Dec 31 14:17:51 2003 +0000 *** empty log message *** ChangeLog | 5 +++++ plugins/sql/pgsql/pgsql.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit d353df9273989bd2e5ae0dffaa8ac9d58eb03af6 Author: Nicolas Delon Date: Wed Dec 31 11:53:45 2003 +0000 * plugins/format/classic/classic.c: fix some warnings * plugins/format/classic/idmef-db-get.c: (get_ntp_timestamp) remove unused variables * plugins/sql/pgsql/pgsql.c: bug fix: db_limit_offset was assigned to the escape func entry of the plugin * src/param-string.c: fix some warnings ChangeLog | 16 ++++++++++++++++ plugins/format/classic/classic.c | 3 +++ plugins/format/classic/idmef-db-get.c | 1 - plugins/sql/pgsql/pgsql.c | 4 +++- src/param-string.c | 31 +++++++++++++++++-------------- 5 files changed, 39 insertions(+), 16 deletions(-) commit 18adbf685eeaf5c48ff414f693b9c0e54378f071 Author: Nicolas Delon Date: Mon Dec 29 18:37:29 2003 +0000 * plugins/format/classic/idmef-db-get.c: (get_ntp_timestamp) bug fix: avoid (possibly buggy) code duplication, use idmef_time_new_ntp_timestamp to convert ntp stamptime to idmef_time * plugins/format/classic/idmef-db-select.c: * plugins/sql/mysql/mysql.c: * plugins/sql/pgsql/pgsql.c: * src/sql.c: * src/include/plugin-sql.h: * src/include/sql.h: make sql limit and offset the sql plugin' job to have a better portability (libpreludedb should re-work with MySQL 3.2x) ChangeLog | 17 ++++++ plugins/format/classic/idmef-db-get.c | 14 +---- plugins/format/classic/idmef-db-select.c | 82 ++++++++++++++++-------------- plugins/sql/mysql/mysql.c | 19 +++++++ plugins/sql/pgsql/pgsql.c | 20 +++++++ src/include/plugin-sql.h | 3 + src/include/sql.h | 1 + src/sql.c | 9 +++ 8 files changed, 114 insertions(+), 51 deletions(-) commit dcd0a3666674fbfc9c85842d58eb70dfe321cbef Author: Nicolas Delon Date: Mon Dec 29 13:54:40 2003 +0000 Cleanup ChangeLog | 1 + bindings/python/preludedb.py | 148 ++++++++++++++++++++++-------------------- 2 files changed, 79 insertions(+), 70 deletions(-) commit 78f0f78d1277a80f1784c48d0abd4e435f0c1158 Author: Nicolas Delon Date: Mon Dec 29 11:20:29 2003 +0000 * bindings/perl/PreludeDB.pm: (PreludeDBSQL) remove the "close" method (it should not be directly accessed) * bindings/python/preludedb.py: documentation written remove the "close" method (see above) ChangeLog | 10 +++++ bindings/perl/PreludeDB.pm | 8 ---- bindings/python/preludedb.py | 93 ++++++++++++++++++++++++++++++++++++------ 3 files changed, 90 insertions(+), 21 deletions(-) commit 260ac5095eb5d0e97547d8fa3be2c7232a58cb1f Author: Nicolas Delon Date: Sun Dec 28 22:21:30 2003 +0000 Fixes plugins/format/classic/idmef-db-select.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit eeafdb5b1e1ac7c3c228217052c8625c56854ebe Author: Nicolas Delon Date: Sun Dec 28 16:10:08 2003 +0000 * plugins/format/classic/idmef-db-insert.c: insert an empty string ("") if a MUST-BE-PRESENT string does not contain anything ChangeLog | 6 ++ plugins/format/classic/idmef-db-insert.c | 94 +++++++++++++++++------------ 2 files changed, 61 insertions(+), 39 deletions(-) commit ae908c25abeaaa8386822c0b83e7a14cbafa24fa Author: Nicolas Delon Date: Sun Dec 28 15:18:55 2003 +0000 * plugins/format/classic/idmef-db-select.c: (relation_to_sql) fit last changes of prelude_sql_escape (and underlying db_escape sql plugin functions): the value is already quoted cleanup ChangeLog | 8 +++ plugins/format/classic/idmef-db-select.c | 92 ++++++++++++++++-------------- plugins/sql/mysql/mysql.c | 2 +- 3 files changed, 59 insertions(+), 43 deletions(-) commit b53b82243916bd541c9c8b0216fafbf680ffa5e0 Author: Yoann Vandoorselaere Date: Sat Dec 27 23:55:39 2003 +0000 Ooops plugins/sql/mysql/mysql.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9b7d87e0f0628d03fc3908a99fbacb263d1e35ef Author: Nicolas Delon Date: Sat Dec 27 16:29:09 2003 +0000 * bindings/python/preludedb.py: fixes ChangeLog | 5 +++++ bindings/python/preludedb.py | 25 +++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit 9c1732301b6af90c0250d808da4f33f630dfe8a1 Author: Yoann Vandoorselaere Date: Sat Dec 27 16:26:14 2003 +0000 *** empty log message *** plugins/sql/pgsql/pgsql.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 68bcecd44a661ff7ce1bc4c2a9a52145dbb70061 Author: Yoann Vandoorselaere Date: Sat Dec 27 16:17:47 2003 +0000 * src/include/Makefile.am (noinst_HEADERS): * src/Makefile.am (libpreludedb_la_SOURCES): * src/include/gdb.h: * src/gdb.c: removed. ChangeLog | 20 +++++++++++++------- src/Makefile.am | 1 - src/gdb.c | 39 --------------------------------------- src/include/Makefile.am | 1 - src/include/gdb.h | 7 ------- 5 files changed, 13 insertions(+), 55 deletions(-) commit 5a9bd27484417fbbe4be9686dd1757eea5a0dc48 Author: Yoann Vandoorselaere Date: Sat Dec 27 16:08:12 2003 +0000 * plugins/sql/mysql/mysql.c (cleanup): * plugins/sql/pgsql/pgsql.c (cleanup): fix possible NULL pointer dereference on cleanup. * plugins/sql/mysql/mysql.c (db_escape): * plugins/sql/pgsql/pgsql.c (db_escape): updated. Return "NULL" if input is NULL. Else, quote the string using '' characters. Please note that this plugin is seriously updated compared to 0-8 version and that it should be synced asap. * plugins/format/classic/idmef-db-insert.c (insert_address): (insert_node): (insert_userid): (insert_user): (insert_process): (insert_snmp_service): (insert_service): (insert_inode): (insert_linkage): (insert_analyzer): (insert_target): (insert_source): (insert_file): (insert_classification): (insert_additional_data): (insert_createtime): (insert_detecttime): (insert_impact): (insert_analyzertime): (insert_action): (insert_confidence): (insert_overflow_alert): (insert_tool_alert): (insert_correlation_alert): Restore fix already applied to 0-8 branch, where the responssability to quote (' ') a string is up to the database plugin. This avoid insertion of quoted NULL entry in the database, which would be considered as valid string. ChangeLog | 27 +++ plugins/format/classic/idmef-db-delete.c | 2 +- plugins/format/classic/idmef-db-get.c | 5 +- plugins/format/classic/idmef-db-insert.c | 277 ++++++++++++++++++------------ plugins/sql/mysql/mysql.c | 45 ++++-- plugins/sql/pgsql/pgsql.c | 46 ++++-- 6 files changed, 261 insertions(+), 141 deletions(-) commit 754a4579236a57e1599b7749d7f4b79cf2cf5077 Author: Yoann Vandoorselaere Date: Sat Dec 27 12:27:40 2003 +0000 * src/include/Makefile.am (include_HEADERS): * src/Makefile.am (libpreludedb_la_SOURCES): remove strbuf.[ch]. * plugins/format/classic/idmef-db-select.c: use prelude-strbuf instead of libpreludedb own strbuf implementation. ChangeLog | 10 ++ plugins/format/classic/idmef-db-select.c | 253 +++++++++++++++--------------- src/Makefile.am | 1 - src/include/Makefile.am | 3 - src/include/strbuf.h | 43 ----- src/strbuf.c | 139 ---------------- 6 files changed, 137 insertions(+), 312 deletions(-) commit 6b87d3bcb31fd4abb2d1a2cd7fa867bb87c67a24 Author: Nicolas Delon Date: Fri Dec 26 21:28:12 2003 +0000 * plugins/format/classic/db-object.c: * src/db.c: only print debug message if in debug mode ChangeLog | 4 ++++ plugins/format/classic/db-object.c | 5 ++++- src/db.c | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) commit ee1050036e3f7ac1d8a4b6394595d71303a0cdd0 Author: Nicolas Delon Date: Fri Dec 26 21:17:04 2003 +0000 * configure.in: don't regenerate the .c source files of bindings during ./configure ChangeLog | 6 ++++++ configure.in | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 4ff6abd39c7e819ec82ba4b11bc917dd0886a65a Author: Nicolas Delon Date: Fri Dec 26 18:30:44 2003 +0000 * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: cleanup (PreludeDBSelection) modified to use the new prelude_db_selected_object_new_string function (the function has been rewritten from Perl to C so that it can be also used from Python) * bindings/perl/PreludeDB.i: moved in bindings/libpreludedb.i * src/db-connection.c: * src/include/db-connection.h: (prelude_db_connection_get_sql) new function * src/db-object-selection.c: * src/include/db-object-selection.h: (prelude_db_selected_object_new_string) new function, it should be used by the bindings * bindings/python/*: new files python binding support ChangeLog | 29 + bindings/Makefile.am | 2 +- bindings/generate.sh | 5 + bindings/libpreludedb.i | 145 +++ bindings/perl/PreludeDB.c | 185 ++-- bindings/perl/PreludeDB.i | 154 --- bindings/perl/PreludeDB.pm | 65 +- bindings/perl/generate.sh | 2 +- bindings/python/Makefile.am | 24 + bindings/python/_preludedb.c | 2317 +++++++++++++++++++++++++++++++++++++ bindings/python/generate.sh | 3 + bindings/python/preludedb.py | 402 +++++++ configure.in | 42 +- plugins/format/classic/classic.c | 3 +- src/db-connection.c | 13 + src/db-interface-string.c | 1 + src/db-object-selection.c | 141 +++ src/include/db-connection.h | 2 +- src/include/db-interface.h | 2 +- src/include/db-object-selection.h | 1 + 20 files changed, 3219 insertions(+), 319 deletions(-) commit 5edf5f0fb16501a3b1fca7d9e71b541aeec750da Author: Nicolas Delon Date: Sun Dec 21 22:36:29 2003 +0000 add an "offset" parameter to the prelude_db_interface_select_values function ChangeLog | 2 ++ bindings/perl/PreludeDB.c | 10 ++++++---- bindings/perl/PreludeDB.pm | 6 ++++-- plugins/format/classic/classic.c | 4 ++-- src/db-interface.c | 4 ++-- src/include/db-interface.h | 2 +- src/include/plugin-format.h | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) commit 1bacaaeea53d54ae9853a781ba607ff5ada5a011 Author: Nicolas Delon Date: Sun Dec 21 19:40:23 2003 +0000 * src/db-interface.c: * src/include/db-interface.h: * src/include/plugin-format.h: * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-select.h: * plugins/format/classic/classic.c: add a "limit" and an "offset" parameter to the prelude_db_interface_get_{alert,heartbeat}_ident_list functions * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: fit changes of limit and offset stuff ChangeLog | 17 +++++++++++++ bindings/perl/PreludeDB.c | 22 ++++++++++++----- bindings/perl/PreludeDB.pm | 11 +++++++- plugins/format/classic/classic.c | 17 ++++++++----- plugins/format/classic/idmef-db-select.c | 27 +++++++++++++++++----- plugins/format/classic/include/idmef-db-select.h | 3 ++ src/db-interface.c | 18 +++++++++----- src/include/db-interface.h | 6 +++- src/include/plugin-format.h | 6 +++- 9 files changed, 95 insertions(+), 32 deletions(-) commit 500a6a31bc9ab309f71fa95657013db952e75b6e Author: Nicolas Delon Date: Fri Dec 19 14:14:13 2003 +0000 * plugins/format/classic/idmef-db-select.c: (relation_to_sql) bug fix for substr relation ChangeLog | 6 ++++++ bindings/perl/PreludeDB.c | 2 +- plugins/format/classic/idmef-db-select.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit 0c2c39f909b7857bb0ff6ac881f562d7623d7402 Author: Nicolas Delon Date: Thu Dec 18 23:45:45 2003 +0000 * plugins/format/classic/schema.txt: add support for {alert,heartbeat}.analyzer.{node,process}* objects ChangeLog | 5 +++++ plugins/format/classic/schema.txt | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) commit 6e0127004da7e839ee7c0cc1906be12eced803f6 Author: Yoann Vandoorselaere Date: Sun Dec 14 18:45:58 2003 +0000 * src/db-message-cache.c (cache_write_cb): fix a NULL pointer dereference in the messaging subsystem that would trigger if the cached alert we were written was to big. Return the recycled message. ChangeLog | 7 +++++++ src/db-message-cache.c | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 141313a2304bda8f6a6d3ec6e967ce2ec0f6dcab Author: Nicolas Delon Date: Sun Dec 14 18:25:18 2003 +0000 don't set default path for cache bindings/perl/PreludeDB.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8d36a802c7a5b920e167291122486ac82255c9a3 Author: Nicolas Delon Date: Sun Dec 14 18:11:49 2003 +0000 * src/db-cache.c: renamed in src/db-message-cache.c little code cleanup * src/db-interface.c: * src/include/db-interface.h: make db-interface use db-message-cache * bindings/perl/Prelude.c: regenerated * bindings/perl/Prelude.pm: updated to use cache feature of db-interface ChangeLog | 16 ++ bindings/perl/PreludeDB.c | 119 ++++++++++--- bindings/perl/PreludeDB.pm | 8 + src/Makefile.am | 2 +- src/db-cache.c | 377 ---------------------------------------- src/db-interface.c | 93 ++++++++-- src/db-message-cache.c | 369 +++++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 2 +- src/include/db-cache.h | 33 ---- src/include/db-interface.h | 9 +- src/include/db-message-cache.h | 37 ++++ 11 files changed, 603 insertions(+), 462 deletions(-) commit fd76b73bf97c2839c78ad82dd010cb9d17488e5d Author: Yoann Vandoorselaere Date: Sat Dec 13 16:37:19 2003 +0000 *** empty log message *** src/db-cache.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 6a962b17b9773934bb4cee0325775799ef83f8e1 Author: Yoann Vandoorselaere Date: Sat Dec 13 16:36:38 2003 +0000 *** empty log message *** src/db-cache.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) commit 336f2588751b0ddd2ab77217273d9dad37bc4957 Author: Yoann Vandoorselaere Date: Sat Dec 13 16:17:32 2003 +0000 *** empty log message *** src/db-cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fad0f550a58c414b7ae8d3134de4533c7df09a80 Author: Yoann Vandoorselaere Date: Sat Dec 13 16:14:47 2003 +0000 *** empty log message *** src/db-cache.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit deef51d5671d8cdcd12a1595997296ed8ccd6197 Author: Yoann Vandoorselaere Date: Sat Dec 13 16:14:09 2003 +0000 *** empty log message *** src/db-cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c4c3584562d61d0fc88021b3e1e875e7d71d678e Author: Yoann Vandoorselaere Date: Sat Dec 13 16:06:27 2003 +0000 *** empty log message *** src/db-cache.c | 41 ++++++++++++++++++----------------------- 1 files changed, 18 insertions(+), 23 deletions(-) commit 4719a44bcade0a8a27a033f1b93887c95ad33d6a Author: Yoann Vandoorselaere Date: Sat Dec 13 15:45:45 2003 +0000 more db-cache work... src/db-cache.c | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) commit f00f3f1c7df024e8a9577cf0d4f3c64a9dab80d6 Author: Yoann Vandoorselaere Date: Sat Dec 13 14:34:42 2003 +0000 * configure.in: stop overwritting user provided CFLAGS. * src/sql-connection-data.c: remove useless NULL check. * src/include/Makefile.am (includedir): * src/Makefile.am (libpreludedb_la_SOURCES): * src/include/db-cache.h: * src/db-cache.c: database caching mechanism implementation. ChangeLog | 14 ++ configure.in | 8 +- src/Makefile.am | 1 + src/db-cache.c | 372 +++++++++++++++++++++++++++++++++++++++++++++ src/include/Makefile.am | 1 + src/include/db-cache.h | 33 ++++ src/sql-connection-data.c | 54 ++----- 7 files changed, 437 insertions(+), 46 deletions(-) commit d7067f84006785a2e1ba3cb9f93dc1406c2bba27 Author: Nicolas Delon Date: Wed Dec 10 17:58:55 2003 +0000 * plugins/format/classic/idmef-db-insert.c: * plugins/format/classic/idmef-db-select.c: fit last changes of libprelude (stuff moved from idmef-util.c to idmef-time.c) ChangeLog | 7 +++++++ bindings/perl/PreludeDB.c | 2 +- plugins/format/classic/idmef-db-insert.c | 20 ++++++++++---------- plugins/format/classic/idmef-db-select.c | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) commit 67e5557274b92efe2d025103cffc504bbb7b8bba Author: Nicolas Delon Date: Sun Nov 30 12:44:26 2003 +0000 * bindings/perl/PreludeDB.pm: (PreludeDB::delete_alert) (PreludeDB::delete_heartbeat) bug fix, forgot to port this two functions to the last changes of the libpreludedb C API ChangeLog | 8 ++++++++ bindings/perl/PreludeDB.pm | 27 ++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) commit a8bd1147215d2855cbae3a1743637fed61f47616 Author: Nicolas Delon Date: Mon Nov 24 07:01:25 2003 +0000 forgot to remove the include of db-uident.h ... plugins/format/classic/idmef-db-get.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 89c5719e10fd95b3ca9cea0873535006fe79a631 Author: Nicolas Delon Date: Sun Nov 23 23:23:08 2003 +0000 I forgot to add/remove some files... src/db-message-ident.c | 72 ++++++++++++++++++++++++++++++++++++++++ src/include/db-message-ident.h | 36 ++++++++++++++++++++ src/include/db-uident.h | 37 -------------------- 3 files changed, 108 insertions(+), 37 deletions(-) commit 40c4b26377e57475fcaee183a9a43e8889a40306 Author: Nicolas Delon Date: Sun Nov 23 19:46:13 2003 +0000 * bindings/perl/PreludeDB.i: updated to fit the new db-message-ident.[ch] * bindings/perl/PreludeDB.pm: updated to fit the new db-message-ident.c and the API changes of format plugin code cleanup * plugins/format/classic/classic.c: updated to fit the new db-message-ident.c code cleanup * plugins/format/classic/idmef-db-delete.c: * plugins/format/classic/include/idmef-db-delete.h: updated to fit the new db-message-ident.c * plugins/format/classic/idmef-db-select.c: bug fix, handle correctly is_null and is_not_null relations * plugins/sql/mysql/mysql.c: remove the double queries limitation * plugins/sql/pgsql/pgsql.c: remove the double queries limitation bug fix, db_query did not return NULL for table with 0 row * src/db-message-ident.c: * src/include/db-message-ident.h: new files provide message ident manipulation functions * src/db-interface-string.c: include db-message-ident.h * src/db-interface.c: * src/include/db-interface.h: the API for alert ident list retrieving has been changed in order to be more efficient code cleanup * src/db.c: * src/include/db.h: include db-message-ident.h prelude_db_shutdown now returns void instead of int * src/format-plugins.c: include db-message-ident.h * src/include/plugin-format.h: API has been changed to provide a more efficient to way to handle alert lists * bindings/perl/PreludeDB.c: regenerated ChangeLog | 57 +++ bindings/perl/PreludeDB.c | 539 ++++++++++------------ bindings/perl/PreludeDB.i | 143 +------ bindings/perl/PreludeDB.pm | 99 ++-- plugins/format/classic/classic.c | 188 +++----- plugins/format/classic/idmef-db-delete.c | 10 +- plugins/format/classic/idmef-db-select.c | 10 +- plugins/format/classic/include/idmef-db-delete.h | 4 +- plugins/sql/mysql/mysql.c | 34 +-- plugins/sql/pgsql/pgsql.c | 42 +-- src/Makefile.am | 1 + src/db-interface-string.c | 2 +- src/db-interface.c | 202 +++----- src/db.c | 6 +- src/format-plugins.c | 2 +- src/include/Makefile.am | 2 +- src/include/db-interface.h | 26 +- src/include/db.h | 2 +- src/include/plugin-format.h | 46 ++- 19 files changed, 595 insertions(+), 820 deletions(-) commit 4273bdf890674ea7e03a04d82d0f98877a7ad5b0 Author: Nicolas Delon Date: Wed Nov 19 20:09:58 2003 +0000 * plugins/format/classic/idmef-db-insert.c: bug fix, idmef_source_spoofed_to_string does not exist anymore, replace it by idmef_spoofed_to_string thanks to John Green for pointing that out ChangeLog | 7 +++++++ plugins/format/classic/idmef-db-insert.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 838e5ad99c5c39b36a5f0bcbeb2c344784d7005f Author: Nicolas Delon Date: Tue Nov 18 00:10:27 2003 +0000 * bindings/perl/PreludeDB.pm: bug fix (IDMEFSelection did not longer exist) ChangeLog | 5 ++++ bindings/perl/PreludeDB.c | 2 +- bindings/perl/PreludeDB.pm | 52 +++++++++++++++++++++++++++++++++---------- 3 files changed, 46 insertions(+), 13 deletions(-) commit 28e96ad956c0a8d220d11b235fcc8604960065a0 Author: Nicolas Delon Date: Mon Nov 17 00:15:20 2003 +0000 * src/db-object-selection.c: * src/include/db-object-selection.h: new files replace idmef-selection * bindings/perl/PreludeDB.i: * bindings/perl/PreludeDB.pm: * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-select.h: * src/db-interface-string.c: * src/db-interface-string.c: * src/db-interface.c: * src/db.c: * src/format-plugins.c: * src/include/plugin-format.h: fit new selection stuff changes * bindings/perl/PreludeDB.c: regenerated ChangeLog | 23 ++ bindings/perl/PreludeDB.c | 358 +++++++++++++++++++--- bindings/perl/PreludeDB.i | 2 + bindings/perl/PreludeDB.pm | 103 ++++++- plugins/format/classic/classic.c | 144 ++++++--- plugins/format/classic/idmef-db-select.c | 90 +++--- plugins/format/classic/include/idmef-db-select.h | 2 +- src/Makefile.am | 1 + src/db-interface-string.c | 2 + src/db-interface.c | 19 +- src/db-object-selection.c | 129 ++++++++ src/db.c | 1 + src/format-plugins.c | 2 + src/include/Makefile.am | 1 + src/include/db-interface.h | 8 +- src/include/db-object-selection.h | 53 ++++ src/include/plugin-format.h | 8 +- 17 files changed, 784 insertions(+), 162 deletions(-) commit eafe5c33e3f4f236c4d2d839d76045050a179d9c Author: Stephane Loeuillet Date: Sat Nov 15 16:44:31 2003 +0000 remove 'strip'ping of perl binding correct case on table name (Prelude_UserId not Prelude_UserID) bindings/perl/Makefile.am | 2 +- plugins/format/classic/idmef-db-get.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f3c81df0aecdd5d411f49942852e9e31636525bb Author: Stephane Loeuillet Date: Fri Nov 14 22:49:03 2003 +0000 fix installation problems on gentoo and perhaps other distribs bindings/perl/Makefile.am | 8 ++++---- libpreludedb-config.in | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit a667655d9c63b428e04dc3067da5a333f1a786fb Author: Nicolas Delon Date: Wed Nov 5 20:04:15 2003 +0000 * plugins/format/classic/idmef-db-get.c: fit libprelude changes (*_find_{string,numeric} functions renamed in *_to_{string,numeric}) ChangeLog | 6 ++++++ bindings/perl/PreludeDB.c | 2 +- plugins/format/classic/idmef-db-get.c | 30 +++++++++++++++--------------- 3 files changed, 22 insertions(+), 16 deletions(-) commit 3cf119295e86485c5b70a3677f4d249ae7ac1eb1 Author: Nicolas Delon Date: Sat Oct 25 22:16:19 2003 +0000 * bindings/perl/PreludeDB.pm: remove idmef_selection build related code use new libprelude perl's IDMEFSelection ChangeLog | 6 ++ bindings/perl/PreludeDB.c | 2 +- bindings/perl/PreludeDB.pm | 138 +++++-------------------------------------- 3 files changed, 23 insertions(+), 123 deletions(-) commit f05057ec53eaa4bc57faba69ea70bfcba55f4a39 Author: Nicolas Delon Date: Sat Oct 25 07:54:18 2003 +0000 * bindings/perl/PreludeDB.pm: (PreludeDB::get_values) updated to use distinct stuff * plugins/format/classic/idmef-db-select.c: (build_request) fix a bug introduced when "SELECT DISTINCT" has been reintroduced: the two last arguments of strbuf_sprintf where not took into account because two "%s" where missing in the format string ChangeLog | 16 ++++++++++++++-- bindings/perl/PreludeDB.c | 2 +- bindings/perl/PreludeDB.pm | 5 ++++- plugins/format/classic/idmef-db-select.c | 4 ++-- 4 files changed, 21 insertions(+), 6 deletions(-) commit 44aa9c410c23d89492a19e1a1f8ece627cf59cbf Author: Nicolas Delon Date: Thu Oct 23 22:04:54 2003 +0000 * plugins/format/classic/idmef-db-get.c: * plugins/format/classic/idmef-db-insert.c: fit idmef-tree last changes ChangeLog | 7 ++++ bindings/perl/PreludeDB.c | 2 +- plugins/format/classic/idmef-db-get.c | 45 ++++++----------------------- plugins/format/classic/idmef-db-insert.c | 8 ++-- 4 files changed, 22 insertions(+), 40 deletions(-) commit b44ffde568dfab593e480b246ef35509b65f59cf Author: Krzysztof Zaraska Date: Tue Oct 21 15:38:24 2003 +0000 * src/include/plugin-format.h: * src/include/db-interface.c: * src/db-interface.c: * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-select.h: reintroduced support for "SELECT DISTINCT". * plugins/format/classic/include/idmef-db-select.h: #define'd some useful symbolic names for three int parameters of idmef_db_select(). * bindings/perl/PreludeDB.c: regenerated. ChangeLog | 17 +++++++++++++++++ bindings/perl/PreludeDB.c | 10 ++++++---- plugins/format/classic/classic.c | 10 +++++++--- plugins/format/classic/idmef-db-select.c | 7 +++++-- plugins/format/classic/include/idmef-db-select.h | 9 +++++++++ src/db-interface.c | 3 ++- src/include/db-interface.h | 1 + src/include/plugin-format.h | 1 + 8 files changed, 48 insertions(+), 10 deletions(-) commit cabf9d19d585c9a62ff605a4bde1fb18dbd5c110 Author: Krzysztof Zaraska Date: Tue Oct 21 14:53:09 2003 +0000 2003-10-21 Krzysztof Zaraska * plugins/format/classic/idmef-db-select.c: (table_list_to_strbuf): renamed to table_list_to_strbuf_for_alerts(). (table_list_to_strbuf_for_values): implemented. This function uses right joins as opposed to table_list_to_strbuf_for_alerts(). (build_request): (idmef_db_select): take a parameter specifying if we are extracting complete alerts or values accross the alerts; use left and right joins respectively * plugins/format/classic/idmef-db-select.h: * plugins/format/classic/classic.c: modified accordingly. ChangeLog | 15 +++ plugins/format/classic/classic.c | 6 +- plugins/format/classic/idmef-db-select.c | 124 ++++++++++++++++++++-- plugins/format/classic/include/idmef-db-select.h | 3 +- 4 files changed, 134 insertions(+), 14 deletions(-) commit 201beea5485de2e293ecdf878f5bdea1337a4a0a Author: Nicolas Delon Date: Mon Oct 20 07:35:11 2003 +0000 * bindings/perl/PreludeDB.i: * bindings/perl/PreludeDB.pm: code review: fixes and cleanup * bindings/perl/PreludeDB.c: regenerated ChangeLog | 9 ++ bindings/perl/PreludeDB.c | 243 +++++++++++++++++++++++++++++++------------- bindings/perl/PreludeDB.i | 151 +++++++++++++++++++-------- bindings/perl/PreludeDB.pm | 45 ++++++--- 4 files changed, 320 insertions(+), 128 deletions(-) commit d9b47c4caa554c60eeed8be16e3a3284a15d22c5 Author: Nicolas Delon Date: Sat Oct 18 06:59:41 2003 +0000 * plugins/format/classic/classic.c: bug fix: build value the right way ChangeLog | 5 +++++ bindings/perl/PreludeDB.i | 4 ++++ plugins/format/classic/classic.c | 27 ++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 5 deletions(-) commit b9241548f488ffee895f44e7ba5bee4f5558cfba Author: Nicolas Delon Date: Sun Oct 12 17:53:27 2003 +0000 * bindings/perl/PreludeDB.pm: (PreludeDB::DESTROY) (PreludeDBSQLRow::DESTROY) <<>> "bug" fix/workaround some code like this: perl -e "use Prelude; $message = new IDMEFMessage" (note that I did not use "my") leads to call IDMEFMessage::DESTROY -> idmef_message_destroy with a NULL pointer (because the swig intermediate object has been destroyed before the top IDMEFMessage::DESTROY is called itself) this is very bizarre, and only happen for non-my variable at perl exit stage, perl -e "use Prelude; my $message = new IDMEFMessage" will work perl -e "use Prelude; $message = new IDMEFMessage; $message = undef" will also work indeed, perl is great language ;) ChangeLog | 19 +++++++++++++++++++ bindings/perl/PreludeDB.pm | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit f7cfad3ef300b6b4959280b78641613bafc2c47d Author: Nicolas Delon Date: Sun Oct 12 13:15:48 2003 +0000 * plugins/format/classic/idmef-db-insert.c: (insert_additional_data) fit idmef_additional_data_to_string changes ChangeLog | 6 ++++++ plugins/format/classic/idmef-db-insert.c | 15 +++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 0c88efb8269cc778599064067390669e2b2599b4 Author: Nicolas Delon Date: Wed Oct 8 09:59:07 2003 +0000 * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: fit idmef-criteria changes * plugins/format/classic/classic.c: fit idmef-criteria changes * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-select.h fit idmef-criteria changes criterion_to_sql has been splited up in two functions: criteria_to_sql and criterion_to_sql * plugins/format/classic/schema.txt: add the support of the following objects: heartbeat.create_time heartbeat.analyzer_time alert.create_time alert.analyzer_time * src/db-interface.c: * src/include/db-interface.h: fit idmef-criteria changes * src/sql.c: fit idmef-criteria changes * src/include/plugin-format.h: fit idmef-criteria changes ChangeLog | 34 +++++ bindings/perl/PreludeDB.c | 141 +++++++++++++------ bindings/perl/PreludeDB.pm | 18 ++-- plugins/format/classic/classic.c | 45 +++++-- plugins/format/classic/idmef-db-select.c | 160 +++++++++++----------- plugins/format/classic/include/idmef-db-select.h | 2 +- plugins/format/classic/schema.txt | 6 + src/db-interface.c | 10 +- src/include/db-interface.h | 6 +- src/include/plugin-format.h | 6 +- 10 files changed, 274 insertions(+), 154 deletions(-) commit cdd37296bcd3e46cea7298263cb3a4a5df6cf347 Author: Nicolas Delon Date: Sun Sep 21 13:33:35 2003 +0000 * bindings/perl/PreludeDB.pm: (get_alert_uident_list) (get_heartbeat_uident_list) (get_values) those functions can accept directly a criterion string as a criterion * plugins/format/classic/idmef-db-insert.c: check return value of idmef_get_db_timestamp and idmef_get_ntp_timestamp functions * plugins/format/classic/idmef-db-select.c: (value_to_sql) new function support for idmef_date in idmef_criterion * plugins/format/classic/schema.txt: add support of alert.detect_time object ChangeLog | 21 ++++++++++ bindings/perl/PreludeDB.pm | 21 +++++++--- plugins/format/classic/idmef-db-insert.c | 61 ++++++++++++++++++------------ plugins/format/classic/idmef-db-select.c | 34 ++++++++++++++--- plugins/format/classic/schema.txt | 2 + 5 files changed, 102 insertions(+), 37 deletions(-) commit 8d05f992e746a7d053a2eebdb2234942efc1ca97 Author: Nicolas Delon Date: Fri Sep 19 21:51:05 2003 +0000 * bindings/perl/PreludeDB.pm (PreludeDB::get_values) bug fix ChangeLog | 6 ++++++ bindings/perl/PreludeDB.pm | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit 46200c2f0886748937628fc2d1ae91798528617c Author: Nicolas Delon Date: Fri Sep 19 07:39:48 2003 +0000 * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: add the get_values function * plugins/format/classic/classic.c: check idmef_object_value_new's return value and destroy objval when idmef_object_value_list_add failed ChangeLog | 12 +++ bindings/perl/PreludeDB.c | 81 +++--------------- bindings/perl/PreludeDB.pm | 135 ++++++++++++++++++++++++++++-- plugins/format/classic/classic.c | 8 ++- plugins/format/classic/idmef-db-select.c | 10 +- 5 files changed, 165 insertions(+), 81 deletions(-) commit 949092993fe2c56fb1c4781d7bc1a6cb51f8438e Author: Nicolas Delon Date: Thu Sep 18 06:55:57 2003 +0000 * bindings/perl/PreludeDB.c: regenerated * plugins/format/classic/classic.c: modifications to fit changes of idmef_db_select's prototype (classic_get_values) skip empty lines (lines where all fields are NULL) don't build value depending of object because of sql functions (for example, count for a string field returns a number) * plugins/format/classic/idmef-db-select.c: lot of changes and cleanup to support GROUP BY, ORDER BY and LIMIT distinct is not used anymore, use group by instead * src/db-interface.c: * src/include/db-interface.h: * src/include/plugin-format.h: (prelude_db_interface_select_values) (format_select_values) function's prototype changes, remove distinct and add limit argument ChangeLog | 23 ++ bindings/perl/PreludeDB.c | 20 +- plugins/format/classic/classic.c | 44 ++-- plugins/format/classic/idmef-db-select.c | 241 +++++++++++++++------- plugins/format/classic/include/idmef-db-select.h | 8 +- plugins/sql/mysql/mysql.c | 2 +- src/db-interface.c | 8 +- src/include/db-interface.h | 6 +- src/include/plugin-format.h | 6 +- 9 files changed, 234 insertions(+), 124 deletions(-) commit 50fc4e9a7843c4d706dcaf7f52215db474003a9a Author: Nicolas Delon Date: Mon Sep 15 08:41:58 2003 +0000 * bindings/perl/PreludeDB.pm: * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-select.c: changes to fit modifications in libprelude's idmef_selection ChangeLog | 7 +++++++ bindings/perl/PreludeDB.pm | 2 +- plugins/format/classic/classic.c | 24 ++++++++++++------------ plugins/format/classic/idmef-db-select.c | 23 +++++++++++++---------- 4 files changed, 33 insertions(+), 23 deletions(-) commit 97aebd9c07061aa3d285e8475e0d705983562504 Author: Nicolas Delon Date: Fri Sep 12 14:30:05 2003 +0000 * bindings/perl/PreludeDB.i: cleanup, do not cut & paste the prototypes of functions used, instead, include directly the needed headers * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: some fixes in sql related functions ChangeLog | 12 + bindings/perl/PreludeDB.c | 1119 +++++++++++++++++++++++++++++++++++++++----- bindings/perl/PreludeDB.i | 93 +--- bindings/perl/PreludeDB.pm | 12 +- 4 files changed, 1047 insertions(+), 189 deletions(-) commit fa04806ed0765de3f3a5a2d5d1fc000c6730f474 Author: Yoann Vandoorselaere Date: Mon Sep 8 09:48:45 2003 +0000 * src/db-interface.c (prelude_db_interface_new): check for NULL strdup return value. ChangeLog | 5 ++++- src/db-interface.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 5300a9779655654c29e228b3fcc0b4a8d2a93dce Author: Yoann Vandoorselaere Date: Mon Sep 8 00:58:50 2003 +0000 *** empty log message *** ChangeLog | 30 ++++++ src/db-interface.c | 214 ++++++++++++++++++-------------------------- src/include/db-interface.h | 4 - 3 files changed, 119 insertions(+), 129 deletions(-) commit 71fc24572227d5a43258e298701d390c22268a7e Author: Yoann Vandoorselaere Date: Tue Sep 2 09:20:55 2003 +0000 *** empty log message *** src/db.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 1154b73fbc05f1f60858850b1bc2dcc579ba5710 Author: Yoann Vandoorselaere Date: Tue Sep 2 09:19:34 2003 +0000 * src/db-interface-string.c (get_sql_connection_data): reworked this function so that it is easy to add new parameters. You now just have to add a parameters name and handling function to the array of structure in order for the parameter to be taken into account. ChangeLog | 8 +++ src/db-interface-string.c | 130 ++++++++++++++------------------------------ 2 files changed, 50 insertions(+), 88 deletions(-) commit 14d0b021f5fcd1df6863ae1b8f52e80da122298c Author: Nicolas Delon Date: Sat Aug 30 19:16:21 2003 +0000 * bindings/perl/PreludeDB.i: update the binding interface to the last API changes * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.pm: (PreludeDB::new) restore the removed constructor code and also accept directly connection string update the binding interface to the last API changes (PreludeDB::get_alert) restore the old function's implementation which already "treat empty @object_list as undefined" (PreludeDB::get_heartbeat) some fixes * plugins/format/classic/idmef-db-select.c: (table_list_destroy) fix a memory leak (tlist->top_table was not freed) * plugins/format/classic/classic.c: (classic_select_values) some modifications to fit the last idmef_object_value_new's changes * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-delete.c: * plugins/format/classic/idmef-db-get.c: * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-delete.h: * src/db-interface-string.c: * src/db-interface.c: * src/db.c: * src/format-plugins.c: * src/include/db-interface.h: * src/include/plugin-format.h: * src/include/db-uident.h: API changes, an alert/heartbeat was previously identified by its ident field which is an uint64_t, however IDMEF tell: """ The "ident" attribute by itself provides a unique identifier only among all the "ident" values sent by a particular analyzer. But when combined with the "analyzerid" value for the analyzer, a value that is unique across the intrusion detection environment is created. """ so now, an alert is identified by the couple analyzerid + alert_ident which MUST be unique among the others in the db the current db schema does not respect this, but the new one will ChangeLog | 52 ++++ bindings/perl/PreludeDB.c | 349 ++++++++++++++++----- bindings/perl/PreludeDB.i | 119 +++++++- bindings/perl/PreludeDB.pm | 103 +++++--- plugins/format/classic/classic.c | 206 ++++++++------ plugins/format/classic/idmef-db-delete.c | 13 +- plugins/format/classic/idmef-db-get.c | 11 +- plugins/format/classic/idmef-db-select.c | 11 +- plugins/format/classic/include/idmef-db-delete.h | 7 +- src/db-interface-string.c | 1 + src/db-interface.c | 146 +++++++--- src/db.c | 3 +- src/format-plugins.c | 1 + src/include/Makefile.am | 1 + src/include/db-interface.h | 35 ++- src/include/db-uident.h | 37 +++ src/include/plugin-format.h | 38 ++-- 17 files changed, 830 insertions(+), 303 deletions(-) commit 22cee17dab9dcaf8f2ae8267c498a2aedfd81a76 Author: Yoann Vandoorselaere Date: Tue Aug 19 17:26:27 2003 +0000 *** empty log message *** src/strbuf.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) commit c99ff51a355658074f0d4c9dcbf4764833753e4c Author: Yoann Vandoorselaere Date: Tue Aug 19 17:24:11 2003 +0000 * src/strbuf.c (strbuf_new): use similar OOM warning as we have in other place in the code. coding style fix. ChangeLog | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 01bb488d1aa690bac8c163abc4c311e73a2c3695 Author: Krzysztof Zaraska Date: Thu Aug 14 13:41:59 2003 +0000 * bindings/perl/PreludeDB.pm: (PreludeDB::new): pass connection string directly to prelude_db_interface_new_string(), instead of parsing (since parser does not seem to work anyhow). (_convert_object_list): adapted to changed idmef-selection API (get_alert): treat empty @object_list as undefined * plugins/format/classic/classic.c: (classic_get_alert): fixed an idiotic bug in handling NULL selection. ChangeLog | 12 ++++++++++++ bindings/perl/PreludeDB.pm | 35 ++++++++++------------------------- plugins/format/classic/classic.c | 2 +- 3 files changed, 23 insertions(+), 26 deletions(-) commit 5f3e2a880e10f6628c2bd46d3aeb6b7d909ff68e Author: Krzysztof Zaraska Date: Wed Aug 13 22:03:42 2003 +0000 * bindings/perl/PreludeDB.i: modified to reflect recent API changes. * bindings/perl/PreludeDB.c: regenerated. ChangeLog | 9 +++- bindings/perl/PreludeDB.c | 107 ++++++++++++++++++++++++++++++++++++++++++--- bindings/perl/PreludeDB.i | 8 +++ 3 files changed, 116 insertions(+), 8 deletions(-) commit b428c80a98cf53c30d2d1b89d77716f1c991032c Author: Krzysztof Zaraska Date: Tue Aug 12 10:55:20 2003 +0000 * plugins/format/classic/idmef-db-select.c: (aggregate_function_to_sql): implemented. (add_field): (relation_to_sql): handle aggregate functions (build_request): (idmef_db_select): handle 'distinct' parameter * plugins/format/classic/classic.c: handle aggregate functions. (classic_select_values): (classic_get_values): implemented. (classic_get_alert): (classic_get_heartbeat): force full alert extraction under conditions where partial extraction can produce incorrect results * src/include/db-interface.h: * src/db-interface.c: style fixes (prelude_db_interface_select_values): (prelude_db_interface_get_values): implemented * src/include/plugin-format.h: added format_select_values and format_get_values callbacks ChangeLog | 29 +++++ plugins/format/classic/classic.c | 142 +++++++++++++++++++--- plugins/format/classic/idmef-db-select.c | 63 ++++++++-- plugins/format/classic/include/idmef-db-select.h | 1 + src/db-interface.c | 33 +++++- src/include/db-interface.h | 9 ++ src/include/plugin-format.h | 23 +++- 7 files changed, 267 insertions(+), 33 deletions(-) commit 89a8d7a8ea90c0d6958c3b356f556aba19439f81 Author: Nicolas Delon Date: Sat Aug 2 21:54:33 2003 +0000 * plugins/format/classic/idmef-db-select.c: (table_entry_new): bug fix: free entry AFTER its fields have been freed * plugins/sql/mysql/mysql.c: (db_begin) check session's status before doing anything * plugins/sql/pgsql/pgsql.c: (db_begin) check session's status before doing anything ChangeLog | 20 +++++++++ bindings/perl/PreludeDB.c | 65 +++++++++++++++++++++++++++++- plugins/format/classic/idmef-db-select.c | 5 +- plugins/sql/mysql/mysql.c | 14 ++++++ plugins/sql/pgsql/pgsql.c | 14 ++++++ 5 files changed, 114 insertions(+), 4 deletions(-) commit 38fb09d3a4a5ccd62012ec7bbd2ee91ee7be3288 Author: Nicolas Delon Date: Mon Jul 14 10:33:00 2003 +0000 * src/db-interface.c: (prelude_db_interface_disconnect) fix a bug, interface->db_connection was not set to NULL after it has been destroyed * bindings/perl/PreludeDB.i: * bindings/perl/PreludeDB.pm: (PreludeDB) add the disconnect function * bindings/perl/PreludeDB.c: regenerated ChangeLog | 15 +++++++++++++++ bindings/perl/PreludeDB.c | 34 ++++++++++++++++++++++++++++++++-- bindings/perl/PreludeDB.i | 3 ++- bindings/perl/PreludeDB.pm | 7 +++++++ src/db-interface.c | 1 + 5 files changed, 57 insertions(+), 3 deletions(-) commit 9da9cc4828568e1eeb07c9e77b0089e98168e185 Author: Nicolas Delon Date: Wed Jul 9 20:32:37 2003 +0000 * bindings/perl/PreludeDB.pm: return value of function like PreludeDB::init that returns an integer to indicate if the function failed or not has changed: before the changes, functions returned a value < 0 if the function failed or a value >= 0 otherwise now, the functions return 0 if the function failed or another value otherwise this choice has been done to follow the perl's "conventions" in this domain ChangeLog | 10 ++++++++++ bindings/perl/PreludeDB.pm | 24 +++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) commit 4593e87adf76514eda92d2f3fab3d1ce5d3b9fbf Author: Nicolas Delon Date: Wed Jul 9 08:48:55 2003 +0000 * bindings/perl/PreludeDB.pm: add a 1 (true value) at the end of the package's code * plugins/format/classic/idmef-db-get.c: (get_user) bug fix, "parent" was passed as parent argument of function get_userid instead of "user" ChangeLog | 10 ++++++++++ bindings/perl/PreludeDB.pm | 2 ++ plugins/format/classic/idmef-db-get.c | 2 +- 3 files changed, 13 insertions(+), 1 deletions(-) commit 2d838fc5b079a7a8e6c396dc91213818eab2ad92 Author: Nicolas Delon Date: Tue Jul 8 08:43:56 2003 +0000 * plugins/format/classic/idmef-db-insert.c: bug fix, code cleanup, port to the new IDMEF API * plugins/format/classic/schema.txt: add the alert.target.service.port object ChangeLog | 8 + plugins/format/classic/idmef-db-insert.c | 1118 +++++++++++++++--------------- plugins/format/classic/schema.txt | 1 + 3 files changed, 568 insertions(+), 559 deletions(-) commit b2410b9040ca172e5090662c26a0f5f9c192afba Author: Nicolas Delon Date: Mon Jul 7 18:58:55 2003 +0000 ChangeLog has not been commited the last two times ChangeLog | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) commit d4057926dcc2a20e9a84de921d9fe02a1452fdf6 Author: Nicolas Delon Date: Sun Jul 6 14:24:04 2003 +0000 * bindings/perl/PreludeDB.pm: support full message fetching * plugin/format/classic/idmef-db-delete.c: fix two bugs in alert/heartbeat deletion code (bad test for deletion of Prelude_Address row, and Prelude_Heartbeat rows were not deleted in classic_delete_heartbeat) bindings/perl/PreludeDB.c | 2 +- bindings/perl/PreludeDB.pm | 11 ++++++++--- plugins/format/classic/idmef-db-delete.c | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) commit 25f25226919d6cbb4e26144cea08bdd2166454c6 Author: Nicolas Delon Date: Fri Jul 4 20:56:48 2003 +0000 * plugins/format/classic/idmef-db-delete.c: * plugins/format/classic/include/idmef-db-delete.c: new files * bindings/perl/PreludeDB.c: regenerated * bindings/perl/PreludeDB.i: * bindings/perl/PreludeDB.pm: * plugins/format/classic/classic.c: * src/db-interface.c: * src/include/db-interface.h: * src/include/plugin-format.h: support the deletion of alert/heartbeat bindings/perl/PreludeDB.c | 78 ++++++++- bindings/perl/PreludeDB.i | 6 +- bindings/perl/PreludeDB.pm | 24 +++- plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic.c | 3 + plugins/format/classic/idmef-db-delete.c | 192 ++++++++++++++++++++++ plugins/format/classic/include/idmef-db-delete.h | 30 ++++ src/db-interface.c | 27 +++- src/include/db-interface.h | 4 + src/include/plugin-format.h | 9 + 10 files changed, 364 insertions(+), 11 deletions(-) commit bf45f9ba119ae89a5c3f17bb1a10a86687b82986 Author: Krzysztof Zaraska Date: Wed Jul 2 22:29:25 2003 +0000 * plugins/format/classic/classic.c: include "idmef-db-get.h" * plugins/format/classic/idmef-db-get.c: (get_user): fixed error detection. * plugins/format/classic/schema.txt: newer version. ChangeLog | 11 +++++ plugins/format/classic/classic.c | 1 + plugins/format/classic/idmef-db-get.c | 2 +- plugins/format/classic/schema.txt | 68 +++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletions(-) commit aca804afab83f4d81d37fc51b9d1bc7f53951adf Author: Nicolas Delon Date: Wed Jul 2 19:44:29 2003 +0000 * plugins/format/classic/classic.c: * plugins/format/classic/schema.txt: support whole message fetching for heartbeat ChangeLog | 6 ++++++ plugins/format/classic/classic.c | 4 +++- plugins/format/classic/schema.txt | 10 +++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) commit 8253ed4bbdcf14434c2dd650db3f1f651038816a Author: Krzysztof Zaraska Date: Wed Jul 2 10:38:45 2003 +0000 * plugins/format/classic/idmef-db-select.c: (normalize_condition): implemented. (table_entry_new): copy criteria into table entry structure. Fixed memory leaks in error handling. (table_list_to_strbuf): put condition in bracket (just in case) (add_table): normalize condition before matching with condition in the table entry structure (criterion_to_sql): use aliased table names. (build_request): compile table list after processing criteria * plugins/format/classic/schema.txt: new version of database schema file, courtesy of Davor Ocelic . ChangeLog | 16 +++ plugins/format/classic/idmef-db-select.c | 163 +++++++++++++++++++++--------- plugins/format/classic/schema.txt | 79 +++++++-------- 3 files changed, 169 insertions(+), 89 deletions(-) commit 773f8fe61194ed189ba792ecd914f097524f438e Author: Krzysztof Zaraska Date: Tue Jul 1 11:13:04 2003 +0000 *** empty log message *** ChangeLog | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 0a5f23d9403aa066b6809b480545beb4b8e74e58 Author: Krzysztof Zaraska Date: Tue Jul 1 11:11:41 2003 +0000 * plugins/format/classic/classic.c: (get_message): more readable debug messages :). Handle 1-to-N relations better ( still not perfect :( ). Don't check if selection is NULL, the calling function already does that. * plugins/format/classic/idmef-db-select.c: don't try to build the FROM ... LEFT JOIN ... statements at once; instead, first build a table list and then compile to SQL. Alias all tables. That should make extracting values with 1-to-N relations work correctly. Add a debug messsage containing a number of rows extracted. ChangeLog | 19 +- plugins/format/classic/classic.c | 35 ++- plugins/format/classic/idmef-db-select.c | 570 +++++++++++++++++++----------- 3 files changed, 396 insertions(+), 228 deletions(-) commit ab9bdd8f0d2edb4f437285aaf044ccf3960c9468 Author: Nicolas Delon Date: Mon Jun 30 22:15:40 2003 +0000 * plugins/format/classic/idmef-db-get.c: * plugins/format/classic/include/idmef-db-get.h: new files add the support of a whole message fetching * plugins/format/classic/classic.c: (classic_get_alert) call get_alert when the selection argument is NULL in order to fetch the whole message ChangeLog | 20 + bindings/perl/PreludeDB.c | 2 +- plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic.c | 4 +- plugins/format/classic/idmef-db-get.c | 2556 +++++++++++++++++++++++++ plugins/format/classic/idmef-db-insert.c | 2 +- plugins/format/classic/include/idmef-db-get.h | 33 + src/sql.c | 2 + 8 files changed, 2617 insertions(+), 4 deletions(-) commit 0c6b86a7b788f42f822b9b5e5bd5a880539a9276 Author: Nicolas Delon Date: Fri Jun 27 07:30:43 2003 +0000 * src/sql.c: * src/include/sql.h: (prelude_sql_field_value_int16) (prelude_sql_field_value_uint16) new functions src/include/sql.h | 2 ++ src/sql.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 0 deletions(-) commit 6446d4e04ef7dc40c1c11d2e0598a77a6d021323 Author: Krzysztof Zaraska Date: Mon Jun 23 22:10:46 2003 +0000 *** empty log message *** plugins/format/classic/classic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 55e149b41bbcab03ffcfb137391ce53339fe9e61 Author: Krzysztof Zaraska Date: Mon Jun 23 21:46:12 2003 +0000 * plugins/format/classic/classic.c: (get_message): add some log() statements to help debugging. ChangeLog | 5 +++++ plugins/format/classic/classic.c | 25 +++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit ab5cdcfe4a520ce8ee837dd365220be2c9bf4a8c Author: Krzysztof Zaraska Date: Mon Jun 23 20:47:44 2003 +0000 * plugins/format/classic/classic.c: (get_message): handle NULL fields correctly. * plugins/format/classic/idmef-db-select.c: build query differently, using LEFT JOIN statements. This allows to handle empty tables / records correctly when used along with filled ones. ChangeLog | 10 +++ plugins/format/classic/classic.c | 8 ++- plugins/format/classic/idmef-db-select.c | 96 ++++++++---------------------- 3 files changed, 42 insertions(+), 72 deletions(-) commit 6c663cfb506cbe0cc894f19c536c213227fb375f Author: Krzysztof Zaraska Date: Sun Jun 22 23:21:05 2003 +0000 * plugins/format/classic/classic.c: (get_message): call idmef_selection_set_object_iterator() before processing each row. Use idmef_value_new_for_object() instead of idmef_value_new_generic() to handle enums correctly. ChangeLog | 8 ++++++++ plugins/format/classic/classic.c | 11 ++++------- 2 files changed, 12 insertions(+), 7 deletions(-) commit 3242075b88429b6eba2aa42d39de72d8dcba77ec Author: Krzysztof Zaraska Date: Sun Jun 22 13:32:21 2003 +0000 * plugins/format/classic/classic.c: (get_message): don't use prelude_sql_field_idmef_value(), do convertion manually, obtaining variable type via idmef_object_get_type(). This is caused by some braindead type mappings (uint64_t as STRING, eh?). ChangeLog | 8 ++++++++ plugins/format/classic/classic.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletions(-) commit a5e69ac3b0c553c6bcaa9d7b8e4ae5f1ebcc3cce Author: Krzysztof Zaraska Date: Sun Jun 1 17:20:09 2003 +0000 * plugins/format/classic/idmef-db-select.c: (objects_to_sql): remove unneeded cached_obj variable. ChangeLog | 6 ++++++ plugins/format/classic/idmef-db-select.c | 1 - 2 files changed, 6 insertions(+), 1 deletions(-) commit 7220abc443ddfe28ae2fb20b1d1613a20b8f2df3 Author: Nicolas Delon Date: Thu May 29 20:32:31 2003 +0000 * bindings/perl/PreludeDB/*: removed * bindings/perl/*: new files, the perl binding has been rewritten using swig * configure.in: * Makefile.am: modified to support the perl binding in the build process * plugins/format/classic/idmef-db-select.c: in criterion_to_sql, check if db_object_find's return value is NULL rename idmef_object_get_num function's call in idmef_object_get_numeric because idmef_object_get_num does not exist ChangeLog | 17 + Makefile.am | 2 +- bindings/Makefile.am | 1 + bindings/perl/Makefile.am | 25 + bindings/perl/PreludeDB.c | 1697 ++++++++++++++++++++++++++++++ bindings/perl/PreludeDB.i | 165 +++ bindings/perl/PreludeDB.pm | 334 ++++++ bindings/perl/PreludeDB/Changes | 6 - bindings/perl/PreludeDB/MANIFEST | 8 - bindings/perl/PreludeDB/Makefile.PL | 17 - bindings/perl/PreludeDB/PreludeDB.pm | 131 --- bindings/perl/PreludeDB/PreludeDB.xs | 338 ------ bindings/perl/PreludeDB/README | 38 - bindings/perl/PreludeDB/ppport.h | 540 ---------- bindings/perl/PreludeDB/test.pl | 97 -- bindings/perl/PreludeDB/typemap | 5 - bindings/perl/generate.sh | 3 + configure.in | 40 + plugins/format/classic/idmef-db-select.c | 11 +- src/db-interface.c | 3 +- 20 files changed, 2294 insertions(+), 1184 deletions(-) commit 919f0ee4e75dfbe0a414cbc99bfa75975839238c Author: Nicolas Delon Date: Mon May 19 20:06:17 2003 +0000 * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-select.c: * plugins/format/classic/include/idmef-db-select.h: * src/sql.c: * src/include/sql.h: * src/db-interface.c: * src/include/db-interface.h: * src/include/plugin-format.h: libpreludedb API changes, idmef_cache is not used anymore, idmef_selection is now used for object selection and idmef_message is used to store the fetched fields ChangeLog | 14 ++ plugins/format/classic/classic.c | 261 ++++++++++------------ plugins/format/classic/idmef-db-select.c | 54 ++--- plugins/format/classic/include/idmef-db-select.h | 3 +- src/db-interface.c | 113 ++++------ src/include/db-interface.h | 20 +- src/include/plugin-format.h | 49 ++--- src/include/sql.h | 2 +- src/sql.c | 19 +-- 9 files changed, 235 insertions(+), 300 deletions(-) commit b739568917913c3b5496745a58e65b47dedd3734 Author: Nicolas Delon Date: Sun May 18 17:17:08 2003 +0000 * plugins/format/classic/schema.txt: minor modification to fit idmef_data's last changes * plugins/format/classic/classic.c: minor modifications to fit the idmef_criterion_new's changes ChangeLog | 9 +++++++++ plugins/format/classic/classic.c | 2 -- plugins/format/classic/schema.txt | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) commit a6130d5890fa5f2c1ff4708241942bdaefae0077 Author: Nicolas Delon Date: Wed May 14 08:31:32 2003 +0000 * src/sql-plugins.c: * src/sql.c: minor modifications to fit idmef_string's last changes ChangeLog | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit a3f3ac9fb2d0a66e7ea66bd56d7fe501af21d9f5 Author: Nicolas Delon Date: Wed May 14 08:09:45 2003 +0000 * src/sql-plugins.c: * src/sql.c: minor modifications to fit idmef_string's last changes src/sql-plugins.c | 1 + src/sql.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) commit 36d1f139b7eb30a7b971b148cd0b29014fdb76b9 Author: Krzysztof Zaraska Date: Thu May 8 19:21:36 2003 +0000 * plugins/format/classic/include/idmef-db-select.h: * plugins/format/classic/include/idmef-db-insert.h: change #define'd constants names to match file names. ChangeLog | 8 +++++++- plugins/format/classic/include/idmef-db-insert.h | 6 +++--- plugins/format/classic/include/idmef-db-select.h | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) commit 8e69029590e38064379e9e0f2f1b2ce3f27bd01d Author: Krzysztof Zaraska Date: Thu May 8 19:14:05 2003 +0000 (these modifications should have been checked in on 2003-05-05) * plugins/format/classic/include/idmef-db-output.h: renamed to idmef-db-insert.h * plugins/format/classic/include/idmef-db-read.h: renamed to idmef-db-select.h * plugins/forma/classic/include/idmef-db-select.h: apply modifications corresponding to those in idmef-db-select.c ChangeLog | 15 +++++++++- plugins/format/classic/include/idmef-db-insert.h | 31 +++++++++++++++++++++ plugins/format/classic/include/idmef-db-output.h | 30 -------------------- plugins/format/classic/include/idmef-db-read.h | 32 ---------------------- plugins/format/classic/include/idmef-db-select.h | 32 ++++++++++++++++++++++ 5 files changed, 77 insertions(+), 63 deletions(-) commit d7f8312cb24301bfea27edf93d8cecfb39767688 Author: Krzysztof Zaraska Date: Mon May 5 21:35:35 2003 +0000 * plugins/format/classic/idmef-db-select.c: (objects_to_sql): avoid a SIGSEGV in a situation when a requested object is not present in database schema. ChangeLog | 7 +++++++ plugins/format/classic/idmef-db-select.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) commit 9410593cb87e29f99155e1f17d9b6ee3e87443bb Author: Krzysztof Zaraska Date: Mon May 5 21:03:12 2003 +0000 * plugins/sql/mysql/mysql.c(db_query): fix a bug that returned a non-null pointer for select that returns no rows (this bug was introduced in the last mysql.c modification by using mysql_store_result which has not the same behaviour that mysql_use_result * plugins/format/classic/Makefile.am: the last fix did not work, this one works * src/db-interface.c: * src/include/db-interface.h: a lot of modifications, now, we provide a higher level (easier to use, more efficient) of abstraction on top of the sql database * plugins/format/classic/idmef-db-output.c: has been renamed in idmef-db-insert.c * plugins/format/classic/idmef-db-read.c: has been renamed in idmef-db-select.c * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-insert.c: * plugins/format/classic/idmef-db-select.c: a lot of modifications to fit the new format plugin API ChangeLog | 28 + plugins/format/classic/Makefile.am | 7 +- plugins/format/classic/classic.c | 263 ++++-- plugins/format/classic/idmef-db-insert.c | 1353 ++++++++++++++++++++++++++++++ plugins/format/classic/idmef-db-output.c | 1352 ----------------------------- plugins/format/classic/idmef-db-read.c | 819 ------------------ plugins/format/classic/idmef-db-select.c | 629 ++++++++++++++ plugins/sql/mysql/mysql.c | 9 +- src/db-interface.c | 194 ++++- src/include/db-interface.h | 25 +- src/include/plugin-format.h | 54 +- 11 files changed, 2419 insertions(+), 2314 deletions(-) commit e94ea5341fab96b79414a52446f8a68ec5b015fa Author: Krzysztof Zaraska Date: Mon May 5 17:20:54 2003 +0000 * src/sql.c: (prelude_sql_field_idmef_value): modify to accomodate a change in idmef_string_new() syntax. ChangeLog | 6 ++++++ src/sql.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 142d94c13cd910857c797f6251226e511178122e Author: Krzysztof Zaraska Date: Sun Apr 27 21:40:25 2003 +0000 * plugins/format/classic/idmef-db-read.c: fix compilation warnings. (objects_to_sql): fix possible use of uninitialized values on error. (criterion_to_sql): modified to reflect recent libprelude API changes (relation_less, relation_greater). * src/gdb.c: fix warnings. ChangeLog | 13 ++++++++++++ configure.in | 2 +- plugins/format/classic/idmef-db-read.c | 34 ++++++++++++++++++------------- src/gdb.c | 7 +++++- 4 files changed, 40 insertions(+), 16 deletions(-) commit 2d9c3f130bea22109b45993c51d3b096ebf60c20 Author: Krzysztof Zaraska Date: Tue Apr 15 21:10:37 2003 +0000 *** empty log message *** src/include/queue.h | 39 --------------------------------------- 1 files changed, 0 insertions(+), 39 deletions(-) commit f5242a0f3fdefa561060029bd99253804f35e1cc Author: Krzysztof Zaraska Date: Tue Apr 1 20:46:22 2003 +0000 * plugins/format/classic/classic.c(add_criterion): use idmef_value_ref() instead of idmef_value_clone() ChangeLog | 5 +++++ plugins/format/classic/classic.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) commit 80f399c86c357e246fd3b872d5fff25a1b365aee Author: Krzysztof Zaraska Date: Sun Mar 16 13:13:57 2003 +0000 *** empty log message *** ChangeLog | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) commit 8edd2b1572c59706ab6b64c99e062488de77b2cc Author: Krzysztof Zaraska Date: Sun Mar 16 13:13:34 2003 +0000 * plugins/format/classic/idmef-db-read.c: (build_request): handle queries without WHERE clause plugins/format/classic/idmef-db-read.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit feb4afaa5117824771b841e40304b981ecbb3066 Author: Krzysztof Zaraska Date: Sun Mar 16 13:01:53 2003 +0000 2003-03-16 Krzysztof Zaraska * plugins/format/classic/idmef-db-read.c (criterion_to_sql): handle empty criteria chain correctly 2003-03-14 Nicolas Delon * plugins/format/classic/Makefile.am fix a compilation rule error plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/idmef-db-read.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) commit 727be0b221fcf39d73b8993faabb5e392083b326 Author: Krzysztof Zaraska Date: Sat Feb 22 00:24:51 2003 +0000 * plugins/sql/mysql/mysql.c: functions prelude_sql_{fields,rows}_num works now, mysql_use_result has been replaced by mysql_store_result Thanks to Vincent Glaume for the bug report. * src/include/sql.h: add a comment to explain what does the return value of the prelude_sql_field_fetch mean * plugins/format/classic/Makefile.am: link classic.so against libpreludedb in order to make the perl binding working ChangeLog | 15 +++++++++++++++ bindings/perl/PreludeDB/test.pl | 4 +++- plugins/format/classic/Makefile.am | 2 +- plugins/sql/mysql/mysql.c | 5 +---- src/include/sql.h | 9 +++++++++ 5 files changed, 29 insertions(+), 6 deletions(-) commit 4ef7f0bf43abc9754581366302d924a1e46b88e7 Author: Krzysztof Zaraska Date: Tue Feb 18 22:42:32 2003 +0000 * plugins/format/classic/pgsql.sql: included a patch from Herve Debar (a syntax fix) ChangeLog | 6 ++++++ plugins/format/classic/pgsql.sql | 3 ++- 2 files changed, 8 insertions(+), 1 deletions(-) commit ddc22a5979426e91f0ddbbb7c2e54d8bb8b38795 Author: Krzysztof Zaraska Date: Sat Feb 15 08:01:34 2003 +0000 *** empty log message *** ChangeLog | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) commit aa793918f97dff5b936d5f3fb4703df319707303 Author: Krzysztof Zaraska Date: Sat Feb 15 08:00:47 2003 +0000 * plugins/format/classic/idmef-db-read.c: use SELECT DISTINCT instead of SELECT (eliminates duplicates introduced by 1-to-N relations). plugins/format/classic/idmef-db-read.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6b72b6308979cfc98b97dd9826caac4d1ba54930 Author: Krzysztof Zaraska Date: Sat Feb 15 06:03:40 2003 +0000 * plugins/format/classic/idmef-db-read.c: fix handling of 1-to-N relations * src/idmef-object-list.c: * src/include/idmef-object-list.h: removed. * src/Makefile.am: * src/include/Makefile.am: updated accordingly. plugins/format/classic/idmef-db-read.c | 81 ++++++++++++--------- src/Makefile.am | 1 - src/idmef-object-list.c | 121 -------------------------------- src/include/Makefile.am | 1 - src/include/idmef-object-list.h | 39 ---------- 5 files changed, 46 insertions(+), 197 deletions(-) commit 88948db90af6b5c63cd84ccb878c12708fa116ff Author: Krzysztof Zaraska Date: Fri Feb 14 14:09:53 2003 +0000 * configure.in: add a variable for directory for holding configuration of format plugins * plugins/format/classic/Makefile.am: add plugin and config directories to DEFS. compile db-object.c. install schema.txt. * plugins/format/classic/include/db-object.h * plugins/format/classic/db-object.c: * plugins/format/classic/schema.txt: new file. Parser and config file for describing database structure * plugins/format/classic/include/idmef-db-read.h: * plugins/format/classic/idmef-db-read.c: * plugins/format/classic/classic.c: add IDMEF message reading support. * src/idmef-db-values.c: * src/include/idmef-db-values.h: Removed. idmef_cache_t used instead. * src/Makefile.am: * src/include/Makefile.am: updated accordingly * src/db-interface-string.c: * src/db-interface.c: * src/db.c * src/format-plugins.c: * src/include/db-interface.h: * src/include/plugin-format.h: modify to reflect used API. * src/include/param-string.h * src/param-string.c: fix various bugs resulting in SIGSEGVs (strbuf_sprintf): handle empty strings correctly (strbuf_string): (strbug_empty): (strbuf_clear): implemented * src/db.c: change comment to indicate that reinitialization attempts are OK ChangeLog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 3 +++ 2 files changed, 52 insertions(+), 0 deletions(-) commit 68aa87ab2c1a5b262843e7ee2a9cb62449a066f1 Author: Krzysztof Zaraska Date: Fri Feb 14 14:08:05 2003 +0000 * configure.in: add a variable for directory for holding configuration of format plugins * plugins/format/classic/Makefile.am: add plugin and config directories to DEFS. compile db-object.c. install schema.txt. * plugins/format/classic/include/db-object.h * plugins/format/classic/db-object.c: * plugins/format/classic/schema.txt: new file. Parser and config file for describing database structure * plugins/format/classic/include/idmef-db-read.h: * plugins/format/classic/idmef-db-read.c: * plugins/format/classic/classic.c: add IDMEF message reading support. * src/idmef-db-values.c: * src/include/idmef-db-values.h: Removed. idmef_cache_t used instead. * src/Makefile.am: * src/include/Makefile.am: updated accordingly * src/db-interface-string.c: * src/db-interface.c: * src/db.c * src/format-plugins.c: * src/include/db-interface.h: * src/include/plugin-format.h: modify to reflect used API. * src/include/param-string.h * src/param-string.c: fix various bugs resulting in SIGSEGVs (strbuf_sprintf): handle empty strings correctly (strbuf_string): (strbug_empty): (strbuf_clear): implemented * src/db.c: change comment to indicate that reinitialization attempts are OK plugins/format/classic/Makefile.am | 9 +- plugins/format/classic/classic.c | 147 +++++- plugins/format/classic/db-object.c | 376 ++++++++++++ plugins/format/classic/idmef-db-read.c | 753 +++++++++++++++++++++++- plugins/format/classic/include/db-object.h | 50 ++ plugins/format/classic/include/idmef-db-read.h | 6 +- plugins/format/classic/schema.txt | 44 ++ src/Makefile.am | 1 - src/db-interface-string.c | 2 - src/db-interface.c | 35 +- src/db.c | 12 +- src/format-plugins.c | 2 - src/idmef-db-values.c | 32 - src/include/Makefile.am | 1 - src/include/db-interface.h | 9 +- src/include/idmef-db-values.h | 33 - src/include/plugin-format.h | 10 +- src/include/strbuf.h | 6 + src/param-string.c | 17 +- src/strbuf.c | 28 +- 20 files changed, 1457 insertions(+), 116 deletions(-) commit 53a72e60840d4f54c9119c204b7d207aff1c16df Author: Krzysztof Zaraska Date: Fri Jan 17 23:26:57 2003 +0000 fix a mistake in ChangeLog ChangeLog | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a4db2b5e2c0a7ee0bff65f59a7aaeb565b46653f Author: Krzysztof Zaraska Date: Fri Jan 17 23:25:50 2003 +0000 2003-01-17 Krzysztof Zaraska * plugins/format/classic/classic.c: remove obsoleted call to set_state() (so the code compiles ;P) ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit d08f093c8c46e85d02ed7ddd77eebccf4c7c8e18 Author: Krzysztof Zaraska Date: Fri Jan 17 22:18:16 2003 +0000 plugins/format/classic/classic.c: remove obsoleted call to set_state() plugins/format/classic/classic.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 3caa21101f590eedd3b4d0e8eff528aa51113579 Author: Krzysztof Zaraska Date: Thu Jan 16 22:05:03 2003 +0000 correct URL README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit be3a7b4069b7bdcb885efaabe9e1f7e1a3617f67 Author: Krzysztof Zaraska Date: Thu Jan 16 22:02:29 2003 +0000 * plugins/format/classic/classic: removed unnecessary plugin (un)subscription code. ChangeLog | 5 +++++ plugins/format/classic/classic.c | 31 +++---------------------------- 2 files changed, 8 insertions(+), 28 deletions(-) commit 4faada04df04932d66158658342db0c6d53a8490 Author: Krzysztof Zaraska Date: Sat Jan 11 21:38:52 2003 +0000 * plugins/format/classic/Makefile.am: link the plugin dynamically against libprelude to avoid linker errors when used from Perl. * bindings/*: new files. Perl 5.8 bindings from Nicolas Delon ChangeLog | 10 + bindings/perl/PreludeDB/Changes | 6 + bindings/perl/PreludeDB/MANIFEST | 8 + bindings/perl/PreludeDB/Makefile.PL | 17 + bindings/perl/PreludeDB/PreludeDB.pm | 131 ++++++++ bindings/perl/PreludeDB/PreludeDB.xs | 338 +++++++++++++++++++++ bindings/perl/PreludeDB/README | 38 +++ bindings/perl/PreludeDB/ppport.h | 540 ++++++++++++++++++++++++++++++++++ bindings/perl/PreludeDB/test.pl | 95 ++++++ bindings/perl/PreludeDB/typemap | 5 + plugins/format/classic/Makefile.am | 1 + 11 files changed, 1189 insertions(+), 0 deletions(-) commit 71029ebaf5b51f9100e67b5b78f184f31df29a71 Author: Krzysztof Zaraska Date: Tue Jan 7 23:16:25 2003 +0000 * plugins/sql/mysql.c: * plugins/sql/pgsql.c: (db_query): don't change session status to st_query if there are no results. Remove unneeded st_transaction state (backend will check these things anyhow). Patch from Nicolas Delon (with my cooperation ;)). * src/sql.c: Patch from Nicolas Delon : (prelude_sql_insert): fix bug in error handling. (prelude_sql_row_free): Check for NULL argument. (prelude_sql_field_info_type): Implemented. * src/include/sql.h: Patch from Nicolas Delon : updated accordingly. * plugins/format/classic/idmef-db-output.c: added error handling. Added transaction support: BEGIN; at the start, COMMIT; when we're done or ROLLBACK on error. Finally :) * src/idmef-db-values.c: * src/include/idmef-db-values.h: new file. Implementation of container datatype for data read from database will be placed here. * src/strbuf.c: * src/include/strbuf.h: new file. Provides a dynamically resizable char * buffer. * src/idmef-object-list.c: * src/include/idmef-object-list.h: new file. Local implementation of lists of idmef_object_t objects. * src/Makefile.am: * src/include/Makefile.am: modified accordingly * src/plugin-format.h: API change: add hooks for alert reading function. * plugins/format/classic/idmef-db-read.c: * plugins/format/classic/include/idmef-db-read.h: new file. Alert reading code will be placed here. * plugins/format/classic/classic.c: register callback for alert reading. Remove check for database type duplicating the one from idmef-db-output.c. * plugins/format/classic/Makefile.am: modified accordingly. * plugins/format/classic/include/idmef-db-output.h: change preprocessor macros to avoid names clash. * plugins/format/classic/classic.c: add support for alert reading API. * src/db-interface.c: * src/include/db-interface.c: (prelude_db_interface_read_idmef_objects): implemented. * src/db.c: fix includes adapting to new API. Update copyright notice. * src/format-plugins.c: fix includes adapting to new API. ChangeLog | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 73 insertions(+), 0 deletions(-) commit 930a14d516549dc6e11c7637fcd92cff0cf04907 Author: Krzysztof Zaraska Date: Tue Jan 7 23:15:16 2003 +0000 * plugins/sql/pgsql.c: (db_query): don't change session status to st_query if there are no results. Remove unneeded st_transaction state (backend will check these things anyhow). Patch from Nicolas Delon (with my cooperation ;)). * src/sql.c: Patch from Nicolas Delon : (prelude_sql_insert): fix bug in error handling. (prelude_sql_row_free): Check for NULL argument. (prelude_sql_field_info_type): Implemented. * src/include/sql.h: Patch from Nicolas Delon : updated accordingly. * plugins/format/classic/idmef-db-output.c: added error handling. Added transaction support: BEGIN; at the start, COMMIT; when we're done or ROLLBACK on error. Finally :) * src/idmef-db-values.c: * src/include/idmef-db-values.h: new file. Implementation of container datatype for data read from database will be placed here. * src/strbuf.c: * src/include/strbuf.h: new file. Provides a dynamically resizable char * buffer. * src/idmef-object-list.c: * src/include/idmef-object-list.h: new file. Local implementation of lists of idmef_object_t objects. * src/Makefile.am: * src/include/Makefile.am: modified accordingly * src/plugin-format.h: API change: add hooks for alert reading function. * plugins/format/classic/idmef-db-read.c: * plugins/format/classic/include/idmef-db-read.h: new file. Alert reading code will be placed here. * plugins/format/classic/classic.c: register callback for alert reading. Remove check for database type duplicating the one from idmef-db-output.c. * plugins/format/classic/Makefile.am: modified accordingly. * plugins/format/classic/include/idmef-db-output.h: change preprocessor macros to avoid names clash. * plugins/format/classic/classic.c: add support for alert reading API. * src/db-interface.c: * src/include/db-interface.c: (prelude_db_interface_read_idmef_objects): implemented. * src/db.c: fix includes adapting to new API. Update copyright notice. * src/format-plugins.c: fix includes adapting to new API. -------------------------------------------------------------------- plugins/format/classic/idmef-db-read.c | 57 +++++++++++ plugins/format/classic/include/idmef-db-read.h | 32 ++++++ src/idmef-object-list.c | 121 ++++++++++++++++++++++++ src/include/idmef-object-list.h | 39 ++++++++ 4 files changed, 249 insertions(+), 0 deletions(-) commit 6f742aa2e8d02dd60b974693735a494addab8ecc Author: Krzysztof Zaraska Date: Tue Jan 7 23:12:42 2003 +0000 * plugins/sql/pgsql.c: (db_query): don't change session status to st_query if there are no results. Remove unneeded st_transaction state (backend will check these things anyhow). Patch from Nicolas Delon (with my cooperation ;)). * src/sql.c: Patch from Nicolas Delon : (prelude_sql_insert): fix bug in error handling. (prelude_sql_row_free): Check for NULL argument. (prelude_sql_field_info_type): Implemented. * src/include/sql.h: Patch from Nicolas Delon : updated accordingly. * plugins/format/classic/idmef-db-output.c: added error handling. Added transaction support: BEGIN; at the start, COMMIT; when we're done or ROLLBACK on error. Finally :) * src/idmef-db-values.c: * src/include/idmef-db-values.h: new file. Implementation of container datatype for data read from database will be placed here. * src/strbuf.c: * src/include/strbuf.h: new file. Provides a dynamically resizable char * buffer. * src/idmef-object-list.c: * src/include/idmef-object-list.h: new file. Local implementation of lists of idmef_object_t objects. * src/Makefile.am: * src/include/Makefile.am: modified accordingly * src/plugin-format.h: API change: add hooks for alert reading function. * plugins/format/classic/idmef-db-read.c: * plugins/format/classic/include/idmef-db-read.h: new file. Alert reading code will be placed here. * plugins/format/classic/classic.c: register callback for alert reading. Remove check for database type duplicating the one from idmef-db-output.c. * plugins/format/classic/Makefile.am: modified accordingly. * plugins/format/classic/include/idmef-db-output.h: change preprocessor macros to avoid names clash. * plugins/format/classic/classic.c: add support for alert reading API. * src/db-interface.c: * src/include/db-interface.c: (prelude_db_interface_read_idmef_objects): implemented. * src/db.c: fix includes adapting to new API. Update copyright notice. * src/format-plugins.c: fix includes adapting to new API. -------------------------------------------------------------------- plugins/format/classic/Makefile.am | 2 +- plugins/format/classic/classic.c | 25 ++- plugins/format/classic/idmef-db-output.c | 276 ++++++++++++++-------- plugins/format/classic/include/idmef-db-output.h | 6 +- plugins/sql/mysql/mysql.c | 94 ++------ plugins/sql/pgsql/pgsql.c | 62 ++---- src/Makefile.am | 3 + src/db-interface-string.c | 4 +- src/db-interface.c | 34 +++- src/db.c | 9 +- src/format-plugins.c | 5 +- src/gdb.c | 1 + src/idmef-db-values.c | 32 +++ src/include/Makefile.am | 4 + src/include/db-interface.h | 4 + src/include/idmef-db-values.h | 33 +++ src/include/plugin-format.h | 7 + src/include/sql.h | 1 + src/include/strbuf.h | 37 +++ src/sql.c | 12 +- src/strbuf.c | 110 +++++++++ 21 files changed, 529 insertions(+), 232 deletions(-) commit 64fc9fadb92b30e7b864c7d8d467389753c5f0d2 Author: Krzysztof Zaraska Date: Sat Jan 4 20:17:07 2003 +0000 cleanup src/dispatch.c | 89 -------------------------------------------------------- 1 files changed, 0 insertions(+), 89 deletions(-) commit e023a62c1b47fa8ef04a7a6dbb29c8880247fbbb Author: Krzysztof Zaraska Date: Sat Jan 4 17:43:30 2003 +0000 * plugins/sql/mysql/mysql.c: * plugins/sql/pgsql/pgsql.c: * src/include/plugin-sql.h: * src/include/sql.h: * src/sql.c: updated copyright notices * src/sql.c(prelude_sql_field_value_idmef): call idmef_value_have_own_data() after bulding idmef_string_t object. * src/include/plugin-sql.h: sql plugin API re-designed we no longer convert the database result in our own format we no longer use the errno global variable, instead of this, the sql plugin must maintain an internal errno-type variable * src/{sql.c,include/sql.h}: a lot of changes to fit the new sql plugin API * src/{sql-table.c,include/sql-table.h}: as we are not doing results conversion anymore, those files have been deleted * plugins/sql/mysql/mysql.c: a lot of changes to fit the new sql plugin API dbport argument in db_setup is supported code cleanup, we no longer use mysql API deprecated functions we no longer fetch the query result in one time, instead of this, we fetch the result row by row * plugins/sql/pgsql/pgsql.c a lot of changes to fit the new sql plugin API ChangeLog | 38 ++ plugins/format/classic/classic.c | 1 - plugins/format/classic/idmef-db-output.c | 1 - plugins/sql/mysql/mysql.c | 630 +++++++++++++++++++----------- plugins/sql/pgsql/pgsql.c | 542 ++++++++++++++++---------- src/Makefile.am | 3 +- src/db-interface.c | 1 - src/db.c | 2 +- src/format-plugins.c | 2 +- src/include/Makefile.am | 6 +- src/include/plugin-sql.h | 81 +++- src/include/sql-table.h | 73 ---- src/include/sql.h | 69 +++- src/message-queue.c | 60 --- src/queue.c | 181 --------- src/sql-plugins.c | 3 +- src/sql-table.c | 371 ------------------ src/sql.c | 447 ++++++++++++++++++++-- 18 files changed, 1322 insertions(+), 1189 deletions(-) commit 6c4e677b96fec7eb735c6b0bd0a9f232ed15696f Author: Krzysztof Zaraska Date: Wed Jan 1 12:57:05 2003 +0000 * src/db-interface-string.c(get_sql_connection_data): free 'data' structure correctly on error. Happy New Year :) ChangeLog | 6 ++++++ src/db-interface-string.c | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) commit 5ff1d12255a44d307bd12dee46ade26766b341cc Author: Krzysztof Zaraska Date: Tue Dec 31 17:18:14 2002 +0000 * src/db-interface-string.c(get_sql_connection_data): fix memory leaks on errors. ChangeLog | 5 +++++ src/db-interface-string.c | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) commit ec9205eee18b2c42e34a30f7fca21be1a2529c51 Author: Krzysztof Zaraska Date: Tue Dec 31 16:04:40 2002 +0000 * src/db-interface-string.c(get_sql_connection_data): add handling of "port" keyword. Happy New Year :) ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 2c33900af31a91374b5f1cc5843c67ce7565e682 Author: Krzysztof Zaraska Date: Tue Dec 31 16:04:05 2002 +0000 * src/db-interface-string.c(get_sql_connection_data): add handling of "port" keyword. Happy New Year :) src/db-interface-string.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit cbcfbe07e6fe3f36b3ca9bc2bd015a273225dc00 Author: Krzysztof Zaraska Date: Fri Dec 20 13:34:54 2002 +0000 * plugins/sql/pgsql.c(db_query): fix a memory leak and a possible NULL pointer dereference on error. Thanks to Nicolas Delon for pointing this out. ChangeLog | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit c13b76389d17f8aba837653a2c4d26b5afa10de2 Author: Krzysztof Zaraska Date: Fri Dec 20 13:33:25 2002 +0000 * plugins/sql/pgsql.c(db_query): fix a memory leak and a possible NULL pointer dereference on error. Thanks to Nicolas Delon for pointing this out. plugins/sql/pgsql/pgsql.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit fa2ab54d4bd9e074b9097fbaae6221270cc7a790 Author: Krzysztof Zaraska Date: Thu Dec 19 21:41:01 2002 +0000 * plugins/sql/mysql.c Remove no longer used connection_closed state. (db_connect): modify accordingly (db_cleanup): rename to cleanup. Change type to void. Remove unneeded check for connection state. (db_close): call cleanup(). * plugins/pgsql/pgsql.c: ditto. * src/db-connection-data.c(prelude_db_connection_data_destroy): add missing call to free the structure. * src/db-connection.c: * src/include/db-connection.h: (prelude_db_connection_destroy): implemented. * src/db-interface-string.c: fix memory leaks related to calls to parameter_value() * src/db-interface.c (prelude_db_interface_new): set interface state to active after creating (prelude_db_interface_destroy): don't abort on prelude_db_interface_deactivate() error add missing call to prelude_db_connection_destroy() * src/sql.c (prelude_sql_escape): style fix. (prelude_sql_close): free() the structure ChangeLog | 39 +++++++++++++++++++++++ plugins/sql/mysql/mysql.c | 18 +++------- plugins/sql/pgsql/pgsql.c | 18 +++------- src/db-connection-data.c | 2 + src/db-connection.c | 9 +++++ src/db-interface-string.c | 72 ++++++++++++++++++++++++++++--------------- src/db-interface.c | 18 +++++----- src/include/db-connection.h | 2 +- src/sql.c | 4 ++- 9 files changed, 122 insertions(+), 60 deletions(-) commit 8877c186591a920581b4439b1a3efeb66ce2811c Author: Krzysztof Zaraska Date: Thu Dec 19 13:14:39 2002 +0000 * plugins/sql/mysql/mysql.c: implement handling of queries returning results (this has been done by Nicolas Delon ) ChangeLog | 6 ++ plugins/sql/mysql/mysql.c | 118 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 122 insertions(+), 2 deletions(-) commit e756875f3193392fd3735034f98f1abecb7831d7 Author: Krzysztof Zaraska Date: Sat Dec 14 16:55:25 2002 +0000 * src/sql-table.c: add missing copyright notice. ChangeLog | 5 +++++ src/sql-table.c | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) commit 4c2884244fffe161bb4688c0cfd4e5f8470d4c25 Author: Krzysztof Zaraska Date: Fri Dec 13 23:33:59 2002 +0000 * src/db-interface.c: allow interface specification with format = NULL * src/db-interface.c: * src/include/db-interface-h: (prelude_db_interface_get_connection) (prelude_db_interface_get_connection_data) new function. * src/sql-table.c: * src/include/sql-table.h: rename prelude_sql_row_add_field() to prelude_sql_row_set_field() to reflect actual behavior. Add new function prelude_sql_row_get_width(). * plugins/sql/pgsql/pgsql.c(get_query_result): fix a bug preventing function from working :-) (add missing call to prelude_sql_row_set_field()) ChangeLog | 21 +++++++++++++++++++ plugins/sql/pgsql/pgsql.c | 2 + src/db-interface.c | 47 +++++++++++++++++++++++++++++--------------- src/include/db-interface.h | 4 +++ src/include/sql-table.h | 3 +- src/sql-table.c | 11 ++++++++- 6 files changed, 69 insertions(+), 19 deletions(-) commit 9c87234736aee3fbd2eac2c4c82b2454723b61fc Author: Krzysztof Zaraska Date: Mon Dec 9 22:57:01 2002 +0000 *** empty log message *** src/include/param-string.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit e980c913d30d57bfdebdd92238fd2166573e29d2 Author: Krzysztof Zaraska Date: Mon Dec 9 22:55:20 2002 +0000 * src/include/sql.h: * src/include/sql-table.h: * src/include/param-string.h: add missing copyright notice * src/include/param-string.h: add missing #ifdef ChangeLog | 10 ++++++++++ src/include/param-string.h | 29 +++++++++++++++++++++++++++++ src/include/sql-table.h | 23 +++++++++++++++++++++++ src/include/sql.h | 23 +++++++++++++++++++++++ 4 files changed, 85 insertions(+), 0 deletions(-) commit 965e546901a66e416b01c47625cea39ec947cd0c Author: Krzysztof Zaraska Date: Mon Dec 9 22:16:47 2002 +0000 * src/sql-table.c: * src/include/sql-table.h: prefix public functions and structures with prelude_ (so all public SQL functions are now prefixed with prelude_sql_) * plugins/sql/mysql/mysql.c: * plugins/sql/pgsql/pgsql.c: * src/sql.c: * src/include/sql.h: * src/include/plugin-sql.h: update accordingly. * src/include/plugin-sql.h: add missing plugin_init() prototype. * src/include/format.h: removed. ChangeLog | 23 ++++++++++++++- plugins/sql/mysql/mysql.c | 2 +- plugins/sql/pgsql/pgsql.c | 22 +++++++------- src/include/format.h | 15 ---------- src/include/plugin-sql.h | 5 ++- src/include/sql-table.h | 38 +++++++++++++------------- src/include/sql.h | 2 +- src/sql-table.c | 66 ++++++++++++++++++++++---------------------- src/sql.c | 4 +- 9 files changed, 91 insertions(+), 86 deletions(-) commit f9284b9dacd9dda9507bc167719201fc5bb6d6e4 Author: Krzysztof Zaraska Date: Mon Dec 9 21:30:40 2002 +0000 * src/include/format.h: * src/sql.c: prefix public functions with prelude_ (so all public SQL functions are now prefixed with prelude_sql_) * src/include/format.h: * src/db-interface.c: * plugins/format/classic/idmef-db-output.c: modified accordingly ChangeLog | 12 ++ plugins/format/classic/idmef-db-output.c | 230 +++++++++++++++--------------- src/db-interface.c | 6 +- src/include/format.h | 2 +- src/include/sql.h | 18 ++-- src/sql.c | 22 ++-- 6 files changed, 151 insertions(+), 139 deletions(-) commit f8b3c234d5bbfba6ade9bcf4e0f73ad797a1c2ac Author: Krzysztof Zaraska Date: Mon Dec 9 20:43:03 2002 +0000 * src/include/sql.h: * src/sql.c: SQL connection handling code from sql-plugins.c. sql_connection_t structure made opaque. sql.h is a public header, offering application access to our SQL layer. * src/sql-plugins.c: * src/include/plugin-sql.h: remove code moved to sql.[ch]. * src/Makefile.am: * src/include/Makefile.am: modified accordingly * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-output.c: * src/db-interface.c: include "sql.h" instead of "plugin-sql.h" ChangeLog | 22 ++ plugins/format/classic/classic.c | 2 +- plugins/format/classic/idmef-db-output.c | 2 +- src/Makefile.am | 1 + src/db-interface.c | 2 +- src/include/Makefile.am | 1 + src/include/plugin-sql.h | 28 --- src/include/sql.h | 27 +++ src/sql-plugins.c | 268 ------------------------- src/sql.c | 319 ++++++++++++++++++++++++++++++ 10 files changed, 373 insertions(+), 299 deletions(-) commit b6928de35ee93fba8eb6a1422f3fa2538ba629ca Author: Krzysztof Zaraska Date: Sat Dec 7 21:11:56 2002 +0000 * src/db-interface-string.c: remove unneeded includes. ChangeLog | 5 +++++ src/db-interface-string.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) commit b9278d319a0c4d01e43db527809650019b0ab285 Author: Krzysztof Zaraska Date: Sat Dec 7 20:54:34 2002 +0000 * src/db-interface.c(prelude_db_interface_connect): add missing "break" statement * src/db-interface-string.c: * src/include/db-interface-string.h: new file. Reintroducing "ODBC-style" constructor for prelude_db_interface_t. * src/Makefile.am: * src/include/Makefile.am: update accordingly. ChangeLog | 14 ++++ src/Makefile.am | 1 + src/db-interface-string.c | 142 +++++++++++++++++++++++++++++++++++++ src/db-interface.c | 2 + src/include/Makefile.am | 1 + src/include/db-interface-string.h | 29 ++++++++ 6 files changed, 189 insertions(+), 0 deletions(-) commit 6c66af1dd75b32aa8a339b10948e6f8f972a82bd Author: Krzysztof Zaraska Date: Sat Dec 7 20:37:28 2002 +0000 * src/sql-connection-data.c: handle NULL parameter values correctly in all functions * src/include/db-type.h: define prelude_db_type_invalid ChangeLog | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 25611510b726e68213f54f8e1c78f019c7c2f24a Author: Krzysztof Zaraska Date: Sat Dec 7 20:36:06 2002 +0000 * src/sql-connection-data.c: handle NULL parameter values correctly in all functions * src/include/db-type.h: define prelude_db_type_invalid * src/include/db-connection-data.c: * src/include/db-interface.c: removed (fixing wrong commit) src/db-connection-data.c | 90 ++++++++++++++++++++++++++++++++++++++ src/include/db-connection-data.c | 85 ----------------------------------- src/include/db-type.h | 1 + src/sql-connection-data.c | 56 ++++++++++++++++++------ 4 files changed, 133 insertions(+), 99 deletions(-) commit b5b70a60183d8d47efb2c7adafad6c5d775046b3 Author: Krzysztof Zaraska Date: Sat Dec 7 18:24:45 2002 +0000 * src/db-interface.c: don't include "param-string.h" ChangeLog | 5 +++++ src/db-interface.c | 1 - 2 files changed, 5 insertions(+), 1 deletions(-) commit 797daad9a8d304abdb29b36010a49fe1d77dee2a Author: Krzysztof Zaraska Date: Sat Dec 7 18:15:55 2002 +0000 * src/db-interface.c(prelude_db_interface_new): avoid problems when 'format' or 'name' parameter is NULL ChangeLog | 5 +++++ src/db-interface.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletions(-) commit 4036f81b6437bd5aee4c97f1b6ee4096d7cec9fd Author: Krzysztof Zaraska Date: Sat Dec 7 16:19:32 2002 +0000 * src/include/db-type.h: new file. prelude_db_type_t moved from db-connection.h * src/include/db-connection.h: modified accordingly. * src/include/Makefile.am: modified accordingly. * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-output.c: * src/db-connection.c: * src/db-interface.c: * src/db.c: * src/format-plugins.c: * src/sql-plugins.c: include "db-type.h" * src/sql-connection-data.c: * src/include/sql-connection-data.h: (prelude_sql_connection_data_set_name): (prelude_sql_connection_data_get_name): implemented. * src/param-string.c: declare local functions as static ChangeLog | 29 ++++++++++++++++++++++++++ plugins/format/classic/classic.c | 1 + plugins/format/classic/idmef-db-output.c | 1 + src/db-connection.c | 1 + src/db-interface.c | 1 + src/db.c | 1 + src/format-plugins.c | 1 + src/include/Makefile.am | 1 + src/include/db-connection-data.h | 3 +- src/include/db-connection.h | 6 ----- src/include/db-type.h | 33 ++++++++++++++++++++++++++++++ src/include/sql-connection-data.h | 6 ++++- src/param-string.c | 10 ++++---- src/sql-connection-data.c | 18 ++++++++++++++++ src/sql-plugins.c | 1 + 15 files changed, 100 insertions(+), 13 deletions(-) commit 421ca95fa687a7886a9c4f4ecb59c6fa052497b0 Author: Krzysztof Zaraska Date: Sat Dec 7 15:44:32 2002 +0000 * src/db-interface.c: * src/include/db-connection-data.c: add missing copyright notice ChangeLog | 6 ++++++ src/db-interface.c | 22 ++++++++++++++++++++++ src/include/db-connection-data.c | 23 +++++++++++++++++++++++ 3 files changed, 51 insertions(+), 0 deletions(-) commit be401069b1765d7e8e6f24862d79681a26e22923 Author: Krzysztof Zaraska Date: Sat Dec 7 15:33:54 2002 +0000 * src/db-connection-data.c * src/include/db-connection-data.c * src/db-interface.c * src/include/db-interface.h * src/sql-connection-data.c * src/include/sql-connection-data.h new files. Object model for connection management has been totally reworked using opaque datatypes and should finally be correct. * src/db-connection.c: * src/include/db-connection.h: remove code regaring interface object (moved to db-interface.[ch]). Change structure of prelude_db_connection_t and make opaque. * src/db.c: * src/include/db.h: don't include anything in .h * plugins/format/classic/classic.c: * plugins/format/classic/idmef-db-output.c: modify code as necessary * plugins/sql/mysql/mysql.c: * plugins/sql/pgsql/pgsql.c: fix includes accordingly * src/Makefile.am: * src/include/Makefile.am: modify accordingly ChangeLog | 32 ++++ plugins/format/classic/classic.c | 3 +- plugins/format/classic/idmef-db-output.c | 10 +- plugins/sql/mysql/mysql.c | 15 ++- plugins/sql/pgsql/pgsql.c | 19 ++- src/Makefile.am | 3 + src/db-connection.c | 253 ++--------------------------- src/db-interface.c | 254 ++++++++++++++++++++++++++++++ src/db.c | 15 ++- src/format-plugins.c | 1 + src/include/Makefile.am | 6 + src/include/db-connection-data.c | 62 +++++++ src/include/db-connection-data.h | 39 +++++ src/include/db-connection.h | 45 +----- src/include/db-interface.h | 51 ++++++ src/include/db.h | 18 -- src/include/plugin-sql.h | 4 +- src/include/sql-connection-data.h | 56 +++++++ src/sql-connection-data.c | 180 +++++++++++++++++++++ src/sql-plugins.c | 16 ++- 20 files changed, 775 insertions(+), 307 deletions(-) commit 7dadeee523611893730570008558ba0afd4c9c7f Author: Krzysztof Zaraska Date: Sun Dec 1 18:50:14 2002 +0000 sync with old changes to HEAD ChangeLog | 23 ++++++ plugins/format/classic/idmef-db-output.c | 35 +++++---- plugins/format/classic/mysql.sql | 14 ++-- plugins/format/classic/pgsql.sql | 116 +++++++++++++++--------------- 4 files changed, 109 insertions(+), 79 deletions(-) commit a3357fffca40d500884965584dc72f83643e59d9 Author: Yoann Vandoorselaere Date: Tue Sep 24 15:35:57 2002 +0000 *** empty log message *** src/include/db-connection.h | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) commit 19031714c145e09f2f7654a1730b8487389f173f Author: Yoann Vandoorselaere Date: Tue Sep 24 15:34:12 2002 +0000 *** empty log message *** ChangeLog | 16 +++ src/db-connection.c | 217 +++++++++++++++++++++++-------------------- src/include/db-connection.h | 16 +++ 3 files changed, 147 insertions(+), 102 deletions(-) commit 40b0942461fd4cdb95144e048ebd869057312537 Author: Krzysztof Zaraska Date: Mon Sep 16 20:25:23 2002 +0000 *** empty log message *** ChangeLog | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 73f06d40143dea1c77b83d2a3d65e34aa9bf552c Author: Krzysztof Zaraska Date: Mon Sep 16 20:24:59 2002 +0000 moved *.sql to plugins/format/classic plugins/format/classic/mysql.sql | 389 ++++++++++++++++++++++++++++++++++++++ plugins/format/classic/pgsql.sql | 374 ++++++++++++++++++++++++++++++++++++ plugins/sql/mysql/mysql.sql | 389 -------------------------------------- plugins/sql/pgsql/postgres.sql | 374 ------------------------------------ 4 files changed, 763 insertions(+), 763 deletions(-) commit e170508e5f6e1e2cd9f47d2dc799749ace28275f Author: Krzysztof Zaraska Date: Sun Sep 15 20:52:17 2002 +0000 fix transaction handling. remove db_insert(). ChangeLog | 13 +++++ plugins/sql/mysql/mysql.c | 118 +++++++++++++++++++-------------------------- plugins/sql/pgsql/pgsql.c | 78 +++++++++++------------------- src/include/plugin-sql.h | 6 +- src/sql-plugins.c | 4 +- 5 files changed, 96 insertions(+), 123 deletions(-) commit 0948cb136edd510ccb59618ab3d1556ed652b969 Author: Krzysztof Zaraska Date: Thu Sep 12 07:28:14 2002 +0000 *** empty log message *** ChangeLog | 21 +++++++++++++++++++++ README | 42 ++++++++++++++++++++++++++++++++++++++---- configure.in | 16 ++++++++++++++++ 3 files changed, 75 insertions(+), 4 deletions(-) commit 537d1715309210bfb34b20f102878bd792ff28a2 Author: Krzysztof Zaraska Date: Thu Sep 12 07:17:46 2002 +0000 * src/db-connection.c: * src/include/db-connection.h: removed support for connection lists. This should be done in the application. Added a new ODBC-style common connection interface (prelude_db_connect). * src/param-string.c * src/include/param-string.h: Functions needed for parsing connection configuration strings. * src/sql-table.c: made sql_field_t, sql_row_t, sql_table_t be opaque datatype, for the sake of binary compatibility. * lot of cleanup, handle session the right way (tm). plugins/format/classic/classic.c | 2 +- plugins/format/classic/idmef-db-output.c | 2 +- plugins/sql/mysql/mysql.c | 344 +++++++++------------ plugins/sql/pgsql/pgsql.c | 512 ++++++++++++++---------------- src/Makefile.am | 5 +- src/db-connection.c | 213 +++++++------ src/db.c | 38 +-- src/format-plugins.c | 39 +--- src/include/Makefile.am | 2 + src/include/db-connection.h | 18 +- src/include/db.h | 3 +- src/include/param-string.h | 1 + src/include/plugin-format.h | 8 +- src/include/plugin-sql.h | 26 +- src/include/sql-table.h | 59 ++--- src/param-string.c | 211 ++++++++++++ src/sql-plugins.c | 72 ++--- src/sql-table.c | 262 +++++++++++----- 18 files changed, 1003 insertions(+), 814 deletions(-) commit 0e9b4da3ff12f762f8fa75faaf74e4988d55980c Author: Yoann Vandoorselaere Date: Mon Aug 26 09:43:25 2002 +0000 * src/sql-plugins.c: if va_copy isn't defined (C99), check for __va_copy (C89). If __va_copy isn't available, then fallback on the memcpy() method, but give a compile warning as well explaining this might result in undefined behavior on certain architecture. generate_query(): copy the variable argument list in case generate_dynamic_query() is to be called. This avoid undefined behavior on some architecture, where you can't use a variable argument list twice. ChangeLog | 12 ++++++++++++ src/sql-plugins.c | 32 +++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletions(-) commit 9b3d6221000542b44052a82f197758ecaeb22025 Author: Yoann Vandoorselaere Date: Mon Aug 26 08:23:45 2002 +0000 2002-08-26 Yoann Vandoorselaere * src/sql-plugins.c (sql_query): (sql_insert): kill code duplication, use generate_query(). (generate_query): new function. Fix an off by one in sql_insert() and sql_query. ChangeLog | 6 ++ src/sql-plugins.c | 140 +++++++++++++++++++++++------------------------------ 2 files changed, 67 insertions(+), 79 deletions(-) commit 58d96f56f7c8b8d4f80c517d7f83b55c6a32f644 Author: Yoann Vandoorselaere Date: Sun Aug 25 22:39:05 2002 +0000 *** empty log message *** ChangeLog | 4 ++++ configure.in | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) commit 3f396fdab8e224650ed50080f429f8ea1fefb3bb Author: Yoann Vandoorselaere Date: Sun Aug 25 14:06:58 2002 +0000 2002-08-25 Yoann Vandoorselaere * src/format-plugins.c: avoid using global variable when possible. Style fix. ChangeLog | 5 +++++ src/format-plugins.c | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit 810783cd42383f2a0a2d7d8ec09125945839793c Author: Krzysztof Zaraska Date: Fri Aug 23 22:02:02 2002 +0000 removed rh artifacts ;-) autogen.sh | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 25ba5165252697d95c4a7397d41a37abbcf89095 Author: Krzysztof Zaraska Date: Fri Aug 23 21:15:44 2002 +0000 *** empty log message *** ChangeLog | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- README | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletions(-) commit 32a0fc085b51eb90945cc91ec6facb15b2644a22 Author: Krzysztof Zaraska Date: Fri Aug 23 21:14:35 2002 +0000 mysql plugin ported. README file added. plugins/format/classic/classic.c | 8 - plugins/sql/Makefile.am | 3 +- plugins/sql/mysql/Makefile.am | 2 +- plugins/sql/mysql/mysql.c | 343 ++++++++++++++++++++++++++++---------- plugins/sql/pgsql/pgsql.c | 31 ++-- src/db-connection.c | 16 +- src/include/plugin-sql.h | 4 +- src/sql-plugins.c | 7 +- 8 files changed, 285 insertions(+), 129 deletions(-) commit b188cbca62acf9619b0ee93a628780e8cb4d50e3 Author: Krzysztof Zaraska Date: Thu Aug 22 17:24:36 2002 +0000 clean up. improve interface handling code. plugins/format/classic/classic.c | 4 +- plugins/format/classic/idmef-db-output.c | 4 +- plugins/format/classic/include/idmef-db-output.h | 2 +- src/db-connection.c | 163 +++++++++++++++++----- src/db.c | 67 +++++---- src/include/db-connection.h | 59 +++++++- src/include/db.h | 8 +- src/include/plugin-format.h | 2 +- 8 files changed, 228 insertions(+), 81 deletions(-) commit e3305bf6602287a7e98bb15927076dcbf7f21068 Author: Krzysztof Zaraska Date: Thu Aug 22 15:25:50 2002 +0000 initial db-work commit ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 2a1439f82ecc3675fd2b677a82afdc08bb3a25e3 Author: Krzysztof Zaraska Date: Thu Aug 22 15:13:04 2002 +0000 *** empty log message *** plugins/format/classic/classic.c | 2 + plugins/format/classic/idmef-db-output.c | 96 +++++++++++++++--------------- src/db-connection.c | 6 ++ src/include/plugin-sql.h | 16 +++-- src/sql-plugins.c | 38 +++--------- 5 files changed, 74 insertions(+), 84 deletions(-) commit fb7e88026bfe27a02d69b7d8ae42806f8b97d441 Author: Krzysztof Zaraska Date: Wed Aug 21 23:19:21 2002 +0000 Initial revision COPYING | 340 ++++++ INSTALL | 182 ++++ Makefile.am | 3 + acconfig.h | 8 + acinclude.m4 | 149 +++ autogen.sh | 6 + configure.in | 183 ++++ libpreludedb-config.in | 71 ++ plugins/Makefile.am | 1 + plugins/filters/Makefile.am | 5 + plugins/filters/skeleton/Makefile.am | 6 + plugins/filters/skeleton/skeleton.c | 163 +++ plugins/format/Makefile.am | 1 + plugins/format/classic/Makefile.am | 6 + plugins/format/classic/classic.c | 104 ++ plugins/format/classic/idmef-db-output.c | 1255 ++++++++++++++++++++++ plugins/format/classic/include/idmef-db-output.h | 30 + plugins/format/new/idmef-db-output.c | 401 +++++++ plugins/sql/Makefile.am | 6 + plugins/sql/mysql/Makefile.am | 11 + plugins/sql/mysql/mysql.c | 260 +++++ plugins/sql/mysql/mysql.sql | 389 +++++++ plugins/sql/pgsql/Makefile.am | 12 + plugins/sql/pgsql/pgsql.c | 482 +++++++++ plugins/sql/pgsql/postgres.sql | 374 +++++++ src/Makefile.am | 16 + src/db-connection.c | 167 +++ src/db.c | 74 ++ src/dispatch.c | 89 ++ src/filter-plugins.c | 202 ++++ src/format-plugins.c | 112 ++ src/gdb.c | 33 + src/include/Makefile.am | 15 + src/include/db-connection.h | 19 + src/include/db.h | 49 + src/include/dispatch.h | 16 + src/include/format.h | 15 + src/include/gdb.h | 7 + src/include/plugin-filter.h | 88 ++ src/include/plugin-format.h | 51 + src/include/plugin-sql.h | 133 +++ src/include/queue.h | 39 + src/include/sql-table.h | 66 ++ src/message-queue.c | 60 + src/queue.c | 181 ++++ src/sql-plugins.c | 357 ++++++ src/sql-table.c | 225 ++++ 47 files changed, 6462 insertions(+), 0 deletions(-) libpreludedb-1.0.0/compile0000755000076400007640000000727111347715642012475 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 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 # . 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 $? ;; esac ofile= cfile= eat= 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: libpreludedb-1.0.0/libmissing/0000775000076400007640000000000011347715757013341 500000000000000libpreludedb-1.0.0/libmissing/string.in.h0000664000076400007640000005551311330611105015324 00000000000000/* A GNU-like . Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _GL_STRING_H #define _GL_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The attribute __pure__ was added in gcc 2.96. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) # define __pure__ /* empty */ # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # define memchr rpl_memchr extern void *memchr (void const *__s, int __c, size_t __n) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # define memmem rpl_memmem # endif # if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@ extern void *memmem (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ extern void *mempcpy (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ extern void *memrchr (void const *, int, size_t) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ extern void *rawmemchr (void const *__s, int __c_in) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ extern char *stpcpy (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if ! @HAVE_STPNCPY@ # define stpncpy gnu_stpncpy extern char *stpncpy (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if ! @HAVE_STRCHRNUL@ extern char *strchrnul (char const *__s, int __c_in) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # undef strdup # define strdup rpl_strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@ extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # undef strndup # define strndup rpl_strndup # endif # if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if ! @HAVE_DECL_STRNLEN@ extern size_t strnlen (char const *__string, size_t __maxlen) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ extern char *strpbrk (char const *__s, char const *__accept) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ extern char *strsep (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2)); # endif # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # define strstr rpl_strstr extern char *strstr (const char *haystack, const char *needle) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # define strcasestr rpl_strcasestr # endif # if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@ extern char *strcasestr (const char *haystack, const char *needle) __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # undef strtok_r # define strtok_r rpl_strtok_r # elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@ extern char *strtok_r (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3)); # endif # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # define mbslen rpl_mbslen # endif extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ extern char * mbsstr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ extern int mbscasecmp (const char *s1, const char *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ extern int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case, returning less than, equal to or greater than zero if this initial segment is lexicographically less than, equal to or greater than PREFIX. Note: This function may, in multibyte locales, return 0 if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ extern char * mbspcasecmp (const char *string, const char *prefix) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ extern char * mbscasestr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ extern size_t mbscspn (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ extern char * mbspbrk (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ extern size_t mbsspn (const char *string, const char *reject) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ extern char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ extern char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # undef strerror # define strerror rpl_strerror extern char *strerror (int); # endif #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # define strsignal rpl_strsignal # endif # if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@ extern char *strsignal (int __sig); # endif #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ libpreludedb-1.0.0/libmissing/snprintf.c0000664000076400007640000000366111330611105015244 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } libpreludedb-1.0.0/libmissing/asnprintf.c0000664000076400007640000000220511330611104015375 00000000000000/* Formatted output to strings. Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "vasnprintf.h" #include char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; va_start (args, format); result = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return result; } libpreludedb-1.0.0/libmissing/xsize.h0000664000076400007640000000674211330611106014554 00000000000000/* xsize.h -- Checked size_t computations. Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider type and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ libpreludedb-1.0.0/libmissing/memchr.valgrind0000664000076400007640000000065211330611105016235 00000000000000# Suppress a valgrind message about use of uninitialized memory in memchr(). # POSIX states that when the character is found, memchr must not read extra # bytes in an overestimated length (for example, where memchr is used to # implement strnlen). However, we use a safe word read to provide a speedup. { memchr-value4 Memcheck:Value4 fun:rpl_memchr } { memchr-value8 Memcheck:Value8 fun:rpl_memchr } libpreludedb-1.0.0/libmissing/memchr.c0000664000076400007640000001337311330611105014655 00000000000000/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _LIBC # include #endif #include #include #if defined _LIBC # include #else # define reg_char char #endif #include #if HAVE_BP_SYM_H || defined _LIBC # include #else # define BP_SYM(sym) sym #endif #undef __memchr #ifdef _LIBC # undef memchr #endif #ifndef weak_alias # define __memchr memchr #endif /* Search no more than N bytes of S for C. */ void * __memchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n, ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif libpreludedb-1.0.0/libmissing/m4/0000775000076400007640000000000011347715757013661 500000000000000libpreludedb-1.0.0/libmissing/m4/stddef_h.m40000664000076400007640000000277511330611105015604 00000000000000dnl A placeholder for POSIX 2008 , for platforms that have issues. # stddef_h.m4 serial 1 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then gl_CHECK_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) STDDEF_H=''; AC_SUBST([STDDEF_H]) ]) libpreludedb-1.0.0/libmissing/m4/threadlib.m40000664000076400007640000003055611330611105015760 00000000000000# threadlib.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, dnl USE_PTH_THREADS, USE_WIN32_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for dnl programs that really need multithread functionality. The difference dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for dnl multithread-safe programs. AC_DEFUN([gl_THREADLIB_EARLY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) ]) dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_EARLY_BODY], [ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that dnl influences the result of the autoconf tests that test for *_unlocked dnl declarations, on AIX 5 at least. Therefore it must come early. AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. m4_divert_text([DEFAULTS], [gl_use_threads_default=]) AC_ARG_ENABLE([threads], AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) AC_HELP_STRING([--disable-threads], [build without multithread safety]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else changequote(,)dnl case "$host_os" in dnl Disable multithreading by default on OSF/1, because it interferes dnl with fork()/exec(): When msgexec is linked with -lpthread, its dnl child process gets an endless segmentation fault inside execvp(). dnl Disable multithreading by default on Cygwin 1.5.x, because it has dnl bugs that lead to endless loops or crashes. See dnl . osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac changequote([,])dnl fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_TRY_LINK test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi ]) dnl The guts of gl_THREADLIB. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_BODY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. AC_MSG_CHECKING([whether imported symbols can be declared weak]) gl_have_weak=no AC_TRY_LINK([extern void xyzzy (); #pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) AC_MSG_RESULT([$gl_have_weak]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. AC_CHECK_HEADER([pthread.h], [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. AC_TRY_LINK([#include ], [pthread_mutex_lock((pthread_mutex_t*)0); pthread_mutexattr_init((pthread_mutexattr_t*)0);], [gl_have_pthread=yes]) # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. AC_CHECK_LIB([pthread], [pthread_kill], [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. case "$host_os" in solaris* | hpux*) AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], [Define if the pthread_in_use() detection is hard.]) esac ]) else # Some library is needed. Try libpthread and libc_r. AC_CHECK_LIB([pthread], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. AC_CHECK_LIB([c_r], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], [1], [Define if the POSIX multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" AC_TRY_LINK([#include #include ], [thr_self();], [gl_have_solaristhread=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_SOLARIS_THREADS], [1], [Define if the old Solaris multithreading library can be used.]) if test $gl_have_weak = yes; then AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" AC_LIB_LINKFLAGS([pth]) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" AC_TRY_LINK([#include ], [pth_self();], [gl_have_pth=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_PTH_THREADS], [1], [Define if the GNU Pth multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if test $gl_have_weak = yes; then AC_DEFINE([USE_PTH_THREADS_WEAK], [1], [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=win32 AC_DEFINE([USE_WIN32_THREADS], [1], [Define if the Win32 multithreading API can be used.]) fi fi fi fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) AC_SUBST([LIBTHREAD]) AC_SUBST([LTLIBTHREAD]) AC_SUBST([LIBMULTITHREAD]) AC_SUBST([LTLIBMULTITHREAD]) ]) AC_DEFUN([gl_THREADLIB], [ AC_REQUIRE([gl_THREADLIB_EARLY]) AC_REQUIRE([gl_THREADLIB_BODY]) ]) dnl gl_DISABLE_THREADS dnl ------------------ dnl Sets the gl_THREADLIB default so that threads are not used by default. dnl The user can still override it at installation time, by using the dnl configure option '--enable-threads'. AC_DEFUN([gl_DISABLE_THREADS], [ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) ]) dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock dnl flavours option weak result dnl --------------- --------- --------- -------- --------- dnl Linux 2.4/glibc posix -lpthread Y OK dnl dnl GNU Hurd/glibc posix dnl dnl FreeBSD 5.3 posix -lc_r Y dnl posix -lkse ? Y dnl posix -lpthread ? Y dnl posix -lthr Y dnl dnl FreeBSD 5.2 posix -lc_r Y dnl posix -lkse Y dnl posix -lthr Y dnl dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl dnl NetBSD 1.6 -- dnl dnl OpenBSD 3.4 posix -lpthread Y OK dnl dnl MacOS X 10.[123] posix -lpthread Y OK dnl dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl dnl IRIX 6.5 posix -lpthread Y 0.5 dnl dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl dnl Mingw win32 N OK dnl dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: dnl OK if all three tests terminate OK, dnl 0.5 if the first test terminates OK but the second one loops endlessly, dnl 0.0 if the first test already loops endlessly. libpreludedb-1.0.0/libmissing/m4/size_max.m40000664000076400007640000000563011330611105015634 00000000000000# size_max.m4 serial 9 dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], [gl_cv_size_max=yes]) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include #include ], [size_t_bits_minus_1=]) AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], [#include ], [fits_in_uint=]) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_TRY_COMPILE([#include extern size_t foo; extern unsigned long foo; ], [], [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else dnl Shouldn't happen, but who knows... gl_cv_size_max='((size_t)~(size_t)0)' fi fi ]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after dnl . Remember that the #undef in AH_VERBATIM gets replaced with dnl #define by AC_DEFINE_UNQUOTED. AH_VERBATIM([SIZE_MAX], [/* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) libpreludedb-1.0.0/libmissing/m4/lock.m40000664000076400007640000000231411330611105014741 00000000000000# lock.m4 serial 10 (gettext-0.18) dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_THREADLIB]) if test "$gl_threads_api" = posix; then # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. AC_CHECK_TYPE([pthread_rwlock_t], [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_TRY_COMPILE([#include ], [#if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) fi gl_PREREQ_LOCK ]) # Prerequisites of lib/lock.c. AC_DEFUN([gl_PREREQ_LOCK], [ AC_REQUIRE([AC_C_INLINE]) ]) libpreludedb-1.0.0/libmissing/m4/xsize.m40000664000076400007640000000066211330611105015157 00000000000000# xsize.m4 serial 4 dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([AC_C_INLINE]) AC_CHECK_HEADERS([stdint.h]) ]) libpreludedb-1.0.0/libmissing/m4/gnulib-cache.m40000664000076400007640000000266011330611107016340 00000000000000# Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the specification of how gnulib-tool is used. # It acts as a cache: It is written and read by gnulib-tool. # In projects using CVS, this file is meant to be stored in CVS, # like the configure.ac and various Makefile.am files. # Specification in the form of a command-line invocation: # gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files lock snprintf strdup strndup time_r vsnprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ lock snprintf strdup strndup time_r vsnprintf ]) gl_AVOID([]) gl_SOURCE_BASE([libmissing]) gl_M4_BASE([libmissing/m4]) gl_PO_BASE([]) gl_DOC_BASE([libmissing/doc]) gl_TESTS_BASE([libmissing/tests]) gl_WITH_TESTS gl_LIB([libmissing]) gl_LGPL gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) gl_VC_FILES([false]) libpreludedb-1.0.0/libmissing/m4/extensions.m40000664000076400007640000001052711330611105016215 00000000000000# serial 9 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2010 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) libpreludedb-1.0.0/libmissing/m4/float_h.m40000664000076400007640000000101511330611105015422 00000000000000# float_h.m4 serial 3 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) FLOAT_H= case "$host_os" in beos* | openbsd*) FLOAT_H=float.h gl_CHECK_NEXT_HEADERS([float.h]) ;; esac AC_SUBST([FLOAT_H]) ]) libpreludedb-1.0.0/libmissing/m4/snprintf.m40000664000076400007640000000203411330611105015653 00000000000000# snprintf.m4 serial 5 dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_snprintf_usable=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_snprintf_usable=yes ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_REPLACE_SNPRINTF fi AC_CHECK_DECLS_ONCE([snprintf]) if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([snprintf]) if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi gl_PREREQ_SNPRINTF ]) # Prerequisites of lib/snprintf.c. AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) libpreludedb-1.0.0/libmissing/m4/memchr.m40000664000076400007640000000516311330611105015271 00000000000000# memchr.m4 serial 7 dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) dnl These days, we assume memchr is present. But just in case... AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([memchr]) if test $ac_cv_func_memchr = no; then gl_PREREQ_MEMCHR REPLACE_MEMCHR=1 fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif ]], [[ char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) return 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) return 2; } return 0; ]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], [dnl Be pessimistic for now. gl_cv_func_memchr_works="guessing no"])]) if test "$gl_cv_func_memchr_works" != yes; then gl_PREREQ_MEMCHR REPLACE_MEMCHR=1 AC_LIBOBJ([memchr]) fi fi ]) # Prerequisites of lib/memchr.c. AC_DEFUN([gl_PREREQ_MEMCHR], [ AC_CHECK_HEADERS([bp-sym.h]) ]) libpreludedb-1.0.0/libmissing/m4/wchar_t.m40000664000076400007640000000135311330611105015442 00000000000000# wchar_t.m4 serial 3 (gettext-0.18) dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_TRY_COMPILE([#include wchar_t foo = (wchar_t)'\0';], , [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) libpreludedb-1.0.0/libmissing/m4/time_h.m40000664000076400007640000000517011330611105015261 00000000000000# Configure a more-standard replacement for . # Copyright (C) 2000-2001, 2003-2007, 2009-2010 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. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared dnl in time.h or sys/time.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) ]) libpreludedb-1.0.0/libmissing/m4/stdio_h.m40000664000076400007640000001633111330611105015446 00000000000000# stdio_h.m4 serial 24 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDIO_H_DEFAULTS], [ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) ]) dnl Code shared by fseeko and ftello. Determine if large files are supported, dnl but stdin does not start as a large file by default. AC_DEFUN([gl_STDIN_LARGE_OFFSET], [ AC_CACHE_CHECK([whether stdin defaults to large file offsets], [gl_cv_var_stdin_large_offset], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[#if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif]])], [gl_cv_var_stdin_large_offset=yes], [gl_cv_var_stdin_large_offset=no])]) ]) libpreludedb-1.0.0/libmissing/m4/errno_h.m40000664000076400007640000000554511330611105015456 00000000000000# errno_h.m4 serial 6 dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined ECANCELED booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_CHECK_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) libpreludedb-1.0.0/libmissing/m4/inttypes_h.m40000664000076400007640000000167111330611105016204 00000000000000# inttypes_h.m4 serial 9 dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], [gl_cv_header_inttypes_h=yes], [gl_cv_header_inttypes_h=no])]) if test $gl_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) libpreludedb-1.0.0/libmissing/m4/strdup.m40000664000076400007640000000167411330611105015342 00000000000000# strdup.m4 serial 11 dnl Copyright (C) 2002-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([strdup]) AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi gl_PREREQ_STRDUP ]) AC_DEFUN([gl_FUNC_STRDUP_POSIX], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 AC_LIBOBJ([strdup]) else AC_REPLACE_FUNCS([strdup]) fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi gl_PREREQ_STRDUP ]) # Prerequisites of lib/strdup.c. AC_DEFUN([gl_PREREQ_STRDUP], [:]) libpreludedb-1.0.0/libmissing/m4/lib-ld.m40000664000076400007640000000660311330611105015161 00000000000000# lib-ld.m4 serial 4 (gettext-0.18) dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) 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. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path 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 "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) libpreludedb-1.0.0/libmissing/m4/vsnprintf.m40000664000076400007640000000205611330611105016045 00000000000000# vsnprintf.m4 serial 5 dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_vsnprintf_usable=no AC_CHECK_FUNCS([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_cv_func_vsnprintf_usable=yes ;; esac fi if test $gl_cv_func_vsnprintf_usable = no; then gl_REPLACE_VSNPRINTF fi AC_CHECK_DECLS_ONCE([vsnprintf]) if test $ac_cv_have_decl_vsnprintf = no; then HAVE_DECL_VSNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 fi gl_PREREQ_VSNPRINTF ]) # Prerequisites of lib/vsnprintf.c. AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) libpreludedb-1.0.0/libmissing/m4/wchar.m40000664000076400007640000001307711330611105015125 00000000000000dnl A placeholder for ISO C99 , for platforms that have issues. dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. # wchar.m4 serial 31 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) dnl Prepare for creating substitute . dnl Check for (missing in Linux uClibc when built without wide dnl character support). dnl is always overridden, because of GNULIB_POSIXCHECK. AC_CHECK_HEADERS_ONCE([wchar.h]) gl_CHECK_NEXT_HEADERS([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require additional headers. */ #ifndef __GLIBC__ # include # include # include #endif #include ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth]) ]) dnl Check whether is usable at all. AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to dnl 'gnu_inline'. See dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], [gl_cv_header_wchar_h_correct_inline], [gl_cv_header_wchar_h_correct_inline=yes AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod #include extern int zero (void); int main () { return zero(); } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest1.$ac_objext AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod #include int zero (void) { return 0; } ]])]) if AC_TRY_EVAL([ac_compile]); then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) fi ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_WCHAR_H], [ dnl This is a no-op, because is always overridden. : ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) ]) libpreludedb-1.0.0/libmissing/m4/longlong.m40000664000076400007640000001057511330611105015640 00000000000000# longlong.m4 serial 14 dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug isn't important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [ac_cv_type_long_long_int=yes], [ac_cv_type_long_long_int=no], [ac_cv_type_long_long_int=yes])], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type `long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [ac_cv_type_unsigned_long_long_int=yes], [ac_cv_type_unsigned_long_long_int=no])]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) libpreludedb-1.0.0/libmissing/m4/wint_t.m40000664000076400007640000000172611330611105015323 00000000000000# wint_t.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_TRY_COMPILE([ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0';], , [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) fi ]) libpreludedb-1.0.0/libmissing/m4/gnulib-common.m40000664000076400007640000001176711330611105016573 00000000000000# gnulib-common.m4 serial 12 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED ]) ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module. AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when using the gnulib module ]$1[.]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. # Remove this macro when we can assume autoconf >= 2.60. m4_ifdef([AC_PROG_MKDIR_P], [], [ AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) libpreludedb-1.0.0/libmissing/m4/time_r.m40000664000076400007640000000267411330611105015301 00000000000000dnl Reentrant time functions like localtime_r. dnl Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_TIME_R], [ dnl Persuade glibc and Solaris to declare localtime_r. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], [gl_cv_time_r_posix], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[/* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0);]])], [gl_cv_time_r_posix=yes], [gl_cv_time_r_posix=no])]) if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 AC_LIBOBJ([time_r]) gl_PREREQ_TIME_R fi ]) # Prerequisites of lib/time_r.c. AC_DEFUN([gl_PREREQ_TIME_R], [ : ]) libpreludedb-1.0.0/libmissing/m4/stdint_h.m40000664000076400007640000000164111330611105015627 00000000000000# stdint_h.m4 serial 8 dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1; return !i;], [gl_cv_header_stdint_h=yes], [gl_cv_header_stdint_h=no])]) if test $gl_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) libpreludedb-1.0.0/libmissing/m4/yield.m40000664000076400007640000000135711330611105015125 00000000000000# yield.m4 serial 2 dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_YIELD], [ AC_REQUIRE([gl_THREADLIB]) dnl On some systems, sched_yield is in librt, rather than in libpthread. YIELD_LIB= if test $gl_threads_api = posix; then dnl Solaris has sched_yield in librt, not in libpthread or libc. AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) fi AC_SUBST([YIELD_LIB]) ]) libpreludedb-1.0.0/libmissing/m4/gnulib-tool.m40000664000076400007640000000264711330611105016255 00000000000000# gnulib-tool.m4 serial 2 dnl Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl The following macros need not be invoked explicitly. dnl Invoking them does nothing except to declare default arguments dnl for "gnulib-tool --import". dnl Usage: gl_LOCAL_DIR([DIR]) AC_DEFUN([gl_LOCAL_DIR], []) dnl Usage: gl_MODULES([module1 module2 ...]) AC_DEFUN([gl_MODULES], []) dnl Usage: gl_AVOID([module1 module2 ...]) AC_DEFUN([gl_AVOID], []) dnl Usage: gl_SOURCE_BASE([DIR]) AC_DEFUN([gl_SOURCE_BASE], []) dnl Usage: gl_M4_BASE([DIR]) AC_DEFUN([gl_M4_BASE], []) dnl Usage: gl_PO_BASE([DIR]) AC_DEFUN([gl_PO_BASE], []) dnl Usage: gl_DOC_BASE([DIR]) AC_DEFUN([gl_DOC_BASE], []) dnl Usage: gl_TESTS_BASE([DIR]) AC_DEFUN([gl_TESTS_BASE], []) dnl Usage: gl_WITH_TESTS AC_DEFUN([gl_WITH_TESTS], []) dnl Usage: gl_LIB([LIBNAME]) AC_DEFUN([gl_LIB], []) dnl Usage: gl_LGPL or gl_LGPL([VERSION]) AC_DEFUN([gl_LGPL], []) dnl Usage: gl_MAKEFILE_NAME([FILENAME]) AC_DEFUN([gl_MAKEFILE_NAME], []) dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) dnl Usage: gl_MACRO_PREFIX([PREFIX]) AC_DEFUN([gl_MACRO_PREFIX], []) dnl Usage: gl_PO_DOMAIN([DOMAIN]) AC_DEFUN([gl_PO_DOMAIN], []) dnl Usage: gl_VC_FILES([BOOLEAN]) AC_DEFUN([gl_VC_FILES], []) libpreludedb-1.0.0/libmissing/m4/onceonly.m40000664000076400007640000000753211330611105015646 00000000000000# onceonly.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2010 Free Software Foundation, dnl Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl This file defines some "once only" variants of standard autoconf macros. dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL dnl The advantage is that the check for each of the headers/functions/decls dnl will be put only once into the 'configure' file. It keeps the size of dnl the 'configure' file down, and avoids redundant output when 'configure' dnl is run. dnl The drawback is that the checks cannot be conditionalized. If you write dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to dnl empty, and the check will be inserted before the body of the AC_DEFUNed dnl function. dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested dnl headers at once, thus reducing the size of 'configure'. It is known to work dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. dnl Autoconf version 2.59 plus gnulib is required; this file is not needed dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first dnl argument! AC_PREREQ([2.59]) # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ : m4_foreach_w([gl_HEADER_NAME], [$1], [ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___])), [ m4_divert_text([INIT_PREPARE], [gl_header_list="$gl_header_list gl_HEADER_NAME"]) gl_HEADERS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) ]) AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___]))) ]) ]) m4_define([gl_HEADERS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_header_list=]) AC_CHECK_HEADERS([$gl_header_list]) m4_define([gl_HEADERS_EXPANSION], []) ]) # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ : m4_foreach_w([gl_FUNC_NAME], [$1], [ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ m4_divert_text([INIT_PREPARE], [gl_func_list="$gl_func_list gl_FUNC_NAME"]) gl_FUNCS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) ]) AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) ]) ]) m4_define([gl_FUNCS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_func_list=]) AC_CHECK_FUNCS([$gl_func_list]) m4_define([gl_FUNCS_EXPANSION], []) ]) # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of # AC_CHECK_DECLS(DECL1, DECL2, ...). AC_DEFUN([AC_CHECK_DECLS_ONCE], [ : m4_foreach_w([gl_DECL_NAME], [$1], [ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) ]) AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) ]) ]) libpreludedb-1.0.0/libmissing/m4/printf.m40000664000076400007640000015500411330611105015320 00000000000000# printf.m4 serial 33 dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test whether the *printf family of functions supports the 'j', 'z', 't', dnl 'L' size specifiers. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_sizes_c99. AC_DEFUN([gl_PRINTF_SIZES_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports size specifiers as in C99], [gl_cv_func_printf_sizes_c99], [ AC_TRY_RUN([ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) return 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) return 1; return 0; }], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";; solaris*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports 'long double' dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_long_double. AC_DEFUN([gl_PRINTF_LONG_DOUBLE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports 'long double' arguments], [gl_cv_func_printf_long_double], [ AC_TRY_RUN([ #include #include static char buf[10000]; int main () { buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) return 1; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) return 1; return 0; }], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no], [ changequote(,)dnl case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; *) gl_cv_func_printf_long_double="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'double' arguments and negative zero arguments in the %f, %e, %g dnl directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite. AC_DEFUN([gl_PRINTF_INFINITE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], [gl_cv_func_printf_infinite], [ AC_TRY_RUN([ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { if (sprintf (buf, "%f", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%f", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%e", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%e", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%g", 1.0 / 0.0) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%g", -1.0 / 0.0) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) return 1; return 0; }], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite_long_double. AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl The user can set or unset the variable gl_printf_safe to indicate dnl that he wishes a safe handling of non-IEEE-754 'long double' values. if test -n "$gl_printf_safe"; then AC_DEFINE([CHECK_PRINTF_SAFE], [1], [Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values.]) fi case "$gl_cv_func_printf_long_double" in *yes) AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], [gl_cv_func_printf_infinite_long_double], [ AC_TRY_RUN([ ]GL_NOCRASH[ #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) return 1; if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) return 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) return 1; } #endif return 0; }], [gl_cv_func_printf_infinite_long_double=yes], [gl_cv_func_printf_infinite_long_double=no], [ changequote(,)dnl case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";; darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite_long_double="guessing no";; netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac changequote([,])dnl ]) ]) ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac ]) dnl Test whether the *printf family of functions supports the 'a' and 'A' dnl conversion specifier for hexadecimal output of floating-point numbers. dnl (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_a. AC_DEFUN([gl_PRINTF_DIRECTIVE_A], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], [gl_cv_func_printf_directive_a], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) return 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) return 1; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 || buf[0] == '0') return 1; /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) return 1; return 0; }], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no], [ case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) AC_EGREP_CPP([BZ2908], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2) BZ2908 #endif #endif ], [gl_cv_func_printf_directive_a="guessing yes"], [gl_cv_func_printf_directive_a="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %F format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_f. AC_DEFUN([gl_PRINTF_DIRECTIVE_F], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'F' directive], [gl_cv_func_printf_directive_f], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) return 1; if (sprintf (buf, "%F", 1.0 / 0.0) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) return 1; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) return 1; return 0; }], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";; solaris*) gl_cv_func_printf_directive_f="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %n format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_n. AC_DEFUN([gl_PRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'n' directive], [gl_cv_func_printf_directive_n], [ AC_TRY_RUN([ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; }], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no], [ changequote(,)dnl case "$host_os" in *) gl_cv_func_printf_directive_n="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the %ls format dnl directive and in particular, when a precision is specified, whether dnl the functions stop converting the wide string argument when the number dnl of bytes that have been produced by this conversion equals or exceeds dnl the precision. dnl Result is gl_cv_func_printf_directive_ls. AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'ls' directive], [gl_cv_func_printf_directive_ls], [ AC_TRY_RUN([ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) return 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) return 1; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) return 1; } return 0; }], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no], [ changequote(,)dnl case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with positions. (POSIX:2001) dnl Result is gl_cv_func_printf_positions. AC_DEFUN([gl_PRINTF_POSITIONS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], [gl_cv_func_printf_positions], [ AC_TRY_RUN([ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no], [ changequote(,)dnl case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) dnl Result is gl_cv_func_printf_flag_grouping. AC_DEFUN([gl_PRINTF_FLAG_GROUPING], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the grouping flag], [gl_cv_func_printf_flag_grouping], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; }], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no], [ changequote(,)dnl case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the - flag correctly. dnl (ISO C99.) See dnl dnl Result is gl_cv_func_printf_flag_leftadjust. AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], [gl_cv_func_printf_flag_leftadjust], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; }], [gl_cv_func_printf_flag_leftadjust=yes], [gl_cv_func_printf_flag_leftadjust=no], [ changequote(,)dnl case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports padding of non-finite dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See dnl dnl Result is gl_cv_func_printf_flag_zero. AC_DEFUN([gl_PRINTF_FLAG_ZERO], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the zero flag correctly], [gl_cv_func_printf_flag_zero], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; }], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports large precisions. dnl On mingw, precisions larger than 512 are treated like 512, in integer, dnl floating-point or pointer output. On BeOS, precisions larger than 1044 dnl crash the program. dnl Result is gl_cv_func_printf_precision. AC_DEFUN([gl_PRINTF_PRECISION], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports large precisions], [gl_cv_func_printf_precision], [ AC_TRY_RUN([ #include #include static char buf[5000]; int main () { #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) return 1; return 0; }], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no], [ changequote(,)dnl case "$host_os" in # Guess no only on native Win32 and BeOS systems. mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions recovers gracefully in case dnl of an out-of-memory condition, or whether it crashes the entire program. dnl Result is gl_cv_func_printf_enomem. AC_DEFUN([gl_PRINTF_ENOMEM], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_MULTIARCH]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf survives out-of-memory conditions], [gl_cv_func_printf_enomem], [ gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then AC_LANG_CONFTEST([AC_LANG_SOURCE([ ]GL_NOCRASH[ changequote(,)dnl #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then (./conftest result=$? if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else dnl A universal build on Apple MacOS X platforms. dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac changequote([,])dnl fi ]) ]) dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) dnl Result is ac_cv_func_snprintf. AC_DEFUN([gl_SNPRINTF_PRESENCE], [ AC_CHECK_FUNCS_ONCE([snprintf]) ]) dnl Test whether the string produced by the snprintf function is always NUL dnl terminated. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_truncation_c99. AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf truncates the result as in C99], [gl_cv_func_snprintf_truncation_c99], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; }], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the return value of the snprintf function is the number dnl of bytes (excluding the terminating NUL) that would have been produced dnl if the buffer had been large enough. (ISO C99, POSIX:2001) dnl For example, this test program fails on IRIX 6.5: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8]; dnl int retval = snprintf (buf, 3, "%d", 12345); dnl return retval >= 0 && retval < 3; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_snprintf_retval_c99. AC_DEFUN([gl_SNPRINTF_RETVAL_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], [gl_cv_func_snprintf_retval_c99], [ AC_TRY_RUN([ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; return 0; }], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function supports the %n format directive dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_directive_n. AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], [gl_cv_func_snprintf_directive_n], [ AC_TRY_RUN([ #include #include static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; }], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function, when passed a size = 1, writes any dnl output without bounds in this case, behaving like sprintf. This is the dnl case on Linux libc5. dnl Result is gl_cv_func_snprintf_size1. AC_DEFUN([gl_SNPRINTF_SIZE1], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether snprintf respects a size of 1], [gl_cv_func_snprintf_size1], [ AC_TRY_RUN([ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; }], [gl_cv_func_snprintf_size1=yes], [gl_cv_func_snprintf_size1=no], [gl_cv_func_snprintf_size1="guessing yes"]) ]) ]) dnl Test whether the vsnprintf function, when passed a zero size, produces no dnl output. (ISO C99, POSIX:2001) dnl For example, snprintf nevertheless writes a NUL byte in this case dnl on OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl And vsnprintf writes any output without bounds in this case, behaving like dnl vsprintf, on HP-UX 11 and OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl #include dnl static int my_snprintf (char *buf, int size, const char *format, ...) dnl { dnl va_list args; dnl int ret; dnl va_start (args, format); dnl ret = vsnprintf (buf, size, format, args); dnl va_end (args); dnl return ret; dnl } dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl my_snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_vsnprintf_zerosize_c99. AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], [gl_cv_func_vsnprintf_zerosize_c99], [ AC_TRY_RUN([ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; }], [gl_cv_func_vsnprintf_zerosize_c99=yes], [gl_cv_func_vsnprintf_zerosize_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on mingw. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl The results of these tests on various platforms are: dnl dnl 1 = gl_PRINTF_SIZES_C99 dnl 2 = gl_PRINTF_LONG_DOUBLE dnl 3 = gl_PRINTF_INFINITE dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE dnl 5 = gl_PRINTF_DIRECTIVE_A dnl 6 = gl_PRINTF_DIRECTIVE_F dnl 7 = gl_PRINTF_DIRECTIVE_N dnl 8 = gl_PRINTF_DIRECTIVE_LS dnl 9 = gl_PRINTF_POSITIONS dnl 10 = gl_PRINTF_FLAG_GROUPING dnl 11 = gl_PRINTF_FLAG_LEFTADJUST dnl 12 = gl_PRINTF_FLAG_ZERO dnl 13 = gl_PRINTF_PRECISION dnl 14 = gl_PRINTF_ENOMEM dnl 15 = gl_SNPRINTF_PRESENCE dnl 16 = gl_SNPRINTF_TRUNCATION_C99 dnl 17 = gl_SNPRINTF_RETVAL_C99 dnl 18 = gl_SNPRINTF_DIRECTIVE_N dnl 19 = gl_SNPRINTF_SIZE1 dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 dnl dnl 1 = checking whether printf supports size specifiers as in C99... dnl 2 = checking whether printf supports 'long double' arguments... dnl 3 = checking whether printf supports infinite 'double' arguments... dnl 4 = checking whether printf supports infinite 'long double' arguments... dnl 5 = checking whether printf supports the 'a' and 'A' directives... dnl 6 = checking whether printf supports the 'F' directive... dnl 7 = checking whether printf supports the 'n' directive... dnl 8 = checking whether printf supports the 'ls' directive... dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... dnl 10 = checking whether printf supports the grouping flag... dnl 11 = checking whether printf supports the left-adjust flag correctly... dnl 12 = checking whether printf supports the zero flag correctly... dnl 13 = checking whether printf supports large precisions... dnl 14 = checking whether printf survives out-of-memory conditions... dnl 15 = checking for snprintf... dnl 16 = checking whether snprintf truncates the result as in C99... dnl 17 = checking whether snprintf returns a byte count as in C99... dnl 18 = checking whether snprintf fully supports the 'n' directive... dnl 19 = checking whether snprintf respects a size of 1... dnl 20 = checking whether vsnprintf respects a zero size as in C99... dnl dnl . = yes, # = no. dnl dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . dnl Solaris 10 . . # # # . . # . . . # . . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . . dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . . . . . dnl BeOS # # . # # # . ? # . ? . # ? . . . . . . dnl mingw # # # # # # . . # # . # # ? . # # # . . libpreludedb-1.0.0/libmissing/m4/lib-prefix.m40000664000076400007640000002042211330611105016052 00000000000000# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) libpreludedb-1.0.0/libmissing/m4/string_h.m40000664000076400007640000001132211330611105015625 00000000000000# Configure a GNU-like replacement for . # Copyright (C) 2007-2010 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. # serial 11 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([string.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) libpreludedb-1.0.0/libmissing/m4/include_next.m40000664000076400007640000001716711330611105016506 00000000000000# include_next.m4 serial 14 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including . dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's . By virtue of the second bug, we need to use dnl include_next as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADERS_ONCE([$1]) m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header files dnl that contain only a #include of other header files and no dnl non-comment tokens of their own. This leads to a failure to dnl detect the absolute name of , , dnl and others. The workaround is to force preservation of comments dnl through option -C. This ensures all necessary #line directives dnl are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET([gl_next_header], ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# s#^/[^/]#//&# p q }'`'"']) else AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) fi AS_VAR_POPDEF([gl_header_exists])]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET([gl_next_header])]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) libpreludedb-1.0.0/libmissing/m4/strnlen.m40000664000076400007640000000202611330611105015476 00000000000000# strnlen.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNLEN], [ dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strnlen]) if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi AC_FUNC_STRNLEN if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) AC_DEFINE([strnlen], [rpl_strnlen], [Define to rpl_strnlen if the replacement function should be used.]) gl_PREREQ_STRNLEN fi ]) # Prerequisites of lib/strnlen.c. AC_DEFUN([gl_PREREQ_STRNLEN], [:]) libpreludedb-1.0.0/libmissing/m4/lib-link.m40000664000076400007640000007711611330611105015526 00000000000000# lib-link.m4 serial 20 (gettext-0.18) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[translit([$1],[./-], [___])]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) libpreludedb-1.0.0/libmissing/m4/mmap-anon.m40000664000076400007640000000411211330611105015672 00000000000000# mmap-anon.m4 serial 8 dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Detect how mmap can be used to create anonymous (not file-backed) memory # mappings. # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS # and MAP_ANON exist and have the same value. # - On HP-UX, only MAP_ANONYMOUS exists. # - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be # used. AC_DEFUN([gl_FUNC_MMAP_ANON], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) dnl Persuade glibc to define MAP_ANONYMOUS. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then AC_MSG_CHECKING([for MAP_ANONYMOUS]) AC_EGREP_CPP([I cant identify this map.], [ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif ], [gl_have_mmap_anonymous=yes]) if test $gl_have_mmap_anonymous != yes; then AC_EGREP_CPP([I cant identify this map.], [ #include #ifdef MAP_ANON I cant identify this map. #endif ], [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) gl_have_mmap_anonymous=yes]) fi AC_MSG_RESULT([$gl_have_mmap_anonymous]) if test $gl_have_mmap_anonymous = yes; then AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and .]) fi fi ]) libpreludedb-1.0.0/libmissing/m4/vasnprintf.m40000664000076400007640000001763311330611105016215 00000000000000# vasnprintf.m4 serial 29 dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) if test $ac_cv_func_vasnprintf = no; then gl_REPLACE_VASNPRINTF fi ]) AC_DEFUN([gl_REPLACE_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) AC_LIBOBJ([vasnprintf]) AC_LIBOBJ([printf-args]) AC_LIBOBJ([printf-parse]) AC_LIBOBJ([asnprintf]) if test $ac_cv_func_vasnprintf = yes; then AC_DEFINE([REPLACE_VASNPRINTF], [1], [Define if vasnprintf exists but is overridden by gnulib.]) fi gl_PREREQ_PRINTF_ARGS gl_PREREQ_PRINTF_PARSE gl_PREREQ_VASNPRINTF gl_PREREQ_ASNPRINTF ]) # Prequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) ]) # Prequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) ]) # Prerequisites of lib/vasnprintf.c. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [#include ]) ]) # Extra prerequisites of lib/vasnprintf.c for supporting 'long double' # arguments. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE]) case "$gl_cv_func_printf_infinite" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if dnl NEED_PRINTF_LONG_DOUBLE is already set. AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'long double' arguments.]) ;; esac ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) case "$gl_cv_func_printf_directive_a" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], [Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives.]) AC_CHECK_FUNCS([nl_langinfo]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) case "$gl_cv_func_printf_directive_f" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], [Define if the vasnprintf implementation needs special code for the 'F' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], [Define if the vasnprintf implementation needs special code for the 'ls' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], [ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], [Define if the vasnprintf implementation needs special code for the ' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], [Define if the vasnprintf implementation needs special code for the '-' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], [ AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], [Define if the vasnprintf implementation needs special code for the 0 flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting large precisions. AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], [ AC_REQUIRE([gl_PRINTF_PRECISION]) case "$gl_cv_func_printf_precision" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], [Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory # conditions. AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], [ AC_REQUIRE([gl_PRINTF_ENOMEM]) case "$gl_cv_func_printf_enomem" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_ENOMEM], [1], [Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], [ AC_REQUIRE([gl_PREREQ_VASNPRINTF]) gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM ]) # Prerequisites of lib/asnprintf.c. AC_DEFUN([gl_PREREQ_ASNPRINTF], [ ]) libpreludedb-1.0.0/libmissing/m4/multiarch.m40000664000076400007640000000423611330611105016006 00000000000000# multiarch.m4 serial 5 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On MacOS X 10.5 and later systems, the user 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" # # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], [Define if the compiler is building for multiple architectures of Apple platforms at once.]) APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) libpreludedb-1.0.0/libmissing/m4/strndup.m40000664000076400007640000000307011330611105015510 00000000000000# strndup.m4 serial 17 dnl Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNDUP], [ dnl Persuade glibc to declare strndup(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strndup]) AC_CHECK_FUNCS_ONCE([strndup]) if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0';]])], [gl_cv_func_strndup_works=yes], [gl_cv_func_strndup_works=no], [case $host_os in aix*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac])]) case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 AC_LIBOBJ([strndup]) ;; esac else AC_LIBOBJ([strndup]) fi ]) libpreludedb-1.0.0/libmissing/m4/alloca.m40000664000076400007640000000307511330611104015250 00000000000000# alloca.m4 serial 9 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) libpreludedb-1.0.0/libmissing/m4/intmax_t.m40000664000076400007640000000404311330611105015635 00000000000000# intmax_t.m4 serial 7 dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. AC_PREREQ([2.13]) # Define intmax_t to 'long' or 'long long' # if it is not already defined in or . AC_DEFUN([gl_AC_TYPE_INTMAX_T], [ dnl For simplicity, we assume that a header file defines 'intmax_t' if and dnl only if it defines 'uintmax_t'. AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) else AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) fi ]) dnl An alternative would be to explicitly test for 'intmax_t'. AC_DEFUN([gt_AC_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], [AC_TRY_COMPILE([ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) else AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) fi ]) libpreludedb-1.0.0/libmissing/m4/warn-on-use.m40000664000076400007640000000403211330611105016163 00000000000000# warn-on-use.m4 serial 1 dnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # If you assume C89, then it is generally safe to assume declarations # for functions declared in that standard (such as gets) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], [gl_Symbol], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])]) AS_VAR_IF([gl_Symbol], [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) libpreludedb-1.0.0/libmissing/m4/stdint.m40000664000076400007640000003641511330611105015327 00000000000000# stdint.m4 serial 34 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_STDINT_H], [ AC_PREREQ([2.59])dnl dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [dnl Determine whether the various *_MIN, *_MAX macros are usable dnl in preprocessor expression. We could do it by compiling a test dnl program for each of these macros. It is faster to run a program dnl that inspects the macro expansion. dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] gl_STDINT_INCLUDES [ #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; ]], [[ const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return 1; } return 0; ]])], [gl_cv_header_working_stdint_h=yes], [], [dnl When cross-compiling, assume it works. gl_cv_header_working_stdint_h=yes ]) ]) ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi AC_SUBST([HAVE_SYS_INTTYPES_H]) if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi AC_SUBST([HAVE_SYS_BITYPES_H]) dnl Check for (missing in Linux uClibc when built without wide dnl character support). AC_CHECK_HEADERS_ONCE([wchar.h]) gl_STDINT_TYPE_PROPERTIES STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) # Hey Emacs! # Local Variables: # indent-tabs-mode: nil # End: libpreludedb-1.0.0/libmissing/m4/thread.m40000664000076400007640000000102411330611105015255 00000000000000# thread.m4 serial 2 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_THREAD], [ AC_REQUIRE([gl_THREADLIB]) AC_REQUIRE([AC_C_INLINE]) if test $gl_threads_api = posix; then gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" AC_CHECK_FUNCS([pthread_atfork]) LIBS="$gl_save_LIBS" fi ]) libpreludedb-1.0.0/libmissing/m4/gnulib-comp.m40000664000076400007640000002144311330611107016233 00000000000000# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects using CVS, this file can be treated like other built files. # This macro should be invoked from ./configure.in, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) gl_THREADLIB_EARLY ]) # This macro should be invoked from ./configure.in, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='libmissing' gl_FUNC_ALLOCA gl_HEADER_ERRNO_H gl_FLOAT_H gl_LOCK gl_FUNC_MEMCHR gl_STRING_MODULE_INDICATOR([memchr]) gl_MULTIARCH gl_SIZE_MAX gl_FUNC_SNPRINTF gl_STDIO_MODULE_INDICATOR([snprintf]) gl_STDDEF_H gl_STDINT_H gl_STDIO_H gl_FUNC_STRDUP gl_STRING_MODULE_INDICATOR([strdup]) gl_HEADER_STRING_H gl_FUNC_STRNDUP gl_STRING_MODULE_INDICATOR([strndup]) gl_FUNC_STRNLEN gl_STRING_MODULE_INDICATOR([strnlen]) gl_THREADLIB gl_HEADER_TIME_H gl_TIME_R gl_FUNC_VASNPRINTF gl_FUNC_VSNPRINTF gl_STDIO_MODULE_INDICATOR([vsnprintf]) gl_WCHAR_H gl_XSIZE m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='libmissing/tests' gt_TYPE_WCHAR_T gt_TYPE_WINT_T gl_THREAD gl_YIELD m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) LIBTESTS_LIBDEPS="$gltests_libdeps" AC_SUBST([LIBTESTS_LIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [libmissing]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [libmissing/tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/arg-nonnull.h build-aux/config.rpath build-aux/warn-on-use.h lib/alloca.in.h lib/asnprintf.c lib/errno.in.h lib/float+.h lib/float.in.h lib/glthread/lock.c lib/glthread/lock.h lib/glthread/threadlib.c lib/memchr.c lib/memchr.valgrind lib/printf-args.c lib/printf-args.h lib/printf-parse.c lib/printf-parse.h lib/size_max.h lib/snprintf.c lib/stddef.in.h lib/stdint.in.h lib/stdio-write.c lib/stdio.in.h lib/strdup.c lib/string.in.h lib/strndup.c lib/strnlen.c lib/time.in.h lib/time_r.c lib/vasnprintf.c lib/vasnprintf.h lib/vsnprintf.c lib/wchar.in.h lib/xsize.h m4/00gnulib.m4 m4/alloca.m4 m4/errno_h.m4 m4/extensions.m4 m4/float_h.m4 m4/gnulib-common.m4 m4/include_next.m4 m4/intmax_t.m4 m4/inttypes_h.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/lock.m4 m4/longlong.m4 m4/memchr.m4 m4/mmap-anon.m4 m4/multiarch.m4 m4/onceonly.m4 m4/printf.m4 m4/size_max.m4 m4/snprintf.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdint_h.m4 m4/stdio_h.m4 m4/strdup.m4 m4/string_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/thread.m4 m4/threadlib.m4 m4/time_h.m4 m4/time_r.m4 m4/vasnprintf.m4 m4/vsnprintf.m4 m4/warn-on-use.m4 m4/wchar.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xsize.m4 m4/yield.m4 tests/macros.h tests/signature.h tests/test-alloca-opt.c tests/test-errno.c tests/test-lock.c tests/test-memchr.c tests/test-snprintf.c tests/test-stddef.c tests/test-stdint.c tests/test-stdio.c tests/test-string.c tests/test-time.c tests/test-vasnprintf.c tests/test-vsnprintf.c tests/test-wchar.c tests/zerosize-ptr.h tests=lib/glthread/thread.c tests=lib/glthread/thread.h tests=lib/glthread/yield.h tests=lib/intprops.h tests=lib/verify.h ]) libpreludedb-1.0.0/libmissing/m4/00gnulib.m40000664000076400007640000000252211330611104015431 00000000000000# 00gnulib.m4 serial 2 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) libpreludedb-1.0.0/libmissing/glthread/0000775000076400007640000000000011347715757015133 500000000000000libpreludedb-1.0.0/libmissing/glthread/threadlib.c0000664000076400007640000000367411330611104017134 00000000000000/* Multithreading primitives. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. */ #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # include # if PTHREAD_IN_USE_DETECTION_HARD /* The function to be executed by a dummy thread. */ static void * dummy_thread_func (void *arg) { return arg; } int glthread_in_use (void) { static int tested; static int result; /* 1: linked with -lpthread, 0: only with libc */ if (!tested) { pthread_t thread; if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) /* Thread creation failed. */ result = 0; else { /* Thread creation works. */ void *retval; if (pthread_join (thread, &retval) != 0) abort (); result = 1; } tested = 1; } return result; } # endif #endif /* ========================================================================= */ /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; libpreludedb-1.0.0/libmissing/glthread/lock.c0000664000076400007640000006435111330611104016125 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # if !defined PTHREAD_RWLOCK_INITIALIZER int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_rwlock_init (&lock->rwlock, NULL); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_rdlock (&lock->rwlock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_wrlock (&lock->rwlock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_rwlock_unlock (&lock->rwlock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_rwlock_destroy (&lock->rwlock); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_init (&lock->lock, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_readers, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_writers, NULL); if (err != 0) return err; lock->waiting_writers_count = 0; lock->runcount = 0; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ /* POSIX says: "It is implementation-defined whether the calling thread acquires the lock when a writer does not hold the lock and there are writers blocked on the lock." Let's say, no: give the writers a higher priority. */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } lock->runcount++; return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); if (err != 0) { lock->waiting_writers_count--; pthread_mutex_unlock (&lock->lock); return err; } lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ err = pthread_cond_signal (&lock->waiting_writers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } else { /* Wake up all waiting readers. */ err = pthread_cond_broadcast (&lock->waiting_readers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } } return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_destroy (&lock->lock); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_readers); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_writers); if (err != 0) return err; return 0; } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (lock, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; return 0; } # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (&lock->recmutex, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_recursive_lock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_mutex_lock (&lock->recmutex); } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_mutex_unlock (&lock->recmutex); } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_mutex_destroy (&lock->recmutex); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = pthread_mutex_init (&lock->mutex, NULL); if (err != 0) return err; lock->owner = (pthread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { pthread_t self = pthread_self (); if (lock->owner != self) { int err; err = pthread_mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != pthread_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (pthread_t) 0; return pthread_mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (pthread_t) 0) return EBUSY; return pthread_mutex_destroy (&lock->mutex); } # endif /* -------------------------- gl_once_t datatype -------------------------- */ static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; int glthread_once_singlethreaded (pthread_once_t *once_control) { /* We don't know whether pthread_once_t is an integer type, a floating-point type, a pointer type, or a structure type. */ char *firstbyte = (char *)once_control; if (*firstbyte == *(const char *)&fresh_once) { /* First time use of once_control. Invert the first byte. */ *firstbyte = ~ *(const char *)&fresh_once; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* -------------------------- gl_once_t datatype -------------------------- */ static void glthread_once_call (void *arg) { void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; void (*initfunction) (void) = *gl_once_temp_addr; initfunction (); } int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) { void (*temp) (void) = initfunction; return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); } int glthread_once_singlethreaded (pth_once_t *once_control) { /* We know that pth_once_t is an integer type. */ if (*once_control == PTH_ONCE_INIT) { /* First time use of once_control. Invert the marker. */ *once_control = ~ PTH_ONCE_INIT; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); if (err != 0) return err; lock->owner = (thread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { thread_t self = thr_self (); if (lock->owner != self) { int err; err = mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != thr_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (thread_t) 0; return mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (thread_t) 0) return EBUSY; return mutex_destroy (&lock->mutex); } /* -------------------------- gl_once_t datatype -------------------------- */ int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) { if (!once_control->inited) { int err; /* Use the mutex to guarantee that if another thread is already calling the initfunction, this thread waits until it's finished. */ err = mutex_lock (&once_control->mutex); if (err != 0) return err; if (!once_control->inited) { once_control->inited = 1; initfunction (); } return mutex_unlock (&once_control->mutex); } else return 0; } int glthread_once_singlethreaded (gl_once_t *once_control) { /* We know that gl_once_t contains an integer type. */ if (!once_control->inited) { /* First time use of once_control. Invert the marker. */ once_control->inited = ~ 0; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_WIN32_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ void glthread_lock_init_func (gl_lock_t *lock) { InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_lock_lock_func (gl_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); return 0; } int glthread_lock_unlock_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; LeaveCriticalSection (&lock->lock); return 0; } int glthread_lock_destroy_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* In this file, the waitqueues are implemented as circular arrays. */ #define gl_waitqueue_t gl_carray_waitqueue_t static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->array = NULL; wq->count = 0; wq->alloc = 0; wq->offset = 0; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ static HANDLE gl_waitqueue_add (gl_waitqueue_t *wq) { HANDLE event; unsigned int index; if (wq->count == wq->alloc) { unsigned int new_alloc = 2 * wq->alloc + 1; HANDLE *new_array = (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); if (new_array == NULL) /* No more memory. */ return INVALID_HANDLE_VALUE; /* Now is a good opportunity to rotate the array so that its contents starts at offset 0. */ if (wq->offset > 0) { unsigned int old_count = wq->count; unsigned int old_alloc = wq->alloc; unsigned int old_offset = wq->offset; unsigned int i; if (old_offset + old_count > old_alloc) { unsigned int limit = old_offset + old_count - old_alloc; for (i = 0; i < limit; i++) new_array[old_alloc + i] = new_array[i]; } for (i = 0; i < old_count; i++) new_array[i] = new_array[old_offset + i]; wq->offset = 0; } wq->array = new_array; wq->alloc = new_alloc; } /* Whether the created event is a manual-reset one or an auto-reset one, does not matter, since we will wait on it only once. */ event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) /* No way to allocate an event. */ return INVALID_HANDLE_VALUE; index = wq->offset + wq->count; if (index >= wq->alloc) index -= wq->alloc; wq->array[index] = event; wq->count++; return event; } /* Notifies the first thread from a wait queue and dequeues it. */ static inline void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { SetEvent (wq->array[wq->offset + 0]); wq->offset++; wq->count--; if (wq->count == 0 || wq->offset == wq->alloc) wq->offset = 0; } /* Notifies all threads from a wait queue and dequeues them all. */ static inline void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { unsigned int i; for (i = 0; i < wq->count; i++) { unsigned int index = wq->offset + i; if (index >= wq->alloc) index -= wq->alloc; SetEvent (wq->array[index]); } wq->count = 0; wq->offset = 0; } void glthread_rwlock_init_func (gl_rwlock_t *lock) { InitializeCriticalSection (&lock->lock); gl_waitqueue_init (&lock->waiting_readers); gl_waitqueue_init (&lock->waiting_writers); lock->runcount = 0; lock->guard.done = 1; } int glthread_rwlock_rdlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether only readers are currently running, and whether the runcount field will not overflow. */ if (!(lock->runcount + 1 > 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_readers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_readers, incremented lock->runcount. */ if (!(lock->runcount > 0)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount + 1 > 0)); } } lock->runcount++; LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_wrlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether no readers or writers are currently running. */ if (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_writers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_writers, set lock->runcount = -1. */ if (!(lock->runcount == -1)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount == 0)); } } lock->runcount--; /* runcount becomes -1 */ LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_unlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; EnterCriticalSection (&lock->lock); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { LeaveCriticalSection (&lock->lock); return EPERM; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers.count > 0) { /* Wake up one of the waiting writers. */ lock->runcount--; gl_waitqueue_notify_first (&lock->waiting_writers); } else { /* Wake up all waiting readers. */ lock->runcount += lock->waiting_readers.count; gl_waitqueue_notify_all (&lock->waiting_readers); } } LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_destroy_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; if (lock->runcount != 0) return EBUSY; DeleteCriticalSection (&lock->lock); if (lock->waiting_readers.array != NULL) free (lock->waiting_readers.array); if (lock->waiting_writers.array != NULL) free (lock->waiting_writers.array); lock->guard.done = 0; return 0; } /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) { lock->owner = 0; lock->depth = 0; InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_recursive_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } { DWORD self = GetCurrentThreadId (); if (lock->owner != self) { EnterCriticalSection (&lock->lock); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } } return 0; } int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) { if (lock->owner != GetCurrentThreadId ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = 0; LeaveCriticalSection (&lock->lock); } return 0; } int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) { if (lock->owner != 0) return EBUSY; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) { if (once_control->inited <= 0) { if (InterlockedIncrement (&once_control->started) == 0) { /* This thread is the first one to come to this once_control. */ InitializeCriticalSection (&once_control->lock); EnterCriticalSection (&once_control->lock); once_control->inited = 0; initfunction (); once_control->inited = 1; LeaveCriticalSection (&once_control->lock); } else { /* Undo last operation. */ InterlockedDecrement (&once_control->started); /* Some other thread has already started the initialization. Yield the CPU while waiting for the other thread to finish initializing and taking the lock. */ while (once_control->inited < 0) Sleep (0); if (once_control->inited <= 0) { /* Take the lock. This blocks until the other thread has finished calling the initfunction. */ EnterCriticalSection (&once_control->lock); LeaveCriticalSection (&once_control->lock); if (!(once_control->inited > 0)) abort (); } } } } #endif /* ========================================================================= */ libpreludedb-1.0.0/libmissing/glthread/lock.h0000664000076400007640000010665711330611104016140 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains locking primitives for use with a given thread library. It does not contain primitives for creating threads or for other synchronization primitives. Normal (non-recursive) locks: Type: gl_lock_t Declaration: gl_lock_define(extern, name) Initializer: gl_lock_define_initialized(, name) Initialization: gl_lock_init (name); Taking the lock: gl_lock_lock (name); Releasing the lock: gl_lock_unlock (name); De-initialization: gl_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_lock_init (&name); Taking the lock: err = glthread_lock_lock (&name); Releasing the lock: err = glthread_lock_unlock (&name); De-initialization: err = glthread_lock_destroy (&name); Read-Write (non-recursive) locks: Type: gl_rwlock_t Declaration: gl_rwlock_define(extern, name) Initializer: gl_rwlock_define_initialized(, name) Initialization: gl_rwlock_init (name); Taking the lock: gl_rwlock_rdlock (name); gl_rwlock_wrlock (name); Releasing the lock: gl_rwlock_unlock (name); De-initialization: gl_rwlock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_rwlock_init (&name); Taking the lock: err = glthread_rwlock_rdlock (&name); err = glthread_rwlock_wrlock (&name); Releasing the lock: err = glthread_rwlock_unlock (&name); De-initialization: err = glthread_rwlock_destroy (&name); Recursive locks: Type: gl_recursive_lock_t Declaration: gl_recursive_lock_define(extern, name) Initializer: gl_recursive_lock_define_initialized(, name) Initialization: gl_recursive_lock_init (name); Taking the lock: gl_recursive_lock_lock (name); Releasing the lock: gl_recursive_lock_unlock (name); De-initialization: gl_recursive_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_recursive_lock_init (&name); Taking the lock: err = glthread_recursive_lock_lock (&name); Releasing the lock: err = glthread_recursive_lock_unlock (&name); De-initialization: err = glthread_recursive_lock_destroy (&name); Once-only execution: Type: gl_once_t Initializer: gl_once_define(extern, name) Execution: gl_once (name, initfunction); Equivalent functions with control of error handling: Execution: err = glthread_once (&name, initfunction); */ #ifndef _LOCK_H #define _LOCK_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_mutex_init # pragma weak pthread_mutex_lock # pragma weak pthread_mutex_unlock # pragma weak pthread_mutex_destroy # pragma weak pthread_rwlock_init # pragma weak pthread_rwlock_rdlock # pragma weak pthread_rwlock_wrlock # pragma weak pthread_rwlock_unlock # pragma weak pthread_rwlock_destroy # pragma weak pthread_once # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # pragma weak pthread_mutexattr_init # pragma weak pthread_mutexattr_settype # pragma weak pthread_mutexattr_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pthread_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTHREAD_MUTEX_INITIALIZER # define glthread_lock_init(LOCK) \ (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) # define glthread_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK # ifdef PTHREAD_RWLOCK_INITIALIZER typedef pthread_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTHREAD_RWLOCK_INITIALIZER # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) # else typedef struct { int initialized; pthread_mutex_t guard; /* protects the initialization */ pthread_rwlock_t rwlock; /* read-write lock */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0, PTHREAD_MUTEX_INITIALIZER } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif # else typedef struct { pthread_mutex_t lock; /* protects the remaining fields */ pthread_cond_t waiting_readers; /* waiting readers */ pthread_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP typedef pthread_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; # ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER # else # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # endif # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); # else typedef struct { pthread_mutex_t recmutex; /* recursive mutex */ pthread_mutex_t guard; /* protects the initialization */ int initialized; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif # else /* Old versions of POSIX threads on Solaris did not have recursive locks. We have to implement them ourselves. */ typedef struct { pthread_mutex_t mutex; pthread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif /* -------------------------- gl_once_t datatype -------------------------- */ typedef pthread_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pthread_in_use () \ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_singlethreaded (pthread_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_mutex_init # pragma weak pth_mutex_acquire # pragma weak pth_mutex_release # pragma weak pth_rwlock_init # pragma weak pth_rwlock_acquire # pragma weak pth_rwlock_release # pragma weak pth_once # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pth_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTH_MUTEX_INIT # define glthread_lock_init(LOCK) \ (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_lock_lock(LOCK) \ (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_lock_unlock(LOCK) \ (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef pth_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTH_RWLOCK_INIT # define glthread_rwlock_init(LOCK) \ (pth_in_use() && !pth_rwlock_init (LOCK) ? errno : 0) # define glthread_rwlock_rdlock(LOCK) \ (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) # define glthread_rwlock_wrlock(LOCK) \ (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) # define glthread_rwlock_unlock(LOCK) \ (pth_in_use() && !pth_rwlock_release (LOCK) ? errno : 0) # define glthread_rwlock_destroy(LOCK) \ ((void)(LOCK), 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* In Pth, mutexes are recursive by default. */ typedef pth_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ PTH_MUTEX_INIT # define glthread_recursive_lock_init(LOCK) \ (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_recursive_lock_lock(LOCK) \ (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_recursive_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* -------------------------- gl_once_t datatype -------------------------- */ typedef pth_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pth_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (pth_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak mutex_init # pragma weak mutex_lock # pragma weak mutex_unlock # pragma weak mutex_destroy # pragma weak rwlock_init # pragma weak rw_rdlock # pragma weak rw_wrlock # pragma weak rw_unlock # pragma weak rwlock_destroy # pragma weak thr_self # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ DEFAULTMUTEX # define glthread_lock_init(LOCK) \ (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_lock_lock(LOCK) \ (thread_in_use () ? mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (thread_in_use () ? mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (thread_in_use () ? mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ DEFAULTRWLOCK # define glthread_rwlock_init(LOCK) \ (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (thread_in_use () ? rw_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (thread_in_use () ? rw_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (thread_in_use () ? rw_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (thread_in_use () ? rwlock_destroy (LOCK) : 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* Old Solaris threads did not have recursive locks. We have to implement them ourselves. */ typedef struct { mutex_t mutex; thread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { DEFAULTMUTEX, (thread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; mutex_t mutex; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (thread_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection does not work on Windows 95/98/ME. Packages that need trylock usually define their own mutex type.) */ /* There is no way to statically initialize a CRITICAL_SECTION. It needs to be done lazily, once only. For this we need spinlocks. */ typedef struct { volatile int done; volatile long started; } gl_spinlock_t; /* -------------------------- gl_lock_t datatype -------------------------- */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; } gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME = gl_lock_initializer; # define gl_lock_initializer \ { { 0, -1 } } # define glthread_lock_init(LOCK) \ (glthread_lock_init_func (LOCK), 0) # define glthread_lock_lock(LOCK) \ glthread_lock_lock_func (LOCK) # define glthread_lock_unlock(LOCK) \ glthread_lock_unlock_func (LOCK) # define glthread_lock_destroy(LOCK) \ glthread_lock_destroy_func (LOCK) extern void glthread_lock_init_func (gl_lock_t *lock); extern int glthread_lock_lock_func (gl_lock_t *lock); extern int glthread_lock_unlock_func (gl_lock_t *lock); extern int glthread_lock_destroy_func (gl_lock_t *lock); /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* It is impossible to implement read-write locks using plain locks, without introducing an extra thread dedicated to managing read-write locks. Therefore here we need to use the low-level Event type. */ typedef struct { HANDLE *array; /* array of waiting threads, each represented by an event */ unsigned int count; /* number of waiting threads */ unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } gl_carray_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_carray_waitqueue_t waiting_readers; /* waiting readers */ gl_carray_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { { 0, -1 } } # define glthread_rwlock_init(LOCK) \ (glthread_rwlock_init_func (LOCK), 0) # define glthread_rwlock_rdlock(LOCK) \ glthread_rwlock_rdlock_func (LOCK) # define glthread_rwlock_wrlock(LOCK) \ glthread_rwlock_wrlock_func (LOCK) # define glthread_rwlock_unlock(LOCK) \ glthread_rwlock_unlock_func (LOCK) # define glthread_rwlock_destroy(LOCK) \ glthread_rwlock_destroy_func (LOCK) extern void glthread_rwlock_init_func (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* The Win32 documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ DWORD owner; unsigned long depth; CRITICAL_SECTION lock; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { { 0, -1 }, 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (glthread_recursive_lock_init_func (LOCK), 0) # define glthread_recursive_lock_lock(LOCK) \ glthread_recursive_lock_lock_func (LOCK) # define glthread_recursive_lock_unlock(LOCK) \ glthread_recursive_lock_unlock_func (LOCK) # define glthread_recursive_lock_destroy(LOCK) \ glthread_recursive_lock_destroy_func (LOCK) extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; volatile long started; CRITICAL_SECTION lock; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { -1, -1 }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ /* -------------------------- gl_lock_t datatype -------------------------- */ typedef int gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) # define gl_lock_define_initialized(STORAGECLASS, NAME) # define glthread_lock_init(NAME) 0 # define glthread_lock_lock(NAME) 0 # define glthread_lock_unlock(NAME) 0 # define glthread_lock_destroy(NAME) 0 /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef int gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) # define gl_rwlock_define_initialized(STORAGECLASS, NAME) # define glthread_rwlock_init(NAME) 0 # define glthread_rwlock_rdlock(NAME) 0 # define glthread_rwlock_wrlock(NAME) 0 # define glthread_rwlock_unlock(NAME) 0 # define glthread_rwlock_destroy(NAME) 0 /* --------------------- gl_recursive_lock_t datatype --------------------- */ typedef int gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) # define glthread_recursive_lock_init(NAME) 0 # define glthread_recursive_lock_lock(NAME) 0 # define glthread_recursive_lock_unlock(NAME) 0 # define glthread_recursive_lock_destroy(NAME) 0 /* -------------------------- gl_once_t datatype -------------------------- */ typedef int gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = 0; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) #endif /* ========================================================================= */ /* Macros with built-in error handling. */ /* -------------------------- gl_lock_t datatype -------------------------- */ #define gl_lock_init(NAME) \ do \ { \ if (glthread_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_lock(NAME) \ do \ { \ if (glthread_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_unlock(NAME) \ do \ { \ if (glthread_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_destroy(NAME) \ do \ { \ if (glthread_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ #define gl_rwlock_init(NAME) \ do \ { \ if (glthread_rwlock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_rdlock(NAME) \ do \ { \ if (glthread_rwlock_rdlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_wrlock(NAME) \ do \ { \ if (glthread_rwlock_wrlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_unlock(NAME) \ do \ { \ if (glthread_rwlock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_destroy(NAME) \ do \ { \ if (glthread_rwlock_destroy (&NAME)) \ abort (); \ } \ while (0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ #define gl_recursive_lock_init(NAME) \ do \ { \ if (glthread_recursive_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_lock(NAME) \ do \ { \ if (glthread_recursive_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_unlock(NAME) \ do \ { \ if (glthread_recursive_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_destroy(NAME) \ do \ { \ if (glthread_recursive_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* -------------------------- gl_once_t datatype -------------------------- */ #define gl_once(NAME, INITFUNCTION) \ do \ { \ if (glthread_once (&NAME, INITFUNCTION)) \ abort (); \ } \ while (0) /* ========================================================================= */ #endif /* _LOCK_H */ libpreludedb-1.0.0/libmissing/time_r.c0000664000076400007640000000246011330611106014655 00000000000000/* Reentrant time functions like localtime_r. Copyright (C) 2003, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #include #include #include static struct tm * copy_tm_result (struct tm *dest, struct tm const *src) { if (! src) return 0; *dest = *src; return dest; } struct tm * gmtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, gmtime (t)); } struct tm * localtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, localtime (t)); } libpreludedb-1.0.0/libmissing/printf-parse.c0000664000076400007640000005213211330611105016010 00000000000000/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include # endif #else # include #endif /* malloc(), realloc(), free(). */ #include /* errno. */ #include /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = 1; d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE)); if (d->dir == NULL) /* Out of memory. */ goto out_of_memory_1; a->count = 0; a_allocated = 0; a->arg = NULL; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } #if defined __APPLE__ && defined __MACH__ /* On MacOS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') { if (64 / 8 > sizeof (long)) { /* int64_t = long long */ flags += 16; } else { /* int64_t = long */ flags += 8; } cp++; } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Win32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') { if (64 / 8 > sizeof (long)) { /* __int64 = long long */ flags += 16; } else { /* __int64 = long */ flags += 8; } cp += 3; } #endif else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) realloc (d->dir, memory_size); if (memory == NULL) /* Out of memory. */ goto out_of_memory; d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg) free (a->arg); if (d->dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg) free (a->arg); if (d->dir) free (d->dir); out_of_memory_1: errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T libpreludedb-1.0.0/libmissing/alloca.in.h0000664000076400007640000000357011330611104015244 00000000000000/* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ libpreludedb-1.0.0/libmissing/Makefile.am0000664000076400007640000005554311330611107015301 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files lock snprintf strdup strndup time_r vsnprintf AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = SUBDIRS += tests EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = AM_CFLAGS = noinst_LTLIBRARIES += libmissing.la libmissing_la_SOURCES = libmissing_la_LIBADD = $(gl_LTLIBOBJS) libmissing_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libmissing_la_SOURCES = libmissing_la_LDFLAGS = $(AM_LDFLAGS) ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += float.h float.h-t EXTRA_DIST += float.in.h ## end gnulib module float ## begin gnulib module havelib EXTRA_DIST += $(top_srcdir)/./config.rpath ## end gnulib module havelib ## begin gnulib module lock libmissing_la_SOURCES += glthread/lock.h glthread/lock.c ## end gnulib module lock ## begin gnulib module memchr EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libmissing_la_SOURCES += memchr.c ## end gnulib module memchr ## begin gnulib module size_max libmissing_la_SOURCES += size_max.h ## end gnulib module size_max ## begin gnulib module snprintf EXTRA_DIST += snprintf.c EXTRA_libmissing_la_SOURCES += snprintf.c ## end gnulib module snprintf ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdio BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio-write.c stdio.in.h EXTRA_libmissing_la_SOURCES += stdio-write.c ## end gnulib module stdio ## begin gnulib module strdup EXTRA_DIST += strdup.c EXTRA_libmissing_la_SOURCES += strdup.c ## end gnulib module strdup ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strndup EXTRA_DIST += strndup.c EXTRA_libmissing_la_SOURCES += strndup.c ## end gnulib module strndup ## begin gnulib module strnlen EXTRA_DIST += strnlen.c EXTRA_libmissing_la_SOURCES += strnlen.c ## end gnulib module strnlen ## begin gnulib module threadlib libmissing_la_SOURCES += glthread/threadlib.c EXTRA_DIST += $(top_srcdir)/./config.rpath ## end gnulib module threadlib ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module time_r EXTRA_DIST += time_r.c EXTRA_libmissing_la_SOURCES += time_r.c ## end gnulib module time_r ## begin gnulib module vasnprintf EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libmissing_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf ## begin gnulib module vsnprintf EXTRA_DIST += vsnprintf.c EXTRA_libmissing_la_SOURCES += vsnprintf.c ## end gnulib module vsnprintf ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/./warn-on-use.h ## end gnulib module warn-on-use ## begin gnulib module wchar BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module xsize libmissing_la_SOURCES += xsize.h ## end gnulib module xsize mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : libpreludedb-1.0.0/libmissing/strnlen.c0000664000076400007640000000233211330611105015060 00000000000000/* Find the length of STRING, but scan at most MAXLEN characters. Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ size_t strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } libpreludedb-1.0.0/libmissing/stddef.in.h0000664000076400007640000000522411330611105015261 00000000000000/* A substitute for POSIX 2008 , for platforms that have issues. Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 for platforms that have issues. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by . Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _GL_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _GL_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ libpreludedb-1.0.0/libmissing/vasnprintf.c0000664000076400007640000066014111330611106015576 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # define DCHAR_SET wmemset # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # define DCHAR_SET memset # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the _snwprintf() function instead. */ # define SNPRINTF _snwprintf # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. Also don't use it on Linux libc5, since there snprintf with size = 1 writes any output without bounds, like sprintf. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" warnings in this file. Use -Dlint to suppress them. */ #ifdef lint # define IF_LINT(Code) Code #else # define IF_LINT(Code) /* empty */ #endif /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() and remainder() functions. */ #undef exp #define exp expo #undef remainder #define remainder rem #if !USE_SNPRINTF && !WIDE_CHAR_VERSION # if (HAVE_STRNLEN && !defined _AIX) # define local_strnlen strnlen # else # ifndef local_strnlen_defined # define local_strnlen_defined 1 static size_t local_strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } # endif # endif #endif #if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T && (WIDE_CHAR_VERSION || DCHAR_IS_TCHAR) # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if !USE_SNPRINTF && HAVE_WCHAR_T && WIDE_CHAR_VERSION # if HAVE_WCSNLEN # define local_wcsnlen wcsnlen # else # ifndef local_wcsnlen_defined # define local_wcsnlen_defined 1 static size_t local_wcsnlen (const wchar_t *s, size_t maxlen) { const wchar_t *ptr; for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) ; return ptr - s; } # endif # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems and MacOS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnand (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zerol (long double x) { return isnanl (x) || x + x == x; } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1]; typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1]; /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } #if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess precision. */ if (!(y == 0.0L)) abort (); #endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif /* Tests whether a string of digits consists of exactly PRECISION zeroes and a single '1' digit. */ static int is_borderline (const char *digits, size_t precision) { for (; precision > 0; precision--, digits++) if (*digits != '0') return 0; if (*digits != '1') return 0; digits++; return *digits == '\0'; } #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ free (d.dir); \ if (a.arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = (unsigned char) *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ converted = u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ converted = u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ converted = u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T else if (dp->conversion == 's' # if WIDE_CHAR_VERSION && a.arg[dp->arg_index].type != TYPE_WIDE_STRING # else && a.arg[dp->arg_index].type == TYPE_WIDE_STRING # endif ) { /* The normal handling of the 's' directive below requires allocating a temporary buffer. The determination of its length (tmp_length), in the case when a precision is specified, below requires a conversion between a char[] string and a wchar_t[] wide string. It could be done, but we have no guarantee that the implementation of sprintf will use the exactly same algorithm. Without this guarantee, it is possible to have buffer overrun bugs. In order to avoid such bugs, we implement the entire processing of the 's' directive ourselves. */ int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } # if WIDE_CHAR_VERSION /* %s in vasnwprintf. See the specification of fwprintf. */ { const char *arg = a.arg[dp->arg_index].a.a_string; const char *arg_end; size_t characters; if (has_precision) { /* Use only as many bytes as needed to produce PRECISION wide characters, from the left. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of wide characters. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } if (has_precision || has_width) { /* We know the number of wide characters in advance. */ size_t remaining; # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; remaining--) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); result[length++] = wc; arg += count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); ENSURE_ALLOCATION (xsum (length, 1)); result[length++] = wc; arg += count; } } if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # else /* %ls in vasnprintf. See the specification of fprintf. */ { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; const wchar_t *arg_end; size_t characters; # if !DCHAR_IS_TCHAR /* This code assumes that TCHAR_T is 'char'. */ typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1]; TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; # endif size_t w; if (has_precision) { /* Use only as many wide characters as needed to produce at most PRECISION bytes, from the left. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; while (precision > 0) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } if (precision < count) break; arg_end++; characters += count; precision -= count; } } # if DCHAR_IS_TCHAR else if (has_width) # else else # endif { /* Use the entire string, and count the number of bytes. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end++; characters += count; } } # if DCHAR_IS_TCHAR else { /* Use the entire string. */ arg_end = arg + local_wcslen (arg); /* The number of bytes doesn't matter. */ characters = 0; } # endif # if !DCHAR_IS_TCHAR /* Convert the string into a piece of temporary memory. */ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); if (tmpsrc == NULL) goto out_of_memory; { TCHAR_T *tmpptr = tmpsrc; size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (tmpptr, cbuf, count); tmpptr += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } /* Convert from TCHAR_T[] to DCHAR_T[]. */ tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, characters, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; free (tmpsrc); if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } free (tmpsrc); # endif if (has_width) { # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = characters; # endif } else /* w doesn't matter. */ w = 0; if (has_width && width > w && !(dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_TCHAR if (has_precision || has_width) { /* We know the number of bytes in advance. */ size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (result + length, cbuf, count); length += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; arg++; } } # else ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); length += tmpdst_len; # endif if (has_width && width > w && (dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } } # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. Some systems in this category (IRIX 5.3) also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. But for %a, %A, the default precision is 0. */ if (!has_precision) if (!(dp->conversion == 'a' || dp->conversion == 'A')) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnand (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0L)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else if (dp->conversion == 'a' || dp->conversion == 'A') { *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion - 'A' + 'P'; *p++ = '+'; *p++ = '0'; } else abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; size_t width; #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if NEED_PRINTF_FLAG_LEFTADJUST # define pad_ourselves 1 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2] IF_LINT (= { 0 }); #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } #endif #if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ { switch (dp->conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { # if WIDE_CHAR_VERSION /* ISO C says about %ls in fwprintf: "If the precision is not specified or is greater than the size of the array, the array shall contain a null wide character." So if there is a precision, we must not use wcslen. */ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; if (has_precision) tmp_length = local_wcsnlen (arg, precision); else tmp_length = local_wcslen (arg); # else /* ISO C says about %ls in fprintf: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." So if there is a precision, we must not use wcslen. */ /* This case has already been handled above. */ abort (); # endif } else # endif { # if WIDE_CHAR_VERSION /* ISO C says about %s in fwprintf: "If the precision is not specified or is greater than the size of the converted array, the converted array shall contain a null wide character." So if there is a precision, we must not use strlen. */ /* This case has already been handled above. */ abort (); # else /* ISO C says about %s in fprintf: "If the precision is not specified or greater than the size of the array, the array shall contain a null character." So if there is a precision, we must not use strlen. */ const char *arg = a.arg[dp->arg_index].a.a_string; if (has_precision) tmp_length = local_strnlen (arg, precision); else tmp_length = strlen (arg); # endif } break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (!pad_ourselves) { # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif } tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ } if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; /*FALLTHROUGH*/ # endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's returns value conforms to ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ /* On native Win32 systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes '4', '5', '6' into buf, not '4', '5', '\0'.) - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. On native Win32 systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Ensure that maxlen below will be >= 2. Needed on BeOS, where an snprintf() with maxlen==1 acts like sprintf(). */ ENSURE_ALLOCATION (xsum (length, (2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR)); /* Prepare checking whether snprintf returns the count via %n. */ *(TCHAR_T *) (result + length) = '\0'; #endif for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. */ size_t bigger_need = xsum (xtimes (allocated, 2), 12); ENSURE_ALLOCATION (bigger_need); continue; } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EINVAL; return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least (count + 1) * sizeof (TCHAR_T) bytes. (The +1 is for the trailing NUL.) But ask for (count + 2) * sizeof (TCHAR_T) bytes, so that in the next round, we likely get maxlen > (unsigned int) count + 1 and so we don't get here again. And allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, ((unsigned int) count + 2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif #if !DCHAR_IS_TCHAR /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ typedef int TCHAR_T_verify [2 * (sizeof (TCHAR_T) == 1) - 1]; # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = (unsigned char) *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); # if USE_SNPRINTF length += count; ENSURE_ALLOCATION (n); length -= count; # else ENSURE_ALLOCATION (n); # endif } /* Here count + pad <= allocated - length. */ { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; #if USE_SNPRINTF overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; #endif out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF libpreludedb-1.0.0/libmissing/stdint.in.h0000664000076400007640000004037211330611105015320 00000000000000/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _GL_STDINT_H /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _GL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _GL_STDINT_H /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. MacOS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ #if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #endif /* Avoid collision with Solaris 2.5.1 etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ #undef intmax_t #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t #elif defined GL_INT64_T # define intmax_t int64_t #else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t #endif #undef uintmax_t #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #elif defined GL_UINT64_T # define uintmax_t uint64_t #else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #undef INT64_MIN #undef INT64_MAX #ifdef GL_INT64_T /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #undef UINT64_MAX #ifdef GL_UINT64_T # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #undef INTMAX_MIN #undef INTMAX_MAX #ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif #undef UINTMAX_MAX #ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX #else # define UINTMAX_MAX UINT32_MAX #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ /* 7.18.4. Macros for integer constants */ #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #undef INTMAX_C #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL #elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) #else # define INTMAX_C(x) x##L #endif #undef UINTMAX_C #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL #elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) #else # define UINTMAX_C(x) x##UL #endif #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ #endif /* _GL_STDINT_H */ #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ libpreludedb-1.0.0/libmissing/size_max.h0000664000076400007640000000234711330611105015225 00000000000000/* size_max.h -- declare SIZE_MAX through system headers Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ # include /* Get SIZE_MAX declaration on systems like glibc 2. */ # if HAVE_STDINT_H # include # endif /* On systems where these include files don't define it, SIZE_MAX is defined in config.h. */ #endif /* GNULIB_SIZE_MAX_H */ libpreludedb-1.0.0/libmissing/stdio-write.c0000664000076400007640000001145411330611105015652 00000000000000/* POSIX compatible FILE stream write function. Copyright (C) 2008-2010 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include /* Specification. */ #include /* Replace these functions only if module 'sigpipe' is requested. */ #if GNULIB_SIGPIPE /* On native Windows platforms, SIGPIPE does not exist. When write() is called on a pipe with no readers, WriteFile() fails with error GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. This write() function is at the basis of the function which flushes the buffer of a FILE stream. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \ if (ferror (stream)) \ return (EXPRESSION); \ else \ { \ RETTYPE ret; \ SetLastError (0); \ ret = (EXPRESSION); \ if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \ { \ int fd = fileno (stream); \ if (fd >= 0 \ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\ { \ /* Try to raise signal SIGPIPE. */ \ raise (SIGPIPE); \ /* If it is currently blocked or ignored, change errno from \ EINVAL to EPIPE. */ \ errno = EPIPE; \ } \ } \ return ret; \ } # if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */ # if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */ int printf (const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stdout, format, args); va_end (args); return retval; } # endif # endif # if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */ int fprintf (FILE *stream, const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stream, format, args); va_end (args); return retval; } # endif # if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */ int vprintf (const char *format, va_list args) { return vfprintf (stdout, format, args); } # endif # if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */ int vfprintf (FILE *stream, const char *format, va_list args) #undef vfprintf { CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF) } # endif int putchar (int c) { return fputc (c, stdout); } int fputc (int c, FILE *stream) #undef fputc { CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF) } int fputs (const char *string, FILE *stream) #undef fputs { CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF) } int puts (const char *string) #undef puts { FILE *stream = stdout; CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF) } size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream) #undef fwrite { CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n) } # endif #endif libpreludedb-1.0.0/libmissing/stdio.in.h0000664000076400007640000005467111330611105015144 00000000000000/* A GNU-like . Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_FILE || defined __need___FILE /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #ifndef _GL_STDIO_H #define _GL_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include #include /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */ #include #ifndef __attribute__ /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable __attribute__ only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(Spec) /* empty */ # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # define dprintf rpl_dprintf # endif # if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@ extern int dprintf (int fd, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " "use gnulib module dprintf for portability"); # endif #endif #if @GNULIB_FCLOSE@ # if @REPLACE_FCLOSE@ # define fclose rpl_fclose /* Close STREAM and its underlying file descriptor. */ extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif #if @GNULIB_FFLUSH@ # if @REPLACE_FFLUSH@ # define fflush rpl_fflush /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ extern int fflush (FILE *gl_stream); # endif #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */ #undef gets _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # undef fopen # define fopen rpl_fopen extern FILE * fopen (const char *filename, const char *mode) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " "use gnulib module fopen for portability"); #endif #if @GNULIB_FPRINTF_POSIX@ # if @REPLACE_FPRINTF@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); # endif #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); #elif defined GNULIB_POSIXCHECK # undef fprintf /* Assume fprintf is always declared. */ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "use gnulib module fprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_FPURGE@ # if @REPLACE_FPURGE@ # define fpurge rpl_fpurge # endif # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ extern int fpurge (FILE *gl_stream) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef fpurge # if HAVE_RAW_DECL_FPURGE _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " "use gnulib module fpurge for portability"); # endif #endif #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputc # define fputc rpl_fputc extern int fputc (int c, FILE *stream) _GL_ARG_NONNULL ((2)); #endif #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputs # define fputs rpl_fputs extern int fputs (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # undef freopen # define freopen rpl_freopen extern FILE * freopen (const char *filename, const char *mode, FILE *stream) _GL_ARG_NONNULL ((2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - " "use gnulib module freopen for portability"); #endif /* Set up the following warnings, based on which modules are in use. GNU Coding Standards discourage the use of fseek, since it imposes an arbitrary limitation on some 32-bit hosts. Remember that the fseek module depends on the fseeko module, so we only have three cases to consider: 1. The developer is not using either module. Issue a warning under GNULIB_POSIXCHECK for both functions, to remind them that both functions have bugs on some systems. _GL_NO_LARGE_FILES has no impact on this warning. 2. The developer is using both modules. They may be unaware of the arbitrary limitations of fseek, so issue a warning under GNULIB_POSIXCHECK. On the other hand, they may be using both modules intentionally, so the developer can define _GL_NO_LARGE_FILES in the compilation units where the use of fseek is safe, to silence the warning. 3. The developer is using the fseeko module, but not fseek. Gnulib guarantees that fseek will still work around platform bugs in that case, but we presume that the developer is aware of the pitfalls of fseek and was trying to avoid it, so issue a warning even when GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be defined to silence the warning in particular compilation units. Most gnulib clients that perform stream operations should fall into category three. */ #if @GNULIB_FSEEK@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif # if @REPLACE_FSEEK@ # undef fseek # define fseek rpl_fseek extern int fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1)); # endif #endif #if @GNULIB_FSEEKO@ # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif # if @REPLACE_FSEEKO@ /* Provide fseek, fseeko functions that are aware of a preceding fflush(), and which detect pipes. */ # undef fseeko # define fseeko rpl_fseeko extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1)); # if !@GNULIB_FSEEK@ # undef fseek # define fseek rpl_fseek static inline int _GL_ARG_NONNULL ((1)) rpl_fseek (FILE *fp, long offset, int whence) { return fseeko (fp, offset, whence); } # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FSEEK_WARN /* Category 1, above. */ # undef fseek # undef fseeko # if HAVE_RAW_DECL_FSEEKO _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " "use gnulib module fseeko for portability"); # endif #endif #ifdef _GL_FSEEK_WARN # undef _GL_FSEEK_WARN /* Here, either fseek is undefined (but C89 guarantees that it is declared), or it is defined as rpl_fseek (declared above). */ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " "on 32-bit platforms - " "use fseeko function for handling of large files"); #endif /* See the comments on fseek/fseeko. */ #if @GNULIB_FTELL@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell # endif # if @REPLACE_FTELL@ # undef ftell # define ftell rpl_ftell extern long ftell (FILE *fp) _GL_ARG_NONNULL ((1)); # endif #endif #if @GNULIB_FTELLO@ # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif # if @REPLACE_FTELLO@ # undef ftello # define ftello rpl_ftello extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1)); # if !@GNULIB_FTELL@ # undef ftell # define ftell rpl_ftell static inline long _GL_ARG_NONNULL ((1)) rpl_ftell (FILE *f) { return ftello (f); } # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell # undef ftello # if HAVE_RAW_DECL_FTELLO _GL_WARN_ON_USE (ftello, "ftello is unportable - " "use gnulib module ftello for portability"); # endif #endif #ifdef _GL_FTELL_WARN # undef _GL_FTELL_WARN /* Here, either ftell is undefined (but C89 guarantees that it is declared), or it is defined as rpl_ftell (declared above). */ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " "on 32-bit platforms - " "use ftello function for handling of large files"); #endif #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fwrite # define fwrite rpl_fwrite extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((1, 4)); #endif #if @GNULIB_GETDELIM@ # if !@HAVE_DECL_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4)); # endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " "use gnulib module getdelim for portability"); # endif #endif #if @GNULIB_GETLINE@ # if @REPLACE_GETLINE@ # undef getline # define getline rpl_getline # endif # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3)); # endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is unportable - " "use gnulib module getline for portability"); # endif #endif #if @GNULIB_OBSTACK_PRINTF@ # if @REPLACE_OBSTACK_PRINTF@ # define obstack_printf rpl_osbtack_printf # define obstack_vprintf rpl_obstack_vprintf # endif # if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ extern int obstack_printf (struct obstack *obs, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); extern int obstack_vprintf (struct obstack *obs, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #endif #if @GNULIB_PERROR@ # if @REPLACE_PERROR@ # define perror rpl_perror /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ extern void perror (const char *string); # endif #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif #if @GNULIB_POPEN@ # if @REPLACE_POPEN@ # undef popen # define popen rpl_popen extern FILE *popen (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef popen # if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); # endif #endif #if @GNULIB_PRINTF_POSIX@ # if @REPLACE_PRINTF@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1)); # endif #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1)); #elif defined GNULIB_POSIXCHECK # undef printf /* Assume printf is always declared. */ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " "use gnulib module printf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putc # define putc rpl_fputc extern int putc (int c, FILE *stream) _GL_ARG_NONNULL ((2)); #endif #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putchar # define putchar rpl_putchar extern int putchar (int c); #endif #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef puts # define puts rpl_puts extern int puts (const char *string) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_REMOVE@ # if @REPLACE_REMOVE@ # undef remove # define remove rpl_remove extern int remove (const char *name) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " "use gnulib module remove for more portability"); #endif #if @GNULIB_RENAME@ # if @REPLACE_RENAME@ # undef rename # define rename rpl_rename extern int rename (const char *old_filename, const char *new_filename) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " "use gnulib module rename for more portability"); #endif #if @GNULIB_RENAMEAT@ # if @REPLACE_RENAMEAT@ # undef renameat # define renameat rpl_renameat # endif # if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@ extern int renameat (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4)); # endif #elif defined GNULIB_POSIXCHECK # undef renameat # if HAVE_RAW_DECL_RENAMEAT _GL_WARN_ON_USE (renameat, "renameat is not portable - " "use gnulib module renameat for portability"); # endif #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # define snprintf rpl_snprintf # endif # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@ extern int snprintf (char *str, size_t size, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))) _GL_ARG_NONNULL ((3)); # endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " "use gnulib module snprintf for portability"); # endif #endif /* Some people would argue that sprintf should be handled like gets (for example, OpenBSD issues a link warning for both functions), since both can cause security holes due to buffer overruns. However, we believe that sprintf can be used safely, and is more efficient than snprintf in those safe cases; and as proof of our belief, we use sprintf in several gnulib modules. So this header intentionally avoids adding a warning to sprintf except when GNULIB_POSIXCHECK is defined. */ #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # define sprintf rpl_sprintf extern int sprintf (char *str, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "use gnulib module sprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VASPRINTF@ # if @REPLACE_VASPRINTF@ # define asprintf rpl_asprintf # define vasprintf rpl_vasprintf # endif # if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ extern int asprintf (char **result, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2)); extern int vasprintf (char **result, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # define vdprintf rpl_vdprintf # endif # if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@ extern int vdprintf (int fd, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " "use gnulib module vdprintf for portability"); # endif #endif #if @GNULIB_VFPRINTF_POSIX@ # if @REPLACE_VFPRINTF@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); #elif defined GNULIB_POSIXCHECK # undef vfprintf /* Assume vfprintf is always declared. */ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "use gnulib module vfprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VPRINTF_POSIX@ # if @REPLACE_VPRINTF@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1)); # endif #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1)); #elif defined GNULIB_POSIXCHECK # undef vprintf /* Assume vprintf is always declared. */ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "use gnulib module vprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # define vsnprintf rpl_vsnprintf # endif # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))) _GL_ARG_NONNULL ((3)); # endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " "use gnulib module vsnprintf for portability"); # endif #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # define vsprintf rpl_vsprintf extern int vsprintf (char *str, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "use gnulib module vsprintf-posix for portable " "POSIX compliance"); #endif #ifdef __cplusplus } #endif #endif /* _GL_STDIO_H */ #endif /* _GL_STDIO_H */ #endif libpreludedb-1.0.0/libmissing/time.in.h0000664000076400007640000001026311330611106014746 00000000000000/* A more-standard . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _GL_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _GL_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ #include /* The definition of _GL_ARG_NONNULL is copied here. */ # ifdef __cplusplus extern "C" { # endif /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # else # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # endif # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @REPLACE_NANOSLEEP@ # define nanosleep rpl_nanosleep extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1)); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @REPLACE_MKTIME@ # define mktime rpl_mktime extern time_t mktime (struct tm *__tp) _GL_ARG_NONNULL ((1)); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @REPLACE_LOCALTIME_R@ # undef localtime_r # define localtime_r rpl_localtime_r # undef gmtime_r # define gmtime_r rpl_gmtime_r extern struct tm *localtime_r (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)); extern struct tm *gmtime_r (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)); # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @REPLACE_STRPTIME@ # undef strptime # define strptime rpl_strptime extern char *strptime (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3)); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @REPLACE_TIMEGM@ # undef timegm # define timegm rpl_timegm extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1)); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if GNULIB_PORTCHECK # undef asctime # define asctime eschew_asctime # undef asctime_r # define asctime_r eschew_asctime_r # undef ctime # define ctime eschew_ctime # undef ctime_r # define ctime_r eschew_ctime_r # endif # ifdef __cplusplus } # endif #endif libpreludedb-1.0.0/libmissing/Makefile.in0000664000076400007640000015464311347715642015334 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libmissing --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --tests-base=libmissing/tests --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files lock snprintf strdup strndup time_r vsnprintf VPATH = @srcdir@ 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@ target_triplet = @target@ subdir = libmissing DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libmissing_la_OBJECTS = glthread/lock.lo glthread/threadlib.lo libmissing_la_OBJECTS = $(am_libmissing_la_OBJECTS) libmissing_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libmissing_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmissing_la_SOURCES) $(EXTRA_libmissing_la_SOURCES) DIST_SOURCES = $(libmissing_la_SOURCES) $(EXTRA_libmissing_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = tests noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libmissing.la EXTRA_DIST = m4/gnulib-cache.m4 alloca.in.h \ $(top_srcdir)/./arg-nonnull.h errno.in.h float.in.h \ $(top_srcdir)/./config.rpath memchr.c memchr.valgrind \ snprintf.c stddef.in.h stdint.in.h stdio-write.c stdio.in.h \ strdup.c string.in.h strndup.c strnlen.c \ $(top_srcdir)/./config.rpath time.in.h time_r.c asnprintf.c \ float+.h printf-args.c printf-args.h printf-parse.c \ printf-parse.h vasnprintf.c vasnprintf.h vsnprintf.c \ $(top_srcdir)/./warn-on-use.h wchar.in.h # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h $(ERRNO_H) $(FLOAT_H) \ $(STDDEF_H) $(STDINT_H) stdio.h string.h time.h warn-on-use.h \ wchar.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ arg-nonnull.h-t errno.h errno.h-t float.h float.h-t stddef.h \ stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t string.h \ string.h-t time.h time.h-t warn-on-use.h warn-on-use.h-t \ wchar.h wchar.h-t MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libmissing_la_SOURCES = glthread/lock.h glthread/lock.c size_max.h \ glthread/threadlib.c xsize.h libmissing_la_LIBADD = $(gl_LTLIBOBJS) libmissing_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libmissing_la_SOURCES = memchr.c snprintf.c stdio-write.c \ strdup.c strndup.c strnlen.c time_r.c asnprintf.c \ printf-args.c printf-parse.c vasnprintf.c vsnprintf.c libmissing_la_LDFLAGS = $(AM_LDFLAGS) ARG_NONNULL_H = arg-nonnull.h WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits libmissing/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits libmissing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done glthread/$(am__dirstamp): @$(MKDIR_P) glthread @: > glthread/$(am__dirstamp) glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) glthread/lock.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/threadlib.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) libmissing.la: $(libmissing_la_OBJECTS) $(libmissing_la_DEPENDENCIES) $(libmissing_la_LINK) $(libmissing_la_OBJECTS) $(libmissing_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f glthread/lock.$(OBJEXT) -rm -f glthread/lock.lo -rm -f glthread/threadlib.$(OBJEXT) -rm -f glthread/threadlib.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf glthread/.libs glthread/_libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 glthread/$(DEPDIR)/$(am__dirstamp) -rm -f glthread/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ 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 -rf ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ 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: libpreludedb-1.0.0/libmissing/strdup.c0000664000076400007640000000264611330611105014724 00000000000000/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif /* Get specification. */ #include #include #undef __strdup #ifdef _LIBC # undef strdup #endif #ifndef weak_alias # define __strdup strdup #endif /* Duplicate S, returning an identical malloc'd string. */ char * __strdup (const char *s) { size_t len = strlen (s) + 1; void *new = malloc (len); if (new == NULL) return NULL; return (char *) memcpy (new, s, len); } #ifdef libc_hidden_def libc_hidden_def (__strdup) #endif #ifdef weak_alias weak_alias (__strdup, strdup) #endif libpreludedb-1.0.0/libmissing/errno.in.h0000664000076400007640000001104311330611104015130 00000000000000/* A POSIX-like . Copyright (C) 2008-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _GL_ERRNO_H #define _GL_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ # define EWOULDBLOCK EAGAIN /* Values >= 100 seem safe to use. */ # define ETXTBSY 100 # define GNULIB_defined_ETXTBSY 1 /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 # define EDESTADDRREQ 10039 # define EMSGSIZE 10040 # define EPROTOTYPE 10041 # define ENOPROTOOPT 10042 # define EPROTONOSUPPORT 10043 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EOPNOTSUPP 10045 # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define EAFNOSUPPORT 10047 # define EADDRINUSE 10048 # define EADDRNOTAVAIL 10049 # define ENETDOWN 10050 # define ENETUNREACH 10051 # define ENETRESET 10052 # define ECONNABORTED 10053 # define ECONNRESET 10054 # define ENOBUFS 10055 # define EISCONN 10056 # define ENOTCONN 10057 # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define ETIMEDOUT 10060 # define ECONNREFUSED 10061 # define ELOOP 10062 # define EHOSTDOWN 10064 /* not required by POSIX */ # define EHOSTUNREACH 10065 # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _GL_ERRNO_H */ #endif /* _GL_ERRNO_H */ libpreludedb-1.0.0/libmissing/float+.h0000664000076400007640000001310511330611104014557 00000000000000/* Supplemental information about the floating-point formats. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H #include #include /* Number of bits in the mantissa of a floating-point number, including the "hidden bit". */ #if FLT_RADIX == 2 # define FLT_MANT_BIT FLT_MANT_DIG # define DBL_MANT_BIT DBL_MANT_DIG # define LDBL_MANT_BIT LDBL_MANT_DIG #elif FLT_RADIX == 4 # define FLT_MANT_BIT (FLT_MANT_DIG * 2) # define DBL_MANT_BIT (DBL_MANT_DIG * 2) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) #elif FLT_RADIX == 16 # define FLT_MANT_BIT (FLT_MANT_DIG * 4) # define DBL_MANT_BIT (DBL_MANT_DIG * 4) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) #endif /* Bit mask that can be used to mask the exponent, as an unsigned number. */ #define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) #define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) #define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) /* Number of bits used for the exponent of a floating-point number, including the exponent's sign. */ #define FLT_EXP_BIT \ (FLT_EXP_MASK < 0x100 ? 8 : \ FLT_EXP_MASK < 0x200 ? 9 : \ FLT_EXP_MASK < 0x400 ? 10 : \ FLT_EXP_MASK < 0x800 ? 11 : \ FLT_EXP_MASK < 0x1000 ? 12 : \ FLT_EXP_MASK < 0x2000 ? 13 : \ FLT_EXP_MASK < 0x4000 ? 14 : \ FLT_EXP_MASK < 0x8000 ? 15 : \ FLT_EXP_MASK < 0x10000 ? 16 : \ FLT_EXP_MASK < 0x20000 ? 17 : \ FLT_EXP_MASK < 0x40000 ? 18 : \ FLT_EXP_MASK < 0x80000 ? 19 : \ FLT_EXP_MASK < 0x100000 ? 20 : \ FLT_EXP_MASK < 0x200000 ? 21 : \ FLT_EXP_MASK < 0x400000 ? 22 : \ FLT_EXP_MASK < 0x800000 ? 23 : \ FLT_EXP_MASK < 0x1000000 ? 24 : \ FLT_EXP_MASK < 0x2000000 ? 25 : \ FLT_EXP_MASK < 0x4000000 ? 26 : \ FLT_EXP_MASK < 0x8000000 ? 27 : \ FLT_EXP_MASK < 0x10000000 ? 28 : \ FLT_EXP_MASK < 0x20000000 ? 29 : \ FLT_EXP_MASK < 0x40000000 ? 30 : \ FLT_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define DBL_EXP_BIT \ (DBL_EXP_MASK < 0x100 ? 8 : \ DBL_EXP_MASK < 0x200 ? 9 : \ DBL_EXP_MASK < 0x400 ? 10 : \ DBL_EXP_MASK < 0x800 ? 11 : \ DBL_EXP_MASK < 0x1000 ? 12 : \ DBL_EXP_MASK < 0x2000 ? 13 : \ DBL_EXP_MASK < 0x4000 ? 14 : \ DBL_EXP_MASK < 0x8000 ? 15 : \ DBL_EXP_MASK < 0x10000 ? 16 : \ DBL_EXP_MASK < 0x20000 ? 17 : \ DBL_EXP_MASK < 0x40000 ? 18 : \ DBL_EXP_MASK < 0x80000 ? 19 : \ DBL_EXP_MASK < 0x100000 ? 20 : \ DBL_EXP_MASK < 0x200000 ? 21 : \ DBL_EXP_MASK < 0x400000 ? 22 : \ DBL_EXP_MASK < 0x800000 ? 23 : \ DBL_EXP_MASK < 0x1000000 ? 24 : \ DBL_EXP_MASK < 0x2000000 ? 25 : \ DBL_EXP_MASK < 0x4000000 ? 26 : \ DBL_EXP_MASK < 0x8000000 ? 27 : \ DBL_EXP_MASK < 0x10000000 ? 28 : \ DBL_EXP_MASK < 0x20000000 ? 29 : \ DBL_EXP_MASK < 0x40000000 ? 30 : \ DBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define LDBL_EXP_BIT \ (LDBL_EXP_MASK < 0x100 ? 8 : \ LDBL_EXP_MASK < 0x200 ? 9 : \ LDBL_EXP_MASK < 0x400 ? 10 : \ LDBL_EXP_MASK < 0x800 ? 11 : \ LDBL_EXP_MASK < 0x1000 ? 12 : \ LDBL_EXP_MASK < 0x2000 ? 13 : \ LDBL_EXP_MASK < 0x4000 ? 14 : \ LDBL_EXP_MASK < 0x8000 ? 15 : \ LDBL_EXP_MASK < 0x10000 ? 16 : \ LDBL_EXP_MASK < 0x20000 ? 17 : \ LDBL_EXP_MASK < 0x40000 ? 18 : \ LDBL_EXP_MASK < 0x80000 ? 19 : \ LDBL_EXP_MASK < 0x100000 ? 20 : \ LDBL_EXP_MASK < 0x200000 ? 21 : \ LDBL_EXP_MASK < 0x400000 ? 22 : \ LDBL_EXP_MASK < 0x800000 ? 23 : \ LDBL_EXP_MASK < 0x1000000 ? 24 : \ LDBL_EXP_MASK < 0x2000000 ? 25 : \ LDBL_EXP_MASK < 0x4000000 ? 26 : \ LDBL_EXP_MASK < 0x8000000 ? 27 : \ LDBL_EXP_MASK < 0x10000000 ? 28 : \ LDBL_EXP_MASK < 0x20000000 ? 29 : \ LDBL_EXP_MASK < 0x40000000 ? 30 : \ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) /* Number of bits used for a floating-point number: the mantissa (not counting the "hidden bit", since it may or may not be explicit), the exponent, and the sign. */ #define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) #define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) #define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) /* Number of bytes used for a floating-point number. This can be smaller than the 'sizeof'. For example, on i386 systems, 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but sizeof (long double) = 12 or = 16. */ #define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) /* Verify that SIZEOF_FLT <= sizeof (float) etc. */ typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1]; typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1]; typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1]; #endif /* _FLOATPLUS_H */ libpreludedb-1.0.0/libmissing/wchar.in.h0000664000076400007640000002166511330611106015124 00000000000000/* A substitute for ISO C99 , for platforms that have issues. Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * ISO C 99 for platforms that have issues. * * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H /* Special invocation convention: - Inside glibc and uClibc header files. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's . - On IRIX 6.5, similarly, we have an include -> , and the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _GL_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include # include # include #endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _GL_WCHAR_H #define _GL_WCHAR_H /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Define wint_t. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # undef btowc # define btowc rpl_btowc # endif # if !@HAVE_BTOWC@ || @REPLACE_BTOWC@ extern wint_t btowc (int c); # endif #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); # endif #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # undef wctob # define wctob rpl_wctob # endif # if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ extern int wctob (wint_t wc); # endif #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); # endif #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # undef mbsinit # define mbsinit rpl_mbsinit # endif # if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@ extern int mbsinit (const mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); # endif #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif # if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@ extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); # endif #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # undef mbrlen # define mbrlen rpl_mbrlen # endif # if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@ extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif # if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@ extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif # if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@ extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif # if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@ extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif # if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@ extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if @REPLACE_WCSNRTOMBS@ # undef wcsnrtombs # define wcsnrtombs rpl_wcsnrtombs # endif # if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@ extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2)); # endif #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); # endif #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # undef wcwidth # define wcwidth rpl_wcwidth extern int wcwidth (wchar_t); # else # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ extern int wcwidth (int /* actually wchar_t */); # endif # endif #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); # endif #endif #ifdef __cplusplus } #endif #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif libpreludedb-1.0.0/libmissing/vsnprintf.c0000664000076400007640000000367611330611106015441 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc. Written by Simon Josefsson and Yoann Vandoorselaere . This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to vsprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int vsnprintf (char *str, size_t size, const char *format, va_list args) { char *output; size_t len; size_t lenbuf = size; output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } libpreludedb-1.0.0/libmissing/float.in.h0000664000076400007640000000425311330611104015115 00000000000000/* A correct . Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ #ifndef _GL_FLOAT_H #define _GL_FLOAT_H /* 'long double' properties. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.0842021724855044340E-19L /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935063E-4932L /* Maximum representable finite number. */ # undef LDBL_MAX # define LDBL_MAX 1.1897314953572317650E+4932L /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif #endif /* _GL_FLOAT_H */ #endif /* _GL_FLOAT_H */ libpreludedb-1.0.0/libmissing/tests/0000775000076400007640000000000011347715757014503 500000000000000libpreludedb-1.0.0/libmissing/tests/test-stdio.c0000664000076400007640000000232211330611105016633 00000000000000/* Test of substitute. Copyright (C) 2007, 2009-2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); /* Check that the types are all defined. */ fpos_t t1; off_t t2; size_t t3; ssize_t t4; va_list t5; int main (void) { return 0; } libpreludedb-1.0.0/libmissing/tests/test-memchr.c0000664000076400007640000000616311330611105016773 00000000000000/* * Copyright (C) 2008-2010 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * 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 . */ #include #include #include "signature.h" SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); #include #include "zerosize-ptr.h" #include "macros.h" /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */ #define MEMCHR (char *) memchr int main (void) { size_t n = 0x100000; char *input = malloc (n); ASSERT (input); input[0] = 'a'; input[1] = 'b'; memset (input + 2, 'c', 1024); memset (input + 1026, 'd', n - 1028); input[n - 2] = 'e'; input[n - 1] = 'a'; /* Basic behavior tests. */ ASSERT (MEMCHR (input, 'a', n) == input); ASSERT (MEMCHR (input, 'a', 0) == NULL); ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL); ASSERT (MEMCHR (input, 'b', n) == input + 1); ASSERT (MEMCHR (input, 'c', n) == input + 2); ASSERT (MEMCHR (input, 'd', n) == input + 1026); ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1); ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2); ASSERT (MEMCHR (input, 'f', n) == NULL); ASSERT (MEMCHR (input, '\0', n) == NULL); /* Check that a very long haystack is handled quickly if the byte is found near the beginning. */ { size_t repeat = 10000; for (; repeat > 0; repeat--) { ASSERT (MEMCHR (input, 'c', n) == input + 2); } } /* Alignment tests. */ { int i, j; for (i = 0; i < 32; i++) { for (j = 0; j < 256; j++) input[i + j] = j; for (j = 0; j < 256; j++) { ASSERT (MEMCHR (input + i, j, 256) == input + i + j); } } } /* Check that memchr() does not read past the first occurrence of the byte being searched. See the Austin Group's clarification . */ { char *page_boundary = (char *) zerosize_ptr (); if (page_boundary != NULL) { for (n = 1; n <= 500; n++) { char *mem = page_boundary - n; memset (mem, 'X', n); ASSERT (MEMCHR (mem, 'U', n) == NULL); { size_t i; for (i = 0; i < n; i++) { mem[i] = 'U'; ASSERT (MEMCHR (mem, 'U', 4000) == mem + i); mem[i] = 'X'; } } } } } free (input); return 0; } libpreludedb-1.0.0/libmissing/tests/test-string.c0000664000076400007640000000201011330611105017011 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libpreludedb-1.0.0/libmissing/tests/test-alloca-opt.c0000664000076400007640000000276211330611105017554 00000000000000/* Test of optional automatic memory allocation. Copyright (C) 2005, 2007, 2009, 2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #if HAVE_ALLOCA static void do_allocation (int n) { void *ptr = alloca (n); (void) ptr; } void (*func) (int) = do_allocation; #endif int main () { #if HAVE_ALLOCA int i; /* Repeat a lot of times, to make sure there's no memory leak. */ for (i = 0; i < 100000; i++) { /* Try various values. n = 0 gave a crash on Alpha with gcc-2.5.8. Some versions of MacOS X have a stack size limit of 512 KB. */ func (34); func (134); func (399); func (510823); func (129321); func (0); func (4070); func (4095); func (1); func (16582); } #endif return 0; } libpreludedb-1.0.0/libmissing/tests/test-wchar.c0000664000076400007640000000213511330611105016617 00000000000000/* Test of substitute. Copyright (C) 2007-2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" /* Check that the types wchar_t and wint_t are defined. */ wchar_t a = 'c'; wint_t b = 'x'; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libpreludedb-1.0.0/libmissing/tests/intprops.h0000664000076400007640000000627211330611105016427 00000000000000/* intprops.h -- properties of integer types Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 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 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 . */ /* Written by Paul Eggert. */ #ifndef GL_INTPROPS_H # define GL_INTPROPS_H # include /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ # define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ # define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) /* Return zero if T can be determined to be an unsigned type. Otherwise, return 1. When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a tighter bound. Otherwise, it overestimates the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. The symbol signed_type_or_expr__ is private to this header file. */ # if __GNUC__ >= 2 # define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) # else # define signed_type_or_expr__(t) 1 # endif /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ # define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \ + signed_type_or_expr__ (t) + 1) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ # define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) #endif /* GL_INTPROPS_H */ libpreludedb-1.0.0/libmissing/tests/glthread/0000775000076400007640000000000011347715757016275 500000000000000libpreludedb-1.0.0/libmissing/tests/glthread/thread.c0000664000076400007640000001374111330611105017604 00000000000000/* Creating and controlling threads. Copyright (C) 2005-2010 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 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include /* Specification. */ #include "glthread/thread.h" #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_WIN32_THREADS #include /* -------------------------- gl_thread_t datatype -------------------------- */ /* The Thread-Local Storage (TLS) key that allows to access each thread's 'struct gl_thread_struct *' pointer. */ static DWORD self_key = (DWORD)-1; /* Initializes self_key. This function must only be called once. */ static void do_init_self_key (void) { self_key = TlsAlloc (); /* If this fails, we're hosed. */ if (self_key == (DWORD)-1) abort (); } /* Initializes self_key. */ static void init_self_key (void) { gl_once_define(static, once) gl_once (once, do_init_self_key); } /* This structure contains information about a thread. It is stored in TLS under key self_key. */ struct gl_thread_struct { /* Fields for managing the handle. */ HANDLE volatile handle; CRITICAL_SECTION handle_lock; /* Fields for managing the exit value. */ void * volatile result; /* Fields for managing the thread start. */ void * (*func) (void *); void *arg; }; /* Return a real HANDLE object for the current thread. */ static inline HANDLE get_current_thread_handle (void) { HANDLE this_handle; /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic identifier, not a real handle. */ if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), GetCurrentProcess (), &this_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) abort (); return this_handle; } gl_thread_t gl_thread_self_func (void) { gl_thread_t thread; if (self_key == (DWORD)-1) init_self_key (); thread = TlsGetValue (self_key); if (thread == NULL) { /* This happens only in threads that have not been created through glthread_create(), such as the main thread. */ for (;;) { thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread != NULL) break; /* Memory allocation failed. There is not much we can do. Have to busy-loop, waiting for the availability of memory. */ Sleep (1); } thread->handle = get_current_thread_handle (); InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ TlsSetValue (self_key, thread); } return thread; } /* The main function of a freshly creating thread. It's a wrapper around the FUNC and ARG arguments passed to glthread_create_func. */ static unsigned int WINAPI wrapper_func (void *varg) { struct gl_thread_struct *thread = (struct gl_thread_struct *)varg; EnterCriticalSection (&thread->handle_lock); /* Create a new handle for the thread only if the parent thread did not yet fill in the handle. */ if (thread->handle == NULL) thread->handle = get_current_thread_handle (); LeaveCriticalSection (&thread->handle_lock); if (self_key == (DWORD)-1) init_self_key (); TlsSetValue (self_key, thread); /* Run the thread. Store the exit value if the thread was not terminated otherwise. */ thread->result = thread->func (thread->arg); return 0; } int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg) { struct gl_thread_struct *thread = (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); if (thread == NULL) return ENOMEM; thread->handle = NULL; InitializeCriticalSection (&thread->handle_lock); thread->result = NULL; /* just to be deterministic */ thread->func = func; thread->arg = arg; { unsigned int thread_id; HANDLE thread_handle; thread_handle = (HANDLE) _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id); /* calls CreateThread with the same arguments */ if (thread_handle == NULL) { DeleteCriticalSection (&thread->handle_lock); free (thread); return EAGAIN; } EnterCriticalSection (&thread->handle_lock); if (thread->handle == NULL) thread->handle = thread_handle; else /* thread->handle was already set by the thread itself. */ CloseHandle (thread_handle); LeaveCriticalSection (&thread->handle_lock); *threadp = thread; return 0; } } int glthread_join_func (gl_thread_t thread, void **retvalp) { if (thread == NULL) return EINVAL; if (thread == gl_thread_self ()) return EDEADLK; if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED) return EINVAL; if (retvalp != NULL) *retvalp = thread->result; DeleteCriticalSection (&thread->handle_lock); CloseHandle (thread->handle); free (thread); return 0; } int gl_thread_exit_func (void *retval) { gl_thread_t thread = gl_thread_self (); thread->result = retval; _endthreadex (0); /* calls ExitThread (0) */ abort (); } #endif /* ========================================================================= */ libpreludedb-1.0.0/libmissing/tests/glthread/thread.h0000664000076400007640000002715511330611105017615 00000000000000/* Creating and controlling threads. Copyright (C) 2005-2010 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 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains primitives for creating and controlling threads. Thread data type: gl_thread_t. Creating a thread: thread = gl_thread_create (func, arg); Or with control of error handling: err = glthread_create (&thread, func, arg); extern int glthread_create (gl_thread_t *result, void *(*func) (void *), void *arg); Querying and changing the signal mask of a thread (not supported on all platforms): gl_thread_sigmask (how, newmask, oldmask); Or with control of error handling: err = glthread_sigmask (how, newmask, oldmask); extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask); Waiting for termination of another thread: gl_thread_join (thread, &return_value); Or with control of error handling: err = glthread_join (thread, &return_value); extern int glthread_join (gl_thread_t thread, void **return_value_ptr); Getting a reference to the current thread: current = gl_thread_self (); extern gl_thread_t gl_thread_self (void); Terminating the current thread: gl_thread_exit (return_value); extern void gl_thread_exit (void *return_value) __attribute__ ((noreturn)); Requesting custom code to be executed at fork() time(not supported on all platforms): gl_thread_atfork (prepare_func, parent_func, child_func); Or with control of error handling: err = glthread_atfork (prepare_func, parent_func, child_func); extern int glthread_atfork (void (*prepare_func) (void), void (*parent_func) (void), void (*child_func) (void)); Note that even on platforms where this is supported, use of fork() and threads together is problematic, see */ #ifndef _GLTHREAD_THREAD_H #define _GLTHREAD_THREAD_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_create # pragma weak pthread_sigmask # pragma weak pthread_join # ifndef pthread_self # pragma weak pthread_self # endif # pragma weak pthread_exit # if HAVE_PTHREAD_ATFORK # pragma weak pthread_atfork # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* This choice of gl_thread_t assumes that pthread_equal (a, b) is equivalent to ((a) == (b)). This is the case on all platforms in use in 2008. */ typedef pthread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS) # define glthread_sigmask(HOW, SET, OSET) \ (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0) # define gl_thread_self() \ (pthread_in_use () ? (void *) pthread_self () : NULL) # define gl_thread_exit(RETVAL) \ (pthread_in_use () ? pthread_exit (RETVAL) : 0) # if HAVE_PTHREAD_ATFORK # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \ (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0) # else # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # endif # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_spawn # pragma weak pth_sigmask # pragma weak pth_join # pragma weak pth_self # pragma weak pth_exit # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef pth_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (pth_in_use () ? ((*(THREADP) = pth_spawn (NULL, FUNC, ARG)) ? 0 : errno) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (pth_in_use () && !pth_sigmask (HOW, SET, OSET) ? errno : 0) # define glthread_join(THREAD, RETVALP) \ (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0) # define gl_thread_self() \ (pth_in_use () ? (void *) pth_self () : 0) # define gl_thread_exit(RETVAL) \ (pth_in_use () ? pth_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak thr_create # pragma weak thr_join # pragma weak thr_self # pragma weak thr_exit # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_thread_t datatype -------------------------- */ typedef thread_t gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ (thread_in_use () ? thr_create (NULL, 0, FUNC, ARG, 0, THREADP) : 0) # define glthread_sigmask(HOW, SET, OSET) \ (thread_in_use () ? sigprocmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0) # define gl_thread_self() \ (thread_in_use () ? (void *) thr_self () : 0) # define gl_thread_exit(RETVAL) \ (thread_in_use () ? thr_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif /* -------------------------- gl_thread_t datatype -------------------------- */ /* The gl_thread_t is a pointer to a structure in memory. Why not the thread handle? If it were the thread handle, it would be hard to implement gl_thread_self() (since GetCurrentThread () returns a pseudo- handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be closed afterwards, and there is no function for quickly retrieving a thread handle from its id). Why not the thread id? I tried it. It did not work: Sometimes ids appeared that did not belong to running threads, and glthread_join failed with ESRCH. */ typedef struct gl_thread_struct *gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) \ glthread_create_func (THREADP, FUNC, ARG) # define glthread_sigmask(HOW, SET, OSET) \ /* unsupported */ 0 # define glthread_join(THREAD, RETVALP) \ glthread_join_func (THREAD, RETVALP) # define gl_thread_self() \ gl_thread_self_func () # define gl_thread_exit(RETVAL) \ gl_thread_exit_func (RETVAL) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 extern int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg); extern int glthread_join_func (gl_thread_t thread, void **retvalp); extern gl_thread_t gl_thread_self_func (void); extern int gl_thread_exit_func (void *retval); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ typedef int gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) ENOSYS # define glthread_sigmask(HOW, SET, OSET) 0 # define glthread_join(THREAD, RETVALP) 0 # define gl_thread_self() NULL # define gl_thread_exit(RETVAL) 0 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 #endif /* ========================================================================= */ /* Macros with built-in error handling. */ #ifdef __cplusplus extern "C" { #endif static inline gl_thread_t gl_thread_create (void *(*func) (void *arg), void *arg) { gl_thread_t thread; int ret; ret = glthread_create (&thread, func, arg); if (ret != 0) abort (); return thread; } #define gl_thread_sigmask(HOW, SET, OSET) \ do \ { \ if (glthread_sigmask (HOW, SET, OSET)) \ abort (); \ } \ while (0) #define gl_thread_join(THREAD, RETVAL) \ do \ { \ if (glthread_join (THREAD, RETVAL)) \ abort (); \ } \ while (0) #define gl_thread_atfork(PREPARE, PARENT, CHILD) \ do \ { \ if (glthread_atfork (PREPARE, PARENT, CHILD)) \ abort (); \ } \ while (0) #ifdef __cplusplus } #endif #endif /* _GLTHREAD_THREAD_H */ libpreludedb-1.0.0/libmissing/tests/glthread/yield.h0000664000076400007640000000476311330611105017454 00000000000000/* Yielding the processor to other threads and processes. Copyright (C) 2005-2010 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 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file contains a primitive for yielding the processor to other threads. extern void gl_thread_yield (void); */ #ifndef _GLTHREAD_YIELD_H #define _GLTHREAD_YIELD_H #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ sched_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ pth_yield (NULL) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ thr_yield () # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WIN32_THREADS # include # ifdef __cplusplus extern "C" { # endif # define gl_thread_yield() \ Sleep (0) # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) /* Provide dummy implementation if threads are not supported. */ # define gl_thread_yield() 0 #endif /* ========================================================================= */ #endif /* _GLTHREAD_YIELD_H */ libpreludedb-1.0.0/libmissing/tests/verify.h0000664000076400007640000001275611330611106016062 00000000000000/* Compile-time assert-like macros. Copyright (C) 2005-2006, 2009-2010 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 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 . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef VERIFY_H # define VERIFY_H 1 /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. Symbols ending in "__" are private to this header. The code below uses several ideas. * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct verify_type__ will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define GL_CONCAT0(x, y) x##y #define GL_CONCAT(x, y) GL_CONCAT0 (x, y) extern struct {...} * GL_CONCAT(dummy,__LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct verify_type__ {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct verify_type__ {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * This implementation exploits the fact that GCC does not warn about the last declaration mentioned above. If a future version of GCC introduces a warning for this, the problem could be worked around by using code specialized to GCC, e.g.,: #if 4 <= __GNUC__ # define verify(R) \ extern int (* verify_function__ (void)) \ [__builtin_constant_p (R) && (R) ? 1 : -1] #endif * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Verify requirement R at compile-time, as an integer constant expression. Return 1. */ # ifdef __cplusplus template struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; # define verify_true(R) \ (!!sizeof (verify_type__<(R) ? 1 : -1>)) # else # define verify_true(R) \ (!!sizeof \ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # define verify(R) extern int (* verify_function__ (void)) [verify_true (R)] #endif libpreludedb-1.0.0/libmissing/tests/signature.h0000664000076400007640000000367711330611105016560 00000000000000/* Macro for checking that a function declaration is compliant. Copyright (C) 2009, 2010 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 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 . */ #ifndef SIGNATURE_CHECK /* Check that the function FN takes the specified arguments ARGS with a return type of RET. This header is designed to be included after and the one system header that is supposed to contain the function being checked, but prior to any other system headers that are necessary for the unit test. Therefore, this file does not include any system headers, nor reference anything outside of the macro arguments. For an example, if foo.h should provide: extern int foo (char, float); then the unit test named test-foo.c would start out with: #include #include #include "signature.h" SIGNATURE_CHECK (foo, int, (char, float)); #include ... */ # define SIGNATURE_CHECK(fn, ret, args) \ SIGNATURE_CHECK1 (fn, ret, args, __LINE__) /* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. Note that the checks must not occupy the same line. */ # define SIGNATURE_CHECK1(fn, ret, args, id) \ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ # define SIGNATURE_CHECK2(fn, ret, args, id) \ static ret (* _GL_UNUSED signature_check ## id) args = fn #endif /* SIGNATURE_CHECK */ libpreludedb-1.0.0/libmissing/tests/test-lock.c0000664000076400007640000003570411330611105016453 00000000000000/* Test of locking in multithreaded situations. Copyright (C) 2005, 2008, 2009, 2010 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 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 . */ /* Written by Bruno Haible , 2005. */ #include #if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 #endif #if USE_SOLARIS_THREADS # define TEST_SOLARIS_THREADS 1 #endif #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif #if USE_WIN32_THREADS # define TEST_WIN32_THREADS 1 #endif /* Whether to enable locking. Uncomment this to get a test program without locking, to verify that it crashes. */ #define ENABLE_LOCKING 1 /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking is enabled. */ #define DO_TEST_LOCK 1 #define DO_TEST_RWLOCK 1 #define DO_TEST_RECURSIVE_LOCK 1 #define DO_TEST_ONCE 1 /* Whether to help the scheduler through explicit yield(). Uncomment this to see if the operating system has a fair scheduler. */ #define EXPLICIT_YIELD 1 /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 /* Number of simultaneous threads. */ #define THREAD_COUNT 10 /* Number of operations performed in each thread. This is quite high, because with a smaller count, say 5000, we often get an "OK" result even without ENABLE_LOCKING (on Linux/x86). */ #define REPEAT_COUNT 50000 #include #include #include #if !ENABLE_LOCKING # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS # undef USE_WIN32_THREADS #endif #include "glthread/lock.h" #if !ENABLE_LOCKING # if TEST_POSIX_THREADS # define USE_POSIX_THREADS 1 # endif # if TEST_SOLARIS_THREADS # define USE_SOLARIS_THREADS 1 # endif # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif # if TEST_WIN32_THREADS # define USE_WIN32_THREADS 1 # endif #endif #include "glthread/thread.h" #include "glthread/yield.h" #if ENABLE_DEBUGGING # define dbgprintf printf #else # define dbgprintf if (0) printf #endif #if EXPLICIT_YIELD # define yield() gl_thread_yield () #else # define yield() #endif #define ACCOUNT_COUNT 4 static int account[ACCOUNT_COUNT]; static int random_account (void) { return ((unsigned int) rand() >> 3) % ACCOUNT_COUNT; } static void check_accounts (void) { int i, sum; sum = 0; for (i = 0; i < ACCOUNT_COUNT; i++) sum += account[i]; if (sum != ACCOUNT_COUNT * 1000) abort (); } /* ------------------- Test normal (non-recursive) locks ------------------- */ /* Test normal locks by having several bank accounts and several threads which shuffle around money between the accounts and another thread checking that all the money is still there. */ gl_lock_define_initialized(static, my_lock) static void * lock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); gl_lock_lock (my_lock); dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int lock_checker_done; static void * lock_checker_thread (void *arg) { while (!lock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; lock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (lock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (lock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); lock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ----------------- Test read-write (non-recursive) locks ----------------- */ /* Test read-write locks by having several bank accounts and several threads which shuffle around money between the accounts and several other threads that check that all the money is still there. */ gl_rwlock_define_initialized(static, my_rwlock) static void * rwlock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { int i1, i2, value; dbgprintf ("Mutator %p before wrlock\n", gl_thread_self ()); gl_rwlock_wrlock (my_rwlock); dbgprintf ("Mutator %p after wrlock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_rwlock_unlock (my_rwlock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int rwlock_checker_done; static void * rwlock_checker_thread (void *arg) { while (!rwlock_checker_done) { dbgprintf ("Checker %p before check rdlock\n", gl_thread_self ()); gl_rwlock_rdlock (my_rwlock); check_accounts (); gl_rwlock_unlock (my_rwlock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_rwlock (void) { int i; gl_thread_t checkerthreads[THREAD_COUNT]; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; rwlock_checker_done = 0; /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) checkerthreads[i] = gl_thread_create (rwlock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (rwlock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); rwlock_checker_done = 1; for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (checkerthreads[i], NULL); check_accounts (); } /* -------------------------- Test recursive locks -------------------------- */ /* Test recursive locks by having several bank accounts and several threads which shuffle around money between the accounts (recursively) and another thread checking that all the money is still there. */ gl_recursive_lock_define_initialized(static, my_reclock) static void recshuffle (void) { int i1, i2, value; dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); i1 = random_account (); i2 = random_account (); value = ((unsigned int) rand() >> 3) % 10; account[i1] += value; account[i2] -= value; /* Recursive with probability 0.5. */ if (((unsigned int) rand() >> 3) % 2) recshuffle (); dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); } static void * reclock_mutator_thread (void *arg) { int repeat; for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { recshuffle (); dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); return NULL; } static volatile int reclock_checker_done; static void * reclock_checker_thread (void *arg) { while (!reclock_checker_done) { dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); yield (); } dbgprintf ("Checker %p dying.\n", gl_thread_self ()); return NULL; } static void test_recursive_lock (void) { int i; gl_thread_t checkerthread; gl_thread_t threads[THREAD_COUNT]; /* Initialization. */ for (i = 0; i < ACCOUNT_COUNT; i++) account[i] = 1000; reclock_checker_done = 0; /* Spawn the threads. */ checkerthread = gl_thread_create (reclock_checker_thread, NULL); for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (reclock_mutator_thread, NULL); /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); reclock_checker_done = 1; gl_thread_join (checkerthread, NULL); check_accounts (); } /* ------------------------ Test once-only execution ------------------------ */ /* Test once-only execution by having several threads attempt to grab a once-only task simultaneously (triggered by releasing a read-write lock). */ gl_once_define(static, fresh_once) static int ready[THREAD_COUNT]; static gl_lock_t ready_lock[THREAD_COUNT]; #if ENABLE_LOCKING static gl_rwlock_t fire_signal[REPEAT_COUNT]; #else static volatile int fire_signal_state; #endif static gl_once_t once_control; static int performed; gl_lock_define_initialized(static, performed_lock) static void once_execute (void) { gl_lock_lock (performed_lock); performed++; gl_lock_unlock (performed_lock); } static void * once_contender_thread (void *arg) { int id = (int) (long) arg; int repeat; for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Tell the main thread that we're ready. */ gl_lock_lock (ready_lock[id]); ready[id] = 1; gl_lock_unlock (ready_lock[id]); if (repeat == REPEAT_COUNT) break; dbgprintf ("Contender %p waiting for signal for round %d\n", gl_thread_self (), repeat); #if ENABLE_LOCKING /* Wait for the signal to go. */ gl_rwlock_rdlock (fire_signal[repeat]); /* And don't hinder the others (if the scheduler is unfair). */ gl_rwlock_unlock (fire_signal[repeat]); #else /* Wait for the signal to go. */ while (fire_signal_state <= repeat) yield (); #endif dbgprintf ("Contender %p got the signal for round %d\n", gl_thread_self (), repeat); /* Contend for execution. */ gl_once (once_control, once_execute); } return NULL; } static void test_once (void) { int i, repeat; gl_thread_t threads[THREAD_COUNT]; /* Initialize all variables. */ for (i = 0; i < THREAD_COUNT; i++) { ready[i] = 0; gl_lock_init (ready_lock[i]); } #if ENABLE_LOCKING for (i = 0; i < REPEAT_COUNT; i++) gl_rwlock_init (fire_signal[i]); #else fire_signal_state = 0; #endif /* Block all fire_signals. */ for (i = REPEAT_COUNT-1; i >= 0; i--) gl_rwlock_wrlock (fire_signal[i]); /* Spawn the threads. */ for (i = 0; i < THREAD_COUNT; i++) threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i); for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Wait until every thread is ready. */ dbgprintf ("Main thread before synchonizing for round %d\n", repeat); for (;;) { int ready_count = 0; for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready_count += ready[i]; gl_lock_unlock (ready_lock[i]); } if (ready_count == THREAD_COUNT) break; yield (); } dbgprintf ("Main thread after synchonizing for round %d\n", repeat); if (repeat > 0) { /* Check that exactly one thread executed the once_execute() function. */ if (performed != 1) abort (); } if (repeat == REPEAT_COUNT) break; /* Preparation for the next round: Initialize once_control. */ memcpy (&once_control, &fresh_once, sizeof (gl_once_t)); /* Preparation for the next round: Reset the performed counter. */ performed = 0; /* Preparation for the next round: Reset the ready flags. */ for (i = 0; i < THREAD_COUNT; i++) { gl_lock_lock (ready_lock[i]); ready[i] = 0; gl_lock_unlock (ready_lock[i]); } /* Signal all threads simultaneously. */ dbgprintf ("Main thread giving signal for round %d\n", repeat); #if ENABLE_LOCKING gl_rwlock_unlock (fire_signal[repeat]); #else fire_signal_state = repeat + 1; #endif } /* Wait for the threads to terminate. */ for (i = 0; i < THREAD_COUNT; i++) gl_thread_join (threads[i], NULL); } /* -------------------------------------------------------------------------- */ int main () { #if TEST_PTH_THREADS if (!pth_init ()) abort (); #endif #if DO_TEST_LOCK printf ("Starting test_lock ..."); fflush (stdout); test_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RWLOCK printf ("Starting test_rwlock ..."); fflush (stdout); test_rwlock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_RECURSIVE_LOCK printf ("Starting test_recursive_lock ..."); fflush (stdout); test_recursive_lock (); printf (" OK\n"); fflush (stdout); #endif #if DO_TEST_ONCE printf ("Starting test_once ..."); fflush (stdout); test_once (); printf (" OK\n"); fflush (stdout); #endif return 0; } #else /* No multithreading available. */ #include int main () { fputs ("Skipping test: multithreading not enabled\n", stderr); return 77; } #endif libpreludedb-1.0.0/libmissing/tests/test-time.c0000664000076400007640000000203011330611105016443 00000000000000/* Test of substitute. Copyright (C) 2007, 2009, 2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "verify.h" struct timespec a; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libpreludedb-1.0.0/libmissing/tests/macros.h0000664000076400007640000000610211330611105016025 00000000000000/* Common macros used by gnulib tests. Copyright (C) 2006-2010 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 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 . */ /* This file contains macros that are used by many gnulib tests. Put here only frequently used macros, say, used by 10 tests or more. */ #include #include /* Define ASSERT_STREAM before including this file if ASSERT must target a stream other than stderr. */ #ifndef ASSERT_STREAM # define ASSERT_STREAM stderr #endif /* ASSERT (condition); verifies that the specified condition is fulfilled. If not, a message is printed to ASSERT_STREAM if defined (defaulting to stderr if undefined) and the program is terminated with an error code. This macro has the following properties: - The programmer specifies the expected condition, not the failure condition. This simplifies thinking. - The condition is tested always, regardless of compilation flags. (Unlike the macro from .) - On Unix platforms, the tester can debug the test program with a debugger (provided core dumps are enabled: "ulimit -c unlimited"). - For the sake of platforms where no debugger is available (such as some mingw systems), an error message is printed on the error stream that includes the source location of the ASSERT invocation. */ #define ASSERT(expr) \ do \ { \ if (!(expr)) \ { \ fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ __FILE__, __LINE__); \ fflush (ASSERT_STREAM); \ abort (); \ } \ } \ while (0) /* SIZEOF (array) returns the number of elements of an array. It works for arrays that are declared outside functions and for local variables of array type. It does *not* work for function parameters of array type, because they are actually parameters of pointer type. */ #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) libpreludedb-1.0.0/libmissing/tests/Makefile.am0000664000076400007640000001260611330611110016426 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects SUBDIRS = TESTS = XFAIL_TESTS = TESTS_ENVIRONMENT = noinst_PROGRAMS = check_PROGRAMS = noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -I. -I$(srcdir) \ -I../.. -I$(srcdir)/../.. \ -I../../libmissing -I$(srcdir)/../../libmissing LDADD = libtests.a ../../libmissing/libmissing.la libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = AM_LIBTOOLFLAGS = --preserve-dup-deps TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' ## begin gnulib module alloca-opt-tests TESTS += test-alloca-opt check_PROGRAMS += test-alloca-opt EXTRA_DIST += test-alloca-opt.c ## end gnulib module alloca-opt-tests ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/./arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module errno-tests TESTS += test-errno check_PROGRAMS += test-errno EXTRA_DIST += test-errno.c ## end gnulib module errno-tests ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module lock-tests TESTS += test-lock check_PROGRAMS += test-lock test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ EXTRA_DIST += test-lock.c ## end gnulib module lock-tests ## begin gnulib module memchr-tests TESTS += test-memchr check_PROGRAMS += test-memchr EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memchr-tests ## begin gnulib module snprintf-tests TESTS += test-snprintf check_PROGRAMS += test-snprintf EXTRA_DIST += test-snprintf.c signature.h macros.h ## end gnulib module snprintf-tests ## begin gnulib module stddef-tests TESTS += test-stddef check_PROGRAMS += test-stddef EXTRA_DIST += test-stddef.c ## end gnulib module stddef-tests ## begin gnulib module stdint-tests TESTS += test-stdint check_PROGRAMS += test-stdint EXTRA_DIST += test-stdint.c ## end gnulib module stdint-tests ## begin gnulib module stdio-tests TESTS += test-stdio check_PROGRAMS += test-stdio EXTRA_DIST += test-stdio.c ## end gnulib module stdio-tests ## begin gnulib module string-tests TESTS += test-string check_PROGRAMS += test-string EXTRA_DIST += test-string.c ## end gnulib module string-tests ## begin gnulib module thread libtests_a_SOURCES += glthread/thread.h glthread/thread.c ## end gnulib module thread ## begin gnulib module time-tests TESTS += test-time check_PROGRAMS += test-time EXTRA_DIST += test-time.c ## end gnulib module time-tests ## begin gnulib module vasnprintf-tests TESTS += test-vasnprintf check_PROGRAMS += test-vasnprintf EXTRA_DIST += test-vasnprintf.c macros.h ## end gnulib module vasnprintf-tests ## begin gnulib module verify libtests_a_SOURCES += verify.h ## end gnulib module verify ## begin gnulib module vsnprintf-tests TESTS += test-vsnprintf check_PROGRAMS += test-vsnprintf EXTRA_DIST += test-vsnprintf.c signature.h macros.h ## end gnulib module vsnprintf-tests ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/./warn-on-use.h ## end gnulib module warn-on-use ## begin gnulib module wchar-tests TESTS += test-wchar check_PROGRAMS += test-wchar EXTRA_DIST += test-wchar.c ## end gnulib module wchar-tests ## begin gnulib module yield libtests_a_SOURCES += glthread/yield.h ## end gnulib module yield # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : libpreludedb-1.0.0/libmissing/tests/test-stddef.c0000664000076400007640000000213711330611105016766 00000000000000/* Test of substitute. Copyright (C) 2009, 2010 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 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 . */ /* Written by Eric Blake , 2009. */ #include #include #include "verify.h" /* Check that appropriate types are defined. */ wchar_t a = 'c'; ptrdiff_t b = 1; size_t c = 2; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); int main (void) { return 0; } libpreludedb-1.0.0/libmissing/tests/test-vasnprintf.c0000664000076400007640000000550111330611105017705 00000000000000/* Test of vasnprintf() and asnprintf() functions. Copyright (C) 2007-2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include "vasnprintf.h" #include #include #include #include "macros.h" static char * my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *ret; va_start (args, format); ret = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return ret; } static void test_vasnprintf () { char buf[8]; int size; for (size = 0; size <= 8; size++) { size_t length = size; char *result = my_asnprintf (NULL, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); free (result); } for (size = 0; size <= 8; size++) { size_t length; char *result; memcpy (buf, "DEADBEEF", 8); length = size; result = my_asnprintf (buf, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); if (size < 6) ASSERT (result != buf); ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); if (result != buf) free (result); } } static void test_asnprintf () { char buf[8]; int size; for (size = 0; size <= 8; size++) { size_t length = size; char *result = asnprintf (NULL, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); free (result); } for (size = 0; size <= 8; size++) { size_t length; char *result; memcpy (buf, "DEADBEEF", 8); length = size; result = asnprintf (buf, &length, "%d", 12345); ASSERT (result != NULL); ASSERT (strcmp (result, "12345") == 0); ASSERT (length == 5); if (size < 6) ASSERT (result != buf); ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); if (result != buf) free (result); } } int main (int argc, char *argv[]) { test_vasnprintf (); test_asnprintf (); return 0; } libpreludedb-1.0.0/libmissing/tests/Makefile.in0000664000076400007640000013377411347715643016501 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. VPATH = @srcdir@ 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@ target_triplet = @target@ TESTS = test-alloca-opt$(EXEEXT) test-errno$(EXEEXT) \ test-lock$(EXEEXT) test-memchr$(EXEEXT) test-snprintf$(EXEEXT) \ test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ test-string$(EXEEXT) test-time$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vsnprintf$(EXEEXT) \ test-wchar$(EXEEXT) XFAIL_TESTS = noinst_PROGRAMS = check_PROGRAMS = test-alloca-opt$(EXEEXT) test-errno$(EXEEXT) \ test-lock$(EXEEXT) test-memchr$(EXEEXT) test-snprintf$(EXEEXT) \ test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ test-string$(EXEEXT) test-time$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vsnprintf$(EXEEXT) \ test-wchar$(EXEEXT) subdir = libmissing/tests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libmissing/m4/00gnulib.m4 \ $(top_srcdir)/libmissing/m4/alloca.m4 \ $(top_srcdir)/libmissing/m4/errno_h.m4 \ $(top_srcdir)/libmissing/m4/extensions.m4 \ $(top_srcdir)/libmissing/m4/float_h.m4 \ $(top_srcdir)/libmissing/m4/gnulib-common.m4 \ $(top_srcdir)/libmissing/m4/gnulib-comp.m4 \ $(top_srcdir)/libmissing/m4/gnulib-tool.m4 \ $(top_srcdir)/libmissing/m4/include_next.m4 \ $(top_srcdir)/libmissing/m4/intmax_t.m4 \ $(top_srcdir)/libmissing/m4/inttypes_h.m4 \ $(top_srcdir)/libmissing/m4/lib-ld.m4 \ $(top_srcdir)/libmissing/m4/lib-link.m4 \ $(top_srcdir)/libmissing/m4/lib-prefix.m4 \ $(top_srcdir)/libmissing/m4/lock.m4 \ $(top_srcdir)/libmissing/m4/longlong.m4 \ $(top_srcdir)/libmissing/m4/memchr.m4 \ $(top_srcdir)/libmissing/m4/mmap-anon.m4 \ $(top_srcdir)/libmissing/m4/multiarch.m4 \ $(top_srcdir)/libmissing/m4/onceonly.m4 \ $(top_srcdir)/libmissing/m4/printf.m4 \ $(top_srcdir)/libmissing/m4/size_max.m4 \ $(top_srcdir)/libmissing/m4/snprintf.m4 \ $(top_srcdir)/libmissing/m4/stddef_h.m4 \ $(top_srcdir)/libmissing/m4/stdint.m4 \ $(top_srcdir)/libmissing/m4/stdint_h.m4 \ $(top_srcdir)/libmissing/m4/stdio_h.m4 \ $(top_srcdir)/libmissing/m4/strdup.m4 \ $(top_srcdir)/libmissing/m4/string_h.m4 \ $(top_srcdir)/libmissing/m4/strndup.m4 \ $(top_srcdir)/libmissing/m4/strnlen.m4 \ $(top_srcdir)/libmissing/m4/thread.m4 \ $(top_srcdir)/libmissing/m4/threadlib.m4 \ $(top_srcdir)/libmissing/m4/time_h.m4 \ $(top_srcdir)/libmissing/m4/time_r.m4 \ $(top_srcdir)/libmissing/m4/vasnprintf.m4 \ $(top_srcdir)/libmissing/m4/vsnprintf.m4 \ $(top_srcdir)/libmissing/m4/warn-on-use.m4 \ $(top_srcdir)/libmissing/m4/wchar.m4 \ $(top_srcdir)/libmissing/m4/wchar_t.m4 \ $(top_srcdir)/libmissing/m4/wint_t.m4 \ $(top_srcdir)/libmissing/m4/xsize.m4 \ $(top_srcdir)/libmissing/m4/yield.m4 \ $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/ax_c_check_flag.m4 \ $(top_srcdir)/m4/ax_ld_check_flag.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 \ $(top_srcdir)/m4/ax_lib_postgresql.m4 \ $(top_srcdir)/m4/ax_lib_sqlite3.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libprelude.m4 $(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)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libtests_a_OBJECTS = glthread/thread.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) test_alloca_opt_SOURCES = test-alloca-opt.c test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) test_alloca_opt_LDADD = $(LDADD) test_alloca_opt_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_errno_SOURCES = test-errno.c test_errno_OBJECTS = test-errno.$(OBJEXT) test_errno_LDADD = $(LDADD) test_errno_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_lock_SOURCES = test-lock.c test_lock_OBJECTS = test-lock.$(OBJEXT) am__DEPENDENCIES_2 = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2) test_memchr_SOURCES = test-memchr.c test_memchr_OBJECTS = test-memchr.$(OBJEXT) test_memchr_LDADD = $(LDADD) test_memchr_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_snprintf_SOURCES = test-snprintf.c test_snprintf_OBJECTS = test-snprintf.$(OBJEXT) test_snprintf_LDADD = $(LDADD) test_snprintf_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stddef_SOURCES = test-stddef.c test_stddef_OBJECTS = test-stddef.$(OBJEXT) test_stddef_LDADD = $(LDADD) test_stddef_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdint_SOURCES = test-stdint.c test_stdint_OBJECTS = test-stdint.$(OBJEXT) test_stdint_LDADD = $(LDADD) test_stdint_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_stdio_SOURCES = test-stdio.c test_stdio_OBJECTS = test-stdio.$(OBJEXT) test_stdio_LDADD = $(LDADD) test_stdio_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_string_SOURCES = test-string.c test_string_OBJECTS = test-string.$(OBJEXT) test_string_LDADD = $(LDADD) test_string_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_time_SOURCES = test-time.c test_time_OBJECTS = test-time.$(OBJEXT) test_time_LDADD = $(LDADD) test_time_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) test_vasnprintf_SOURCES = test-vasnprintf.c test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT) test_vasnprintf_LDADD = $(LDADD) test_vasnprintf_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_vsnprintf_SOURCES = test-vsnprintf.c test_vsnprintf_OBJECTS = test-vsnprintf.$(OBJEXT) test_vsnprintf_LDADD = $(LDADD) test_vsnprintf_DEPENDENCIES = libtests.a \ ../../libmissing/libmissing.la libtests.a \ $(am__DEPENDENCIES_1) test_wchar_SOURCES = test-wchar.c test_wchar_OBJECTS = test-wchar.$(OBJEXT) test_wchar_LDADD = $(LDADD) test_wchar_DEPENDENCIES = libtests.a ../../libmissing/libmissing.la \ libtests.a $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-errno.c test-lock.c test-memchr.c \ test-snprintf.c test-stddef.c test-stdint.c test-stdio.c \ test-string.c test-time.c test-vasnprintf.c test-vsnprintf.c \ test-wchar.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-errno.c test-lock.c test-memchr.c \ test-snprintf.c test-stddef.c test-stdint.c test-stdio.c \ test-string.c test-time.c test-vasnprintf.c test-vsnprintf.c \ test-wchar.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINDINGS_CC = @BINDINGS_CC@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WINT_T = @HAVE_WINT_T@ HTML_DIR = @HTML_DIR@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPRELUDEDB_SONAME = @LIBPRELUDEDB_SONAME@ LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBTHREAD = @LTLIBTHREAD@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CONFIG = @MYSQL_CONFIG@ MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ MYSQL_VERSION = @MYSQL_VERSION@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ 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_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCFLAGS = @PCFLAGS@ PERL = @PERL@ PERL_EXTRA_PARAMS = @PERL_EXTRA_PARAMS@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRESQL_CFLAGS = @POSTGRESQL_CFLAGS@ POSTGRESQL_LDFLAGS = @POSTGRESQL_LDFLAGS@ POSTGRESQL_VERSION = @POSTGRESQL_VERSION@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_VERSION = @SQLITE3_VERSION@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SWIG = @SWIG@ SYSCONFDIR = @SYSCONFDIR@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ YIELD_LIB = @YIELD_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_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@ db_plugin_dir = @db_plugin_dir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ format_plugin_dir = @format_plugin_dir@ format_schema_dir = @format_schema_dir@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 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@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sql_plugin_dir = @sql_plugin_dir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects SUBDIRS = TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/./arg-nonnull.h \ test-errno.c intprops.h test-lock.c test-memchr.c \ zerosize-ptr.h signature.h macros.h test-snprintf.c \ signature.h macros.h test-stddef.c test-stdint.c test-stdio.c \ test-string.c test-time.c test-vasnprintf.c macros.h \ test-vsnprintf.c signature.h macros.h \ $(top_srcdir)/./warn-on-use.h test-wchar.c # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = arg-nonnull.h warn-on-use.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ warn-on-use.h warn-on-use.h-t MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = \ -I. -I$(srcdir) \ -I../.. -I$(srcdir)/../.. \ -I../../libmissing -I$(srcdir)/../../libmissing LDADD = libtests.a ../../libmissing/libmissing.la libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = glthread/thread.h glthread/thread.c verify.h \ glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = AM_LIBTOOLFLAGS = --preserve-dup-deps ARG_NONNULL_H = arg-nonnull.h test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmissing/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libmissing/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkLIBRARIES: -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) glthread/$(am__dirstamp): @$(MKDIR_P) glthread @: > glthread/$(am__dirstamp) glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) -rm -f libtests.a $(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(RANLIB) libtests.a clean-checkPROGRAMS: @list='$(check_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 clean-noinstPROGRAMS: @list='$(noinst_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 test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) @rm -f test-alloca-opt$(EXEEXT) $(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) @rm -f test-errno$(EXEEXT) $(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS) test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) @rm -f test-lock$(EXEEXT) $(LINK) $(test_lock_OBJECTS) $(test_lock_LDADD) $(LIBS) test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) @rm -f test-memchr$(EXEEXT) $(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS) test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) @rm -f test-snprintf$(EXEEXT) $(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS) test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) @rm -f test-stddef$(EXEEXT) $(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS) test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) @rm -f test-stdint$(EXEEXT) $(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS) test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) @rm -f test-stdio$(EXEEXT) $(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS) test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) @rm -f test-string$(EXEEXT) $(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS) test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) @rm -f test-time$(EXEEXT) $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) @rm -f test-vasnprintf$(EXEEXT) $(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS) test-vsnprintf$(EXEEXT): $(test_vsnprintf_OBJECTS) $(test_vsnprintf_DEPENDENCIES) @rm -f test-vsnprintf$(EXEEXT) $(LINK) $(test_vsnprintf_OBJECTS) $(test_vsnprintf_LDADD) $(LIBS) test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) @rm -f test-wchar$(EXEEXT) $(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f glthread/thread.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vsnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ 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@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 glthread/$(DEPDIR)/$(am__dirstamp) -rm -f glthread/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ 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 -rf ./$(DEPDIR) glthread/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ check-am ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/./arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/./warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/./warn-on-use.h \ > $@-t && \ mv $@-t $@ # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ 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: libpreludedb-1.0.0/libmissing/tests/test-errno.c0000664000076400007640000000550011330611105016637 00000000000000/* Test of substitute. Copyright (C) 2008, 2009, 2010 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 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 . */ /* Written by Bruno Haible , 2008. */ #include #include /* Verify that the POSIX mandated errno values exist and can be used as initializers outside of a function. The variable names happen to match the Linux/x86 error numbers. */ int e1 = EPERM; int e2 = ENOENT; int e3 = ESRCH; int e4 = EINTR; int e5 = EIO; int e6 = ENXIO; int e7 = E2BIG; int e8 = ENOEXEC; int e9 = EBADF; int e10 = ECHILD; int e11 = EAGAIN; int e11a = EWOULDBLOCK; int e12 = ENOMEM; int e13 = EACCES; int e14 = EFAULT; int e16 = EBUSY; int e17 = EEXIST; int e18 = EXDEV; int e19 = ENODEV; int e20 = ENOTDIR; int e21 = EISDIR; int e22 = EINVAL; int e23 = ENFILE; int e24 = EMFILE; int e25 = ENOTTY; int e26 = ETXTBSY; int e27 = EFBIG; int e28 = ENOSPC; int e29 = ESPIPE; int e30 = EROFS; int e31 = EMLINK; int e32 = EPIPE; int e33 = EDOM; int e34 = ERANGE; int e35 = EDEADLK; int e36 = ENAMETOOLONG; int e37 = ENOLCK; int e38 = ENOSYS; int e39 = ENOTEMPTY; int e40 = ELOOP; int e42 = ENOMSG; int e43 = EIDRM; int e67 = ENOLINK; int e71 = EPROTO; int e72 = EMULTIHOP; int e74 = EBADMSG; int e75 = EOVERFLOW; int e84 = EILSEQ; int e88 = ENOTSOCK; int e89 = EDESTADDRREQ; int e90 = EMSGSIZE; int e91 = EPROTOTYPE; int e92 = ENOPROTOOPT; int e93 = EPROTONOSUPPORT; int e95 = EOPNOTSUPP; int e95a = ENOTSUP; int e97 = EAFNOSUPPORT; int e98 = EADDRINUSE; int e99 = EADDRNOTAVAIL; int e100 = ENETDOWN; int e101 = ENETUNREACH; int e102 = ENETRESET; int e103 = ECONNABORTED; int e104 = ECONNRESET; int e105 = ENOBUFS; int e106 = EISCONN; int e107 = ENOTCONN; int e110 = ETIMEDOUT; int e111 = ECONNREFUSED; int e113 = EHOSTUNREACH; int e114 = EALREADY; int e115 = EINPROGRESS; int e116 = ESTALE; int e122 = EDQUOT; int e125 = ECANCELED; /* Don't verify that these errno values are all different, except for possibly EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has ENOTSUP == EOPNOTSUPP. */ int main () { /* Verify that errno can be assigned. */ errno = EOVERFLOW; /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */ if (errno == EINVAL) return 1; return 0; } libpreludedb-1.0.0/libmissing/tests/test-snprintf.c0000664000076400007640000000333711330611105017363 00000000000000/* Test of snprintf() function. Copyright (C) 2007-2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...)); #include #include "macros.h" int main (int argc, char *argv[]) { char buf[8]; int size; int retval; for (size = 0; size <= 8; size++) { memcpy (buf, "DEADBEEF", 8); retval = snprintf (buf, size, "%d", 12345); if (size < 6) { #if CHECK_SNPRINTF_POSIX ASSERT (retval < 0 || retval >= size); #endif if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); } #if !CHECK_SNPRINTF_POSIX if (size > 0) #endif ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (retval == 5); ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } return 0; } libpreludedb-1.0.0/libmissing/tests/test-vsnprintf.c0000664000076400007640000000371411330611105017550 00000000000000/* Test of vsnprintf() function. Copyright (C) 2007-2010 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 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 . */ /* Written by Bruno Haible , 2007. */ #include #include #include "signature.h" SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list)); #include #include #include "macros.h" static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main (int argc, char *argv[]) { char buf[8]; int size; int retval; for (size = 0; size <= 8; size++) { memcpy (buf, "DEADBEEF", 8); retval = my_snprintf (buf, size, "%d", 12345); if (size < 6) { #if CHECK_VSNPRINTF_POSIX ASSERT (retval < 0 || retval >= size); #endif if (size > 0) { ASSERT (memcmp (buf, "12345", size - 1) == 0); ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size); } #if !CHECK_VSNPRINTF_POSIX if (size > 0) #endif ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); } else { ASSERT (retval == 5); ASSERT (memcmp (buf, "12345\0EF", 8) == 0); } } return 0; } libpreludedb-1.0.0/libmissing/tests/zerosize-ptr.h0000664000076400007640000000471711330611106017231 00000000000000/* Return a pointer to a zero-size object in memory. Copyright (C) 2009, 2010 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 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 . */ /* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL argument. Therefore this file produces a non-NULL pointer which cannot be dereferenced, if possible. */ #include /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an mprotect() function in libgcc.a. */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # include # include # include # include /* Define MAP_FILE when it isn't otherwise. */ # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif /* Return a pointer to a zero-size object in memory (that is, actually, a pointer to a page boundary where the previous page is readable and writable and the next page is neither readable not writable), if possible. Return NULL otherwise. */ static void * zerosize_ptr (void) { /* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is not defined on HP-UX 11 (since it does not support MAP_FIXED). */ #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) return two_pages + pagesize; } #endif return NULL; } libpreludedb-1.0.0/libmissing/tests/test-stdint.c0000664000076400007640000002630311330611105017023 00000000000000/* Test of substitute. Copyright (C) 2006-2010 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 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 . */ /* Written by Bruno Haible , 2006. */ #include /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #include #include "verify.h" #include "intprops.h" #if __GNUC__ >= 2 && DO_PEDANTIC # define verify_same_types(expr1,expr2) \ extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ extern void _verify_func(__LINE__) (__typeof__ (expr2) *); # define _verify_func(line) _verify_func2(line) # define _verify_func2(line) verify_func_ ## line #else # define verify_same_types(expr1,expr2) extern void verify_func (int) #endif /* 7.18.1.1. Exact-width integer types */ /* 7.18.2.1. Limits of exact-width integer types */ int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; verify (TYPE_MINIMUM (int8_t) == INT8_MIN); verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); verify_same_types (INT8_MIN, (int8_t) 0 + 0); verify_same_types (INT8_MAX, (int8_t) 0 + 0); int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; verify (TYPE_MINIMUM (int16_t) == INT16_MIN); verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); verify_same_types (INT16_MIN, (int16_t) 0 + 0); verify_same_types (INT16_MAX, (int16_t) 0 + 0); int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; verify (TYPE_MINIMUM (int32_t) == INT32_MIN); verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); verify_same_types (INT32_MIN, (int32_t) 0 + 0); verify_same_types (INT32_MAX, (int32_t) 0 + 0); #ifdef INT64_MAX int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; verify (TYPE_MINIMUM (int64_t) == INT64_MIN); verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); verify_same_types (INT64_MIN, (int64_t) 0 + 0); verify_same_types (INT64_MAX, (int64_t) 0 + 0); #endif uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); #ifdef UINT64_MAX uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); #endif #if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX /* ok */ #else err or; #endif #if UINT8_MAX && UINT16_MAX && UINT32_MAX /* ok */ #else err or; #endif /* 7.18.1.2. Minimum-width integer types */ /* 7.18.2.2. Limits of minimum-width integer types */ int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); #ifdef INT_LEAST64_MAX int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); #endif uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); #ifdef UINT_LEAST64_MAX uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); #endif #if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX /* ok */ #else err or; #endif #if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* 7.18.2.3. Limits of fastest minimum-width integer types */ int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); #ifdef INT_FAST64_MAX int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); #endif uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); #ifdef UINT_FAST64_MAX uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); #endif #if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX /* ok */ #else err or; #endif #if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX /* ok */ #else err or; #endif /* 7.18.1.4. Integer types capable of holding object pointers */ /* 7.18.2.4. Limits of integer types capable of holding object pointers */ intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); uintptr_t h[2] = { 17, UINTPTR_MAX }; verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); #if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX /* ok */ #else err or; #endif /* 7.18.1.5. Greatest-width integer types */ /* 7.18.2.5. Limits of greatest-width integer types */ intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); /* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in the preprocessor. */ #if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) #if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX /* ok */ #else err or; #endif #endif /* 7.18.3. Limits of other integer types */ #include verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); #if PTRDIFF_MIN && PTRDIFF_MAX /* ok */ #else err or; #endif #include verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); #if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX /* ok */ #else err or; #endif verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); verify_same_types (SIZE_MAX, (size_t) 0 + 0); #if SIZE_MAX /* ok */ #else err or; #endif #if HAVE_WCHAR_T verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); # if WCHAR_MIN != 17 && WCHAR_MAX /* ok */ # else err or; # endif #endif #if HAVE_WINT_T # include verify (TYPE_MINIMUM (wint_t) == WINT_MIN); verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); verify_same_types (WINT_MIN, (wint_t) 0 + 0); verify_same_types (WINT_MAX, (wint_t) 0 + 0); # if WINT_MIN != 17 && WINT_MAX /* ok */ # else err or; # endif #endif /* 7.18.4. Macros for integer constants */ verify (INT8_C (17) == 17); verify_same_types (INT8_C (17), (int_least8_t)0 + 0); verify (UINT8_C (17) == 17); verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); verify (INT16_C (17) == 17); verify_same_types (INT16_C (17), (int_least16_t)0 + 0); verify (UINT16_C (17) == 17); verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); verify (INT32_C (17) == 17); verify_same_types (INT32_C (17), (int_least32_t)0 + 0); verify (UINT32_C (17) == 17); verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); #ifdef INT64_C verify (INT64_C (17) == 17); verify_same_types (INT64_C (17), (int_least64_t)0 + 0); #endif #ifdef UINT64_C verify (UINT64_C (17) == 17); verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); #endif verify (INTMAX_C (17) == 17); verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); verify (UINTMAX_C (17) == 17); verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); int main (void) { return 0; } libpreludedb-1.0.0/libmissing/printf-args.h0000664000076400007640000000743211330611105015642 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include /* Get wchar_t. */ #if HAVE_WCHAR_T # include #endif /* Get wint_t. */ #if HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; typedef struct { size_t count; argument *arg; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ libpreludedb-1.0.0/libmissing/printf-args.c0000664000076400007640000001477011330611105015640 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } libpreludedb-1.0.0/libmissing/printf-parse.h0000664000076400007640000001125311330611105016014 00000000000000/* Parse printf format string. Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; } char_directives; #if ENABLE_UNISTDIO /* A parsed directive. */ typedef struct { const uint8_t* dir_start; const uint8_t* dir_end; int flags; const uint8_t* width_start; const uint8_t* width_end; size_t width_arg_index; const uint8_t* precision_start; const uint8_t* precision_end; size_t precision_arg_index; uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u8_directive; /* A parsed format string. */ typedef struct { size_t count; u8_directive *dir; size_t max_width_length; size_t max_precision_length; } u8_directives; /* A parsed directive. */ typedef struct { const uint16_t* dir_start; const uint16_t* dir_end; int flags; const uint16_t* width_start; const uint16_t* width_end; size_t width_arg_index; const uint16_t* precision_start; const uint16_t* precision_end; size_t precision_arg_index; uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u16_directive; /* A parsed format string. */ typedef struct { size_t count; u16_directive *dir; size_t max_width_length; size_t max_precision_length; } u16_directives; /* A parsed directive. */ typedef struct { const uint32_t* dir_start; const uint32_t* dir_end; int flags; const uint32_t* width_start; const uint32_t* width_end; size_t width_arg_index; const uint32_t* precision_start; const uint32_t* precision_end; size_t precision_arg_index; uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u32_directive; /* A parsed format string. */ typedef struct { size_t count; u32_directive *dir; size_t max_width_length; size_t max_precision_length; } u32_directives; #endif /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #if ENABLE_UNISTDIO extern int ulc_printf_parse (const char *format, char_directives *d, arguments *a); extern int u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); extern int u16_printf_parse (const uint16_t *format, u16_directives *d, arguments *a); extern int u32_printf_parse (const uint32_t *format, u32_directives *d, arguments *a); #else # ifdef STATIC STATIC # else extern # endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif #endif /* _PRINTF_PARSE_H */ libpreludedb-1.0.0/libmissing/vasnprintf.h0000664000076400007640000000566111330611106015603 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include #ifndef __attribute__ /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable __attribute__ only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(Spec) /* empty */ # endif #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ #if REPLACE_VASNPRINTF # define asnprintf rpl_asnprintf # define vasnprintf rpl_vasnprintf #endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ libpreludedb-1.0.0/libmissing/strndup.c0000664000076400007640000000221011330611105015065 00000000000000/* A replacement function, for systems that lack strndup. Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include char * strndup (char const *s, size_t n) { size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) return NULL; new[len] = '\0'; return memcpy (new, s, len); } libpreludedb-1.0.0/gtk-doc.make0000644000076400007640000001364211347715571013306 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = sh -c endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: html-build.stamp else all-local: endif docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs libpreludedb-1.0.0/NEWS0000664000076400007640000003521111347715557011620 00000000000000* 2010-03-16, libpreludedb-1.0.0: - No changes since rc1. * 2010-01-29, libpreludedb-1.0.0rc1: - Fixes insertion failure for ProcessEnv - Retrieve the correct table for application of Time criteria. The old implementation could use the CreateTime table in place of a DetectTime table, when asked for the table handling a detect_time element. - [preludedb-admin]: Do not account for EOF in loaded messages statistics - [preludedb-admin]: Fix a problem where the offset was not correctly calculated when retrieving events to be copied, if the number of events copied in the previous transaction didn't exceed the events_per_transaction limit. - [preludedb-admin]: Correctly propagate error return on loaded messages read error. Fix a possible crash in case of invalid input message. - [preludedb-admin]: Fix events deletion/move bugs. When deleting events without specifying the --count parameters, only half of the events would be moved/deleted. * 2009-07-15, libpreludedb-0.9.15.3: - libpreludedb distribution was missing SWIG generated bindings. * 2009-07-10, libpreludedb-0.9.15.2: - Fix regression introduced in libpreludedb 0.9.15: libpreludedb-config --plugin-dir would return incorrect result. - Improve mysql, postgresql, and sqlite3 detection method, should work on 64 bits architecture, and make it easy to cross compile. - Minor fixes. * 2008-09-09, libpreludedb-0.9.15.1: - Fix handling of preludedb-admin --offset parameter. * 2008-08-27, libpreludedb-0.9.15: - preludedb-admin has a bew 'count' command, printing the result of a COUNT() on the database. - preludedb-admin work on smaller set of data, to prevent large retrieval error (fix #220, refs #305). - preludedb-admin handling of interrupted transaction was improved. - Fix MySQL and SQLite MacOSX detection, by Uwe Schwartz . (fix #296). - Check PostgreSQL version is higher or equal than 8.2.0, and use the new E'value' escape method when available to avoid a warning. * 2008-01-03, libpreludedb-0.9.14.1: - Fix PostgreSQL upgrade script (fix #271). * 2007-12-19, libpreludedb-0.9.14: - Improved thread safety: all query are now mutex protected, and the mutex won't be released until the transaction is over. - Use TEXT in place of VARCHAR for alert.assessment.impact.description (fix #265). - Fix OpenBSD compilation issue, thanks Alexandre Anriot for pointing out this (fix #227). - [preludedb-admin] Make it possible to specify an offset with no limit. - [mysql] Prevent MySQL session from timing out after 8 hours of inactivity. - [pgsql] Fix PostgreSQL warning when inserting binary data. - [preludedb-admin] Fix a problem handling the offset option with the load command. - [preludedb-admin] Fix possible wraparound in statistics computation code. - Allow Python threads to run while executing libpreludedb C function. * 2007-08-20, libpreludedb-0.9.13: - Source and Target now use a 16 bits index (required for CorrelationAlert with large number of source/target). CorrelationAlert Alertident now use a 32 bits index (required to link large number of Alert together). - Fix compilation on system without ENOTSUP (fix #227): Include modified patch from Alexandre Anriot . - [pgsql] Patch by Pierre Chifflier , that fixes type conversions preventing PostgreSQL to use indexes (fix #225). - [preludedb-admin] Use separate alert / heartbeat command: this is done to have a coherent implementation of the --offset and --count command line options. - [preludedb-admin] Fix --offset with the load command. - [preludedb-admin] Give the delete table a decent size, should speedup the delete command. - [documentation] preludedb-admin manpage (fix #230), by Pierre Chifflier . * 2007-03-17, libpreludedb-0.9.12: - [sqlite3] Provide case-insensitive regex. - [preludedb-admin] Loading of multiple file and improved reporting. - Provide substring match for AdditionalData value. - Fix insertion issue for ProcessArg and File Linkage. - Fix a bug when retrieving an empty time field (following retrieved fields where not the one expected). - When a given SQL function is not implemented by the driver, return a detailed error message with information concerning the missing function. - Implement Python only get_values, get_heartbeat_idents, get_alert_idents. Return the number of rows as well as the rows in a tupple. - Make sure we have an exception to process: fix a crash with Python bindings upon signal reception. Fix #200. * 2007-02-07, libpreludedb-0.9.11.3: - Fix invalid free() in the SQLite plugin. - Fix preludedb-admin copy/move operations. * 2007-01-08, libpreludedb-0.9.11.2: - Fix make installation error when Perl bindings are disabled. * 2007-01-05, libpreludedb-0.9.11.1: - Prevent binding generation error when using old SWIG version. - Generate bindings for the error handling API. - Small Perl/Python detection improvement. Fix #182. - Fix bindings compilation when using make -j. - New configure --with-perl-installdirs flags: might be used to override default site perl installation. - Various bug fixes. * 2006-12-20, libpreludedb-0.9.11: - Avoid using GNU sed extension when generating postgresql/sqlite schema. - Fix a Python binding memory leak upon alert list deletion. - Compile and run on OS X. - Various bugfixes. - Various portability fixes. * 2006-10-06, libpreludedb-0.9.10: - Fix PostgreSQL schema update version 5. - Only export symbol starting with preludedb_. - Verbose error reporting in case of libpreludedb initialization failure. * 2006-08-11, libpreludedb-0.9.9: - Implement an idea from Lex van Roon providing an alert/heartbeat deletion performance improvement in the order of 3000% (preludedb-admin already benefit from it, next Prewikka release will benefit from it too). - Fix --with-(perl|python|swig) detection path ordering. - Verbose error reporting on logfile opening error. - Various bug fixes. * 2006-07-03, libpreludedb-0.9.8.1: - Bump database schema version (fix invalid database version error). * 2006-06-06, libpreludedb-0.9.8: - Always use prelude_escape_binary() when inserting additional data, even in case we're inserting a string, since the database field might be of a type that require binary kind of escaping. Fix #143. - Implement reading of message_processing_model, security_model, security_level. Handling of community member is deprecated (IDMEFv16 update). - Fix a bug where Service->ip_version would not be read from database. - Upon connection to a PostgreSQL database, set default date style to ISO: this is needed since libpreludedb assume ISO format to parse database timestamp. Fix #140. - Error reporting improvement. * 2006-03-30, libpreludedb-0.9.7.1: - Flush the SQL query logfile after each query. - Add --events-per-transaction option to preludedb-admin, default value is 1000, which prevent heavy VM pressure on large database operation. * 2006-03-24, libpreludedb-0.9.7: - Fix Perl/Python bindings uint64 handling on 32 bits machine. - Make preludedb_check_version available from Perl/Python bindings. - Use new IDMEF_LIST_APPEND primitive, require libprelude 0.9.6. - Add libprelude dependencie to SQL plugins, since they depend on libprelude symbols. Fix compilation problem with some distribution. - Use global transaction surrounding all operation in preludedb-admin, this bring a major performance improvement for insert operation. - Fix PostgreSQL FileAccess query failure. - Dynamic PostgreSQL schema generation (this fix certain inefficient datatype that were used in the old version). Update schema would be hard to do for all postgreSQL version, thus using preludedb-admin copy for the update is required. - API improvement. * 2006-03-08, libpreludedb-0.9.6: - Fix PostgreSQL plugin compilation problem. - Update database schema: enforce that AdditionalData data field is not NULL. - Improve Swig basic type mapping situation regarding to the target architecture. - Fix query time calculation. * 2006-02-22, libpreludedb-0.9.5.1: - Correctly read database schema version. * 2006-02-22, libpreludedb-0.9.5: - Fix important memory leak in Python bindings, Prewikka should end-up consuming way less memory than it used to. - Fix PostgreSQL plugin compilation problem. - Fix for preludedb-admin --count handling when --offset was used. - Provide more information in preludedb-admin error message. - Various cleanup. * 2006-02-08, libpreludedb-0.9.4: - Fix for filtering IDMEF field using the '!=' operator, which resulted in filtering of events where the field did not exist (#129). - Implement a "move" command in preludedb-admin. - When SQL query logging is enabled, log the time taken to execute the query. - Improve plugin API by making it opaque so that existing plugin don't break if we add more SQL plugin function. - Verbose error reporting, make the plugin error API viable for more drivers. - Fix error reporting from perl and python bindings. - Make libpreludedb header files c++ compiler friendly. - Enforce listed IDMEF value ordering. IDMEF value were sometime unordered because of an uninitialized list position problem. * 2005-01-16, libpreludedb-0.9.3: - SQLite support. - More accurate error reporting in preludedb-admin. - Fix NULL error in case the buffer is too small, truncate. - Fix license notice, stating clearly that linking from a program using a GPL compatible license is allowed. Required for Debian package inclusion. * 2005-12-12, libpreludedb-0.9.2: - Fix character escaping issue with two consecutive backslash followed by a wildcard (we were escaping the wildcard, which is not supposed to be escaped in this case). * 2005-11-28, libpreludedb-0.9.1: - Fix automated reconnection to the database server. - Allow saving to standard output with preludedb-admin. - Make preludedb-admin delete command safer to use: forbid deletion unless a criteria is provided. - Workaround invalid library run path added through MakeMaker generated Makefile. - Fix Perl bindings Makefile generated with DESTDIR appended twice. * 2005-09-20, libpreludedb-0.9.0: - 0.9.0 final. - Make Perl/Python bindings more fault tolerant. * 2005-09-15, libpreludedb-0.9.0-rc14: - Correct Python bindings exception handling. - Fix alert saving in preludedb-admin. - Perl bindings would fail to compile if perl was compiled using the platform (non gcc) compiler. - Fix warnings. * 2005-08-25, libpreludedb-0.9.0-rc13: - Fix broken table comparison. - Empty additional data are valid. * 2005-08-17, libpreludedb-0.9.0-rc12: - Fix preludedb-admin link on some systems. * 2005-08-17, libpreludedb-0.9.0-rc11: - More useful Python exception on PreludeDB error. - Fix insertion of FileAccess Permission. - Add missing retrieval of UserID tty. - Fine grained libprelude operator now allow us to have similar behavior between different database implementation. - Support for more operator, including case insensitive version of most operator, and a new regexp operator. - Fix invalid UTC offset applied to broken down time match. - New preludedb-admin tool. Allow save/load/delete/copy/print of PreludeDB database. - When no database password is set, don't default to "prelude". This failed on user trying to access a database with no password. * 2005-08-02, libpreludedb-0.9.0-rc10: - Include missing database schema update. * 2005-08-01, libpreludedb-0.9.0-rc9: - Fix IDMEF SNMPService mapping problem. - Fix IDMEF FileAccess permission mapping problem. - Set close on exec flags on the logging file descriptor. - Escape '%' character within query, since the caller is expected to use '*'. * 2005-07-08, libpreludedb-0.9.0-rc8: - Fix Perl bindings Makefile generation with some MakeMaker version. - Use GnuLib for portability issue. - Handle broken down criteria match. - Improve error reporting. - Various bugfixes. * 2005-05-30, libpreludedb-0.9.0-rc7: - Fix alert deletion query issue. * 2005-05-30, libpreludedb-0.9.0-rc6: - Fix portability problem with %hh convertion specifier (exampe: Solaris selection problem). - Fix potential problem on 64 bits systems. - Fix IDMEF FileAccess insertion. - Fix bad indexes. - Improve DELETE operation speed. - Handle IDMEFv14 file_type attribute. - Fix several PostgreSQL incompatibility in generated request. - Update PostrgreSQL schema. - Various bugfix. * 2005-04-17, libpreludedb-0.9.0-rc5: - Fix truncated error code on some INSERT. - Handle confidence as a float, not as an integer. - Fix GMT offset and USEC invertion. - Fix checksum field insertion. - Fix PgSQL schema update. - Update PgSQL/MySQL schema version. * 2005-04-09, libpreludedb-0.9.0-rc4: - Fix error with bindings Makefile when using BSD make. - Add missing 'info' severity to the MySQL schema. Provide a schema for upgrading. - Check database schema version on initialization. - Fix broken libpreludedb.m4 detection routine. - Fix Perl/Python bindings regeneration problem. - Fix database schema for MySQL 3.23. - Fix broken MySQL error check. * 2005-03-31, libpreludedb-0.9.0-rc3: - Fix PgSQL plugin loading problem. * 2005-03-31, libpreludedb-0.9.0-rc2: - Fix Python/Perl bindings linking order. Was linking to old version of the library on system where old libprelude-0.8 was installed. - Fix an issue with the Perl bindings on make clean. * 2005-03-29, libpreludedb-0.9.0-rc1: - Initial release.