libzia-4.67/0000755000175000017500000000000014752603141007730 500000000000000libzia-4.67/configure0000755000175000017500000213331114752576427011603 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71 for libzia 4.67. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 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 as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (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 \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$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 || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libzia' PACKAGE_TARNAME='libzia' PACKAGE_VERSION='4.67' PACKAGE_STRING='libzia 4.67' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/eprintf.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS REQPRIVATE HAVE_GNUTLS GNUTLS_LIBS GNUTLS_CFLAGS HAVE_LIBEXECINFO HAVE_LIBICERTY HAVE_LIBBFD HAVE_LIBFTDI1 HAVE_LIBFTDI LIBFTDI_LIBS LIBFTDI_CFLAGS HAVE_LIBPNG LIBPNG_LIBS LIBPNG_CFLAGS HAVE_SDL_TTF SDL_TTF_LIBS SDL_TTF_CFLAGS HAVE_SDL SDL_LIBS SDL_CFLAGS HAVE_GTK GTK_LIBS GTK_CFLAGS HAVE_FORKPTY HAVE_GLIB GLIB_LIBS GLIB_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_PKGCONFIG HAVE_MAKE USE_WLMAP_FALSE USE_WLMAP_TRUE LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL ac_ct_AR AR DLLTOOL OBJDUMP FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL RANLIB AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS 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 runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_opt with_gtk with_sdl with_SDL_ttf with_png with_ftdi with_bfd enable_pedantic ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GLIB_CFLAGS GLIB_LIBS GTK_CFLAGS GTK_LIBS SDL_CFLAGS SDL_LIBS SDL_TTF_CFLAGS SDL_TTF_LIBS LIBPNG_CFLAGS LIBPNG_LIBS LIBFTDI_CFLAGS LIBFTDI_LIBS GNUTLS_CFLAGS GNUTLS_LIBS' # 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' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$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 ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$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 runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libzia 4.67 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/libzia] --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 case $ac_init_help in short | recursive ) echo "Configuration of libzia 4.67:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-opt Disable compiling optimisation (-O0) --enable-pedantic Enable pedantic gcc checking(-Wall etc.) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --without-gtk Build without gtk library for mingw (default: test) --without-sdl Build without sdl library for graphics support (default: test) --without-sdl_ttf Build without SDL_ttf support (default: test) --without-png Build without PNG support (default: test) --without-ftdi Build without FTDI support for usb to serial converter (default: test) --without-bfd Build without libbfd support for debug symbols in backtrace (default: test) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config SDL_CFLAGS C compiler flags for SDL, overriding pkg-config SDL_LIBS linker flags for SDL, overriding pkg-config SDL_TTF_CFLAGS C compiler flags for SDL_TTF, overriding pkg-config SDL_TTF_LIBS linker flags for SDL_TTF, overriding pkg-config LIBPNG_CFLAGS C compiler flags for LIBPNG, overriding pkg-config LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config LIBFTDI_CFLAGS C compiler flags for LIBFTDI, overriding pkg-config LIBFTDI_LIBS linker flags for LIBFTDI, overriding pkg-config GNUTLS_CFLAGS C compiler flags for GNUTLS, overriding pkg-config GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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 configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. 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 printf "%s\n" "$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 libzia configure 4.67 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else $as_nop as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else $as_nop as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else $as_nop ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) 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 if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 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 libzia $as_me 4.67, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "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=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*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 do not provoke an error unfortunately, instead are silently treated as an "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 is necessary to write \x00 == 0 to get something that is 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 **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" # Auxiliary files required by this configure script. ac_aux_files="compile ltmain.sh missing install-sh config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$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=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 printf %s "checking target system type... " >&6; } if test ${ac_cv_target+y} then : printf %s "(cached) " >&6 else $as_nop 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_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 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}- am__api_version='1.16' # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test ${ac_cv_path_install+y}; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$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' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$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 MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libzia' VERSION='4.67' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test -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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 -f "/etc/debian_version"; then echo "TIP: If following test fails, try to run: apt-get install libc6-dev" fi if test -f "/etc/SuSE-release"; then echo "TIP: If following test fails, try to run: yast -i gcc" fi case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.7' macro_revision='2.4.7' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && 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 $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$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+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop 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 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else $as_nop i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_reload_flag='-r' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. set dummy ${ac_tool_prefix}file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="${ac_tool_prefix}file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_FILECMD"; then ac_ct_FILECMD=$FILECMD # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FILECMD+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_FILECMD"; then ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FILECMD="file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD if test -n "$ac_ct_FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 printf "%s\n" "$ac_ct_FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_FILECMD" = x; then FILECMD=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FILECMD=$ac_ct_FILECMD fi else FILECMD="$ac_cv_prog_FILECMD" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) 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=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else $as_nop with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else $as_nop lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else $as_nop lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options enable_dlopen=yes enable_win32_dll=no # Check whether --enable-shared was given. if test ${enable_shared+y} 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 $as_nop enable_shared=yes fi # Check whether --enable-static was given. if test ${enable_static+y} 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 $as_nop enable_static=yes fi # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop pic_mode=default fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} 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 $as_nop enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else $as_nop if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else $as_nop lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char shl_load (); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else $as_nop ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else $as_nop ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dld_link (); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else $as_nop ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$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= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$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: test x$prefix = "xNONE" && prefix="$ac_default_prefix" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$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 app_cc_ver=$($CC -dumpversion) # --disable-opt opt='-O2' # Check whether --enable-opt was given. if test ${enable_opt+y} then : enableval=$enable_opt; disable_opt=yes else $as_nop disable_opt=no fi if test x"$disable_opt" = x"yes"; then CFLAGS=$(echo "$CFLAGS"|sed 's/-O2/-O0/') opt='-O0' fi # check for platform type case "$host_os" in mingw*) PLATFORM="mingw" ;; *) PLATFORM=$(uname -s | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/') if test $? != 0 ; then PLATFORM="unix" fi ;; esac printf "%s\n" "#define PLATFORM \"$PLATFORM\"" >>confdefs.h # check for machine type case "$host_os" in mingw*) MACHINE="i386" ;; *) if test x"$MACHINE" = x"" ; then MACHINE=$(uname -m) fi ;; esac printf "%s\n" "#define MACHINE \"$MACHINE\"" >>confdefs.h REQPRIVATE="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker supports -Wl,-map" >&5 printf %s "checking whether linker supports -Wl,-map... " >&6; } app_ld_wlmap=unchecked case "$host_os" in mingw*) ;; *) OLDLDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Map,libzia.so.map" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : app_ld_wlmap=yes else $as_nop app_ld_wlmap=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$OLDLDFLAGS rm -f libzia.so.map ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $app_ld_wlmap" >&5 printf "%s\n" "$app_ld_wlmap" >&6; } if test "$app_ld_wlmap" = "yes"; then USE_WLMAP_TRUE= USE_WLMAP_FALSE='#' else USE_WLMAP_TRUE='#' USE_WLMAP_FALSE= fi # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" if test "x$ac_cv_header_arpa_inet_h" = xyes then : printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" if test "x$ac_cv_header_bfd_h" = xyes then : printf "%s\n" "#define HAVE_BFD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "cygwin/in.h" "ac_cv_header_cygwin_in_h" "$ac_includes_default" if test "x$ac_cv_header_cygwin_in_h" = xyes then : printf "%s\n" "#define HAVE_CYGWIN_IN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" if test "x$ac_cv_header_ctype_h" = xyes then : printf "%s\n" "#define HAVE_CTYPE_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dbghelp.h" "ac_cv_header_dbghelp_h" "$ac_includes_default" if test "x$ac_cv_header_dbghelp_h" = xyes then : printf "%s\n" "#define HAVE_DBGHELP_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" if test "x$ac_cv_header_dirent_h" = xyes then : printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" if test "x$ac_cv_header_execinfo_h" = xyes then : printf "%s\n" "#define HAVE_EXECINFO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes then : printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" if test "x$ac_cv_header_ifaddrs_h" = xyes then : printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/i2c-dev.h" "ac_cv_header_linux_i2c_dev_h" "$ac_includes_default" if test "x$ac_cv_header_linux_i2c_dev_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_I2C_DEV_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" if test "x$ac_cv_header_linux_input_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_INPUT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/spi/spidev.h" "ac_cv_header_linux_spi_spidev_h" "$ac_includes_default" if test "x$ac_cv_header_linux_spi_spidev_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_SPI_SPIDEV_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" if test "x$ac_cv_header_math_h" = xyes then : printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" if test "x$ac_cv_header_netdb_h" = xyes then : printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes then : printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "psapi.h" "ac_cv_header_psapi_h" "$ac_includes_default" if test "x$ac_cv_header_psapi_h" = xyes then : printf "%s\n" "#define HAVE_PSAPI_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default" if test "x$ac_cv_header_pty_h" = xyes then : printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "shlobj.h" "ac_cv_header_shlobj_h" "$ac_includes_default" if test "x$ac_cv_header_shlobj_h" = xyes then : printf "%s\n" "#define HAVE_SHLOBJ_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" if test "x$ac_cv_header_signal_h" = xyes then : printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes then : printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ioctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_prctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" if test "x$ac_cv_header_sys_wait_h" = xyes then : printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" if test "x$ac_cv_header_termios_h" = xyes then : printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" if test "x$ac_cv_header_time_h" = xyes then : printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "win32api/ws2tcpip.h" "ac_cv_header_win32api_ws2tcpip_h" "$ac_includes_default" if test "x$ac_cv_header_win32api_ws2tcpip_h" = xyes then : printf "%s\n" "#define HAVE_WIN32API_WS2TCPIP_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes then : printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes then : printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" if test "x$ac_cv_header_ws2tcpip_h" = xyes then : printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" " #include #include " if test "x$ac_cv_header_linux_wireless_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_WIRELESS_H 1" >>confdefs.h fi # Obsolete code to be removed. if test $ac_cv_header_sys_time_h = yes; then printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # End of obsolete code. app_libc_ver="cross" if test "$cross_compiling" = yes; then xyz="" else if test "$cross_compiling" = yes then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GLIBC__ #include #endif #include #ifdef __CYGWIN__ #include #endif FILE *f; int main(void){ f=fopen("conftest.libc.out", "wt"); if (!f) return -1; #ifdef __GLIBC__ fprintf(f, "glibc %d.%d (%s)\n", __GLIBC__, __GLIBC_MINOR__, gnu_get_libc_version()); #endif #ifdef __CYGWIN__ fprintf(f, "cygwin %d.%d.%d, api %d.%d\n", CYGWIN_VERSION_DLL_MAJOR/1000, CYGWIN_VERSION_DLL_MAJOR%1000, CYGWIN_VERSION_DLL_MINOR, CYGWIN_VERSION_API_MAJOR, CYGWIN_VERSION_API_MINOR); #endif fclose(f); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : app_libc_ver="yes $(cat conftest.libc.out)" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.libc.out fi ac_fn_c_check_func "$LINENO" "strncmpi" "ac_cv_func_strncmpi" if test "x$ac_cv_func_strncmpi" = xyes then : printf "%s\n" "#define HAVE_STRNCMPI 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes then : printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h fi app_mlibs="" app_mdebs="" app_mrpms="" app_olibs="" app_odebs="" app_orpms="" # check for make # Extract the first word of "make", so it can be a program name with args. set dummy make; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_HAVE_MAKE+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$HAVE_MAKE"; then ac_cv_prog_HAVE_MAKE="$HAVE_MAKE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_MAKE="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_MAKE" && ac_cv_prog_HAVE_MAKE="no" fi fi HAVE_MAKE=$ac_cv_prog_HAVE_MAKE if test -n "$HAVE_MAKE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_MAKE" >&5 printf "%s\n" "$HAVE_MAKE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x"$HAVE_MAKE" = x"no"; then app_mlibs="$app_mlibs make" app_mdebs="$app_mdebs make" app_mrpms="$app_mrpms make" fi # check for pkg-config # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_HAVE_PKGCONFIG+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$HAVE_PKGCONFIG"; then ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_PKGCONFIG="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" fi fi HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG if test -n "$HAVE_PKGCONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGCONFIG" >&5 printf "%s\n" "$HAVE_PKGCONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x"$HAVE_PKGCONFIG" = x"no"; then app_mlibs="$app_mlibs pkg-config" app_mdebs="$app_mdebs pkg-config" app_mrpms="$app_mrpms pkg-config" fi # check for glib and gthreads app_glib_ver="" HAVE_GLIB="0" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 > 2.30.0" >&5 printf %s "checking for glib-2.0 > 2.30.0... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 > 2.30.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 > 2.30.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 > 2.30.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 > 2.30.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 > 2.30.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 > 2.30.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 > 2.30.0" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 > 2.30.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 app_mlibs="$app_mlibs libglib2" app_mdebs="$app_mdebs libglib2.0-dev" app_mrpms="$app_mrpms glib2-devel" app_glib="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_mlibs="$app_mlibs libglib2" app_mdebs="$app_mdebs libglib2.0-dev" app_mrpms="$app_mrpms glib2-devel" app_glib="no" else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_GLIB /**/" >>confdefs.h app_glib="yes" app_glib_ver=$($PKG_CONFIG --modversion 'glib-2.0 > 2.30.0') HAVE_GLIB="1" REQPRIVATE="$REQPRIVATE glib-2.0" fi # # check for forkpty # HAVE_FORKPTY="0" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 printf %s "checking for forkpty in -lutil... " >&6; } if test ${ac_cv_lib_util_forkpty+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char forkpty (); int main (void) { return forkpty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_util_forkpty=yes else $as_nop ac_cv_lib_util_forkpty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; } if test "x$ac_cv_lib_util_forkpty" = xyes then : printf "%s\n" "#define HAVE_FORKPTY /**/" >>confdefs.h HAVE_FORKPTY="1" fi LIBS="$LIBS -lutil" # # check for gtk # # Check whether --with-gtk was given. if test ${with_gtk+y} then : withval=$with_gtk; fi app_gtk="disabled" app_gtk_ver="" HAVE_GTK="0" if test "x$with_gtk" != "xno"; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0 > 3.0.0" >&5 printf %s "checking for gtk+-3.0 > 3.0.0... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 > 3.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 > 3.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 > 3.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 > 3.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 > 3.0.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 > 3.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 > 3.0.0" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 > 3.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 app_olibs="$app_mlibs libgtk-3-0" app_odebs="$app_mdebs libgtk-3-dev" app_orpms="$app_mrpms gtk3-devel" app_gtk="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_mlibs libgtk-3-0" app_odebs="$app_mdebs libgtk-3-dev" app_orpms="$app_mrpms gtk3-devel" app_gtk="no" else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_GTK /**/" >>confdefs.h app_gtk="yes" app_gtk_ver=$($PKG_CONFIG --modversion 'gtk+-3.0 > 3.0.0') HAVE_GTK="1" REQPRIVATE="$REQPRIVATE gtk+-3.0" fi fi # Check whether --with-sdl was given. if test ${with_sdl+y} then : withval=$with_sdl; fi app_sdl="disabled" if test "x$with_sdl" != "xno"; then # check for SDL app_sdl_ver="" HAVE_SDL="0" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sdl2 >= 2.0.5" >&5 printf %s "checking for sdl2 >= 2.0.5... " >&6; } if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= 2.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= 2.0.5") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl2 >= 2.0.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= 2.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= 2.0.5") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl2 >= 2.0.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl2 >= 2.0.5" 2>&1` else SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl2 >= 2.0.5" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sdl > 1.2.10" >&5 printf %s "checking for sdl > 1.2.10... " >&6; } if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl > 1.2.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl > 1.2.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl > 1.2.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl > 1.2.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl > 1.2.10" 2>&1` else SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl > 1.2.10" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 app_olibs="$app_olibs libsdl" app_odebs="$app_odebs libsdl-dev" app_orpms="$app_orpms libSDL-devel" app_sdl="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libsdl" app_odebs="$app_odebs libsdl-dev" app_orpms="$app_orpms libSDL-devel" app_sdl="no" else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_SDL 1" >>confdefs.h printf "%s\n" "#define HAVE_SDL1 1" >>confdefs.h app_sdl="yes" app_sdl_ver=$(sdl-config --version) HAVE_SDL="1" REQPRIVATE="$REQPRIVATE sdl" fi elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sdl > 1.2.10" >&5 printf %s "checking for sdl > 1.2.10... " >&6; } if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl > 1.2.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl > 1.2.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl > 1.2.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl > 1.2.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl > 1.2.10" 2>&1` else SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl > 1.2.10" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 app_olibs="$app_olibs libsdl" app_odebs="$app_odebs libsdl-dev" app_orpms="$app_orpms libSDL-devel" app_sdl="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libsdl" app_odebs="$app_odebs libsdl-dev" app_orpms="$app_orpms libSDL-devel" app_sdl="no" else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_SDL 1" >>confdefs.h printf "%s\n" "#define HAVE_SDL1 1" >>confdefs.h app_sdl="yes" app_sdl_ver=$(sdl-config --version) HAVE_SDL="1" REQPRIVATE="$REQPRIVATE sdl" fi else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } #not tested on older, version from 2016 printf "%s\n" "#define HAVE_SDL 1" >>confdefs.h printf "%s\n" "#define HAVE_SDL2 1" >>confdefs.h app_sdl="yes" app_sdl_ver=$($PKG_CONFIG --modversion sdl2) HAVE_SDL="2" REQPRIVATE="$REQPRIVATE sdl2" fi fi # Check whether --with-SDL_ttf was given. if test ${with_SDL_ttf+y} then : withval=$with_SDL_ttf; fi app_libsdlttf="disabled" if test "x$with_SDL_ttf" != "xno"; then # check for libSDL_ttf app_libsdlttf_ver="" HAVE_SDL_TTF="0" if test "x$HAVE_SDL" = "x2"; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SDL2_ttf >= 2.0.12" >&5 printf %s "checking for SDL2_ttf >= 2.0.12... " >&6; } if test -n "$SDL_TTF_CFLAGS"; then pkg_cv_SDL_TTF_CFLAGS="$SDL_TTF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL2_ttf >= 2.0.12\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL2_ttf >= 2.0.12") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_TTF_CFLAGS=`$PKG_CONFIG --cflags "SDL2_ttf >= 2.0.12" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_TTF_LIBS"; then pkg_cv_SDL_TTF_LIBS="$SDL_TTF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL2_ttf >= 2.0.12\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL2_ttf >= 2.0.12") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_TTF_LIBS=`$PKG_CONFIG --libs "SDL2_ttf >= 2.0.12" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_TTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "SDL2_ttf >= 2.0.12" 2>&1` else SDL_TTF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "SDL2_ttf >= 2.0.12" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_TTF_PKG_ERRORS" >&5 app_olibs="$app_olibs libsdl2_ttf" app_odebs="$app_odebs libsdl2-ttf-dev" app_orpms="$app_orpms SDL2_ttf-devel" app_libsdlttf="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libsdl2_ttf" app_odebs="$app_odebs libsdl2-ttf-dev" app_orpms="$app_orpms SDL2_ttf-devel" app_libsdlttf="no" else SDL_TTF_CFLAGS=$pkg_cv_SDL_TTF_CFLAGS SDL_TTF_LIBS=$pkg_cv_SDL_TTF_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_SDL_TTF 1" >>confdefs.h app_libsdlttf="yes" app_libsdlttf_ver=$(pkg-config --modversion 'SDL2_ttf >= 2.0.12') HAVE_SDL_TTF="2" REQPRIVATE="$REQPRIVATE SDL2_ttf" fi else pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SDL_ttf >= 2.0.11" >&5 printf %s "checking for SDL_ttf >= 2.0.11... " >&6; } if test -n "$SDL_TTF_CFLAGS"; then pkg_cv_SDL_TTF_CFLAGS="$SDL_TTF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL_ttf >= 2.0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL_ttf >= 2.0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_TTF_CFLAGS=`$PKG_CONFIG --cflags "SDL_ttf >= 2.0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_TTF_LIBS"; then pkg_cv_SDL_TTF_LIBS="$SDL_TTF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL_ttf >= 2.0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "SDL_ttf >= 2.0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_TTF_LIBS=`$PKG_CONFIG --libs "SDL_ttf >= 2.0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SDL_TTF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "SDL_ttf >= 2.0.11" 2>&1` else SDL_TTF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "SDL_ttf >= 2.0.11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_TTF_PKG_ERRORS" >&5 app_olibs="$app_olibs libsdl_ttf" app_odebs="$app_odebs libsdl-ttf2.0-dev" app_orpms="$app_orpms SDL_ttf-devel" app_libsdlttf="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libsdl_ttf" app_odebs="$app_odebs libsdl-ttf2.0-dev" app_orpms="$app_orpms SDL_ttf-devel" app_libsdlttf="no" else SDL_TTF_CFLAGS=$pkg_cv_SDL_TTF_CFLAGS SDL_TTF_LIBS=$pkg_cv_SDL_TTF_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_SDL_TTF 1" >>confdefs.h app_libsdlttf="yes" app_libsdlttf_ver=$(pkg-config --modversion 'SDL_ttf >= 2.0.11') HAVE_SDL_TTF="1" REQPRIVATE="$REQPRIVATE SDL_ttf" fi fi fi # Check whether --with-png was given. if test ${with_png+y} then : withval=$with_png; fi app_libpng="disabled" if test "x$with_png" != "xno"; then # check for libpng app_libpng_ver="" HAVE_LIBPNG="0" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpng > 1.2.0" >&5 printf %s "checking for libpng > 1.2.0... " >&6; } if test -n "$LIBPNG_CFLAGS"; then pkg_cv_LIBPNG_CFLAGS="$LIBPNG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng > 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng > 1.2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng > 1.2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBPNG_LIBS"; then pkg_cv_LIBPNG_LIBS="$LIBPNG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng > 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng > 1.2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng > 1.2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng > 1.2.0" 2>&1` else LIBPNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng > 1.2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBPNG_PKG_ERRORS" >&5 app_olibs="$app_olibs libpng" app_odebs="$app_odebs libpng-dev" app_orpms="$app_orpms libpng12-devel" app_libpng="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libpng" app_odebs="$app_odebs libpng-dev" app_orpms="$app_orpms libpng12-devel" app_libpng="no" else LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS LIBPNG_LIBS=$pkg_cv_LIBPNG_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h app_libpng="yes" app_libpng_ver=$(pkg-config --modversion 'libpng > 1.2.0') HAVE_LIBPNG="1" REQPRIVATE="$REQPRIVATE libpng" fi fi #if test x"$app_glib" = x"yes"; then # PKG_CHECK_MODULES(GTHREAD, # gthread-2.0 > 2.0.0, # AC_DEFINE([HAVE_GTHREAD2], [], [gthread2]), # AC_MSG_ERROR([glib is installed but gthread not ?])) #fi # # check for libftdi # # Check whether --with-ftdi was given. if test ${with_ftdi+y} then : withval=$with_ftdi; fi app_ftdi="disabled" if test "x$with_ftdi" != "xno"; then # check for libftdi app_ftdi_ver="" HAVE_LIBFTDI="0" HAVE_LIBFTDI1="0" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libftdi1 >= 1.00" >&5 printf %s "checking for libftdi1 >= 1.00... " >&6; } if test -n "$LIBFTDI_CFLAGS"; then pkg_cv_LIBFTDI_CFLAGS="$LIBFTDI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi1 >= 1.00\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi1 >= 1.00") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_CFLAGS=`$PKG_CONFIG --cflags "libftdi1 >= 1.00" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFTDI_LIBS"; then pkg_cv_LIBFTDI_LIBS="$LIBFTDI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi1 >= 1.00\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi1 >= 1.00") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_LIBS=`$PKG_CONFIG --libs "libftdi1 >= 1.00" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libftdi1 >= 1.00" 2>&1` else LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libftdi1 >= 1.00" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFTDI_PKG_ERRORS" >&5 pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libftdi >= 0.11" >&5 printf %s "checking for libftdi >= 0.11... " >&6; } if test -n "$LIBFTDI_CFLAGS"; then pkg_cv_LIBFTDI_CFLAGS="$LIBFTDI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_CFLAGS=`$PKG_CONFIG --cflags "libftdi >= 0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFTDI_LIBS"; then pkg_cv_LIBFTDI_LIBS="$LIBFTDI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_LIBS=`$PKG_CONFIG --libs "libftdi >= 0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libftdi >= 0.11" 2>&1` else LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libftdi >= 0.11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFTDI_PKG_ERRORS" >&5 app_ftdi="no" app_olibs="$app_olibs libftdi1" app_odebs="$app_odebs libftdi-dev" app_orpms="$app_orpms libftdi1-devel" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_ftdi="no" app_olibs="$app_olibs libftdi1" app_odebs="$app_odebs libftdi-dev" app_orpms="$app_orpms libftdi1-devel" else LIBFTDI_CFLAGS=$pkg_cv_LIBFTDI_CFLAGS LIBFTDI_LIBS=$pkg_cv_LIBFTDI_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_LIBFTDI 1" >>confdefs.h app_ftdi_ver=$($PKG_CONFIG --modversion 'libftdi >= 0.11') echo "libftdi version $app_ftdi_ver" app_ftdi="yes" LIBS="$LIBS -lusb" HAVE_LIBFTDI="1" REQPRIVATE="$REQPRIVATE libftdi" fi elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libftdi >= 0.11" >&5 printf %s "checking for libftdi >= 0.11... " >&6; } if test -n "$LIBFTDI_CFLAGS"; then pkg_cv_LIBFTDI_CFLAGS="$LIBFTDI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_CFLAGS=`$PKG_CONFIG --cflags "libftdi >= 0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFTDI_LIBS"; then pkg_cv_LIBFTDI_LIBS="$LIBFTDI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.11\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFTDI_LIBS=`$PKG_CONFIG --libs "libftdi >= 0.11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libftdi >= 0.11" 2>&1` else LIBFTDI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libftdi >= 0.11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFTDI_PKG_ERRORS" >&5 app_ftdi="no" app_olibs="$app_olibs libftdi1" app_odebs="$app_odebs libftdi-dev" app_orpms="$app_orpms libftdi1-devel" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_ftdi="no" app_olibs="$app_olibs libftdi1" app_odebs="$app_odebs libftdi-dev" app_orpms="$app_orpms libftdi1-devel" else LIBFTDI_CFLAGS=$pkg_cv_LIBFTDI_CFLAGS LIBFTDI_LIBS=$pkg_cv_LIBFTDI_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_LIBFTDI 1" >>confdefs.h app_ftdi_ver=$($PKG_CONFIG --modversion 'libftdi >= 0.11') echo "libftdi version $app_ftdi_ver" app_ftdi="yes" LIBS="$LIBS -lusb" HAVE_LIBFTDI="1" REQPRIVATE="$REQPRIVATE libftdi" fi else LIBFTDI_CFLAGS=$pkg_cv_LIBFTDI_CFLAGS LIBFTDI_LIBS=$pkg_cv_LIBFTDI_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_LIBFTDI 1" >>confdefs.h printf "%s\n" "#define HAVE_LIBFTDI1 1" >>confdefs.h app_ftdi_ver=$($PKG_CONFIG --modversion 'libftdi1 >= 1.00') echo "libftdi version $app_ftdi_ver" app_ftdi="yes" HAVE_LIBFTDI="1" HAVE_LIBFTDI1="1" REQPRIVATE="$REQPRIVATE libftdi1" CFLAGS="$CFLAGS $LIBFTDI_CFLAGS" LIBS="$LIBS $LIBFTDI_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftdi_new in -lftdi" >&5 printf %s "checking for ftdi_new in -lftdi... " >&6; } if test ${ac_cv_lib_ftdi_ftdi_new+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lftdi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char ftdi_new (); int main (void) { return ftdi_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ftdi_ftdi_new=yes else $as_nop ac_cv_lib_ftdi_ftdi_new=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ftdi_ftdi_new" >&5 printf "%s\n" "$ac_cv_lib_ftdi_ftdi_new" >&6; } if test "x$ac_cv_lib_ftdi_ftdi_new" = xyes then : printf "%s\n" "#define HAVE_FTDI_NEW /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftdi_usb_get_strings in -lftdi" >&5 printf %s "checking for ftdi_usb_get_strings in -lftdi... " >&6; } if test ${ac_cv_lib_ftdi_ftdi_usb_get_strings+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lftdi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char ftdi_usb_get_strings (); int main (void) { return ftdi_usb_get_strings (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ftdi_ftdi_usb_get_strings=yes else $as_nop ac_cv_lib_ftdi_ftdi_usb_get_strings=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ftdi_ftdi_usb_get_strings" >&5 printf "%s\n" "$ac_cv_lib_ftdi_ftdi_usb_get_strings" >&6; } if test "x$ac_cv_lib_ftdi_ftdi_usb_get_strings" = xyes then : printf "%s\n" "#define HAVE_FTDI_USB_GET_STRINGS 1" >>confdefs.h fi # # check for libbfd # # Check whether --with-bfd was given. if test ${with_bfd+y} then : withval=$with_bfd; fi app_bfd="disabled" app_bfd_ver="" HAVE_LIBBFD="0" HAVE_LIBIBERTY="0" HAVE_LIBEXECINFO="0" if test "x$with_bfd" != "xno"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bfd_init in -lbfd" >&5 printf %s "checking for bfd_init in -lbfd... " >&6; } if test ${ac_cv_lib_bfd_bfd_init+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbfd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char bfd_init (); int main (void) { return bfd_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bfd_bfd_init=yes else $as_nop ac_cv_lib_bfd_bfd_init=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_init" >&5 printf "%s\n" "$ac_cv_lib_bfd_bfd_init" >&6; } if test "x$ac_cv_lib_bfd_bfd_init" = xyes then : printf "%s\n" "#define HAVE_LIBBFD 1" >>confdefs.h if test -z "$target" ; then as_fn_error $? "Unrecognized target system type; please check config.sub." "$LINENO" 5 fi printf "%s\n" "#define TARGET \"${target}\"" >>confdefs.h #app_bfd_ver="not detected" app_bfd="yes" LIBS="$LIBS -lbfd" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyn_string_append in -liberty" >&5 printf %s "checking for dyn_string_append in -liberty... " >&6; } if test ${ac_cv_lib_iberty_dyn_string_append+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-liberty $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dyn_string_append (); int main (void) { return dyn_string_append (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_iberty_dyn_string_append=yes else $as_nop ac_cv_lib_iberty_dyn_string_append=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iberty_dyn_string_append" >&5 printf "%s\n" "$ac_cv_lib_iberty_dyn_string_append" >&6; } if test "x$ac_cv_lib_iberty_dyn_string_append" = xyes then : LIBS="$LIBS -liberty" HAVE_LIBIBERTY="1" fi HAVE_LIBBFD="1" else $as_nop app_bfd="no" app_olibs="$aqp_olibs libbfd" app_odebs="$aqp_odebs binutils-dev" app_orpms="$app_orpms binutils-devel" fi fi # in FreeBSD the backtrace is in libexecinfo { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lexecinfo" >&5 printf %s "checking for backtrace in -lexecinfo... " >&6; } if test ${ac_cv_lib_execinfo_backtrace+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lexecinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char backtrace (); int main (void) { return backtrace (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_execinfo_backtrace=yes else $as_nop ac_cv_lib_execinfo_backtrace=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_execinfo_backtrace" >&5 printf "%s\n" "$ac_cv_lib_execinfo_backtrace" >&6; } if test "x$ac_cv_lib_execinfo_backtrace" = xyes then : LIBS="$LIBS -lexecinfo" HAVE_LIBEXECINFO="1" fi for ac_func in backtrace_symbols do : ac_fn_c_check_func "$LINENO" "backtrace_symbols" "ac_cv_func_backtrace_symbols" if test "x$ac_cv_func_backtrace_symbols" = xyes then : printf "%s\n" "#define HAVE_BACKTRACE_SYMBOLS 1" >>confdefs.h printf "%s\n" "#define HAVE_BACKTRACE_SYMBOLS 1" >>confdefs.h fi done HAVE_GNUTLS="0" app_gnutls_ver="" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 3.5.8" >&5 printf %s "checking for gnutls >= 3.5.8... " >&6; } if test -n "$GNUTLS_CFLAGS"; then pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 3.5.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 3.5.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 3.5.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GNUTLS_LIBS"; then pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 3.5.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 3.5.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 3.5.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 3.5.8" 2>&1` else GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 3.5.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GNUTLS_PKG_ERRORS" >&5 app_olibs="$app_olibs libgnutls" app_odebs="$app_odebs libgnutls28-dev" app_gnutls="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } app_olibs="$app_olibs libgnutls" app_odebs="$app_odebs libgnutls28-dev" app_gnutls="no" else GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_GNUTLS 1" >>confdefs.h app_gnutls="yes" HAVE_GNUTLS="1" app_gnutls_ver=$($PKG_CONFIG --modversion 'gnutls') fi # # check for library errors # if test -n "$app_mlibs$app_olibs"; then echo "" echo "" echo "********" if test -n "$app_mlibs"; then echo "Missing mandatory libraries: $app_mlibs" fi if test -n "$app_olibs"; then echo "Missing optional libraries: $app_olibs" fi if test -f "/etc/debian_version"; then echo "Try to run: apt-get install $app_mdebs $app_odebs" fi if test -f "/etc/SuSE-release"; then echo "Try to run: yast -i $app_mrpms $app_orpms" fi echo "********" if test -n "$app_mlibs"; then as_fn_error $? "missing mandatory library/libraries" "$LINENO" 5 fi fi if test x"$app_ld_wlmap" = x"yes"; then LIBS="$LIBS -Wl,-Map,libzia.so.map" fi CFLAGS="$CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $SDL_CFLAGS $SDL_TTF_CFLAGS $LIBPNG_FLAGS -I../include -I../include/unix $GNUTLS_CFLAGS" #CFLAGS="-I/usr/include $CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $SDL_CFLAGS $LIBPNG_FLAGS" LIBS="$LIBS $GLIB_LIBS $GTK_LIBS $SDL_LIBS $SDL_TTF_LIBS $LIBPNG_LIBS $LIBFTDI_LIBS $GNUTLS_LIBS " { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for g_thread_try_new in -lglib-2.0" >&5 printf %s "checking for g_thread_try_new in -lglib-2.0... " >&6; } if test ${ac_cv_lib_glib_2_0_g_thread_try_new+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char g_thread_try_new (); int main (void) { return g_thread_try_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_glib_2_0_g_thread_try_new=yes else $as_nop ac_cv_lib_glib_2_0_g_thread_try_new=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glib_2_0_g_thread_try_new" >&5 printf "%s\n" "$ac_cv_lib_glib_2_0_g_thread_try_new" >&6; } if test "x$ac_cv_lib_glib_2_0_g_thread_try_new" = xyes then : printf "%s\n" "#define HAVE_G_THREAD_TRY_NEW /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np in -lpthread" >&5 printf %s "checking for pthread_setname_np in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_setname_np+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pthread_setname_np (); int main (void) { return pthread_setname_np (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_setname_np=yes else $as_nop ac_cv_lib_pthread_pthread_setname_np=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_setname_np" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_setname_np" >&6; } if test "x$ac_cv_lib_pthread_pthread_setname_np" = xyes then : printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for g_string_append_vprintf in -lglib-2.0" >&5 printf %s "checking for g_string_append_vprintf in -lglib-2.0... " >&6; } if test ${ac_cv_lib_glib_2_0_g_string_append_vprintf+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char g_string_append_vprintf (); int main (void) { return g_string_append_vprintf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_glib_2_0_g_string_append_vprintf=yes else $as_nop ac_cv_lib_glib_2_0_g_string_append_vprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glib_2_0_g_string_append_vprintf" >&5 printf "%s\n" "$ac_cv_lib_glib_2_0_g_string_append_vprintf" >&6; } if test "x$ac_cv_lib_glib_2_0_g_string_append_vprintf" = xyes then : printf "%s\n" "#define HAVE_G_STRING_APPEND_VPRINTF /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for g_hash_table_remove_all in -lglib-2.0" >&5 printf %s "checking for g_hash_table_remove_all in -lglib-2.0... " >&6; } if test ${ac_cv_lib_glib_2_0_g_hash_table_remove_all+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char g_hash_table_remove_all (); int main (void) { return g_hash_table_remove_all (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_glib_2_0_g_hash_table_remove_all=yes else $as_nop ac_cv_lib_glib_2_0_g_hash_table_remove_all=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glib_2_0_g_hash_table_remove_all" >&5 printf "%s\n" "$ac_cv_lib_glib_2_0_g_hash_table_remove_all" >&6; } if test "x$ac_cv_lib_glib_2_0_g_hash_table_remove_all" = xyes then : printf "%s\n" "#define HAVE_G_HASH_TABLE_REMOVE_ALL /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main (void) { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no else $as_nop ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) app_endian="big";; #( no) app_endian="little" ;; #( universal) printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) app_endian="unknown" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 printf %s "checking for long long... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { unsigned long long a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : have_long_long=yes else $as_nop have_long_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5 printf "%s\n" "$have_long_long" >&6; } test "$have_long_long" = yes && printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5 printf %s "checking for uint32_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_INTTYPES_H #include #endif int main (void) { uint32_t a; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : have_uint32_t=yes else $as_nop have_uint32_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_uint32_t" >&5 printf "%s\n" "$have_uint32_t" >&6; } test "$have_uint32_t" = yes && printf "%s\n" "#define HAVE_UINT32_T /**/" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 printf %s "checking for typeof... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { int a; typeof(a) b; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : have_typeof=yes else $as_nop have_typeof=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_typeof" >&5 printf "%s\n" "$have_typeof" >&6; } test "$have_typeof" = yes && printf "%s\n" "#define HAVE_TYPEOF /**/" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 printf %s "checking size of char... " >&6; } if test ${ac_cv_sizeof_char+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_char" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 printf "%s\n" "$ac_cv_sizeof_char" >&6; } printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_short" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h test "$have_long_long" = yes && # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_void_p" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # --enable-pedantic # Check whether --enable-pedantic was given. if test ${enable_pedantic+y} then : enableval=$enable_pedantic; enable_pedantic=yes else $as_nop enable_pedantic=no fi if test x"$enable_pedantic" = x"yes"; then #CFLAGS="$CFLAGS -Wall -Wpedantic" CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wstrict-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wno-format-extra-args -Wformat-security -Wdeprecated-declarations" #CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wstrict-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wno-format-extra-args -Wformat-security" fi OLDCFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = strerror_r(1, NULL, 1); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : printf "%s\n" "#define Z_STRERROR_R_RETURNS_INT /**/" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$OLDCFLAGS CFLAGS=$(echo $CFLAGS | sed 's/ \+/ /g') LDFLAGS=$(echo $LDFLAGS | sed 's/ \+/ /g') LIBS=$(echo $LIBS | sed 's/ \+/ /g') sharedir="$prefix/share/$PACKAGE_NAME" printf "%s\n" "#define SHAREDIR \"$sharedir\"" >>confdefs.h ac_config_files="$ac_config_files Makefile android-old/Makefile bin/Makefile bin/zia-config data/Makefile include/Makefile include/android/Makefile include/android/zconfig.h include/msvc/Makefile include/msvc/zconfig.h include/unix/Makefile libzia.pc m4/Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_WLMAP_TRUE}" && test -z "${USE_WLMAP_FALSE}"; then as_fn_error $? "conditional \"USE_WLMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$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 || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libzia $as_me 4.67, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ libzia config.status 4.67 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "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 printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "android-old/Makefile") CONFIG_FILES="$CONFIG_FILES android-old/Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "bin/zia-config") CONFIG_FILES="$CONFIG_FILES bin/zia-config" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/android/Makefile") CONFIG_FILES="$CONFIG_FILES include/android/Makefile" ;; "include/android/zconfig.h") CONFIG_FILES="$CONFIG_FILES include/android/zconfig.h" ;; "include/msvc/Makefile") CONFIG_FILES="$CONFIG_FILES include/msvc/Makefile" ;; "include/msvc/zconfig.h") CONFIG_FILES="$CONFIG_FILES include/msvc/zconfig.h" ;; "include/unix/Makefile") CONFIG_FILES="$CONFIG_FILES include/unix/Makefile" ;; "libzia.pc") CONFIG_FILES="$CONFIG_FILES libzia.pc" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" 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) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" (echo "------ Libzia settings: --------"; echo " version: $PACKAGE_NAME-$PACKAGE_VERSION"; echo " prefix: $prefix"; #echo " sharedir: $sharedir"; echo " platform: $PLATFORM"; echo " machine: $MACHINE"; echo " target: $target"; echo " compiler: $CC $app_cc_ver"; echo " sizes: int=$ac_cv_sizeof_int, long=$ac_cv_sizeof_long, long long=$ac_cv_sizeof_long_long, void*=$ac_cv_sizeof_void_p" echo " endianity: $app_endian"; echo " CFLAGS: $CFLAGS"; echo " LDFLAGS: $LDFLAGS"; echo " LIBS: $LIBS"; echo " libc: $app_libc_ver"; echo " libglib: $app_glib $app_glib_ver"; echo " libgtk: $app_gtk $app_gtk_ver"; echo " libsdl: $app_sdl $app_sdl_ver"; echo "libsdl_ttf: $app_libsdlttf $app_libsdlttf_ver"; echo " libpng: $app_libpng $app_libpng_ver"; echo " libftdi: $app_ftdi $app_ftdi_ver"; echo " libbfd: $app_bfd $app_bfd_ver"; echo " gnutls: $app_gnutls $app_gnutls_ver"; echo " pedantic: $enable_pedantic"; echo " opts: $opt") | tee settings echo "" (echo "char *z_settings="; cat settings | sed 's/\(.*\)/"\1\\n"/'; echo ";") > src/settings.c cat config.h |grep '^#define' | sed 's/#define \(.*\)/#define Z_\1/' > include/unix/zconfig.h chmod +x svnver.sh bin/zia-config libzia-4.67/AUTHORS0000644000175000017500000000004114662101506010711 00000000000000Ladislav Vaiz libzia-4.67/compile0000755000175000017500000001635014672552113011236 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libzia-4.67/COPYING0000644000175000017500000004312114662101506010702 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. libzia-4.67/ChangeLog0000644000175000017500000000000014662101506011406 00000000000000libzia-4.67/TODO0000644000175000017500000000000014662101506010324 00000000000000libzia-4.67/include/0000755000175000017500000000000014752603141011353 500000000000000libzia-4.67/include/zmisc.h0000644000175000017500000000330314662101502012562 00000000000000/* Misc functions Copyright (C) 2012-2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZMISC_H #define __ZMISC_H #include #include #ifdef Z_HAVE_TERMIOS #ifdef Z_CYGWIN void cfmakeraw (struct termios *); #endif #endif #ifdef Z_MSC_MINGW #include #include #endif char *z_strdup_home(void); #ifdef Z_MSC_MINGW int setenv(const char *name, const char *value, int overwrite); #endif char *z_username(char *buf, int buflen); void z_get_settings(GString *gs); double z_min3_d(double a, double b, double c); double z_max3_d(double a, double b, double c); static inline double z_sqr(double x){ return x * x; } #ifdef Z_MSC_MINGW #define z_finite(a) _finite(a) #else #define z_finite(a) isfinite(a) #endif // argument is fftw_complex #define Z_CABS(x) (sqrt( (x)[0]*(x)[0] + (x)[1]*(x)[1])) // arguments are fftw_complex #define Z_CMUL(out, x, y) {\ double r = (x)[0] * (y)[0] - (x)[1] * (y)[1]; \ (out)[1] = (x)[1] * (y)[0] + (x)[0] * (y)[1]; \ (out)[0] = r; \ } #ifdef Z_MSC_MINGW int zreg_getint(HKEY hSecKey, const char *section, const char *entry); char *zreg_getstr(HKEY hSecKey, const char *section, const char *entry); #endif int z_browser(char *url); #define Z_CLR 0 #define Z_SET 1 #define Z_XOR 2 #if _MSC_VER < 1700 /* 2012 */ double round(double number); #endif #ifdef Z_MSC_MINGW #define getpid _getpid #endif #ifdef Z_MSC typedef int ssize_t; #endif #endif libzia-4.67/include/zfiledlg.h0000644000175000017500000000336514662101502013245 00000000000000/* zfiledlg.h - header for file dialog Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZFILEDLG_H #define __ZFILEDLG_H #include #include #ifdef Z_HAVE_GTK #include #endif struct zselect; // we don't need it but must be included before windows.h #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif struct zfiledlg{ GThread *thread; void (*fce)(void *, char *); void *arg; char *last_dir; struct zselect *zsel; #ifdef Z_MSC_MINGW_CYGWIN OPENFILENAME ofn; #elif defined(Z_HAVE_DLFCN_H) GPtrArray *memlist; char *ext2; /* void (*gtk_init)(int *argc, ...); void *(*gtk_file_chooser_dialog_new)(char *title, ...); int (*gtk_dialog_run)(void *); char *(*gtk_file_chooser_get_filename)(void *); void (*gtk_widget_destroy)(void *); int (*gtk_events_pending)(void); void (*gtk_main_iteration)(void); int (*gtk_file_chooser_set_current_folder)(void *, void *); void *(*gtk_file_filter_new)(void); void (*gtk_file_filter_set_name)(void *, char *); void (*gtk_file_filter_add_pattern)(void *, char *); void (*g_object_set_data)(void *, char *, void *); void (*gtk_file_chooser_add_filter)(void *, void *);*/ #endif }; struct zfiledlg *zfiledlg_init(void); void zfiledlg_free(struct zfiledlg *dlg); int zfiledlg_open(struct zfiledlg *dlg, struct zselect *zsel, void (*fce)(void *, char *), void *arg, const char *filename, const char *ext); void zfiledlg_read_handler(int n, char *items[]); #endif libzia-4.67/include/ziconv.h0000644000175000017500000000065714662101502012756 00000000000000/* ziconv.h - skeleton for ziconv Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZICONV_H #define __ZICONV_H #include #include int ziconv(iconv_t cd, char *inbuf, GString *outbuf); #endif libzia-4.67/include/zgetopt.h0000644000175000017500000000115214662101502013131 00000000000000/* zgetopt.h - getopt compatibility layer Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZGETOPT_H #define __ZGETOPT_H #include #ifdef Z_HAVE_GETOPT_H #include #else LIBZIA_API char *optarg; LIBZIA_API int optind; LIBZIA_API extern int opterr; LIBZIA_API extern int optopt; int getopt(int argc, char *argv[], char *optstring); #endif #endif libzia-4.67/include/regex_.h0000644000175000017500000005156314662101502012721 00000000000000/* Definitions for data structures and routines for the regular expression library. Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #ifdef Z_MSC_MINGW_ANDROID #ifndef _REGEX_H #define _REGEX_H 1 #include #include /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ #define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ #define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ #define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ #define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ #define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ #define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ #define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in an bre or immediately after an alternation or begin-group operator. */ #define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ #define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ #define RE_SYNTAX_EMACS 0 #define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) #define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) #define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS) #define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) #define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) #define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ #define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) #define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ #define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) #define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ /* Maximum number of duplicates an interval can allow. Some systems (erroneously) define this in other header files, but we want our value, so remove any previous define. */ #ifdef RE_DUP_MAX # undef RE_DUP_MAX #endif /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */ #define RE_DUP_MAX (0x7fff) /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (REG_EXTENDED << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (REG_ICASE << 1) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (REG_NEWLINE << 1) /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the `re_error_msg' table in regex.c. */ typedef enum { #ifdef _XOPEN_SOURCE REG_ENOSYS = -1, /* This will never happen for this implementation. */ #endif REG_NOERROR = 0, /* Success. */ REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ REG_BADPAT, /* Invalid pattern. */ REG_ECOLLATE, /* Inalid collating element. */ REG_ECTYPE, /* Invalid character class name. */ REG_EESCAPE, /* Trailing backslash. */ REG_ESUBREG, /* Invalid back reference. */ REG_EBRACK, /* Unmatched left bracket. */ REG_EPAREN, /* Parenthesis imbalance. */ REG_EBRACE, /* Unmatched \{. */ REG_BADBR, /* Invalid contents of \{\}. */ REG_ERANGE, /* Invalid range end. */ REG_ESPACE, /* Ran out of memory. */ REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ REG_EEND, /* Premature end. */ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been compiled, the `re_nsub' field is available. All other fields are private to the regex routines. */ #ifndef RE_TRANSLATE_TYPE # define RE_TRANSLATE_TYPE unsigned char * #endif struct re_pattern_buffer { /* Space that holds the compiled pattern. It is declared as `unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *buffer; /* Number of bytes to which `buffer' points. */ unsigned long int allocated; /* Number of bytes actually used in `buffer'. */ unsigned long int used; /* Syntax setting with which the pattern was compiled. */ reg_syntax_t syntax; /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *fastmap; /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ RE_TRANSLATE_TYPE translate; /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in `re_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned can_be_null : 1; /* If REGS_UNALLOCATED, allocate space in the `regs' structure for `max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #define REGS_UNALLOCATED 0 #define REGS_REALLOCATE 1 #define REGS_FIXED 2 unsigned regs_allocated : 2; /* Set to zero when `regex_compile' compiles a pattern; set to one by `re_compile_fastmap' if it updates the fastmap. */ unsigned fastmap_accurate : 1; /* If set, `re_match_2' does not return information about subexpressions. */ unsigned no_sub : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned not_bol : 1; /* Similarly for an end-of-line anchor. */ unsigned not_eol : 1; /* If true, an anchor at a newline matches. */ unsigned newline_anchor : 1; }; typedef struct re_pattern_buffer regex_t; /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { unsigned num_regs; regoff_t *start; regoff_t *end; }; /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ #ifndef RE_NREGS # define RE_NREGS 30 #endif /* POSIX specification for registers. Aside from the different names than `re_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern int re_search (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, int __range, struct re_registers *__regs); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern int re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, int __range, struct re_registers *__regs, int __stop); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern int re_match (struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, struct re_registers *__regs); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ extern int re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, struct re_registers *__regs, int __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least `NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, unsigned int __num_regs, regoff_t *__starts, regoff_t *__ends); #if defined _REGEX_RE_COMP || defined _LIBC # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". */ #ifndef __restrict # if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) # if defined restrict || 199901L <= __STDC_VERSION__ # define __restrict restrict # else # define __restrict # endif # endif #endif /* gcc 3.1 and up support the [restrict] syntax. */ #ifndef __restrict_arr # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \ && !defined __GNUG__ # define __restrict_arr __restrict # else # define __restrict_arr # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags); extern int regexec (const regex_t *__restrict __preg, const char *__restrict __string, size_t __nmatch, regmatch_t __pmatch[__restrict_arr], int __eflags); extern size_t regerror (int __errcode, const regex_t *__restrict __preg, char *__restrict __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ #endif /* unix */ libzia-4.67/include/zhash.h0000644000175000017500000000315114662101502012553 00000000000000/* zhash.h - libzia hash extension Copyright (C) 2011-2013 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __GHASH_H #define __GHASH_H #include #include typedef struct _ZHashNode ZHashNode; typedef struct _ZHashTable ZHashTable; struct _ZHashNode { gpointer key; gpointer value; ZHashNode *next; }; struct _ZHashTable { gint size; gint nnodes; guint frozen; ZHashNode **nodes; GHashFunc hash_func; GCompareFunc key_compare_func; }; /*void init_ghash(void); void free_ghash(void);*/ ZHashTable *z_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); void z_hash_table_destroy (ZHashTable *hash_table); void z_hash_table_foreach (ZHashTable *hash_table, GHFunc func, gpointer user_data); void z_hash_table_insert (ZHashTable *hash_table, gpointer key, gpointer value); void z_hash_table_remove (ZHashTable *hash_table, gconstpointer key); gpointer z_hash_table_lookup (ZHashTable *hash_table, gconstpointer key); gboolean z_hash_table_lookup_extended (ZHashTable *hash_table, gconstpointer lookup_key, gpointer *orig_key, gpointer *value); guint z_hash_table_foreach_remove (ZHashTable *hash_table, GHRFunc func, gpointer user_data); guint z_hash_table_size (ZHashTable *hash_table); gboolean free_gpointer_item(gpointer key, gpointer value, gpointer user_data); #ifndef Z_HAVE_G_HASH_TABLE_REMOVE_ALL void g_hash_table_remove_all(GHashTable *hash_table); #endif #endif libzia-4.67/include/libziaint.h0000644000175000017500000000571714662101502013435 00000000000000/* libzia.h Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __LIBZIAINT_H #define __LIBZIAINT_H #ifdef _MSC_VER #pragma warning(error:4013) #endif #include // LIBZIA_EXPORTS must be defined in libzia.vcxcproj #ifndef _MSC_VER #define LIBZIA_API #elif defined(LIBZIA_EXPORTS) #define LIBZIA_API __declspec(dllexport) #elif defined(LIBZIA_STATIC_LINK) #define LIBZIA_API #else #define LIBZIA_API __declspec(dllimport) #endif /* predefined macros of compilers gcc unix: __GNUC__=4.3.2 i586-mingw32msvc-gcc: WIN32 __GNUC__=4.2.1 __MINGW32__ gcc cygwin: __CYGWIN__ __GNUC__=3.4.4 gcc cyg #inc: WIN32 __CYGWIN__ __GNUC__=3.4.4 gcc cygwin -mno-cygwin: WIN32 __GNUC__=3.4.4 __MINGW32__ msvc6: WIN32 _MSC_VER=12.00 msvc10 (vs2010): WIN32 _MSC_VER=16.00 */ #if defined(_MSC_VER) #define Z_MSC #define Z_PLATFORM "msvc" #ifdef _WIN64 #define Z_MACHINE "win64" #else #define Z_MACHINE "win32" #endif #elif defined(__MINGW32__) #define Z_MINGW // Z_PLATFORM defined in unix/zconfig.h // Z_MACHINE defined in unix/zconfig.h #elif defined(__CYGWIN__) #define Z_CYGWIN #define Z_PLATFORM "cygwin" #define Z_MACHINE "win32" #elif defined(ANDROID) #define Z_ANDROID #define Z_PLATFORM "android" #define Z_MACHINE "arm" #elif defined(__APPLE__) // Z_MACOS is subset of Z_UNIX #define Z_MACOS #define Z_UNIX // Z_PLATFORM is "darwin" // Z_MACHINE is "x86_64" #else #define Z_UNIX // Z_PLATFORM defined in unix/zconfig.h // Z_MACHINE defined in unix/zconfig.h #endif #if defined(Z_MSC) || defined(Z_MINGW) // MSVC or MINGW #define Z_MSC_MINGW #endif #if defined(Z_MSC) || defined(Z_MINGW) || defined(Z_CYGWIN) #define Z_MSC_MINGW_CYGWIN #endif #if defined(Z_MSC) || defined(Z_MINGW) || defined(Z_ANDROID) #define Z_MSC_MINGW_ANDROID #endif #if defined(Z_CYGWIN) || defined(Z_UNIX) // UNIX API available #define Z_UNIX_CYGWIN #endif #if defined(Z_UNIX) || defined(Z_MINGW) #define Z_UNIX_MINGW #endif #if defined(Z_UNIX) || defined(Z_ANDROID) #define Z_UNIX_ANDROID #endif #if defined(Z_UNIX) || defined(Z_CYGWIN) || defined(Z_ANDROID) #define Z_UNIX_CYGWIN_ANDROID #endif #if defined(Z_UNIX) || defined(Z_MINGW) || defined(Z_ANDROID) #define Z_UNIX_MINGW_ANDROID #endif #define Z_SWAP(typ, a, b) { typ c; c = a; a = b; b = c; } #define Z_MAX(a, b) ( (a) > (b) ? (a) : (b) ) #define Z_MIN(a, b) ( (a) < (b) ? (a) : (b) ) #define Z_ABS(a) ( (a) < 0 ? (-(a)) : (a) ) int z_min3(int a, int b, int c); #ifdef Z_CYGWIN #ifndef _MAX_PATH #define _MAX_PATH 260 #endif #endif #define ZRET(statement) if ((ret = statement) < 0) return ret; #define ZRETX(statement) if ((ret = statement) < 0) goto x; #endif libzia-4.67/include/zsdl.h0000644000175000017500000001337014662101501012415 00000000000000/* zsdl.h - SDL utilities Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSDL_H #define __ZSDL_H #include #ifdef Z_HAVE_SDL #include #ifdef Z_HAVE_SDL2 void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h); #define KMOD_META KMOD_LALT #else #define SDL_Window SDL_Surface #define SDL_GetWindowWMInfo(w, i) SDL_GetWMInfo(i) #define SDL_Keycode SDLKey #define SDL_Keysym SDL_keysym #define SDL_Keymod SDLMod #define SDL_SetWindowIcon(w, i) SDL_WM_SetIcon(i, NULL) #define SDL_GetCurrentVideoDriver(s) SDL_VideoDriverName(s, sizeof(s)-1) #endif #include #ifdef Z_HAVE_SDL_TTF #include #endif struct zzsdl { #ifdef Z_HAVE_SDL2 SDL_Window *window; SDL_Renderer *renderer; #endif SDL_Surface *screen; Uint32 format; int depth; void (*putpixel)(SDL_Surface *, int x, int y, int color); int font_w, font_h; SDL_PixelFormat *pxformat; int antialiasing, antialiasing_supported; int inverse; iconv_t to8b_cd; GString *to8b_gs; #ifdef Z_HAVE_SDL_TTF GHashTable* ttfs;// key=height, of TTF_Font * SDL_RWops *ttf_fontrw; // foreign key from app, do not free in libzia! iconv_t ttf_iconv; #endif }; //extern struct zzsdl *zsdl; struct zzsdl *zsdl_init(SDL_Surface *screen, int font_h, int inverse, SDL_RWops* fontRW); void zsdl_free(void); struct zzsdl *zsdl_instance(void); SDL_Surface *z_create_surface(struct zzsdl *zzsdl, int w, int h); void z_putpixel8(SDL_Surface *surface, int x, int y, int color); void z_putpixel16(SDL_Surface *surface, int x, int y, int color); void z_putpixel24(SDL_Surface *surface, int x, int y, int color); void z_putpixel32(SDL_Surface *surface, int x, int y, int color); void z_putpixel8inv(SDL_Surface *surface, int x, int y, int color); void z_putpixel16inv(SDL_Surface *surface, int x, int y, int color); void z_putpixel24inv(SDL_Surface *surface, int x, int y, int color); void z_putpixel32inv(SDL_Surface *surface, int x, int y, int color); void z_putpixel_fmt(SDL_Surface *surface, int x, int y, int color, SDL_PixelFormat *format); int z_getpixel8(SDL_Surface *surface, int x, int y); int z_getpixel16(SDL_Surface *surface, int x, int y); int z_getpixel24(SDL_Surface *surface, int x, int y); int z_getpixel32(SDL_Surface *surface, int x, int y); #define z_putpixel(s, x, y, c) zsdl->putpixel(s, x, y, c) int z_getpixel(SDL_Surface *surface, int x, int y); int z_getpixel_fmt(SDL_Surface *surface, int x, int y, SDL_PixelFormat *format); #define ZFONT_TRANSP 1 #define ZFONT_CENTERX 2 #define ZFONT_CENTERY 4 #define ZFONT_RIGHT 8 #define ZFONT_SYNC 16 #define ZFONT_CHAR 32 #define ZFONT_DOUBLEHT 64 #define ZFONT_DOUBLEHB 128 #define ZFONT_USERHFLG 256 #define ZFONT_OUTLINE 512 #define ZFONT_OUTLINE_FONT 1024 #define ZFONT_UTF8 2048 #define ZFONT_USERH(h) (((h << 16) & 0xff0000) | ZFONT_USERHFLG) int zsdl_print_ttf_char(SDL_Surface* surface, int* x, int y, int color, int bgcolor, int flags, unsigned char c); void zsdl_printf(SDL_Surface *surface, int x, int y, int color, int bgcolor, int flags, char *m, ...); void zsdl_fit(int *flg, int width, int height, char *str); int zsdl_h2w(int font_h); int zsdl_max_font_h(int w, int h, char *text); short *zfont_create_outline(const short *font, int size_b, int font_h); int z_clip_pixel(SDL_Rect *clip, int x, int y); int z_overlapped_pixel(SDL_Rect *clip_rect, int x, int y); int z_overlapped_rect(SDL_Rect *a, SDL_Rect *b); int z_overlapped_line(SDL_Rect *clip_rect, int x1, int y1, int x2, int y2); void z_line(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color); void z_lineaa(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color); void z_do_line(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color, void (*func)(SDL_Surface *surface, int x, int y, int d) ); void z_triangle(SDL_Surface *surface, int x1, int y1, int x2, int y2, int x3, int y3, int c); void z_triangle_net(SDL_Surface *surface, int c, int n, ...); void z_circle(SDL_Surface *surface, int x, int y, int r, int c); void z_dashfce(SDL_Surface* surface, int x, int y, int d); void z_dotfce(SDL_Surface *surface, int x, int y, int d) ; void z_rect(SDL_Surface *surface, int x1, int y1, int x2, int y2, int c); void z_rect2(SDL_Surface *surface, SDL_Rect *r, int c); void z_cross(SDL_Surface *surface, int x, int y, int color, int zoom); void z_pip(SDL_Surface *surface, int x, int y, int color1, int color2, int zoom); int z_makecol(int r, int g, int b); unsigned char z_r(SDL_Surface *surface, int color); unsigned char z_g(SDL_Surface *surface, int color); unsigned char z_b(SDL_Surface *surface, int color); void z_dumpbitmap(SDL_Surface *screen, SDL_Surface *surface); void zsdl_font_save(SDL_Surface *screen); int zsdl_font_dump(const char *pngfilename, const char *txtfilename); int zsdl_font_dump_skip_red(const char *pngfilename, const char *txtfilename); int zsdl_sys_key_repeat(int delay, int rate); #endif struct zzsdl *zsdl_get(void); void z_disable_screensaver(void); int zsdl_maximize(struct zzsdl *zsdl, int mode); int zsdl_maximized(struct zzsdl *zsdl, int *w, int *h); int z_line_intersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y); int z_point_is_in_quadrangle(double xp, double yp, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4); int z_color_from_html(char *htmlcolor); #endif libzia-4.67/include/zlist.h0000644000175000017500000000257214662101502012611 00000000000000/* zlist.h - double linked lists Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZLIST_H #define __ZLIST_H struct list_head { void *next; void *prev; }; #define init_list(x) {(x).next=&(x); (x).prev=&(x);} #define list_empty(x) ((x).next == &(x)) #define del_from_list(x) {((struct list_head *)(x)->next)->prev=(x)->prev; ((struct list_head *)(x)->prev)->next=(x)->next;} #define add_at_pos(p,x) do {(x)->next=(p)->next; (x)->prev=(p); (p)->next=(x); (x)->next->prev=(x);} while(0) #define free_list(l) {while ((l).next != &(l)) {struct list_head *a=(l).next; del_from_list(a); g_free(a); }} #ifdef __GNUC__ #define add_to_list(l,x) add_at_pos((typeof(x))&(l),(x)) #define foreach(e,l) for ((e)=(l).next; (e)!=(typeof(e))&(l); (e)=(e)->next) #define foreachback(e,l) for ((e)=(l).prev; (e)!=(typeof(e))&(l); (e)=(e)->prev) #else struct xlist_head { struct xlist_head *next; struct xlist_head *prev; }; #define add_to_list(l,x) add_at_pos((struct xlist_head *)&(l),(struct xlist_head *)(x)) #define foreach(e,l) for ((e)=(l).next; (e)!=(void *)&(l); (e)=(e)->next) #define foreachback(e,l) for ((e)=(l).prev; (e)!=(void *)&(l); (e)=(e)->prev) #endif #endif libzia-4.67/include/zsvnversion.h0000644000175000017500000000003214752576442014062 00000000000000#define Z_SVNVER "11796M" libzia-4.67/include/zbinbuf.h0000644000175000017500000000262114662101502013076 00000000000000/* zbinbuf - Binary buffer Copyright (C) 2011-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZBINBUF_H #define __ZBINBUF_H #include #include struct zbinbuf{ int size, len, increment; char *buf; }; struct zbinbuf *zbinbuf_init(void); void zbinbuf_free(struct zbinbuf *zbb); void zbinbuf_append_bin(struct zbinbuf *zbb, const void *data, int len); void zbinbuf_append(struct zbinbuf *zbb, const char *str); int zbinbuf_sprintf(struct zbinbuf *zbb, char *fmt, ...); int zbinbuf_sprintfa(struct zbinbuf *zbb, char *fmt, ...); void zbinbuf_prepend(struct zbinbuf *zbb, void *data, int len); void zbinbuf_erase(struct zbinbuf *zbb, int pos, int len); void zbinbuf_truncate(struct zbinbuf *zbb, int len); void zbinbuf_getstr(struct zbinbuf *zbb, int pos, char *str, int maxlen); void zbinbuf_getline(struct zbinbuf *zbb, int *pos, char *str, int maxlen); int zbinbuf_append_file(struct zbinbuf *zbb, const char *filename); int zbinbuf_write_to_file(struct zbinbuf *zbb, const char *filename, int offset, int len); void zbinbuf_append_le_s16(struct zbinbuf *zbb, int16_t a); void zbinbuf_append_le_s32(struct zbinbuf *zbb, int32_t a); char *zbinbuf_readline(struct zbinbuf *zbb); #endif libzia-4.67/include/zpng.h0000644000175000017500000000125514662101502012417 00000000000000/* zpng.h - PNG functions for SDL surfaces Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZPNG_H #define __ZPNG_H #include #include #include struct SDL_Surface; struct SDL_Surface *zpng_load(const char *filename); struct SDL_Surface *zpng_create(const void *data, int len); int zpng_save(struct SDL_Surface * surf, char * fname, struct zbinbuf *bbuf); #ifdef Z_HAVE_LIBPNG void zpng_get_version(GString *gs); #endif #endif libzia-4.67/include/zselect.h0000644000175000017500000001061714662101502013114 00000000000000/* select.h - Main application loop Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSELECT_H #define __ZSELECT_H #include #ifdef Z_HAVE_SYS_SELECT_H #include #endif #ifdef Z_HAVE_SIGNAL_H #include #endif #ifdef Z_HAVE_SYS_TIME_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifndef FD_SETSIZE #define FD_SETSIZE 1024 #endif #include typedef long ztime; struct zselect; struct zselect *zselect_init(void (*redraw)(void)); void zselect_free(struct zselect *zsel); ztime zselect_time(void); int zselect_bh_new(struct zselect *zsel, void (*fce)(void *arg), void *arg); void zselect_bh_check(struct zselect *zsel); /*#ifdef LEAK_DEBUG_LIST int debug_install_timer(char *file, int line, ttime, void (*)(void *), void *arg, char *fname); #define install_timer(x, y, z) debug_install_timer(__FILE__, __LINE__, x, y, z, #y) void debug_kill_timer(char *file, int line, int timer_id); #define kill_timer(x) debug_kill_timer(__FILE__, __LINE__, x) void debug_set_handlers(char *file, int line, int, void (*)(void *), void (*)(void *), void (*)(void *), void *arg, char *read_fname, char *write_fname, char *error_fname); #define set_handlers(n, r, w, x, a) debug_set_handlers(__FILE__, __LINE__, n, r, w, x, a, #r, #w, #x); #else */ #define zselect_timer_new(zsel, ztime, fn, arg) zselect_timer_new_dbg((zsel), (ztime), (fn), (#fn), arg) int zselect_timer_new_dbg(struct zselect *zsel, ztime, void (*)(void *), char *fname, void *arg); /* todo argument callbacku */ int zselect_timer_new_at(struct zselect *zsel, struct timeval *at, void (*)(void *), void *arg); void zselect_timer_kill(struct zselect *zsel, int); #define zselect_set(zsel, fd, read_fn, write_fn, error_fn, arg) zselect_set_dbg((zsel), (fd), (read_fn), (#read_fn), (write_fn), (#write_fn), (error_fn), (#error_fn), (arg)) void zselect_set_dbg(struct zselect *zsel, int, void (*)(void *), char *, void (*)(void *), char *, void (*)(void *), char *, void *arg); void zselect_set_read(struct zselect *zsel, int fd, void (*write_func)(void *), void *arg); void zselect_set_write(struct zselect *zsel, int fd, void (*write_func)(void *), void *arg); //#enndif ztime zselect_timer_get(struct zselect *zsel, int id); void zselect_loop(struct zselect *zsel); void zselect_terminate(struct zselect *zsel); int zselect_terminating(struct zselect *zsel); //void zselect_check_heap(void); //tODO //void debug_set_handlers(char *file, int line, int, void (*)(void *), void (*)(void *), void (*)(void *), void *arg); //#define set_handlers(n, r, w, x, a) debug_set_handlers(__FILE__, __LINE__, n, r, w, x, a); #define H_READ 0 #define H_WRITE 1 #define H_ERROR 2 #define H_DATA 3 typedef void (*ZSELECT_HANDLER)(void *); void *zselect_get(struct zselect *zsel, int fd, int typ); #ifdef Z_UNIX_ANDROID void zselect_signal_set(int, void (*)(void *, siginfo_t *, void *), void *, int); #endif int zselect_msg_send(struct zselect *zsel, char *fmt, ...); int zselect_msg_set(struct zselect *zsel, void (*handler)(struct zselect *, int n, char **items)); int zselect_msg_send_raw(struct zselect *zsel, char *s); void zselect_start_profile(struct zselect *zsel, double limit); void zselect_hint(struct zselect *zsel, const char *fmt, ...); void zselect_handle_profile(struct zselect *zsel, struct timeval *start, void *fce, char *fname); int zselect_profiling(struct zselect *zsel); void zselect_abort_exception(void *arg); #ifdef Z_UNIX_ANDROID void zselect_sigterm(void *arg, siginfo_t *siginfo, void *ctx); #endif void zselect_signal_init(void); /*struct zselect_profile{ void *fce; int calls; double maxtime; double tottime; };*/ #endif libzia-4.67/include/zdir.h0000644000175000017500000000366114662101502012414 00000000000000/* zdir.h Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZDIR_H #define __ZDIR_H #include #ifdef Z_HAVE_IO_H #include #endif #include /*#ifdef Z_HAVE_WINDOWS_H #include #endif*/ #ifdef Z_HAVE_DIRECT_H #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #define Z_MAX_PATH 260 #ifdef Z_HAVE_DIRENT_H #include #else #define __S_IFMT 0170000 #define __S_IFDIR 0040000 #define __S_IFREG 0100000 #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask)) #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR) #define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG) typedef struct dirent{ char d_name[Z_MAX_PATH]; }; typedef struct DIR{ long handle; /* -1 for failed rewind */ struct _finddata_t info; struct dirent result; /* d_name null iff first time */ char *name; /* null-terminated char string */ }DIR; DIR *opendir(char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #endif #ifdef Z_MSC #define zchdir(dir) _chdir(dir) #else #define zchdir(dir) chdir(dir) #endif int z_scandir (char *dir, struct dirent ***namelist, int (*select) (const char *, const struct dirent *), int (*cmp) (const void *, const void *)); void z_free_namelist(struct dirent ***namelist, int *namelistlen); int z_select_dir_func(const char *, const struct dirent *de); int z_select_file_func(const char *, const struct dirent *de); int z_compare_name_func(const void *d1, const void *d2); int z_scandir_alphasort(const void *a, const void *b); int z_mkdir(const char *s, int mode); int z_mkdir_p(const char *s, int mode); int z_fmkdir_p(const char *filename, int mode); #endif libzia-4.67/include/zssd1306.h0000644000175000017500000000150414662101502012733 00000000000000/* zssd1306.h - header for SSD1306 display Copyright (C) 2016 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSSD1306_H #define __ZSSD1306_H #include struct zbusdev; #define ZSSD1306_SLAVE 0x3c #ifdef Z_UNIX int zssd1306_init(struct zbusdev *dev); void zssd1306_data(struct zbusdev *dev, void *data, size_t len); void zssd1306_free(struct zbusdev *dev); void zssd1306_flip(struct zbusdev *dev, char flip); void zssd1306_invert(struct zbusdev *dev, char invert); void zssd1306_contrast(struct zbusdev *dev, unsigned char contrast); void zssd1306_goto(struct zbusdev *dev, unsigned char x, unsigned char y); #endif #endif libzia-4.67/include/zpath.h0000644000175000017500000000142314662101502012564 00000000000000/* zpath.h - path functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZPATH_H #define __ZPATH_H #include #ifdef Z_MSC_MINGW char *z_wokna(char *file); #else static inline char *z_wokna(char *file) { return file; } #endif char *z_unix(char *file); char *z_dirname(char *filename); const char *z_filename(const char *filename); const char *z_extension(const char *filename); char *z_optimize_path(char *src); /* src must be allocated by glib, return can differ */ char *z_binary_file_name(void); char *z_libzia_file_name(void **codebase); #endif libzia-4.67/include/zdht11.h0000644000175000017500000000105114662101502012546 00000000000000/* dht11.h - skeleton for new header files Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZDHT11_H #define __ZDHT11_H struct zgpio; struct zdht11{ float temperature, humidity; }; int zdht11_read_once(struct zdht11 *dht, struct zgpio *gpio, int prot); int zdht11_read(struct zdht11 *dht, struct zgpio *gpio, int prot); #endif libzia-4.67/include/zsun.h0000644000175000017500000000104714662101502012437 00000000000000 /* skel - Skeleton for new h files Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSUN_H #define __ZSUN_H #include #include double zsun_riseset(time_t t, int sunrise, double latitude, double longitude); gchar *zsun_strdup_riseset(time_t t, double latitude, double longitude); void zsun_test(void); #endif libzia-4.67/include/zdump.h0000644000175000017500000000116214662101502012575 00000000000000/* zdump.h - make core dump Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __Z_DUMP_H #define __Z_DUMP_H #include #include // can be called more times void z_dump_init(char *filename, void (*handler)(GString *gs), char *msg_title, char *appddir); void z_dump_free(void); void z_dump_create(void); char *z_dump_backtrace(GString *gs, void *vex, void *ctx, int level); #endif libzia-4.67/include/zbat.h0000644000175000017500000000126314662101502012400 00000000000000/* Tucnak - VHF contest log Copyright (C) 2012-2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZBAT_H #define __ZBAT_H #include #include struct zbat { int n; int capacity; char *technology; int charging; int discharging; }; struct zbat *zbat_init(void); void zbat_free(struct zbat *); void zbat_getinfo(struct zbat *zbat); #ifdef Z_HAVE_SDL void zbat_draw(struct zbat *bat, SDL_Surface *surface, int x, int y, int w, int h); #endif #endif libzia-4.67/include/zspidev.h0000644000175000017500000000052014662101502013117 00000000000000/* zspidev.c - SPI over spidev Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ struct zbusdev *zspidev_init(int busnr, int cs); libzia-4.67/include/zghash.h0000644000175000017500000000146014662101502012723 00000000000000/* zghash.h - extension for glib's hash tables Copyright (C) 2011-2021 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZGHASH_H #define __ZGHASH_H #include #include void zg_hash_safe_insert(GHashTable *table, char *key, char *value); gboolean zg_hash_free_item(gpointer key, gpointer value, gpointer user_data); gboolean zg_hash_free_key(gpointer key, gpointer value, gpointer user_data); void zg_hash_free(GHashTable *hash); void zg_hash_table_foreach_sorted(GHashTable *hash, GHFunc func, int (*compar)(const void *, const void *), gpointer user_data); #endif libzia-4.67/include/zi2c.h0000644000175000017500000000106614662101502012310 00000000000000/* zi2c.c - I2C library Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZI2C_H #define __ZI2C_H #include struct zbusdev; struct zbusdev *zi2c_init(int busnr, int slave); int zi2c_free(struct zbusdev *dev); int zi2c_write(struct zbusdev *dev, void *buf, size_t len); int zi2c_read(struct zbusdev *dev, void *buf, size_t len); #endif libzia-4.67/include/zgpio.h0000644000175000017500000000467414662101502012601 00000000000000/* zgpio.h - GPIO library Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZGPIO_H #define __ZGPIO_H #include #define ZMCP23017_SLAVE 0x20 struct zselect; struct zgpio; struct zbus; enum zgpio_chip_type{ ZGPIOCHIP_SYSGPIO = 0, ZGPIOCHIP_MCP23017 = 1 }; enum zgpio_edge{ ZGPIO_EDGE_NONE = 0, ZGPIO_EDGE_RISING = 1, ZGPIO_EDGE_FALLING = 2, ZGPIO_EDGE_BOTH = 3 }; struct zgpio{ struct zgpiochip *chip; int nr; char *name; int unexport_after; enum zgpio_edge edge; void (*handler)(struct zgpio *gpio, int value, void *data); void *data; // SYSGPIO int value_fd; struct zselect *zsel; // MCP23017 unsigned char mask; }; struct zgpiochip{ enum zgpio_chip_type type; struct zbusdev *dev; // MCP23017 struct zgpio *inta; unsigned char olat[2]; unsigned char gpio[2]; GPtrArray *gpios; // of struct zgpio * int mirror; // mirror a/b void (*freechip)(struct zgpiochip *chip); struct zgpio *(*init_nr)(struct zgpiochip *chip, int nr); struct zgpio *(*init_name)(struct zgpiochip *chip, const char *name); void (*free)(struct zgpio *gpio); int (*dir_input)(struct zgpio *gpio); int (*dir_output)(struct zgpio *gpio); int (*write)(struct zgpio *gpio, int value); int (*read)(struct zgpio *gpio); int (*set_handler)(struct zgpio *gpio, struct zselect *zsel, enum zgpio_edge edge, void (*handler)(struct zgpio *gpio, int value, void *data), void *data); }; struct zgpiochip *zgpiochip_init_sysgpio(void); struct zgpiochip *zgpiochip_init_mcp23017(struct zbusdev *bus, struct zgpio *inta, struct zselect *zsel, int mirror); void zgpiochip_free(struct zgpiochip *chip); struct zgpio *zgpio_init_nr(struct zgpiochip *chip, int nr); struct zgpio *zgpio_init_name(struct zgpiochip *chip, const char *name); void zgpio_free(struct zgpio *gpio); int zgpio_dir_input(struct zgpio *gpio); int zgpio_dir_output(struct zgpio *gpio); int zgpio_write(struct zgpio *gpio, int value); int zgpio_read(struct zgpio *gpio); int zgpio_set_handler(struct zgpio *chip, struct zselect *zsel, enum zgpio_edge edge, void (*handler)(struct zgpio *gpio, int value, void *data), void *data); #endif libzia-4.67/include/eprintf.h0000644000175000017500000000145314662101502013110 00000000000000/* libzia Copyright (C) 2011-2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __EPRINTF_H #define __EPRINTF_H #include #include int zg_string_veprintfa(const char *flags, GString *gs, char *fmt, va_list l); int zg_string_eprintfa(const char *flags, GString *gs, char *fmt, ...); int zg_string_eprintf(const char *flags, GString *gs, char *fmt, ...); int z_tokens(const char *str); char *z_tokenize(char *str, int *tokenpos); char *z_base64dec(char *bin, int maxlen, int *plen, char *src); char *z_hexadec(char *bin, int maxlen, int *plen, char *src); #endif /* __EPRINTF_H */ libzia-4.67/include/zclip.h0000644000175000017500000000106214662101502012556 00000000000000/* zclip.h - clipboard functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZCLIP_H #define __ZCLIP_H #include #ifdef Z_HAVE_SDL #include #endif int zclip_init(void); #ifdef Z_HAVE_SDL int zclip_event_filter(const SDL_Event *event); #endif int zclip_copy(const char *text); char *zclip_strdup_paste(void); #endif libzia-4.67/include/regex_internal.h0000644000175000017500000005221214662101502014446 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include #include #include #include #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC # include #endif #if defined HAVE_LOCALE_H || defined _LIBC # include #endif #if defined HAVE_WCHAR_H || defined _LIBC # include #endif /* HAVE_WCHAR_H || _LIBC */ #if defined HAVE_WCTYPE_H || defined _LIBC # include #endif /* HAVE_WCTYPE_H || _LIBC */ #if defined HAVE_STDBOOL_H || defined _LIBC # include #endif /* HAVE_STDBOOL_H || _LIBC */ #if defined HAVE_STDINT_H || defined _LIBC # include #endif /* HAVE_STDINT_H || _LIBC */ #if defined _LIBC # include #else # define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif /* For loser systems without the definition. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) #ifndef inline # define inline #endif #endif /* Number of single byte character. */ #define SBC_MAX 256 #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # define __wctype wctype # define __iswctype iswctype # define __btowc btowc # define __mempcpy mempcpy # define __wcrtomb wcrtomb # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #ifdef __GNUC__ # define __attribute(arg) __attribute__ (arg) #else # define __attribute(arg) #endif extern const char __re_error_msgid[] attribute_hidden; extern const size_t __re_error_msgid_idx[] attribute_hidden; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. */ #define BITSET_WORD_BITS (sizeof (bitset_word_t) * CHAR_BIT) /* Number of bitset_word_t in a bit_set. */ #define BITSET_WORDS (SBC_MAX / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define bitset_set(set,i) \ (set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS) #define bitset_clear(set,i) \ (set[i / BITSET_WORD_BITS] &= ~((bitset_word_t) 1 << i % BITSET_WORD_BITS)) #define bitset_contain(set,i) \ (set[i / BITSET_WORD_BITS] & ((bitset_word_t) 1 << i % BITSET_WORD_BITS)) #define bitset_empty(set) memset (set, '\0', sizeof (bitset_t)) #define bitset_set_all(set) memset (set, '\xff', sizeof (bitset_t)) #define bitset_copy(dest,src) memcpy (dest, src, sizeof (bitset_t)) #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { int alloc; int nelem; int *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ int nmbchars; /* # of collating symbols. */ int ncoll_syms; /* # of equivalence classes. */ int nequiv_classes; /* # of range expressions. */ int nranges; /* # of character classes. */ int nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ int idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; int *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ int raw_mbs_idx; /* The length of the valid characters in the buffers. */ int valid_len; /* The corresponding number of bytes in raw_mbs array. */ int valid_raw_len; /* The length of the buffers MBS and WCS. */ int bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ int cur_idx; /* length of RAW_MBS array. */ int raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ int len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ int raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ int stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* 1 if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # ifdef __i386__ # define internal_function __attribute ((regparm (3), stdcall)) # else # define internal_function # endif #endif #ifndef NOT_IN_libc static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) internal_function; # ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; # endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) internal_function __attribute ((pure)); #endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) //#include #ifndef _LIBC # if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # endif #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* `node_idx' is the index in dfa->nodes, if `type' == 0. Otherwise `type' indicate the type of this node. */ int node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { unsigned int hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept `multi byte'. Note that we refer to multibyte characters, and multi character collating elements as `multi byte'. */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { int num; int alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { int next_idx; int alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { int node; int str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { int str_idx; int node; state_array_t *path; int alasts; /* Allocation size of LASTS. */ int nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { int node; int str_idx; int subexp_from; int subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ int match_last; int last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; int state_log_top; /* Back reference cache. */ int nbkref_ents; int abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; int nsub_tops; int asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; int last_node; int last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { int idx; int node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { int num; int alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; int *nexts; int *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions `re_nsub' is in regex_t. */ unsigned int state_hash_mask; int init_node; int nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; int *subexp_map; #ifdef DEBUG char* re_str; #endif __libc_lock_define (, lock) }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset operation. */ static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t internal_function __attribute ((pure)) re_string_wchar_at (const re_string_t *pstr, int idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } # ifndef NOT_IN_libc static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, int idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } # endif #endif /* RE_ENABLE_I18N */ #endif /* _REGEX_INTERNAL_H */ libzia-4.67/include/zia.h0000644000175000017500000000202514662101502012220 00000000000000/* zia.h - interface for all header files Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZIA_H #define __ZIA_H #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif libzia-4.67/include/zcor.h0000644000175000017500000000422614662101502012417 00000000000000/* zcor.c - Polar map data Copyright (C) 2002-2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZCOR_H #define __ZCOR_H #include #include #ifdef Z_HAVE_SDL #include #define COR_KM_MASK 0xffffff00 #define COR_KM_MIN -19968 #define COR_KM_MAX 20224 #define COR_KM_STEP 256 struct cpoint{ short int w,h; signed char c; } __attribute__((packed)) ; #ifdef Z_MSC #pragma pack(push, 1) #endif struct kmpoint{ short int kx,ky; signed char c; } #ifndef Z_ANDROID __attribute__((packed)) #endif ; #ifdef Z_MSC #pragma pack(pop) #endif struct kmarray{ struct kmpoint *data; int len; int size; }; struct zcor{ int nth; const struct cpoint *file; int items; gchar *loc; GHashTable *km; /* of struct ckmpoint */ GHashTable *wwl4; /* of struct ckmpoint */ GHashTable *wwl2; /* of struct ckmpoint */ GHashTable *az; /* of struct ckmpoint */ GThread *thread; int thread_break; double sw_myw, sw_myh; struct zselect *zsel; void (*callback)(void); }; extern struct zcor *gcor; extern double maxcnt; //extern double gst[360]; struct kmarray *kmarray_new(void); void kmarray_add(GHashTable *hash, gpointer key, struct kmpoint *km); struct zcor *zcor_init(struct zselect *zsel, void(*callback)(void), const struct cpoint *file, int cor_items); void zcor_free(struct zcor *cor); void zcors_free(void); struct zcor *zcor_calc(double myh, double myw, gchar *locator, struct zselect *zsel, void (*callback)(void), const struct cpoint *file, int cor_items); void zcors_recalc(double myh, double myw, gchar *locator, struct zselect *zsel, void (*callback)(void), const struct cpoint *file, int cor_items); gpointer zcor_thread_func(gpointer arg); void zcor_switch(void); void zcor_read_handler(int n, char **items); //gboolean free_km_item(gpointer key, gpointer value, gpointer user_data); void free_km_value(gpointer value); gpointer k2key(int kx, int ky); void zcor_dump(struct zcor *cor); #endif #endif libzia-4.67/include/zmd5.h0000644000175000017500000000136114662101502012316 00000000000000/* MD5 functions Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef ZMD5_H #define ZMD5_H #include #include struct zmd5 { uint32_t buf[4]; uint32_t bits[2]; unsigned char in[64]; unsigned char tdigest[33]; }; void zmd5_init(struct zmd5 *ctx); void zmd5_update(struct zmd5 *ctx, unsigned char *buf, unsigned len); void zmd5_final(unsigned char digest[16], struct zmd5 *ctx); unsigned char *zmd5_final_str(struct zmd5 *ctx); void zmd5_transform(uint32_t buf[4], uint32_t in[16]); #endif libzia-4.67/include/zinput.h0000644000175000017500000000202014662101502012761 00000000000000/* zinput.c - Linut input /dev/input/eventX Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZINPUT_H #define __ZINPUT_H #include #ifdef Z_HAVE_LINUX_INPUT_H #include #endif struct zinput{ char *device; int fd; struct zselect *zsel; #ifdef Z_HAVE_LINUX_INPUT_H struct input_event *event; #endif int touch_sdl; int btn_touch, old_btn_touch; int abs_x, abs_y; int x_res, y_res, swap_xy, x_min, x_max, y_min, y_max; int debug; }; struct zinput *zinput_open(char *device, struct zselect *zsel); void zinput_free(struct zinput *inp); void zinput_calibrate(struct zinput *inp, int swap_xy, int x_res, int y_res, int x_min, int x_max, int y_min, int y_max); void zinput_register_touchscreen_sdl(struct zinput *inp); void zinput_read_handler(void *xxx); #endif libzia-4.67/include/zsha1.h0000644000175000017500000000113114662101502012460 00000000000000#ifndef __ZSHA1_H #define __ZSHA1_H #include /* SHA-1 in C By Steve Reid 100% Public Domain */ #include "stdint.h" typedef struct { uint32_t state[5]; uint32_t count[2]; unsigned char buffer[64]; } zsha1_ctx; void zsha1_transform(uint32_t state[5], const unsigned char buffer[64]); void zsha1_init(zsha1_ctx * context); void zsha1_update(zsha1_ctx * context, const unsigned char *data, uint32_t len); void zsha1_final(unsigned char digest[20], zsha1_ctx * context); void zsha1(char *hash_out, const char *str, int len); #endif /* SHA1_H */ libzia-4.67/include/zasyncdns.h0000644000175000017500000000221414662101502013451 00000000000000/* zasyncdns.h - asynchronous DNS queries Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZASYNCDNS_H #define __ZASYNCDNS_H #include #include #include struct zselect; struct zasyncdns{ struct zselect *zsel; char *hostname; void *arg; int socktype; GThread *thread; void (*callback)(struct zasyncdns *adns, int n, int *family, int *socktype, int *protocol, int *addrlen, union zsockaddr *addr, char *errorstr); }; struct zasyncdns *zasyncdns_init(void); void zasyncdns_free(struct zasyncdns *adns); struct zasyncdns *zasyncdns_getaddrinfo( struct zasyncdns *adns, struct zselect *zsel, void (*callback)(struct zasyncdns *adns, int n, int *family, int *socktype, int *protocol, int *addrlen, union zsockaddr *addr, char *errorstr), char *hostname, int socktype, void *arg); void zasyncdns_read_handler(int n, char *items[]); #endif libzia-4.67/include/ztime.h0000644000175000017500000000267014662101502012573 00000000000000/* portable time functions Copyright (C) 2009-2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZTIME_H #define __ZTIME_H #include #ifdef Z_HAVE_TIME_H #include #endif #ifdef Z_HAVE_SYS_TIME_H #include #endif #ifndef Z_HAVE_SYS_TIME_H int gettimeofday(struct timeval *tv, void *dummy); #endif #ifdef Z_MSC_MINGW struct tm *gmtime_r(time_t *timep, struct tm *result); struct tm *localtime_r(time_t *timep, struct tm *result); time_t timegm(struct tm *tm); int settimeofday(const struct timeval *tv, const void *zone); #endif #define ZTIMEOUT_MOD 10000000 int ztimeout_init(int timeout_ms); int ztimeout_occured(int tmo); int ztimeout_diff_ms(int *tmo); //int ztimeout_test(int tmo, int i, int res); /* usage: int tmo = ztimeout_init(miliseconds); while(!z_timeout_occured(tmo)) { do_something(); } */ int zst_start(void); int zst_stop(int reltime, const char *text); void ST_START(void); void ST_STOP(const char *text); /* usage: int st = zst_start(); .... st = zst_stop(st, "prvni"); .... zst_stop(st, "druhy"); or ST_START(); ... ST_STOP("prvni"); ... ST_STOP("druhy"); */ double z_difftimeval_double(struct timeval *stop, struct timeval *start); char *z_format_hms(char *s, int len, time_t t); #endif libzia-4.67/include/zstr.h0000644000175000017500000001143714662101502012446 00000000000000/* string utilities Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSTR_H #define __ZSTR_H #include #include #include #include gint z_compare_string (gconstpointer a, gconstpointer b); char *z_strstr(const char *, const char *); char *z_strcasestr(const char *phaystack, const char *pneedle); int z_levenshtein(const char *s, const char*t); char *z_string_hex(GString *gs, char *data, int len); static inline char z_char_uc(char a) { if (a >= 'a' && a <= 'z') a -= 0x20; return a; } static inline char z_char_lc(char a) { if (a >= 'A' && a <= 'Z') a += 0x20; return a; } static inline char *z_str_lc(char *str){ register char *c; if (!str) return str; for (c = str; *c != '\0'; c++){ if (*c >= 'A' && *c <= 'Z') *c += 0x20; } return str; } static inline char *z_str_uc(char *str){ register char *c; if (!str) return str; for (c = str; *c != '\0'; c++){ if (*c >= 'a' && *c <= 'z') *c -= 0x20; } return str; } static inline char *z_strlcpy(gchar *dest, const gchar *src, gsize dest_size){ if (src == NULL){ g_strlcpy(dest, "", dest_size); }else{ g_strlcpy(dest, src, dest_size); } return dest; } static inline char *z_char_replace(char *src, char find, char replacewith){ char *c; for (c = src; *c != '\0'; c++){ if (*c == find) *c = replacewith; } return src; } #ifdef Z_MSC #define strtok_r strtok_s #endif #ifdef Z_MINGW char *strtok_r(char *str, const char *delim, char **saveptr); #endif char *z_strip_crlf(char *str); char *z_strip_from(char *str, char charfrom); char *z_1250_to_8859_2(char *src); void *z_strtop(const char *str); #ifndef Z_HAVE_G_STRING_APPEND_VPRINTF void g_string_append_vprintf(GString *gs, const gchar *format, va_list args); #endif double z_qrg_parse(const char *s); void z_qrg_format(char *s, int size, double qrg); char *z_html2txt(char *html); #define ZSR_ALL 0x01 // all occurences #define ZSR_CI 0x02 // case insensitive // returns last replace position int z_string_replace(GString *gs, char *pattern, char *newstr, int flags); int z_string_replace_from_to(GString *gs, char *from, char *to, char *newstr, int flags); #ifdef Z_MSC_MINGW #define strcasecmp _stricmp #define strncasecmp _strnicmp #endif static inline char *z_trim(char *s){ char *c; if (!s || !*s) return s; for (c = s + strlen(s) - 1; c > s; c--) { if (!isspace((unsigned char)*c)) break; *c = '\0'; } for (c = s; *c != '\0'; c++) if (!isspace((unsigned char)*c)) break; if (c[0] == '\xef' && c[1] == '\xbb' && c[2] == '\xbf'){ for (c += 3; *c != '\0'; c++) if (!isspace((unsigned char)*c)) break; } return c; } static inline char *z_trim_end(char *s){ char *c; if (!s || !*s) return s; for (c = s + strlen(s) - 1; c >= s; c--) { if (!isspace((unsigned char)*c)) break; *c = '\0'; } return s; } static inline const char *z_trim_beg(const char *s){ const char *c; for (c = s; *c != '\0'; c++) if (!isspace((unsigned char)*c)) break; if (c[0] == '\xef' && c[1] == '\xbb' && c[2] == '\xbf'){ for (c += 3; *c != '\0'; c++) if (!isspace((unsigned char)*c)) break; } return c; } static inline gchar *z_strdup_trim(gchar *s){ char *c1, *c2; c1 = g_strdup(s); c2 = g_strdup(z_trim(c1)); g_free(c1); return c2; } // can move string to left static inline void z_trim_white(char* s) { char* c; if (!s || !*s) return; for (c = s + strlen(s) - 1; c > s; c--) { if (!isspace((unsigned char)*c)) break; *c = '\0'; } for (c = s; *c != '\0' && isspace((unsigned char)*c); c++); if (c != s) memmove(s, c, strlen(c) + 1); } // can move string to left static inline void z_trim_char(char* s, char ch) { char* c; if (!s || !*s) return; for (c = s + strlen(s) - 1; c > s; c--) { if (*c != ch) break; *c = '\0'; } for (c = s; *c != '\0' && *c == ch; c++); if (c != s) memmove(s, c, strlen(c) + 1); } #define ZSPL_NSTRIP 0x01 void z_split2(char *src, char delimiter, char **key, char **val, int flags); int zstr_begins_with(const char *haystack, const char *needle, int casesensitive); static inline char *z_trimdup(const char *src){ return z_trim_end(g_strdup(z_trim_beg(src))); } char *zstr_shorten(const char *src, int maxlen); void z_string_bytes(GString *gs, long long bytes); void z_strtok_csv_simple(GString *gs, GString *token); void zg_string_trim(GString *gs); gpointer zg_memdup(gconstpointer mem, gsize byte_size); #endif libzia-4.67/include/zdebug.h0000644000175000017500000000271714662101502012725 00000000000000 /* zdebug.h - debugging functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZDEBUG_H #define __ZDEBUG_H #include #include #include #include #include extern char *debug_msg_title; void zdebug_init(int argc, char *argv[], void (*free_callback)(void), void (*trace_callback)(char *), char *msg_title); void zdebug_free(void); void z_g_log_func(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data); void z_alsa_error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...); int zdebug_debug_type(void); void dbg(char *m, ...); void error(char *m, ...); void trace(int enable, char *m, ...); void zinternal_error(char *file, int line, char *, ...); #ifdef __GNUC__ #define zinternal(m...) zinternal_error(__FILE__, __LINE__, m) #else #define zinternal(m, ...) zinternal_error(__FILE__, __LINE__, m, __VA_ARGS__) #endif #ifdef __GNUC__ static inline void zforce_dump(void) { #ifdef Z_ANDROID error("%s\n", "Forcing core dump"); #else error("\n\033[1m%s\033[0m\n", "Forcing core dump"); #endif // fflush(stderr); raise(SIGSEGV); exit(1); } #endif void zhexdump(void *buf, size_t len, const char *desc); #endif libzia-4.67/include/zfhs.h0000644000175000017500000000076114662101502012414 00000000000000/* zfhs.h - header for zfhs.c Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __FHS_H #define __FHS_H #include int zfhs_lock(const char *device, int ignore_stale); int zfhs_unlock(const char *device); char *zfhs_strdup_error(int err, const char *device); #endif libzia-4.67/include/zserial.h0000644000175000017500000000677414662101502013125 00000000000000/* zserial - portable serial port api Copyright (C) 2011-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSERIAL_H #define __ZSERIAL_H #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #include enum zserial_type{ ZSERTYPE_TTY, ZSERTYPE_FTDI, ZSERTYPE_WIN32, ZSERTYPE_TCP, ZSERTYPE_PROC_WIN32, ZSERTYPE_PROC_PTY, ZSERTYPE_PROC_PIPE }; struct zserial_port{ char *filename; char *desc; }; struct zserial{ enum zserial_type type; GString *errorstr; char *id; int baudrate; int bits; char parity; int stopbits; #ifdef Z_HAVE_TERMIOS_H int fd; int locked; #endif #ifdef Z_HAVE_LIBFTDI int vid; struct ftdi_context *ftdi; char *serial; #endif #ifdef Z_MSC_MINGW HANDLE handle; HANDLE prochandle, procstdin, procstdout; #endif #if defined(Z_HAVE_TERMIOS_H) || defined(WIN32) || defined(Z_ANDROID) char *filename; #endif GThread *thread; int thread_break; int pipefds[2]; char *cmd, *arg; int pid; #ifdef Z_HAVE_PTY_H int master; #endif int read_fd; // stdout and stderr of child int write_fd; // stdin of child char *hostname; int port; int sock; int opened; int (*zs_open)(struct zserial *zser); int (*zs_read)(struct zserial *zser, void *data, int len, int timeout_ms); int (*zs_write)(struct zserial *zser, void *data, int len); int (*zs_close)(struct zserial *zser); int (*zs_dtr)(struct zserial *zser, int on); int (*zs_rts)(struct zserial *zser, int on); int (*zs_detect)(struct zserial *zser); int nolocks; GPtrArray *ports; // detected zserial_ports MUTEX_DEFINE(close3); }; struct zserial *zserial_init(void); struct zserial *zserial_init_tty(const char *filename); struct zserial *zserial_init_ftdi(const int vid, const int pid, char *serial); struct zserial *zserial_init_win32(const char *filename); struct zserial *zserial_init_tcp(const char *hostname, const int tcpport); struct zserial *zserial_init_proc_win32(const char *cmd, const char *arg); struct zserial *zserial_init_proc_pty(const char *cmd, const char *arg); struct zserial *zserial_init_proc_pipe(const char *cmd, const char *arg); struct zserial *zserial_init_serial(const char *device); struct zserial *zserial_init_process(const char *cmd, const char *arg); void zserial_set_line(struct zserial *zser, int baudrate, int bits, char parity, int stopbits); int zserial_open(struct zserial *zser); int zserial_is_opened(struct zserial* zser); int zserial_read(struct zserial *zser, void *data, int len, int timeout_ms); int zserial_write(struct zserial *zser, void *data, int len); int zserial_close(struct zserial *zser); void zserial_free(struct zserial *zser); const char *zserial_errorstr(struct zserial *zser); void zserial_clear_errorstr(struct zserial *zser); /* nastavi DTR (DB9 = pin 4) */ int zserial_dtr(struct zserial *zser, int on); /* nastavi RTS (DB9 = pin 7) */ int zserial_rts(struct zserial *zser, int on); int zserial_fd(struct zserial *zser); const char *zserial_id(struct zserial *zser); int zserial_prot(struct zserial *zser, char saddr, char fce, char *data, int *len, int timeout); void zserial_nolocks(struct zserial *zser, int nolocks); int zserial_detect(struct zserial *zser); #endif libzia-4.67/include/zavgfilter.h0000644000175000017500000000126714662101502013621 00000000000000/* zavgfilter.h - Header for extreme filter/averager Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZAVGFILTER_H #define __ZAVGFILTER_H #include #define _USE_MATH_DEFINES // for MSVC #include double zavg(double *data, int cnt); double zavgfilter(double *data, int incnt, int outcnt, int step); double zstddev(double *data, int cnt); double zminimum(double *data, int cnt); double zmaximum(double *data, int cnt); void zavgfilter_test(void); #endif libzia-4.67/include/zjson.h0000644000175000017500000000537614662101502012614 00000000000000#ifndef __ZJSON_H #define __ZJSON_H #include #include #include #include struct zjson{ const char *aa; // FK GString *gs; const char *type; const char *c; int level; }; void zjson_begin_object(struct zjson *json); void zjson_begin_array(struct zjson *json); void zjson_end(struct zjson *json); void zjson_concatEscaped(struct zjson *json, const char *str); void zjson_add_private(struct zjson *json, const char *key, const char *value, bool asStr, bool raw); void zjson_add_str(struct zjson *json, const char *key, const char *value); void zjson_add_c(struct zjson *json, const char *key, const char value); void zjson_add_bool(struct zjson *json, const char *key, const bool value); void zjson_add_int(struct zjson *json, const char *key, const int value); void zjson_add_long(struct zjson *json, const char *key, const long value); void zjson_add_epoch(struct zjson *json, const char *key, time_t value, unsigned int places); #ifdef Z_UNIX_ANDROID void zjson_add_sql(struct zjson *json, const char *key, time_t value); #endif void zjson_add_float(struct zjson *json, const char *key, const float value, unsigned int places); void zjson_add_double(struct zjson *json, const char *key, const double value, unsigned int places); void zjson_add_json(struct zjson *json, const char *key, const struct zjson *src); void zjson_add_mac(struct zjson *json, const char *key, const uint8_t *mac); void zjson_addln(struct zjson *json); struct zjson *zjson_init(const char *src); void zjson_begin(struct zjson *json, const char *src); void zjson_free(struct zjson *json); void zjson_init_parse(struct zjson *json); char *zjson_get1(struct zjson *json, bool escape); char *zjson_get_private(struct zjson *json, const char *key, bool escape); char *zjson_get_str(struct zjson *json, const char *key, const char *def); char zjson_get_c(struct zjson *json, const char *key, char def); bool zjson_get_bool(struct zjson *json, const char *key, bool def); int zjson_get_int(struct zjson *json, const char *key, int def); long zjson_get_long(struct zjson *json, const char *key, long def); uint8_t *zjson_get_mac(struct zjson *json, const char *key, const uint8_t *def); time_t zjson_get_epoch(struct zjson *json, const char *key, time_t def); //#ifdef Z_UNIX_ANDROID //time_t zjson_get_sql(struct zjson *json, const char *key, time_t def); //#endif float zjson_get_float(struct zjson *json, const char *key, float def); double zjson_get_double(struct zjson *json, const char *key, double def); struct zjson *zjson_get_object(struct zjson *json, const char *key); struct zjson *zjson_get_array(struct zjson *json, const char *key); int zjson_array_length(struct zjson *json); void zjson_test(void); #endiflibzia-4.67/include/android/0000755000175000017500000000000014752603141012773 500000000000000libzia-4.67/include/android/Makefile.in0000644000175000017500000003210014752576426014773 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/android ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = zconfig.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/zconfig.h.in \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = zconfig.h zconfig.h.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/android/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/android/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): zconfig.h: $(top_builddir)/config.status $(srcdir)/zconfig.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libzia-4.67/include/android/Makefile.am0000644000175000017500000000010114662101501014730 00000000000000datarootdir = @datarootdir@ EXTRA_DIST = zconfig.h zconfig.h.in libzia-4.67/include/android/zconfig.h0000644000175000017500000000171414752602550014531 00000000000000#ifndef __ZCONFIG_H #define __ZCONFIG_H // // This file zconfig.h is generated from zconfig.h.in ! // #define Z_PACKAGE "libzia" #define Z_VERSION "4.67" #define Z_PACKAGE_NAME Z_PACKAGE #define Z_PACKAGE_VERSION Z_VERSION #include #define Z_HAVE_SDL #define Z_HAVE_SDL1 #define Z_HAVE_SDL_TTF #define Z_HAVE_LIBPNG #define Z_HAVE_TIME_H #define Z_HAVE_LIBFTDIx #define Z_HAVE_GETADDRINFO #define Z_HAVE_ERRNO_H #define Z_HAVE_G_HASH_TABLE_REMOVE_ALL #define Z_HAVE_G_STRING_APPEND_VPRINTF #define Z_HAVE_SYS_SOCKET_H #define Z_HAVE_NETINET_IN_H #define Z_HAVE_NETDB_H #define Z_HAVE_DIRENT_H #define Z_HAVE_ARPA_INET_H #define Z_STRERROR_R_RETURNS_INT #define Z_HAVE_SYS_SELECT_H #define Z_HAVE_SYS_TIME_H #define Z_HAVE_FCNTL_H #define Z_HAVE_SYS_IOCTL_H #define Z_HAVE_ANDROID_LOG_H #define Z_HAVE_GETOPT_H #define Z_HAVE_UNISTD_H #define Z_HAVE_TERMIOS_H #undef Z_HAVE_GNUTLS #define Z_HAVE_OPENSSL #endif libzia-4.67/include/android/zconfig.h.in0000644000175000017500000000173414662101501015126 00000000000000#ifndef __ZCONFIG_H #define __ZCONFIG_H // // This file zconfig.h is generated from zconfig.h.in ! // #define Z_PACKAGE "@PACKAGE@" #define Z_VERSION "@PACKAGE_VERSION@" #define Z_PACKAGE_NAME Z_PACKAGE #define Z_PACKAGE_VERSION Z_VERSION #include #define Z_HAVE_SDL #define Z_HAVE_SDL1 #define Z_HAVE_SDL_TTF #define Z_HAVE_LIBPNG #define Z_HAVE_TIME_H #define Z_HAVE_LIBFTDIx #define Z_HAVE_GETADDRINFO #define Z_HAVE_ERRNO_H #define Z_HAVE_G_HASH_TABLE_REMOVE_ALL #define Z_HAVE_G_STRING_APPEND_VPRINTF #define Z_HAVE_SYS_SOCKET_H #define Z_HAVE_NETINET_IN_H #define Z_HAVE_NETDB_H #define Z_HAVE_DIRENT_H #define Z_HAVE_ARPA_INET_H #define Z_STRERROR_R_RETURNS_INT #define Z_HAVE_SYS_SELECT_H #define Z_HAVE_SYS_TIME_H #define Z_HAVE_FCNTL_H #define Z_HAVE_SYS_IOCTL_H #define Z_HAVE_ANDROID_LOG_H #define Z_HAVE_GETOPT_H #define Z_HAVE_UNISTD_H #define Z_HAVE_TERMIOS_H #undef Z_HAVE_GNUTLS #define Z_HAVE_OPENSSL #endif libzia-4.67/include/libzia.h0000644000175000017500000000276514662101502012722 00000000000000/* libzia.h - header file for application Copyright (C) 2013-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __LIBZIA_H #define __LIBZIA_H #ifdef _MSC_VER #pragma warning(error:4013) #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_UNIX #include #include #include #include #include #endif #endif libzia-4.67/include/Makefile.am0000644000175000017500000000163014662101502013321 00000000000000datarootdir = @datarootdir@ SUBDIRS = android msvc unix library_includedir = $(includedir)/libzia library_include_HEADERS = \ eprintf.h \ libzia.h \ libziaint.h \ regex_.h \ zglib.h \ zandroid.h \ zasyncdns.h \ zavgfilter.h \ zbat.h \ zbfd.h \ zbinbuf.h \ zbus.h \ zcall.h \ zchart.h \ zclip.h \ zcor.h \ zdebug.h \ zdht11.h \ zdir.h \ zdump.h \ zerror.h \ zfhs.h \ zfile.h \ zfiledlg.h \ zftdi.h \ zgetopt.h \ zghash.h \ zgpio.h \ zgptrarray.h \ zhash.h \ zhttp.h \ zhttpd.h \ zi2c.h \ zia.h \ ziconv.h \ zifaces.h \ zinput.h \ zjson0.h \ zjson.h \ zloc.h \ zlist.h \ zmd5.h \ zmisc.h \ zmsgbox.h \ zpath.h \ zpng.h \ zptrarray.h \ zrc.h \ zsha1.h \ zsdl.h \ zselect.h \ zserial.h \ zspidev.h \ zspigpio.h \ zssd1306.h \ zsvnversion.h \ zsock.h \ zstr.h \ zsun.h \ zthread.h \ ztime.h \ zver.h EXTRA_DIST = regex_internal.h CLEANFILES = zsvnversion.tmp libzia-4.67/include/zcall.h0000644000175000017500000000114614662101502012545 00000000000000/* ham callsign functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZCALL_H #define __ZCALL_H #include char *z_get_raw_call(char *buf, const char *call); int z_call_is_rover(const char *callsign); char *z_suffix(char *call); #define ZCBC_SLASH 1 #define ZCBC_MINUS 2 int z_can_be_call_char(const char c, int flags); int z_can_be_call(const char *call, int flags); #endif libzia-4.67/include/zver.h0000644000175000017500000000064714662101502012433 00000000000000/* svnver - keeps and reports SVN revision number Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZVER_H #define __ZVER_H // exports libzia svn version to application const char *z_svnver(void); #endif libzia-4.67/include/zmsgbox.h0000644000175000017500000000107714662101502013134 00000000000000/* zmsgbox.c - portable messagebox Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZMSGBOX_H #define __ZMSGBOX_H #include #define ZMB_CANCEL 0 #define ZMB_OK 1 #define ZMB_YES 2 #define ZMB_NO 4 int z_msgbox_info(const char *caption, const char *fmt, ...); int z_msgbox_error(const char *caption, const char *fmt, ...); #endif libzia-4.67/include/zerror.h0000644000175000017500000000164714662101502012771 00000000000000/* zerror.h - header for zerror.c Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZERROR_H #define __ZERROR_H #include #include #include #ifdef Z_MSC_MINGW char *strerror_r(int err_no, char *buf, size_t size); #endif char *z_strdup_strerror(int err); void z_strerror(GString *gs, int err); #ifdef Z_MSC_MINGW_CYGWIN void z_lasterror(GString *gs); void z_lasterror_e(GString *gs, int err); #endif const char *z_host_error(void); #ifdef Z_MSC_MINGW #define z_sock_errno WSAGetLastError() #else #define z_sock_errno errno #endif #define z_sock_strerror() z_sock_strerror_func(err, errbuf, sizeof(errbuf)) const char *z_sock_strerror_func(int err, char *errbuf, int size); #endif libzia-4.67/include/zifaces.h0000644000175000017500000000215414662101502013064 00000000000000/* interfaces - network interfaces detection Copyright (C) 2002-20011 Ladislav Vaiz and authors of samba www.samba.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef _ZIFACES_H #define _ZIFACES_H #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_ARPA_INET_H #include #endif #include #define ZIFACE_NAME_SIZE 16 struct ziface_struct { char name[16]; struct in_addr ip; struct in_addr netmask; unsigned char mac[6]; }; int zifaces_get(struct ziface_struct *ifaces, int max_interfaces, int up_only); // 1 if input address is from local network int ziface_is_local(struct in_addr ia); struct zwifi_stat{ uint8_t raw_level, raw_noise, raw_qual, raw_updated; uint8_t raw_max_qual; int quality_percent, level_dbm; }; int ziface_wifi_stats(struct zwifi_stat *stat, char *devname, int clear); char *ziface_macid(const char *namestarts); #endif libzia-4.67/include/zhttpd.h0000644000175000017500000000653114662101502012760 00000000000000/* zhttpd.h - Simple HTTP daemon Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZHTTPD_H #define __ZHTTPD_H #define ZWS_CONTINUE 0x00 #define ZWS_TEXT 0x01 #define ZWS_BINARY 0x02 #define ZWS_CLOSE 0x08 #define ZWS_PING 0x09 #define ZWS_PONG 0x0a #include #include #include #include #include struct zhttpconn; struct zhttpd{ struct zselect *zsel; int port; int sock; GPtrArray *bindings; // of struct zhttpdbinding GPtrArray *conns; GMutex *conns_mutex; void(*conn_new)(struct zhttpconn *conn); void(*conn_close)(struct zhttpconn *conn); }; struct zhttpheader{ char *key, *value; }; struct zhttpconn{ struct zhttpd *zhttpd; int sock; GString *request; MUTEX_DEFINE(response); int response_i; struct zbinbuf *response; struct sockaddr_in peer; GPtrArray *response_headers; int status; char *req_path; char *req_args; char *req_data; GPtrArray *memlist; struct zhttpdbinding *binding; int is_ws; struct zbinbuf *wsbuf; int ws_ping_timer_id; int is_stream; void *user_data; }; struct zhttpdbinding{ struct zhttpd *zhttpd; GRegex *regex; void (*handler)(struct zhttpconn *conn); // for file binding char *file_docroot; // for websockets binding void (*ws_onmessage)(struct zhttpconn *conn, int opcode, char *buf0, int len); }; struct zhttpd *zhttpd_init(struct zselect *zsel, int port, int loopback); void zhttpd_handlers(struct zhttpd *httpd, void(*conn_new)(struct zhttpconn *conn), void(*conn_close)(struct zhttpconn *conn)); void zhttpd_free(struct zhttpd *zhttpd); void zhttpd_free_conn(struct zhttpconn *conn); void zhttpd_close_conn(struct zhttpconn *conn); void zhttpd_free_binding(struct zhttpdbinding *b); void zhttpd_free_header(struct zhttpheader *header); void zhttpd_accept_handler(void *arg); void zhttpd_read_handler(void *arg); void zhttpd_write_handler(void *arg); //int zhttpd_flush(struct zhttpconn *conn); void zhttpd_write_response_header(struct zhttpconn *conn); void zhttpd_response(struct zhttpconn *conn, int status, char *contenttype); void zhttpd_add_header(struct zhttpconn *conn, char *header, char *value); void zhttpd_get(struct zhttpconn *conn); void zhttpd_post(struct zhttpconn *conn); struct zhttpdbinding *zhttpd_add_binding(struct zhttpd *zhttpd, char *regex, void (*handler)(struct zhttpconn *conn)); char *zhttpd_arg(struct zhttpconn *conn, char *key, char *def); int zhttpd_arg_int(struct zhttpconn *conn, char *key, int def); void zhttpd_file_handler(struct zhttpconn *conn); void zhttpd_ws_handshake_handler(struct zhttpconn *conn); void zhttpd_ws_read_handler(void *arg); char *zhttpd_get_header(struct zhttpconn *conn, char *header, char *def); void zhttpd_ws_send(struct zhttpconn *conn, int opcode, char *s, int len); void zhttpd_ws_send_all(struct zhttpd *zhttpd, int opcode, char *s, int len); void zhttpd_ws_ping_timer(void *arg); void zhttpd_write(struct zhttpconn *conn, const void *data, int len); int http_response_buf_len(struct zhttpconn *conn); #endif libzia-4.67/include/zspigpio.h0000644000175000017500000000066314662101502013307 00000000000000/* zspidev.c - SPI over spidev Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ struct zgpio; struct zbusdev *zspigpio_init(struct zgpio *sclk, struct zgpio *mosi, struct zgpio *miso, struct zgpio *ss, int sleep_us, int sspol); libzia-4.67/include/zbfd.h0000644000175000017500000000332114662101502012362 00000000000000/* Binary symbols lookup Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZBFD_H #define __ZBFD_H #include #ifdef Z_HAVE_LIBBFD #include #endif #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #ifdef Z_MSC_MINGW #ifdef Z_HAVE_DBGHELP_H #include "dbghelp.h" #else #include #endif #endif #ifdef Z_MSC_MINGW typedef BOOL (WINAPI *T_SymFromAddr)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO); typedef BOOL (WINAPI *T_StackWalk64)(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID, PREAD_PROCESS_MEMORY_ROUTINE64 , PFUNCTION_TABLE_ACCESS_ROUTINE64, PGET_MODULE_BASE_ROUTINE64, PTRANSLATE_ADDRESS_ROUTINE64); typedef BOOL (WINAPI *T_SymInitialize)(HANDLE, PCSTR, BOOL); #endif struct zbfd{ GString *errstr; const char *filename; const char *functionname; unsigned int line; long offset; #ifdef Z_HAVE_LIBBFD bfd *bfd; int found; bfd_vma pc; struct bfd_symbol **syms; #endif #ifdef Z_MSC_MINGW SYMBOL_INFO *symbol; #endif #ifdef Z_MSC_MINGW T_SymFromAddr SymFromAddr; #endif #if defined(Z_MINGW) || defined (Z_UNIX) FILE *dbin, *dzia; void *ziacodebase; char dsym[256]; #endif }; struct zbfd *zbfd_init(void); void zbfd_free(struct zbfd *zbfd); int zbfd_open(struct zbfd *zbfd, char *filename, char *appddir); int zbfd_lookup(struct zbfd *zbfd, void *addr); int z_backtrace(void **buffer, int size, void *vex, void *ctx, int level); #endif libzia-4.67/include/zgptrarray.h0000644000175000017500000000121514662101502013642 00000000000000/* zgptrarray.h - libzia extensions for glib's GPtrArray Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZGPTRARRAY_H #define __ZGPTRARRAY_H #include #include void zg_ptr_array_free_all(GPtrArray *array); void zg_ptr_array_free_items(GPtrArray *array); void zg_ptr_array_qsort (GPtrArray *farray, int (*compar)(const void *, const void *)); int zg_ptr_array_find_str(GPtrArray *array, char *needle); #endif libzia-4.67/include/zptrarray.h0000644000175000017500000000613714662101502013503 00000000000000 /* zptrarray.h - extended GPtrArray from glib Copyright (C) 2002-2013 Ladislav Vaiz and authors of glib www.gtk.org */ /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GLib Team and others 1997-1999. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef _ZPTRARRAY_H #define _ZPTRARRAY_H #include #include typedef struct _ZPtrArray ZPtrArray; struct _ZPtrArray { gpointer *pdata; guint len; }; /*void init_zptrarray(void); void free_zptrarray(void); */ #define z_ptr_array_index(array,index) (array->pdata)[index] ZPtrArray* z_ptr_array_new (void); void z_ptr_array_free (ZPtrArray *array, gboolean free_seg); void z_ptr_array_free_all(ZPtrArray *array); void z_ptr_array_set_size (ZPtrArray *array, gint length); gpointer z_ptr_array_remove_index (ZPtrArray *array, guint index); gpointer z_ptr_array_remove_index_fast (ZPtrArray *array, guint index); gboolean z_ptr_array_remove (ZPtrArray *array, gpointer data); gboolean z_ptr_array_remove_fast (ZPtrArray *array, gpointer data); void z_ptr_array_add (ZPtrArray *array, gpointer data); void z_ptr_array_insert (ZPtrArray *array, gpointer data, guint index); #define zg_ptr_array_foreach(type, var, array) \ int var##_i; \ type var; \ for (var##_i = 0, var = var##_i < (array)->len ? (type)g_ptr_array_index(array, var##_i) : NULL; var##_i < (array)->len; var##_i++, var = (type)g_ptr_array_index(array, var##_i)) #define zg_ptr_array_foreachback(type, var, array) \ int var##_i; \ type var; \ for (var##_i = array->len - 1, var = var##_i >= 0 ? (type)g_ptr_array_index(array, var##_i) : NULL; var##_i >= 0; var##_i--, var = (type)g_ptr_array_index(array, var##_i)) void z_ptr_array_qsort (ZPtrArray *farray, int (*compar)(const void *, const void *)); void z_ptr_array_uniq (ZPtrArray *farray, int (*compar)(const void *, const void *), int free_dups); gpointer *z_ptr_array_bsearch(ZPtrArray *farray, const void *key, int (*compar)(const void *, const void *)); gint z_ptr_array_bsearch_index(ZPtrArray *farray, const void *key, int (*compar)(const void *, const void *)); #endif libzia-4.67/include/zbus.h0000644000175000017500000000244614662101502012427 00000000000000/* zbus.h - header for buses (i2c, spi) Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZBUS_H #define __ZBUS_H #include struct zbusdev{ int busnr; char *filename; int fd; int (*free)(struct zbusdev *dev); int (*write)(struct zbusdev *dev, void *buf, size_t len); int (*read)(struct zbusdev *dev, void *buf, size_t len); int (*read_regs)(struct zbusdev *dev, unsigned char addr, void *buf, size_t len); // i2c int slave; // spidev int cs; // spigpio struct zgpio *sclk; struct zgpio *mosi; struct zgpio *miso; struct zgpio *ss; int sleep_us; int sspol; // 0 = normal, 1 = inverted }; // low-level int zbus_free(struct zbusdev *dev); int zbus_write(struct zbusdev *dev, void *buf, size_t len); int zbus_read(struct zbusdev *dev, void *buf, size_t len); // high-level int zbus_write_reg(struct zbusdev *dev, unsigned char addr, unsigned char value); int zbus_read_reg(struct zbusdev *dev, unsigned char addr); int zbus_read_regs(struct zbusdev *dev, unsigned char addr, void *buf, size_t len); #endif libzia-4.67/include/zrc.h0000644000175000017500000000207214662101502012235 00000000000000/* rc - config file functions Copyright (C) 2007-2009 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZRC_H #define __ZRC_H #include #include struct zrc{ GHashTable *items; }; int zrc_read_file(char *filename); //int zrc_read_files(char *name); //char *zrc_getopt(char *key); void zrc_info(void); char *zrc_str(char *key, char *def); int zrc_int(char *key, int def); double zrc_double(char *key, double def); // current locales char *zrc_strf(char *def, char *fmt, ...); int zrc_intf(int def, char *fmt, ...); void zrc_declare_array(char *key); GPtrArray *zrc_array(char *key); extern char zrc_errstr[100]; void zrc_write_str(FILE *f, char *key, char *value); void zrc_write_int(FILE *f, char *key, int value); void zrc_write_double(FILE *f, char *key, int value, int places); int zrc_save(char *file, void zrc_app_write(FILE *f)); #endif libzia-4.67/include/zftdi.h0000644000175000017500000000071214662101502012556 00000000000000/* ftdi functions Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZFTDI_H #define __ZFTDI_H #ifdef Z_HAVE_FTDI #ifndef Z_HAVE_FTDI_NEW struct ftdi_context *ftdi_new(void); void ftdi_free(struct ftdi_context *ftdi); #endif #endif #endif libzia-4.67/include/zjson0.h0000644000175000017500000000230314662101502012657 00000000000000/* 0bsolete JSON library Copyright (C) 2014-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZJSON0_H #define __ZJSON0_H #include #include #include void zjson0_test(void); // parse char *zjson0_get_str(const char *str, int len, const char *path); int zjson0_get_int(const char *str, int len, const char *path); // create void zjson0_object_start(GString *gs, char *name); void zjson0_object_end(GString *gs); void zjson0_array_start(GString *gs, char *name); void zjson0_array_end(GString *gs); void zjson0_item_int(GString *gs, char *name, int value); void zjson0_item_int64(GString *gs, char *name, int64_t value); void zjson0_item_double(GString *gs, char *name, double value, int places); void zjson0_item_string(GString *gs, char *name, const char *value); void zjson0_item_bool(GString *gs, char *name, int value); void zjson0_item_null(GString *gs, char *name); void zjson0_item_sql(GString *gs, char *name, time_t value); void zjson0_strip(GString *gs); #endif libzia-4.67/include/zthread.h0000644000175000017500000000354014662101502013101 00000000000000/* zthread.h - libzia thread functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZTHREAD_H #define __ZTHREAD_H #include #include #if GLIB_CHECK_VERSION(2, 32, 0) #define MUTEX_INIT(x) g_mutex_init(&x##_mutex); #define MUTEX_FREE(x) {} #else #define MUTEX_INIT(x) x##_mutex = g_mutex_new() #define MUTEX_FREE(x) if (x##_mutex) {g_mutex_free(x##_mutex); x##_mutex = NULL;} #endif #ifdef Z_LEAK_DEBUG_LIST #define MUTEX_DEFINE(x) \ GMutex *x##_mutex; \ char *x##_file; \ int x##_line; #define MUTEX_LOCK(x) { \ g_mutex_lock(x##_mutex); \ x##_file = __FILE__; \ x##_line = __LINE__; \ } #define MUTEX_TRYLOCK(x) { \ g_mutex_trylock(x##_mutex); \ x##_file = __FILE__; \ x##_line = __LINE__; \ } #define MUTEX_UNLOCK(x) g_mutex_unlock(x##_mutex) #elif GLIB_CHECK_VERSION(2, 32, 0) #define MUTEX_DEFINE(x) GMutex x##_mutex #define MUTEX_LOCK(x) g_mutex_lock(&(x##_mutex)) #define MUTEX_TRYLOCK(x) g_mutex_trylock(&(x##_mutex)) #define MUTEX_UNLOCK(x) g_mutex_unlock(&(x##_mutex)) #else #define MUTEX_DEFINE(x) GMutex *x##_mutex #define MUTEX_LOCK(x) g_mutex_lock(x##_mutex) #define MUTEX_TRYLOCK(x) g_mutex_trylock(x##_mutex) #define MUTEX_UNLOCK(x) g_mutex_unlock(x##_mutex) #endif #ifdef Z_MSC // _MINGW error: conflicting types for 'sleep' unsigned int sleep(unsigned sec); #endif #ifdef Z_MSC unsigned int usleep(unsigned usec); #endif #ifndef Z_HAVE_G_THREAD_TRY_NEW GThread *g_thread_try_new(const gchar *name, GThreadFunc func, gpointer data, GError **error); #endif void zg_thread_set_name(char* threadName); int z_cpu_cores(void); int zg_thread_set_priority(int priority); #endif libzia-4.67/include/zsock.h0000644000175000017500000000365414662101502012577 00000000000000/* zsock.h - socket functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZSOCK_H #define __ZSOCK_H #include #ifdef Z_HAVE_SYS_SOCKET_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_NETDB_H #include #endif #ifdef Z_HAVE_NETINET_IN_H #include #endif #ifdef Z_HAVE_WS2TCPIP_H #include #endif /*#ifdef Z_HAVE_W32API_WS2TCPIP_H #include #endif #ifdef Z_HAVE_CYGWIN_IN_H #include #endif*/ #ifdef Z_HAVE_UNISTD_H #include // for close() prototype #endif #include // to have structure with maximal size of supported protocols typedef union zsockaddr{ struct sockaddr sa; struct sockaddr_in in; #ifdef AF_INET6 struct sockaddr_in6 in6; #endif }zsockaddr; #ifdef Z_MSC_MINGW typedef int socklen_t; #endif int z_sock_nonblock(int fd, int nonblock); int z_sock_reuse(int fd, int reuseaddr); int z_sock_broadcast(int fd, int reuseaddr); int z_sock_error(int fd); void *z_sockadr_get_addr(union zsockaddr *sa); int z_sockadr_get_len(union zsockaddr *sa); char *z_sock_ntoa(GString *gs, int family, union zsockaddr *sa); int z_sock_aton(const char *hostname, int port, union zsockaddr *sa); int z_pipe(int fds[2]); #ifdef Z_MSC_MINGW int inet_aton(const char *cp, struct in_addr *inp); #endif int z_sock_wouldblock(int err); int z_sock_printf(int fd, const char *m, ...); #ifdef Z_UNIX_ANDROID #define closesocket close #endif int z_pipe_write(int fd, const void *buf, int count); int z_pipe_read(int fd, void *buf, int count); int z_pipe_close(int fd); void z_sock_set_errno(int err); int z_sock_connect(int sock, union zsockaddr *sa, int timeout_ms); #endif libzia-4.67/include/Makefile.in0000644000175000017500000005461514752576426013372 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(library_include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(library_includedir)" HEADERS = $(library_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs 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@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = android msvc unix library_includedir = $(includedir)/libzia library_include_HEADERS = \ eprintf.h \ libzia.h \ libziaint.h \ regex_.h \ zglib.h \ zandroid.h \ zasyncdns.h \ zavgfilter.h \ zbat.h \ zbfd.h \ zbinbuf.h \ zbus.h \ zcall.h \ zchart.h \ zclip.h \ zcor.h \ zdebug.h \ zdht11.h \ zdir.h \ zdump.h \ zerror.h \ zfhs.h \ zfile.h \ zfiledlg.h \ zftdi.h \ zgetopt.h \ zghash.h \ zgpio.h \ zgptrarray.h \ zhash.h \ zhttp.h \ zhttpd.h \ zi2c.h \ zia.h \ ziconv.h \ zifaces.h \ zinput.h \ zjson0.h \ zjson.h \ zloc.h \ zlist.h \ zmd5.h \ zmisc.h \ zmsgbox.h \ zpath.h \ zpng.h \ zptrarray.h \ zrc.h \ zsha1.h \ zsdl.h \ zselect.h \ zserial.h \ zspidev.h \ zspigpio.h \ zssd1306.h \ zsvnversion.h \ zsock.h \ zstr.h \ zsun.h \ zthread.h \ ztime.h \ zver.h EXTRA_DIST = regex_internal.h CLEANFILES = zsvnversion.tmp all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(library_includedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -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-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-library_includeHEADERS 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: uninstall-library_includeHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-library_includeHEADERS install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-library_includeHEADERS .PRECIOUS: Makefile # 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: libzia-4.67/include/zandroid.h0000644000175000017500000000135214662101502013251 00000000000000/* zandroid.h - header for JNI calls Copyright (C) 2012-2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZANDROID_H #define __ZANDROID_H struct zselect; void zandroid_init(struct zselect *location); void zandroid_update_package(const char *filename); void zandroid_browser(const char *url); void zandroid_get_location(double *h, double *w, int *state); void zandroid_play_wav(const char *filename); void zandroid_ssbd_abort(void); void zandroid_messagebox(const char *caption, const char *str); void zandroid_update_location(void); #endif libzia-4.67/include/zloc.h0000644000175000017500000000256314662101502012413 00000000000000/* zloc.c - WWL functions Copyright (C) 2011-2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZLOC_H #define __ZLOC_H #include #define ZLOC_R_EARTH 6371.2907 double qth(const char *qth,int width); char *compute_wwl4(char *s, double h, double w); char *mkwwl4(char *buf, int w, int h); char *hw2loc(char *buf, double w, double h, int len); char *x2gramin(char *buf, int size, double x, char *signs); int qrbqtf(char *myqth,char *recqth,double *qrb,double *qtf,GString *gs_debug, int flags); int hw2qrbqtf(double h1, double w1, double h2, double w2, double *qrb, double *qtf); void hw2km(double h1, double w1, double h2, double w2, int *kx, int *ky); void hw2km_d(double h1, double w1, double h2, double w2, double *kx, double *ky); void hw2km_f(double h1, double w1, double h2, double w2, float *kx, float *ky); void km2qrbqtf(int kx, int ky, double *qrb, double *qtf); int qrbqtf2hw(double h1, double w1, double qrb, double qtf, double *h2, double *w2); int qsopwr( char *myqth, char *recqth); int qthwr(char *qth,int width); void qrb_qtf_int(char *mywwl, char *wwl, int *qrb_int, int *qtf_int); int iaru_round(double qrb); void z_nearest_wwl(char *s, char *my); #endif libzia-4.67/include/zchart.h0000644000175000017500000000215214662101502012731 00000000000000/* zchart.c - XY charts for debugging Copyright (C) 2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZCHART_H #define __ZCHART_H #include #include #ifdef Z_HAVE_SDL #include struct zchart; struct zchart_val{ double x, y; }; struct zchart_set { struct zchart *chart; GArray *values; char *desc; int color; double minx, maxx, miny, maxy; char *fmt; }; struct zchart { SDL_Surface *surface; SDL_Rect area; int bgcolor; GPtrArray *sets; int mx, my; }; struct zchart *zchart_init(SDL_Surface *surface, SDL_Rect *area, int bgcolor); void zchart_free(struct zchart *); struct zchart_set *zchart_add_set(struct zchart *chart, char *desc, int color); void zchart_add(struct zchart *chart, int set, double x, double y); void zchart_clear(struct zchart *chart); void zchart_redraw(struct zchart *chart); void zchart_mouse(struct zchart *chart, int mx, int my); #endif #endif libzia-4.67/include/msvc/0000755000175000017500000000000014752603141012323 500000000000000libzia-4.67/include/msvc/Makefile.in0000644000175000017500000003205214752576426014331 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/msvc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = zconfig.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/zconfig.h.in \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = zconfig.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/msvc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/msvc/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): zconfig.h: $(top_builddir)/config.status $(srcdir)/zconfig.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libzia-4.67/include/msvc/zconfig.h.in0000644000175000017500000000166414662101501014460 00000000000000#ifndef __ZCONFIG_H #define __ZCONFIG_H // // This file zconfig.h is generated from zconfig.h.in ! // #define Z_PACKAGE "@PACKAGE@" #define Z_VERSION "@PACKAGE_VERSION@" #define Z_PACKAGE_NAME Z_PACKAGE #define Z_PACKAGE_VERSION Z_VERSION #include #define Z_HAVE_SDL #undef Z_HAVE_SDL1 #define Z_HAVE_SDL2 #define Z_HAVE_SDL_TTF #define Z_HAVE_TIME_H #define Z_HAVE_WINDOWS_H #define Z_HAVE_WINSOCK2_H #define Z_HAVE_WS2TCPIP_H #define Z_HAVE_LIBFTDI #define Z_HAVE_IO_H #define Z_HAVE_DIRECT_H #define Z_HAVE_LIBPNG #define Z_HAVE_ZLIB #define Z_HAVE_GETADDRINFO #define Z_HAVE_ERRNO_H #define Z_HAVE_G_HASH_TABLE_REMOVE_ALL #define Z_HAVE_G_STRING_APPEND_VPRINTF #define Z_HAVE_SHLOBJ_H #define Z_HAVE_DBGHELP_H #define Z_HAVE_PSAPI_H #define Z_HAVE_FTDI_USB_GET_STRINGS #define Z_HAVE_SYS_TIMEB_H #define Z_HAVE_GNUTLS #define __attribute__(attr) #define _CRT_SECURE_NO_WARNINGS #endif libzia-4.67/include/msvc/zconfig.h0000644000175000017500000000164414752602550014063 00000000000000#ifndef __ZCONFIG_H #define __ZCONFIG_H // // This file zconfig.h is generated from zconfig.h.in ! // #define Z_PACKAGE "libzia" #define Z_VERSION "4.67" #define Z_PACKAGE_NAME Z_PACKAGE #define Z_PACKAGE_VERSION Z_VERSION #include #define Z_HAVE_SDL #undef Z_HAVE_SDL1 #define Z_HAVE_SDL2 #define Z_HAVE_SDL_TTF #define Z_HAVE_TIME_H #define Z_HAVE_WINDOWS_H #define Z_HAVE_WINSOCK2_H #define Z_HAVE_WS2TCPIP_H #define Z_HAVE_LIBFTDI #define Z_HAVE_IO_H #define Z_HAVE_DIRECT_H #define Z_HAVE_LIBPNG #define Z_HAVE_ZLIB #define Z_HAVE_GETADDRINFO #define Z_HAVE_ERRNO_H #define Z_HAVE_G_HASH_TABLE_REMOVE_ALL #define Z_HAVE_G_STRING_APPEND_VPRINTF #define Z_HAVE_SHLOBJ_H #define Z_HAVE_DBGHELP_H #define Z_HAVE_PSAPI_H #define Z_HAVE_FTDI_USB_GET_STRINGS #define Z_HAVE_SYS_TIMEB_H #define Z_HAVE_GNUTLS #define __attribute__(attr) #define _CRT_SECURE_NO_WARNINGS #endif libzia-4.67/include/msvc/Makefile.am0000644000175000017500000000006414662101501014270 00000000000000datarootdir = @datarootdir@ EXTRA_DIST = zconfig.h libzia-4.67/include/unix/0000755000175000017500000000000014752603141012336 500000000000000libzia-4.67/include/unix/Makefile.am0000644000175000017500000000040314662101502014301 00000000000000datarootdir = @datarootdir@ #library_includedir = $(includedir)/libzia #library_include_HEADERS = zconfig.h DISTCLEANFILES = zconfig.h install: install -m 755 -d $(DESTDIR)$(includedir)/libzia/ install -c -m 644 zconfig.h $(DESTDIR)$(includedir)/libzia/ libzia-4.67/include/unix/Makefile.in0000644000175000017500000003217514752576426014352 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = include/unix ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #library_includedir = $(includedir)/libzia #library_include_HEADERS = zconfig.h DISTCLEANFILES = zconfig.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/unix/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/unix/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -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." 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-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile install: install -m 755 -d $(DESTDIR)$(includedir)/libzia/ install -c -m 644 zconfig.h $(DESTDIR)$(includedir)/libzia/ # 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: libzia-4.67/include/zglib.h0000644000175000017500000000071214662101502012545 00000000000000/* zglib - Includes all glib extension headers Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZGLIB_H #define __ZGLIB_H #include #include #define zg_free0(item) { if (item) { g_free(item); item=NULL; }} #endif libzia-4.67/include/zhttp.h0000644000175000017500000000704014662101502012610 00000000000000 /* zhttp.h - http client Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZHTTP_H #define __ZHTTP_H #include #include #include #include #ifdef Z_HAVE_GNUTLS #include #include #endif #ifdef Z_HAVE_OPENSSL #define OPENSSL_API_COMPAT 30000 #define OPENSSL_NO_DEPRECATED #include #include #include #endif #ifdef Z_HAVE_ZLIB #include #endif enum zhttp_state{ ZHTTPST_NEW, ZHTTPST_DNS, ZHTTPST_CONNECTING, ZHTTPST_TLS_HANDSHAKE, ZHTTPST_REQUEST, ZHTTPST_HEADER, ZHTTPST_DATA, ZHTTPST_DONE, ZHTTPST_ERROR }; struct zhttp{ void (*callback)(struct zhttp *); void *arg; struct zbinbuf *request; struct zbinbuf *response; struct zasyncdns *adns; struct zselect *zsel; char *url; char *errorstr; char *server; char *serveraddr; int port; char *page; int sock; int status; // HTTP status int dataofs; int sent; // sent data int origreqlen; // original length of request enum zhttp_state state; GPtrArray *posts; GHashTable *cookies; GHashTable *headers; char *datastr; // decoded data, freeed with object int connecting_timer_id; int watchdog_timer_id; int watchdog_flag; #if defined(Z_HAVE_GNUTLS) || defined(Z_HAVE_OPENSSL) int istls; #endif #ifdef Z_HAVE_GNUTLS gnutls_session_t session; #endif #ifdef Z_HAVE_OPENSSL SSL_CTX* ctx; SSL* ssl; #endif }; struct zhttp_post_var{ char *name; char *value; char *filename; char *localfilename; }; struct zhttp *zhttp_init(void); void zhttp_free(struct zhttp *http); #define zhttp_free0(http) { zhttp_free(http); http = NULL; } void zhttp_get(struct zhttp *http, struct zselect *zsel, const char *url, void (*callback)(struct zhttp *), void *arg); void zhttp_add_header(struct zhttp *http, const char *name, const char *value); void zhttp_post_free(struct zhttp *http); void zhttp_post_add(struct zhttp *http, const char *name, const char *value); void zhttp_post_add_file_mem(struct zhttp *http, const char *name, const char *filename, const char *value); void zhttp_post_add_file_disk(struct zhttp *http, const char *name, const char *filename, const char *localfilename); void zhttp_post(struct zhttp *http, struct zselect *zsel, const char *url, void (*callback)(struct zhttp *), void *arg); void zhttp_raw(struct zhttp *http, struct zselect *zsel, const char *url, const char *raw_request, void (*callback)(struct zhttp *), void *arg); #ifdef Z_HAVE_ZLIB int zhttp_decode_gzip(struct zhttp* http); #endif void zhttp_status(struct zhttp *http, GString *gs); int zhttp_write_data(struct zhttp *http, const char *filename); void zhttp_store_cookies(struct zhttp *http, const char *data, int len); char *http_get_data(struct zhttp *http); void zhttp_post_json(struct zhttp *http, struct zselect *zsel, const char *url, const char *json, void (*callback)(struct zhttp *), void *arg); #if defined(Z_HAVE_GNUTLS) || defined(Z_HAVE_OPENSSL) void zhttp_init_tls(void); #endif char *http_get_header(struct zhttp *http, const char *header_name); int http_is_content_type(struct zhttp *http, const char *content_type); void zhttp_auth_basic(struct zhttp* http, const char* username, const char* password); #endif libzia-4.67/include/zfile.h0000644000175000017500000000234214662101502012550 00000000000000/* zfile.h - file functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef __ZFILE_H #define __ZFILE_H #include #include #include #include gchar *zfile_fgets(GString *gs, FILE *f, int stripcomment); gchar *zfile_mgets(GString *gs, const char *file, long int *pos, const long int len, int stripcomment); double z_df(const char *filename); #ifndef F_ULOCK # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ # define F_TLOCK 2 /* Test and lock a region for exclusive use. */ # define F_TEST 3 /* Test a region for other processes locks. */ #endif int z_lockf(int fd, int cmd, off_t pos, off_t len); int z_ftruncate(int fd, off_t length); off_t zfile_flen(FILE *f); char *z_format_bytes(char *s, int size, long b); char *z_binary_file_name(void); char *z_libzia_file_name(void **codebase); char *zfile_read_textfile(char *filename); int zfile_printfile(const char *filename, const char *fmt, ...); #endif libzia-4.67/config.guess0000755000175000017500000013623214662101506012175 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2019 Free Software Foundation, Inc. timestamp='2019-07-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2019 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 # 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. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 { 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" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$driver" 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 } # 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 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ "/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 ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-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) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) 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 # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; 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/[-_].*//' | cut -d. -f1,2` ;; 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}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; *:OS108:*:*) echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; 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.*:*) 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) 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 set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) 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 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 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:*:*) 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 ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi else echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*: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 ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) 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 configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-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` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-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. # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; *:Unleashed:*:*) echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" exit ;; esac # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #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 (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 #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #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; } echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&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 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libzia-4.67/install-sh0000755000175000017500000003577614662101506011674 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve 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. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -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 By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # 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 # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_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 && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # 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 "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$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 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libzia-4.67/config.h.in0000644000175000017500000001553614752576442011722 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* backtrace_symbols */ #undef HAVE_BACKTRACE_SYMBOLS /* Define to 1 if you have the header file. */ #undef HAVE_BFD_H /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_CYGWIN_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_DBGHELP_H /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* forkpty */ #undef HAVE_FORKPTY /* ftdi_new */ #undef HAVE_FTDI_NEW /* libftdi contains ftdi_usb_get_strings() */ #undef HAVE_FTDI_USB_GET_STRINGS /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* glib */ #undef HAVE_GLIB /* gnutls */ #undef HAVE_GNUTLS /* gtk */ #undef HAVE_GTK /* g_hash_table_remove_all */ #undef HAVE_G_HASH_TABLE_REMOVE_ALL /* g_string_append_vprintf */ #undef HAVE_G_STRING_APPEND_VPRINTF /* g_thread_try_new */ #undef HAVE_G_THREAD_TRY_NEW /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* libbfd installed */ #undef HAVE_LIBBFD /* libftdi installed */ #undef HAVE_LIBFTDI /* libftdi1 installed */ #undef HAVE_LIBFTDI1 /* libpng */ #undef HAVE_LIBPNG /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_I2C_DEV_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_INPUT_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_SPI_SPIDEV_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_WIRELESS_H /* long long */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PSAPI_H /* pthread_setname_np */ #undef HAVE_PTHREAD_SETNAME_NP /* Define to 1 if you have the header file. */ #undef HAVE_PTY_H /* libSDL2 */ #undef HAVE_SDL /* libSDL1 */ #undef HAVE_SDL1 /* libSDL2 */ #undef HAVE_SDL2 /* libSDL_ttf */ #undef HAVE_SDL_TTF /* Define to 1 if you have the header file. */ #undef HAVE_SHLOBJ_H /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncmpi' function. */ #undef HAVE_STRNCMPI /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PRCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_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_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* have operator typeof */ #undef HAVE_TYPEOF /* uinf32_t */ #undef HAVE_UINT32_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WIN32API_WS2TCPIP_H /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Machine type */ #undef MACHINE /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Platform type */ #undef PLATFORM /* Shared directory */ #undef SHAREDIR /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Configured target name. */ #undef TARGET /* Define to 1 if you can safely include both and . This macro is obsolete. */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* strerror_r returns int not char* */ #undef Z_STRERROR_R_RETURNS_INT libzia-4.67/depcomp0000755000175000017500000005602014672552113011233 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libzia-4.67/aclocal.m40000644000175000017500000015363614752576424011543 00000000000000# generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, [m4_warning([this file was generated for autoconf 2.71. 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'.])]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2021 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.16' 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.16.5], [], [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.16.5])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-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _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. # This creates each '.Po' and '.Plo' makefile fragment that we'll 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" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 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-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) libzia-4.67/missing0000755000175000017500000001533614672552113011262 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libzia-4.67/mkinstalldirs0000755000175000017500000000667214662101506012467 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2020-07-26.22; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "umask 22" umask 22 echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac echo "umask 22" umask 22 for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp=$pathcomp/ done if test ! -z "$dirmode"; then echo "chmod $dirmode $file" chmod "$dirmode" "$file" || errstatus=$? fi done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libzia-4.67/INSTALL0000644000175000017500000003661414662101505010710 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. libzia-4.67/NEWS0000644000175000017500000000000014662101506010333 00000000000000libzia-4.67/libzia.pc.in0000644000175000017500000000047414662101506012056 00000000000000prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: @PACKAGE_NAME@ Description: Sharable and platform-dependent library for Tucnak URL: http://tucnak.nagano.cz Version: @PACKAGE_VERSION@ Cflags: -I${includedir}/libzia Libs: -lzia @LIBS@ Requires.private: @REQPRIVATE@ libzia-4.67/Makefile.am0000644000175000017500000000157414662101505011710 00000000000000datarootdir = @datarootdir@ SUBDIRS = android-old bin data include m4 src MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in stamp-h.in EXTRA_DIST = COPYING INSTALL libzia.pc.in rebuild svnver.sh docsdir = $(datadir)/@PACKAGE_NAME@/doc docs_DATA = AUTHORS ChangeLog TODO pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzia.pc sharedir = $(datadir)/@PACKAGE_NAME@/$(DEB_HOST_MULTIARCH)/ share_DATA = settings ACLOCAL_AMFLAGS = -I m4 CLEANFILES = libzia.so.map nagup: rsync -atuvxz --partial --progress @PACKAGE_NAME@-*.tar.gz ChangeLog ok1zia@nagano.cz::ok1zia/public_html/@PACKAGE_NAME@/ ver: @echo $(VERSION) deb: dpkg-buildpackage -b -rfakeroot -us -uc -tc mv ../libzia_$(VERSION)* . mv ../libzia-dev_$(VERSION)* . lines: (a=`cat src/*.[ch] | wc -l`;\ b=`cat src/regex*.[ch] | wc -l`;\ echo $$(($$a - $$b)) ) cppcheck: cppcheck -f -q --enable=warning . libzia-4.67/README0000644000175000017500000000000014662101506010514 00000000000000libzia-4.67/ltmain.sh0000755000175000017500000121240114672552110011474 00000000000000#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.7 Debian-2.4.7-7~deb12u1" package_revision=2.4.7 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. if test -z "$_G_HAVE_PLUSEQ_OP" && \ __PLUSEQ_TEST="a" && \ __PLUSEQ_TEST+=" b" 2>/dev/null && \ test "a b" = "$__PLUSEQ_TEST"; then _G_HAVE_PLUSEQ_OP=yes fi if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd _G_rc_run_hooks=false case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '_result', escaped # suitably for 'eval'. # # The '_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.7-7~deb12u1 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: _G_rc_lt_options_prep=: # 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 ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_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_arg pretty "$arg" func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. -pthread) case $host in *solaris2*) ;; *) case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac ;; esac continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $func_quote_arg_result" func_append compiler_flags " $func_quote_arg_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_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" func_append compiler_flags " $wl$func_quote_arg_result" func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xassembler) prev=xassembler continue ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_arg pretty "$arg" arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty "$var_value" relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done func_quote eval cd "`pwd`" func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty,unquoted "$var_value" relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. func_quote eval cd "`pwd`" relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: libzia-4.67/rebuild0000755000175000017500000000070214662101506011221 00000000000000#!/bin/bash set -e set -x rm -f config.log config.cache config.h touch config.h.in libtoolize --force --copy aclocal automake --add-missing -c autoreconf ./configure make clean make #aclocal #libtoolize --force --copy #automake --add-missing #automake -c -a # #dirs=`grep ^SUBDIRS Makefile.am|sed 's/.*=//'` #for dir in $dirs; do # echo automake $dir/Makefile # automake $dir/Makefile #done # #autoconf && ./configure && make clean && make libzia-4.67/configure.ac0000644000175000017500000004574214752576420012163 00000000000000AC_INIT([libzia],[4.67]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_SRCDIR(src/eprintf.c) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_RANLIB if test -f "/etc/debian_version"; then echo "TIP: If following test fails, try to run: apt-get install libc6-dev" fi if test -f "/etc/SuSE-release"; then echo "TIP: If following test fails, try to run: yast -i gcc" fi LT_INIT([dlopen]) AC_CONFIG_MACRO_DIR([m4]) dnl Determine default prefix test x$prefix = "xNONE" && prefix="$ac_default_prefix" dnl Locate required external software AC_PROG_CC app_cc_ver=$($CC -dumpversion) # --disable-opt opt='-O2' AC_ARG_ENABLE(opt, [ --disable-opt Disable compiling optimisation (-O0)], disable_opt=yes,disable_opt=no ) if test x"$disable_opt" = x"yes"; then CFLAGS=$(echo "$CFLAGS"|sed 's/-O2/-O0/') opt='-O0' fi # check for platform type case "$host_os" in mingw*) PLATFORM="mingw" ;; *) PLATFORM=$(uname -s | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/') if test $? != 0 ; then PLATFORM="unix" fi ;; esac AC_DEFINE_UNQUOTED([PLATFORM], ["$PLATFORM"], [Platform type]) # check for machine type case "$host_os" in mingw*) MACHINE="i386" ;; *) if test x"$MACHINE" = x"" ; then MACHINE=$(uname -m) fi ;; esac AC_DEFINE_UNQUOTED([MACHINE], ["$MACHINE"], [Machine type]) REQPRIVATE="" AC_MSG_CHECKING([whether linker supports -Wl,-map]) app_ld_wlmap=unchecked case "$host_os" in mingw*) ;; *) OLDLDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Map,libzia.so.map" AC_LINK_IFELSE( [AC_LANG_PROGRAM([],[])], [app_ld_wlmap=yes], [app_ld_wlmap=no]) LDFLAGS=$OLDLDFLAGS rm -f libzia.so.map ;; esac AC_MSG_RESULT([$app_ld_wlmap]) AM_CONDITIONAL([USE_WLMAP], [test "$app_ld_wlmap" = "yes"]) dnl Check for system header files AC_HEADER_STDC AC_CHECK_HEADERS(arpa/inet.h bfd.h cygwin/in.h ctype.h dbghelp.h dirent.h dlfcn.h errno.h execinfo.h fcntl.h getopt.h ifaddrs.h linux/i2c-dev.h linux/input.h linux/spi/spidev.h math.h netdb.h netinet/in.h psapi.h pty.h shlobj.h signal.h stdarg.h stdio.h string.h sys/ioctl.h sys/prctl.h sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h termios.h time.h unistd.h win32api/ws2tcpip.h windows.h winsock2.h ws2tcpip.h) AC_CHECK_HEADERS([linux/wireless.h], [], [], [ #include #include ]) AC_HEADER_TIME app_libc_ver="cross" if test "$cross_compiling" = yes; then xyz="" else AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #ifdef __GLIBC__ #include #endif #include #ifdef __CYGWIN__ #include #endif FILE *f; int main(void){ f=fopen("conftest.libc.out", "wt"); if (!f) return -1; #ifdef __GLIBC__ fprintf(f, "glibc %d.%d (%s)\n", __GLIBC__, __GLIBC_MINOR__, gnu_get_libc_version()); #endif #ifdef __CYGWIN__ fprintf(f, "cygwin %d.%d.%d, api %d.%d\n", CYGWIN_VERSION_DLL_MAJOR/1000, CYGWIN_VERSION_DLL_MAJOR%1000, CYGWIN_VERSION_DLL_MINOR, CYGWIN_VERSION_API_MAJOR, CYGWIN_VERSION_API_MINOR); #endif fclose(f); return 0; } ]])],[ app_libc_ver="yes $(cat conftest.libc.out)"],[],[]) rm -f conftest.libc.out fi dnl AC_CHECK_LIB(m, sin, LIBM="-lm") dnl AC_CHECK_LIB(m, cos, LIBM="-lm") dnl AC_CHECK_LIB(m, tan, LIBM="-lm") dnl AC_CHECK_LIB(m, acos, LIBM="-lm") dnl AC_CHECK_LIB(m, round, LIBM="-lm") dnl LIBS="$LIBS $LIBM" AC_CHECK_FUNCS(strncmpi) AC_CHECK_FUNCS(getaddrinfo) app_mlibs="" app_mdebs="" app_mrpms="" app_olibs="" app_odebs="" app_orpms="" # check for make AC_CHECK_PROG(HAVE_MAKE, make, [yes], [no]) if test x"$HAVE_MAKE" = x"no"; then app_mlibs="$app_mlibs make" app_mdebs="$app_mdebs make" app_mrpms="$app_mrpms make" fi # check for pkg-config AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [yes], [no]) if test x"$HAVE_PKGCONFIG" = x"no"; then app_mlibs="$app_mlibs pkg-config" app_mdebs="$app_mdebs pkg-config" app_mrpms="$app_mrpms pkg-config" fi # check for glib and gthreads app_glib_ver="" HAVE_GLIB="0" PKG_CHECK_MODULES(GLIB, glib-2.0 > 2.30.0, [ AC_DEFINE([HAVE_GLIB], [], [glib]) app_glib="yes" app_glib_ver=$($PKG_CONFIG --modversion 'glib-2.0 > 2.30.0') HAVE_GLIB="1" REQPRIVATE="$REQPRIVATE glib-2.0"], [ app_mlibs="$app_mlibs libglib2" app_mdebs="$app_mdebs libglib2.0-dev" app_mrpms="$app_mrpms glib2-devel" app_glib="no"]) AC_SUBST(HAVE_GLIB) # # check for forkpty # HAVE_FORKPTY="0" AC_CHECK_LIB(util, forkpty, [ AC_DEFINE([HAVE_FORKPTY], [], [forkpty]) HAVE_FORKPTY="1" ]) AC_SUBST([HAVE_FORKPTY]) LIBS="$LIBS -lutil" # # check for gtk # AC_ARG_WITH([gtk], AS_HELP_STRING([--without-gtk], [Build without gtk library for mingw (default: test)])) app_gtk="disabled" app_gtk_ver="" HAVE_GTK="0" if test "x$with_gtk" != "xno"; then PKG_CHECK_MODULES(GTK, gtk+-3.0 > 3.0.0, [ AC_DEFINE([HAVE_GTK], [], [gtk]) app_gtk="yes" app_gtk_ver=$($PKG_CONFIG --modversion 'gtk+-3.0 > 3.0.0') HAVE_GTK="1" REQPRIVATE="$REQPRIVATE gtk+-3.0"], [ app_olibs="$app_mlibs libgtk-3-0" app_odebs="$app_mdebs libgtk-3-dev" app_orpms="$app_mrpms gtk3-devel" app_gtk="no"]) fi AC_SUBST(HAVE_GTK) AC_ARG_WITH([sdl], AS_HELP_STRING([--without-sdl], [Build without sdl library for graphics support (default: test)])) app_sdl="disabled" if test "x$with_sdl" != "xno"; then # check for SDL app_sdl_ver="" HAVE_SDL="0" PKG_CHECK_MODULES(SDL, sdl2 >= 2.0.5, #not tested on older, version from 2016 [ AC_DEFINE([HAVE_SDL], [1], [libSDL2]) AC_DEFINE([HAVE_SDL2], [1], [libSDL2]) app_sdl="yes" app_sdl_ver=$($PKG_CONFIG --modversion sdl2) HAVE_SDL="2" REQPRIVATE="$REQPRIVATE sdl2"], [ PKG_CHECK_MODULES(SDL, sdl > 1.2.10, [ AC_DEFINE([HAVE_SDL], [1], [libSDL1]) AC_DEFINE([HAVE_SDL1], [1], [libSDL1]) app_sdl="yes" app_sdl_ver=$(sdl-config --version) HAVE_SDL="1" REQPRIVATE="$REQPRIVATE sdl"], [ app_olibs="$app_olibs libsdl" app_odebs="$app_odebs libsdl-dev" app_orpms="$app_orpms libSDL-devel" app_sdl="no"] ) ]) fi AC_SUBST(HAVE_SDL) AC_ARG_WITH([SDL_ttf], AS_HELP_STRING([--without-sdl_ttf], [Build without SDL_ttf support (default: test)])) app_libsdlttf="disabled" if test "x$with_SDL_ttf" != "xno"; then # check for libSDL_ttf app_libsdlttf_ver="" HAVE_SDL_TTF="0" if test "x$HAVE_SDL" = "x2"; then PKG_CHECK_MODULES(SDL_TTF, SDL2_ttf >= 2.0.12, [ AC_DEFINE([HAVE_SDL_TTF], [1], [libSDL2_ttf]) app_libsdlttf="yes" app_libsdlttf_ver=$(pkg-config --modversion 'SDL2_ttf >= 2.0.12') HAVE_SDL_TTF="2" REQPRIVATE="$REQPRIVATE SDL2_ttf" ], [ app_olibs="$app_olibs libsdl2_ttf" app_odebs="$app_odebs libsdl2-ttf-dev" app_orpms="$app_orpms SDL2_ttf-devel" app_libsdlttf="no"] ) else PKG_CHECK_MODULES(SDL_TTF, SDL_ttf >= 2.0.11, [ AC_DEFINE([HAVE_SDL_TTF], [1], [libSDL_ttf]) app_libsdlttf="yes" app_libsdlttf_ver=$(pkg-config --modversion 'SDL_ttf >= 2.0.11') HAVE_SDL_TTF="1" REQPRIVATE="$REQPRIVATE SDL_ttf" ], [ app_olibs="$app_olibs libsdl_ttf" app_odebs="$app_odebs libsdl-ttf2.0-dev" app_orpms="$app_orpms SDL_ttf-devel" app_libsdlttf="no"] ) fi fi AC_SUBST(HAVE_SDL_TTF) AC_ARG_WITH([png], AS_HELP_STRING([--without-png], [Build without PNG support (default: test)])) app_libpng="disabled" if test "x$with_png" != "xno"; then # check for libpng app_libpng_ver="" HAVE_LIBPNG="0" PKG_CHECK_MODULES(LIBPNG, libpng > 1.2.0, [ AC_DEFINE([HAVE_LIBPNG], [1], [libpng]) app_libpng="yes" app_libpng_ver=$(pkg-config --modversion 'libpng > 1.2.0') HAVE_LIBPNG="1" REQPRIVATE="$REQPRIVATE libpng" ], [ app_olibs="$app_olibs libpng" app_odebs="$app_odebs libpng-dev" app_orpms="$app_orpms libpng12-devel" app_libpng="no"] ) fi AC_SUBST(HAVE_LIBPNG) #if test x"$app_glib" = x"yes"; then # PKG_CHECK_MODULES(GTHREAD, # gthread-2.0 > 2.0.0, # AC_DEFINE([HAVE_GTHREAD2], [], [gthread2]), # AC_MSG_ERROR([glib is installed but gthread not ?])) #fi # # check for libftdi # AC_ARG_WITH([ftdi], AS_HELP_STRING([--without-ftdi], [Build without FTDI support for usb to serial converter (default: test)])) app_ftdi="disabled" if test "x$with_ftdi" != "xno"; then # check for libftdi app_ftdi_ver="" HAVE_LIBFTDI="0" HAVE_LIBFTDI1="0" PKG_CHECK_MODULES(LIBFTDI, libftdi1 >= 1.00, [ AC_DEFINE([HAVE_LIBFTDI], [1], [libftdi installed]) AC_DEFINE([HAVE_LIBFTDI1], [1], [libftdi1 installed]) app_ftdi_ver=$($PKG_CONFIG --modversion 'libftdi1 >= 1.00') echo "libftdi version $app_ftdi_ver" app_ftdi="yes" HAVE_LIBFTDI="1" HAVE_LIBFTDI1="1" REQPRIVATE="$REQPRIVATE libftdi1" CFLAGS="$CFLAGS $LIBFTDI_CFLAGS" LIBS="$LIBS $LIBFTDI_LIBS" ], [PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.11, [ AC_DEFINE([HAVE_LIBFTDI], [1], [libftdi installed]) app_ftdi_ver=$($PKG_CONFIG --modversion 'libftdi >= 0.11') echo "libftdi version $app_ftdi_ver" app_ftdi="yes" LIBS="$LIBS -lusb" HAVE_LIBFTDI="1" REQPRIVATE="$REQPRIVATE libftdi" ], [ app_ftdi="no" app_olibs="$app_olibs libftdi1" app_odebs="$app_odebs libftdi-dev" app_orpms="$app_orpms libftdi1-devel"]) ]) fi AC_SUBST(HAVE_LIBFTDI) AC_SUBST(HAVE_LIBFTDI1) AC_CHECK_LIB(ftdi, ftdi_new, [ AC_DEFINE([HAVE_FTDI_NEW], [], [ftdi_new]) ]) AC_CHECK_LIB(ftdi, ftdi_usb_get_strings, [ AC_DEFINE(HAVE_FTDI_USB_GET_STRINGS, [1], [libftdi contains ftdi_usb_get_strings()])]) # # check for libbfd # AC_ARG_WITH([bfd], AS_HELP_STRING([--without-bfd], [Build without libbfd support for debug symbols in backtrace (default: test)])) app_bfd="disabled" app_bfd_ver="" HAVE_LIBBFD="0" HAVE_LIBIBERTY="0" HAVE_LIBEXECINFO="0" if test "x$with_bfd" != "xno"; then AC_CHECK_LIB(bfd, bfd_init, [ AC_DEFINE([HAVE_LIBBFD], [1], [libbfd installed]) if test -z "$target" ; then AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) fi AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) #app_bfd_ver="not detected" app_bfd="yes" LIBS="$LIBS -lbfd" AC_CHECK_LIB(iberty, [dyn_string_append], [ LIBS="$LIBS -liberty" HAVE_LIBIBERTY="1" ]) HAVE_LIBBFD="1" ], [ app_bfd="no" app_olibs="$aqp_olibs libbfd" app_odebs="$aqp_odebs binutils-dev" app_orpms="$app_orpms binutils-devel"]) fi AC_SUBST([HAVE_LIBBFD]) AC_SUBST([HAVE_LIBICERTY]) # in FreeBSD the backtrace is in libexecinfo AC_CHECK_LIB([execinfo], [backtrace], [ LIBS="$LIBS -lexecinfo" HAVE_LIBEXECINFO="1" ]) AC_SUBST([HAVE_LIBEXECINFO]) AC_CHECK_FUNCS(backtrace_symbols, [ AC_DEFINE([HAVE_BACKTRACE_SYMBOLS], [1], [backtrace_symbols]) ]) HAVE_GNUTLS="0" app_gnutls_ver="" PKG_CHECK_MODULES(GNUTLS, gnutls >= 3.5.8, [ AC_DEFINE([HAVE_GNUTLS], [1], [gnutls]) app_gnutls="yes" HAVE_GNUTLS="1" app_gnutls_ver=$($PKG_CONFIG --modversion 'gnutls') ], [ app_olibs="$app_olibs libgnutls" app_odebs="$app_odebs libgnutls28-dev" app_gnutls="no" ]) AC_SUBST([HAVE_GNUTLS]) # # check for library errors # if test -n "$app_mlibs$app_olibs"; then echo "" echo "" echo "********" if test -n "$app_mlibs"; then echo "Missing mandatory libraries: $app_mlibs" fi if test -n "$app_olibs"; then echo "Missing optional libraries: $app_olibs" fi if test -f "/etc/debian_version"; then echo "Try to run: apt-get install $app_mdebs $app_odebs" fi if test -f "/etc/SuSE-release"; then echo "Try to run: yast -i $app_mrpms $app_orpms" fi echo "********" if test -n "$app_mlibs"; then AC_MSG_ERROR([missing mandatory library/libraries]) fi fi if test x"$app_ld_wlmap" = x"yes"; then LIBS="$LIBS -Wl,-Map,libzia.so.map" fi CFLAGS="$CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $SDL_CFLAGS $SDL_TTF_CFLAGS $LIBPNG_FLAGS -I../include -I../include/unix $GNUTLS_CFLAGS" #CFLAGS="-I/usr/include $CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $SDL_CFLAGS $LIBPNG_FLAGS" LIBS="$LIBS $GLIB_LIBS $GTK_LIBS $SDL_LIBS $SDL_TTF_LIBS $LIBPNG_LIBS $LIBFTDI_LIBS $GNUTLS_LIBS " AC_CHECK_LIB(glib-2.0, g_thread_try_new, [ AC_DEFINE([HAVE_G_THREAD_TRY_NEW], [], [g_thread_try_new]) ]) AC_CHECK_LIB(pthread, pthread_setname_np, [ AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [], [pthread_setname_np]) ]) AC_CHECK_LIB(glib-2.0, g_string_append_vprintf, [ AC_DEFINE([HAVE_G_STRING_APPEND_VPRINTF], [], [g_string_append_vprintf]) ]) AC_CHECK_LIB(glib-2.0, g_hash_table_remove_all, [ AC_DEFINE([HAVE_G_HASH_TABLE_REMOVE_ALL], [], [g_hash_table_remove_all]) ]) AC_C_BIGENDIAN([app_endian="big"],[app_endian="little"],[app_endian="unknown"]) AC_MSG_CHECKING([for long long]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long a;]])],[have_long_long=yes],[have_long_long=no]) AC_MSG_RESULT($have_long_long) test "$have_long_long" = yes && AC_DEFINE([HAVE_LONG_LONG], [1], [long long]) AC_MSG_CHECKING([for uint32_t]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_INTTYPES_H #include #endif ]], [[uint32_t a;]])],[have_uint32_t=yes],[have_uint32_t=no]) AC_MSG_RESULT($have_uint32_t) test "$have_uint32_t" = yes && AC_DEFINE([HAVE_UINT32_T], [], [uinf32_t]) AC_MSG_CHECKING([for typeof]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a; typeof(a) b;]])],[have_typeof=yes],[have_typeof=no]) AC_MSG_RESULT($have_typeof) test "$have_typeof" = yes && AC_DEFINE([HAVE_TYPEOF], [], [have operator typeof]) AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) test "$have_long_long" = yes && AC_CHECK_SIZEOF(long long, 8) AC_CHECK_SIZEOF(void *) # --enable-pedantic AC_ARG_ENABLE(pedantic, [ --enable-pedantic Enable pedantic gcc checking(-Wall etc.)], enable_pedantic=yes,enable_pedantic=no ) dnl echo "pedantic=$enable_pedantic" if test x"$enable_pedantic" = x"yes"; then #CFLAGS="$CFLAGS -Wall -Wpedantic" CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wstrict-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wno-format-extra-args -Wformat-security -Wdeprecated-declarations" #CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wstrict-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wno-format-extra-args -Wformat-security" fi OLDCFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ int i = strerror_r(1, NULL, 1);]])],[ AC_DEFINE([Z_STRERROR_R_RETURNS_INT], [], [strerror_r returns int not char*])],[]) CFLAGS=$OLDCFLAGS CFLAGS=$(echo $CFLAGS | sed 's/ \+/ /g') LDFLAGS=$(echo $LDFLAGS | sed 's/ \+/ /g') LIBS=$(echo $LIBS | sed 's/ \+/ /g') AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) AC_SUBST([LIBS]) AC_SUBST([REQPRIVATE]) sharedir="$prefix/share/$PACKAGE_NAME" AC_DEFINE_UNQUOTED([SHAREDIR], ["$sharedir"], [Shared directory]) AC_CONFIG_FILES([Makefile android-old/Makefile bin/Makefile bin/zia-config data/Makefile include/Makefile include/android/Makefile include/android/zconfig.h include/msvc/Makefile include/msvc/zconfig.h include/unix/Makefile libzia.pc m4/Makefile src/Makefile]) AC_OUTPUT echo "" (echo "------ Libzia settings: --------"; echo " version: $PACKAGE_NAME-$PACKAGE_VERSION"; echo " prefix: $prefix"; #echo " sharedir: $sharedir"; echo " platform: $PLATFORM"; echo " machine: $MACHINE"; echo " target: $target"; echo " compiler: $CC $app_cc_ver"; echo " sizes: int=$ac_cv_sizeof_int, long=$ac_cv_sizeof_long, long long=$ac_cv_sizeof_long_long, void*=$ac_cv_sizeof_void_p" echo " endianity: $app_endian"; echo " CFLAGS: $CFLAGS"; echo " LDFLAGS: $LDFLAGS"; echo " LIBS: $LIBS"; echo " libc: $app_libc_ver"; echo " libglib: $app_glib $app_glib_ver"; echo " libgtk: $app_gtk $app_gtk_ver"; echo " libsdl: $app_sdl $app_sdl_ver"; echo "libsdl_ttf: $app_libsdlttf $app_libsdlttf_ver"; echo " libpng: $app_libpng $app_libpng_ver"; echo " libftdi: $app_ftdi $app_ftdi_ver"; echo " libbfd: $app_bfd $app_bfd_ver"; echo " gnutls: $app_gnutls $app_gnutls_ver"; echo " pedantic: $enable_pedantic"; echo " opts: $opt") | tee settings echo "" (echo "char *z_settings[]="; cat settings | sed 's/\(.*\)/"\1\\n"/'; echo ";") > src/settings.c cat config.h |grep '^#define' | sed 's/#define \(.*\)/#define Z_\1/' > include/unix/zconfig.h chmod +x svnver.sh bin/zia-config libzia-4.67/svnver.sh0000755000175000017500000000077514662101506011541 00000000000000#!/bin/sh svnver=`svnversion -n . 2>/dev/null` if test "$?" != "0"; then exit 0 fi if test "$svnver" = "exported"; then # svn 1.6 exit 0 fi if test "$svnver" = "Unversioned directory"; then # svn 1.8 exit 0 fi echo "#define Z_SVNVER \"$svnver\"" > include/zsvnversion.tmp cmp -s include/zsvnversion.h include/zsvnversion.tmp if test $? = 0; then echo Keep zsvnversion $svnver exit 0 fi echo Updating zsvnversion to $svnver mv include/zsvnversion.tmp include/zsvnversion.h exit 0 libzia-4.67/data/0000755000175000017500000000000014752603140010640 500000000000000libzia-4.67/data/Makefile.am0000644000175000017500000000014014662101506012606 00000000000000datarootdir = @datarootdir@ EXTRA_DIST = font13x24.inc font18x32.inc font8x13.inc font9x16.inc libzia-4.67/data/font9x16.inc0000644000175000017500000012066214662101506012657 00000000000000const short font9x16[] = { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 0 0x00000, 0x00000, 0x00000, 0x0007e, 0x00081, 0x00081, 0x000a5, 0x000a5, 0x00081, 0x000a5, 0x00099, 0x00081, 0x00081, 0x0007e, 0x00000, 0x00000, // char 1 0x00000, 0x00000, 0x00000, 0x0007e, 0x000ff, 0x000db, 0x00081, 0x000db, 0x000ff, 0x000ff, 0x000c3, 0x00099, 0x000ff, 0x0007e, 0x00000, 0x00000, // char 2 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00066, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, 0x00000, // char 3 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x000ff, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, // char 4 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0003c, 0x000e7, 0x000e7, 0x000e7, 0x00018, 0x00018, 0x0007e, 0x00000, 0x00000, 0x00000, // char 5 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x000ff, 0x000ff, 0x0007e, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, 0x00000, // char 6 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x00024, 0x00066, 0x00042, 0x00042, 0x000ff, 0x000ff, 0x0000c, 0x00006, 0x00000, 0x00000, // char 7 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001e7, 0x001c3, 0x001c3, 0x001e7, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, // char 8 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00066, 0x00042, 0x00042, 0x00066, 0x0003c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 9 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001c3, 0x00199, 0x001bd, 0x001bd, 0x00199, 0x001c3, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, // char 10 0x00000, 0x00000, 0x00000, 0x000f0, 0x000e0, 0x000b0, 0x00098, 0x0000c, 0x0003e, 0x00063, 0x00063, 0x00063, 0x0003e, 0x00000, 0x00000, 0x00000, // char 11 0x00000, 0x00000, 0x00000, 0x00000, 0x0007e, 0x000c3, 0x000c3, 0x000c3, 0x0007e, 0x00018, 0x000ff, 0x000ff, 0x00018, 0x00018, 0x00000, 0x00000, // char 12 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x0000c, 0x0007c, 0x0000c, 0x0000c, 0x0000c, 0x0000e, 0x0000f, 0x00007, 0x00000, 0x00000, 0x00000, // char 13 0x00000, 0x00000, 0x00000, 0x00000, 0x0007e, 0x00066, 0x0007e, 0x00066, 0x00066, 0x00066, 0x00073, 0x00073, 0x00033, 0x00003, 0x00000, 0x00000, // char 14 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x000db, 0x0003c, 0x000e7, 0x0003c, 0x000db, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, // char 15 0x00000, 0x00000, 0x00000, 0x00002, 0x00006, 0x0000e, 0x0001e, 0x0003e, 0x0007e, 0x0003e, 0x0001e, 0x0000e, 0x00006, 0x00002, 0x00000, 0x00000, // char 16 0x00000, 0x00000, 0x00000, 0x00040, 0x00060, 0x00070, 0x00078, 0x0007c, 0x0007e, 0x0007c, 0x00078, 0x00070, 0x00060, 0x00040, 0x00000, 0x00000, // char 17 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x00018, 0x00018, 0x00018, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, 0x00000, // char 18 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00000, 0x00066, 0x00066, 0x00000, 0x00000, // char 19 0x00000, 0x00000, 0x00000, 0x0007e, 0x0006d, 0x0006d, 0x0006d, 0x0006d, 0x0006e, 0x0006c, 0x0006c, 0x0006c, 0x0006c, 0x0006c, 0x00000, 0x00000, // char 20 0x00000, 0x00000, 0x00000, 0x0007e, 0x000c3, 0x00006, 0x0003c, 0x00066, 0x000c3, 0x000c3, 0x00066, 0x0003c, 0x00060, 0x000c3, 0x0007e, 0x00000, // char 21 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x00000, 0x00000, // char 22 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x0007e, 0x00018, 0x00018, 0x00018, 0x0007e, 0x0007e, 0x0003c, 0x00018, 0x0007e, 0x00000, // char 23 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, // char 24 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0007e, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, // char 25 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00010, 0x00030, 0x0007f, 0x000ff, 0x0007f, 0x00030, 0x00010, 0x00000, 0x00000, 0x00000, 0x00000, // char 26 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00008, 0x0000c, 0x000fe, 0x000ff, 0x000fe, 0x0000c, 0x00008, 0x00000, 0x00000, 0x00000, 0x00000, // char 27 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00003, 0x00003, 0x00003, 0x000ff, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, // char 28 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00024, 0x00066, 0x000ff, 0x00066, 0x00024, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 29 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x0003c, 0x0003c, 0x0007e, 0x0007e, 0x000ff, 0x000ff, 0x000ff, 0x00000, 0x00000, 0x00000, // char 30 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x000ff, 0x000ff, 0x0007e, 0x0007e, 0x0003c, 0x0003c, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, // char 31 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 32 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 33 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x00044, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 34 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x000ff, 0x00066, 0x00066, 0x00066, 0x000ff, 0x00066, 0x00066, 0x00066, 0x00000, 0x00000, // char 35 0x00000, 0x00018, 0x00018, 0x0007e, 0x000db, 0x0009b, 0x0001b, 0x0001b, 0x0007e, 0x000d8, 0x000d8, 0x000d9, 0x000db, 0x0007e, 0x00018, 0x00018, // char 36 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00087, 0x000c5, 0x00067, 0x00030, 0x00018, 0x0000c, 0x000e6, 0x000a3, 0x000e1, 0x00000, 0x00000, // char 37 0x00000, 0x00000, 0x00000, 0x0001c, 0x00036, 0x00036, 0x00036, 0x0001c, 0x0009e, 0x000f3, 0x00063, 0x00063, 0x00077, 0x000de, 0x00000, 0x00000, // char 38 0x00000, 0x00000, 0x00018, 0x00018, 0x00018, 0x0000c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 39 0x00000, 0x00000, 0x00000, 0x00070, 0x00018, 0x0000c, 0x00006, 0x00006, 0x00006, 0x00006, 0x00006, 0x0000c, 0x00018, 0x00070, 0x00000, 0x00000, // char 40 0x00000, 0x00000, 0x00000, 0x0000e, 0x00018, 0x00030, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00030, 0x00018, 0x0000e, 0x00000, 0x00000, // char 41 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x000db, 0x0007e, 0x000ff, 0x0007e, 0x000db, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, // char 42 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, // char 43 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x0000c, 0x00004, // char 44 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007e, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 45 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 46 0x00000, 0x00000, 0x00000, 0x00000, 0x00080, 0x000c0, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00003, 0x00001, 0x00000, 0x00000, 0x00000, // char 47 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000e6, 0x000f6, 0x000de, 0x000ce, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 48 0x00000, 0x00000, 0x00000, 0x00030, 0x00038, 0x0003c, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x000fc, 0x00000, 0x00000, // char 49 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c0, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 50 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c0, 0x000c0, 0x00070, 0x000c0, 0x000c0, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 51 0x00000, 0x00000, 0x00000, 0x000c0, 0x000e0, 0x000f0, 0x000d8, 0x000cc, 0x000c6, 0x001fe, 0x000c0, 0x000c0, 0x000c0, 0x001e0, 0x00000, 0x00000, // char 52 0x00000, 0x00000, 0x00000, 0x000fe, 0x00006, 0x00006, 0x00006, 0x0007e, 0x000c0, 0x000c0, 0x000c0, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 53 0x00000, 0x00000, 0x00000, 0x00078, 0x0000c, 0x00006, 0x00006, 0x00006, 0x0007e, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 54 0x00000, 0x00000, 0x00000, 0x000fe, 0x000c6, 0x000c0, 0x000c0, 0x00060, 0x00030, 0x00030, 0x00018, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, // char 55 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 56 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x000c0, 0x00060, 0x00030, 0x0001c, 0x00000, 0x00000, // char 57 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 58 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x0000c, 0x00004, // char 59 0x00000, 0x00000, 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x00000, 0x00000, 0x00000, // char 60 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x00000, 0x00000, 0x00000, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, // char 61 0x00000, 0x00000, 0x00000, 0x00000, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00000, 0x00000, 0x00000, // char 62 0x00000, 0x00000, 0x00000, 0x0007e, 0x000e7, 0x000c3, 0x000c3, 0x00060, 0x00030, 0x00018, 0x00018, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 63 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000f6, 0x000de, 0x000de, 0x000b6, 0x00006, 0x00006, 0x0007c, 0x00000, 0x00000, // char 64 0x00000, 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 65 0x00000, 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007e, 0x00000, 0x00000, // char 66 0x00000, 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 67 0x00000, 0x00000, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 68 0x00000, 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 69 0x00000, 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 70 0x00000, 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00006, 0x000f6, 0x000c6, 0x000cc, 0x000b8, 0x00000, 0x00000, // char 71 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 72 0x00000, 0x00000, 0x00000, 0x00078, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 73 0x00000, 0x00000, 0x00000, 0x000f0, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00066, 0x00066, 0x0003c, 0x00000, 0x00000, // char 74 0x00000, 0x00000, 0x00000, 0x000ce, 0x000cc, 0x000cc, 0x0006c, 0x0006c, 0x0003c, 0x0006c, 0x0006c, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 75 0x00000, 0x00000, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 76 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000ee, 0x000fe, 0x000d6, 0x000d6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 77 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 78 0x00000, 0x00000, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 79 0x00000, 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 80 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000d6, 0x000f6, 0x0007c, 0x00060, 0x000e0, 0x00000, // char 81 0x00000, 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 82 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x00006, 0x0000c, 0x00038, 0x00060, 0x000c0, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 83 0x00000, 0x00000, 0x00000, 0x001fe, 0x001b6, 0x00132, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 84 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 85 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00010, 0x00000, 0x00000, // char 86 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000d6, 0x000d6, 0x000d6, 0x000fe, 0x0006c, 0x0006c, 0x00000, 0x00000, // char 87 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x0006c, 0x00038, 0x0006c, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 88 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 89 0x00000, 0x00000, 0x00000, 0x000fe, 0x000c6, 0x000c2, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00086, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 90 0x00000, 0x00000, 0x00000, 0x0003c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0003c, 0x00000, 0x00000, // char 91 0x00000, 0x00000, 0x00000, 0x00000, 0x00001, 0x00003, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x000c0, 0x00080, 0x00000, 0x00000, 0x00000, // char 92 0x00000, 0x00000, 0x00000, 0x0003c, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x0003c, 0x00000, 0x00000, // char 93 0x00000, 0x00018, 0x0003c, 0x00066, 0x000c3, 0x00081, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 94 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x00000, // char 95 0x00000, 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 96 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 97 0x00000, 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x0003c, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00076, 0x00000, 0x00000, // char 98 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 99 0x00000, 0x00000, 0x00000, 0x00070, 0x00060, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 100 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000fe, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 101 0x00000, 0x00000, 0x00000, 0x00038, 0x0006c, 0x0004c, 0x0000c, 0x0000c, 0x0003e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 102 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000dc, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0007c, 0x00060, 0x00066, 0x0003c, // char 103 0x00000, 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x0000c, 0x0006c, 0x000dc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 104 0x00000, 0x00000, 0x00000, 0x00030, 0x00030, 0x00000, 0x00038, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 105 0x00000, 0x00000, 0x00000, 0x00060, 0x00060, 0x00000, 0x00070, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00066, 0x00066, 0x00066, 0x0003c, // char 106 0x00000, 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x0000c, 0x000cc, 0x0006c, 0x0003c, 0x0003c, 0x0006c, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 107 0x00000, 0x00000, 0x00000, 0x00038, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 108 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0006e, 0x000fe, 0x000d6, 0x000d6, 0x000d6, 0x000d6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 109 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 110 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 111 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0000c, 0x0000c, 0x0001e, // char 112 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000dc, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0007c, 0x00060, 0x00060, 0x000f0, // char 113 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000dc, 0x000cc, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 114 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x0001c, 0x00070, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 115 0x00000, 0x00000, 0x00000, 0x00010, 0x00018, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00000, 0x00000, // char 116 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 117 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 118 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000d6, 0x000d6, 0x000d6, 0x000fe, 0x0006c, 0x00000, 0x00000, // char 119 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 120 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x00060, 0x0003c, // char 121 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 122 0x00000, 0x00000, 0x00000, 0x00070, 0x00018, 0x00018, 0x00018, 0x00018, 0x0000e, 0x00018, 0x00018, 0x00018, 0x00018, 0x00070, 0x00000, 0x00000, // char 123 0x00000, 0x00000, 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x00000, 0x00000, // char 124 0x00000, 0x00000, 0x00000, 0x0000e, 0x00018, 0x00018, 0x00018, 0x00018, 0x00070, 0x00018, 0x00018, 0x00018, 0x00018, 0x0000e, 0x00000, 0x00000, // char 125 0x00000, 0x00000, 0x00000, 0x00000, 0x000dc, 0x00076, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 126 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x00066, 0x000c3, 0x000c3, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, // char 127 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, // char 128 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, // char 129 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, // char 130 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 131 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0000c, 0x00006, 0x00003, 0x00006, 0x0000c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 132 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0000c, 0x00006, 0x00003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 133 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001c0, 0x00060, 0x00030, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 134 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, // char 135 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, // char 136 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0001e, 0x0000f, 0x00007, 0x0000f, 0x0001e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 137 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 138 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00007, 0x0000f, 0x0001e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 139 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0001e, 0x0000f, 0x00007, 0x00003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 140 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, // char 141 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, 0x001f0, // char 142 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00006, 0x0000c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 143 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00030, 0x00060, 0x001c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 144 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00066, 0x001c3, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 145 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001c3, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 146 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00030, 0x00060, 0x001c0, 0x00060, 0x00030, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 147 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 148 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00066, 0x001c3, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 149 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x001ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 150 0x00000, 0x00000, 0x00000, 0x00078, 0x000cc, 0x00006, 0x00006, 0x0007f, 0x00006, 0x0007f, 0x00006, 0x00006, 0x000cc, 0x00078, 0x00000, 0x00000, // char 151 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x00078, 0x001f0, 0x001e0, 0x001c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 152 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001c0, 0x001e0, 0x001f0, 0x00078, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 153 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0007e, 0x001e7, 0x001c3, 0x00181, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 154 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00181, 0x001c3, 0x001e7, 0x0007e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 155 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x00038, 0x00070, 0x001e0, 0x001c0, 0x001e0, 0x00070, 0x00038, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 156 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001ff, 0x001ff, 0x001ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 157 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0007e, 0x001ff, 0x001e7, 0x001ff, 0x0007e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 158 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x0007e, 0x001e7, 0x001c3, 0x001e7, 0x0007e, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 159 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 160 0x00000, 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000f6, 0x00018, 0x000f0, // char 161 0x0006c, 0x00038, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 162 0x00000, 0x00000, 0x00000, 0x0001e, 0x0000c, 0x0004c, 0x0006c, 0x0003c, 0x0001c, 0x0000e, 0x0000e, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 163 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x000c6, 0x00000, 0x00000, 0x00000, 0x00000, // char 164 0x0006c, 0x00038, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 165 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x00006, 0x0000c, 0x00038, 0x00060, 0x000c0, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 166 0x00000, 0x00000, 0x0007e, 0x000c3, 0x00006, 0x0003c, 0x00066, 0x000c3, 0x000c3, 0x00066, 0x0003c, 0x00060, 0x000c3, 0x0007e, 0x00000, 0x00000, // char 167 0x000c6, 0x000c6, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 168 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x00006, 0x0000c, 0x00038, 0x00060, 0x000c0, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 169 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x00006, 0x0000c, 0x00038, 0x00060, 0x000c0, 0x000c6, 0x000c6, 0x0007c, 0x00060, 0x0001c, // char 170 0x0006c, 0x00038, 0x00000, 0x001fe, 0x001b6, 0x00132, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 171 0x000e0, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x000c2, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00086, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 172 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x00000, 0x000fe, 0x00000, 0x000fe, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 173 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000c6, 0x000c2, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00086, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 174 0x00030, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x000c2, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00086, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 175 0x00000, 0x00000, 0x00000, 0x0001c, 0x00036, 0x00036, 0x0001c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 176 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00018, 0x00070, // char 177 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0000c, 0x00078, // char 178 0x00000, 0x00000, 0x00000, 0x00038, 0x00030, 0x00030, 0x000b0, 0x000f0, 0x00070, 0x00038, 0x0003c, 0x00034, 0x00030, 0x00078, 0x00000, 0x00000, // char 179 0x000e0, 0x00030, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 180 0x00000, 0x001b0, 0x000e0, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 181 0x00000, 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x0001c, 0x00070, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 182 0x0006c, 0x00038, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 183 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00030, 0x00060, 0x0003c, // char 184 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x0001c, 0x00070, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 185 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x0001c, 0x00070, 0x000c0, 0x000c6, 0x0007c, 0x00060, 0x0003c, // char 186 0x00000, 0x00000, 0x000c0, 0x000d0, 0x00058, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00000, 0x00000, // char 187 0x00000, 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 188 0x00000, 0x00000, 0x000d8, 0x0006c, 0x00036, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 189 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 190 0x00000, 0x00000, 0x00000, 0x00030, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 191 0x000e0, 0x00030, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 192 0x000e0, 0x00030, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 193 0x00038, 0x0006c, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 194 0x0006c, 0x00038, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 195 0x00000, 0x000c6, 0x000c6, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 196 0x000e0, 0x00030, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 197 0x000e0, 0x00030, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 198 0x00000, 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x000c0, 0x0007c, // char 199 0x0006c, 0x00038, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 200 0x000e0, 0x00030, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 201 0x00000, 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00018, 0x000f0, // char 202 0x0006c, 0x0006c, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 203 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000cc, 0x0008c, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 204 0x00070, 0x00018, 0x00000, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 205 0x00038, 0x0006c, 0x00000, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 206 0x0006c, 0x00038, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 207 0x00000, 0x00000, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000cc, 0x000de, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 208 0x000e0, 0x00030, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 209 0x0006c, 0x00038, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 210 0x000e0, 0x00030, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 211 0x00038, 0x0006c, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 212 0x00198, 0x000cc, 0x00066, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 213 0x000c6, 0x000c6, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 214 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x0006c, 0x00038, 0x00038, 0x0006c, 0x000c6, 0x00000, 0x00000, 0x00000, 0x00000, // char 215 0x0006c, 0x00038, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 216 0x0003c, 0x00066, 0x0003c, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 217 0x000e0, 0x00030, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 218 0x00198, 0x000cc, 0x00066, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 219 0x000c6, 0x000c6, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 220 0x00070, 0x00018, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 221 0x00000, 0x00000, 0x00000, 0x001fe, 0x001b6, 0x00132, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00060, 0x0003c, // char 222 0x00000, 0x00000, 0x00000, 0x0003c, 0x00066, 0x00066, 0x00066, 0x00036, 0x00066, 0x000c6, 0x000c6, 0x000c6, 0x00066, 0x00006, 0x00000, 0x00000, // char 223 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x00076, 0x000dc, 0x000cc, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 224 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 225 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 226 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 227 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00000, 0x0003c, 0x00060, 0x00060, 0x0007c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 228 0x00000, 0x00180, 0x00180, 0x0009c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 229 0x00000, 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 230 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00060, 0x0003c, // char 231 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 232 0x00000, 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000fe, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 233 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000fe, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x0000c, 0x00078, // char 234 0x00000, 0x00000, 0x00000, 0x0006c, 0x0006c, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000fe, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 235 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000fe, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 236 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 237 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 238 0x00000, 0x00180, 0x00180, 0x000f0, 0x00060, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 239 0x00000, 0x00000, 0x00070, 0x00060, 0x000fc, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 240 0x00000, 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 241 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 242 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 243 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 244 0x00000, 0x00000, 0x00198, 0x000cc, 0x00066, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 245 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 246 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x0007e, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, // char 247 0x00000, 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x00076, 0x000dc, 0x000cc, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 248 0x00000, 0x00000, 0x0003c, 0x00066, 0x0003c, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 249 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 250 0x00000, 0x00000, 0x00198, 0x000cc, 0x00066, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0009c, 0x00000, 0x00000, // char 251 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0009c, 0x00000, 0x00000, // char 252 0x00000, 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x00060, 0x0003c, // char 253 0x00000, 0x00000, 0x00000, 0x00010, 0x00018, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00060, 0x0003c, // char 254 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 255 }; libzia-4.67/data/font18x32.inc0000644000175000017500000023066114662101506012736 00000000000000const int font18x32[] = { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 0 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0e007, 0x0c003, 0x0c003, 0x0c003, 0x0cc33, 0x0cc33, 0x0cc33, 0x0cc33, 0x0c003, 0x0c003, 0x0cc33, 0x0ce73, 0x0c7e3, 0x0c3c3, 0x0c003, 0x0c003, 0x0c003, 0x0e007, 0x07ffe, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 1 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0ffff, 0x0ffff, 0x0ffff, 0x0f3cf, 0x0e007, 0x0e007, 0x0f3cf, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0f81f, 0x0f00f, 0x0e3c7, 0x0e7e7, 0x0ffff, 0x0ffff, 0x07ffe, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 2 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x07e7e, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x07ffe, 0x07ffe, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 3 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x07ffe, 0x0ffff, 0x0ffff, 0x07ffe, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x00180, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 4 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x007e0, 0x00ff0, 0x00ff0, 0x00ff0, 0x01ff8, 0x07e7e, 0x0fc3f, 0x0fc3f, 0x0fc3f, 0x0fc3f, 0x07e7e, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 5 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x07ffe, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x07ffe, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 6 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x007e0, 0x00ff0, 0x00ff0, 0x00e70, 0x01c38, 0x03c3c, 0x03c3c, 0x0381c, 0x0300c, 0x0700e, 0x0781e, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x00000, 0x00000, 0x00000, 0x00000, // char 7 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3fe7f, 0x3fc3f, 0x3f81f, 0x3f00f, 0x3f00f, 0x3f81f, 0x3fc3f, 0x3fe7f, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, // char 8 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x01ff8, 0x03e7c, 0x03c3c, 0x0781e, 0x0700e, 0x0700e, 0x0781e, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 9 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3f81f, 0x3f00f, 0x3e3c7, 0x3c7e3, 0x3cff3, 0x3cff3, 0x3cff3, 0x3cff3, 0x3c7e3, 0x3e3c7, 0x3f00f, 0x3f81f, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, // char 10 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ff00, 0x0ff00, 0x0fe00, 0x0fe00, 0x0ff00, 0x0cf80, 0x0c7c0, 0x0c3e0, 0x001f0, 0x001f8, 0x00ffc, 0x01ffe, 0x03e1f, 0x03c0f, 0x03c0f, 0x03c0f, 0x03c0f, 0x03e1f, 0x01ffe, 0x00ffc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 11 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0f81f, 0x0f00f, 0x0f00f, 0x0f00f, 0x0f00f, 0x0f81f, 0x07ffe, 0x03ffc, 0x003c0, 0x003c0, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 12 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x03ff0, 0x000f0, 0x000f0, 0x03ff0, 0x03ff0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000fc, 0x000fe, 0x000ff, 0x000ff, 0x0007f, 0x0003f, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 13 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x03ffc, 0x03c3c, 0x03c3c, 0x03ffc, 0x03ffc, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e3e, 0x03f1f, 0x03f0f, 0x03f0f, 0x03f0f, 0x01f0f, 0x00f0f, 0x0000f, 0x0000f, 0x00000, 0x00000, 0x00000, 0x00000, // char 14 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x0f3cf, 0x0ffff, 0x01ff8, 0x01ff8, 0x0fe7f, 0x0fe7f, 0x01ff8, 0x01ff8, 0x0ffff, 0x0f3cf, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 15 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000c, 0x0001c, 0x0003c, 0x0007c, 0x000fc, 0x001fc, 0x003fc, 0x007fc, 0x00ffc, 0x01ffc, 0x03ffc, 0x03ffc, 0x01ffc, 0x00ffc, 0x007fc, 0x003fc, 0x001fc, 0x000fc, 0x0007c, 0x0003c, 0x0001c, 0x0000c, 0x00000, 0x00000, 0x00000, 0x00000, // char 16 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03000, 0x03800, 0x03c00, 0x03e00, 0x03f00, 0x03f80, 0x03fc0, 0x03fe0, 0x03ff0, 0x03ff8, 0x03ffc, 0x03ffc, 0x03ff8, 0x03ff0, 0x03fe0, 0x03fc0, 0x03f80, 0x03f00, 0x03e00, 0x03c00, 0x03800, 0x03000, 0x00000, 0x00000, 0x00000, 0x00000, // char 17 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x00180, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 18 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x00000, 0x00000, 0x00000, 0x00000, // char 19 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x03ffe, 0x03fff, 0x03cf3, 0x03cf3, 0x03cf3, 0x03cf3, 0x03cf3, 0x03cf3, 0x03cff, 0x03cfe, 0x03cfc, 0x03cf8, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x00000, 0x00000, 0x00000, 0x00000, // char 20 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0f81f, 0x0f01f, 0x0003e, 0x0007c, 0x00ff8, 0x01ff8, 0x03e7c, 0x07c3e, 0x0f81f, 0x0f00f, 0x0f00f, 0x0f81f, 0x07c3e, 0x03e7c, 0x01ff8, 0x01ff0, 0x03e00, 0x07c00, 0x0f80f, 0x0f81f, 0x07ffe, 0x03ffc, 0x00000, 0x00000, // char 21 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, // char 22 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x03ffc, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x03ffc, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x03ffc, 0x03ffc, 0x00000, 0x00000, // char 23 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x03ffc, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 24 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x03ffc, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x00180, 0x00000, 0x00000, 0x00000, // char 25 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00700, 0x00f00, 0x01f00, 0x03fff, 0x07fff, 0x0ffff, 0x0ffff, 0x07fff, 0x03fff, 0x01f00, 0x00f00, 0x00700, 0x00300, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 26 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c0, 0x000e0, 0x000f0, 0x000f8, 0x0fffc, 0x0fffe, 0x0ffff, 0x0ffff, 0x0fffe, 0x0fffc, 0x000f8, 0x000f0, 0x000e0, 0x000c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 27 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 28 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00c30, 0x01c38, 0x03c3c, 0x07c3e, 0x0ffff, 0x0ffff, 0x07c3e, 0x03c3c, 0x01c38, 0x00c30, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 29 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x003c0, 0x007e0, 0x007e0, 0x00ff0, 0x00ff0, 0x01ff8, 0x01ff8, 0x03ffc, 0x03ffc, 0x07ffe, 0x07ffe, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 30 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x0ffff, 0x07ffe, 0x07ffe, 0x03ffc, 0x03ffc, 0x01ff8, 0x01ff8, 0x00ff0, 0x00ff0, 0x007e0, 0x007e0, 0x003c0, 0x003c0, 0x00180, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 31 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 32 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x007e0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x007e0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 33 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x07038, 0x03030, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 34 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x0ffff, 0x0ffff, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x0ffff, 0x0ffff, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x00000, 0x00000, 0x00000, 0x00000, // char 35 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x07ffe, 0x0ffff, 0x0f3df, 0x0e3cf, 0x0c3cf, 0x003cf, 0x003cf, 0x003cf, 0x003df, 0x03ffe, 0x07ffc, 0x0ffe0, 0x0fbc0, 0x0f3c0, 0x0f3c0, 0x0f3c3, 0x0f3c7, 0x0f3cf, 0x0fbdf, 0x07ffe, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 36 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0c01e, 0x0e03f, 0x0f03f, 0x0f83f, 0x07c3f, 0x03e1e, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0787c, 0x0fc3e, 0x0fc1f, 0x0fc0f, 0x0fc07, 0x07803, 0x00000, 0x00000, 0x00000, 0x00000, // char 37 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f0, 0x007f8, 0x00ffc, 0x00f3c, 0x00f3c, 0x00f3c, 0x00f3c, 0x00ffc, 0x007f8, 0x003f8, 0x0c3fc, 0x0e7fe, 0x0ff9f, 0x0ff0f, 0x07e0f, 0x03c0f, 0x03c0f, 0x03e1f, 0x03f3f, 0x07fff, 0x0fffe, 0x0f3fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 38 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001f0, 0x000f0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 39 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03f00, 0x03f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x007c0, 0x03f80, 0x03f00, 0x00000, 0x00000, 0x00000, 0x00000, // char 40 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fc, 0x001fc, 0x003e0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001fc, 0x000fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 41 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x0f3cf, 0x0ffff, 0x03ffc, 0x03ffc, 0x0ffff, 0x0ffff, 0x03ffc, 0x03ffc, 0x0ffff, 0x0f3cf, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 42 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 43 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001f0, 0x000f0, 0x00070, 0x00030, // char 44 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 45 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 46 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0c000, 0x0e000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003e, 0x0001f, 0x0000f, 0x00007, 0x00003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 47 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f83c, 0x0fc3c, 0x0fe3c, 0x0ff3c, 0x0ffbc, 0x0f7fc, 0x0f3fc, 0x0f1fc, 0x0f0fc, 0x0f07c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 48 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00f00, 0x00f80, 0x00fc0, 0x00fe0, 0x00ff0, 0x00ff0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x0fff0, 0x0fff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 49 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 50 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f000, 0x0f000, 0x0f000, 0x0f800, 0x07f00, 0x07f00, 0x0f800, 0x0f000, 0x0f000, 0x0f000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 51 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f000, 0x0f800, 0x0fc00, 0x0fe00, 0x0ff00, 0x0ff80, 0x0f7c0, 0x0f3e0, 0x0f1f0, 0x0f0f8, 0x0f07c, 0x0f07c, 0x3fffc, 0x3fffc, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x1f800, 0x3fc00, 0x3fc00, 0x00000, 0x00000, 0x00000, 0x00000, // char 52 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x03ffc, 0x07ffc, 0x0f800, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x0f000, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 53 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x03fe0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x03ffc, 0x07ffc, 0x0f83c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 54 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f87c, 0x0f03c, 0x0f000, 0x0f000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01e00, 0x00f00, 0x00f00, 0x00780, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 55 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 56 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f07c, 0x0fff8, 0x0fff0, 0x0f000, 0x0f000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007f0, 0x003f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 57 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 58 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001f0, 0x000f0, 0x00070, 0x00030, // char 59 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x03c00, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 60 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 61 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 62 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0fe7f, 0x0fc3f, 0x0f81f, 0x0f00f, 0x0f00f, 0x0f80f, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, // char 63 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f83c, 0x0ff3c, 0x0ffbc, 0x0f3fc, 0x0f3fc, 0x0fffc, 0x07fbc, 0x00f3c, 0x0003c, 0x0003c, 0x0003c, 0x0007c, 0x03ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 64 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 65 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffc, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x07ff0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ffc, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 66 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0e07c, 0x0c03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0c03c, 0x0e07c, 0x0f0f8, 0x0f9f0, 0x07fe0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 67 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffc, 0x01ffc, 0x03ff0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07cf0, 0x03ff0, 0x01ffc, 0x00ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 68 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 69 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 70 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0e07c, 0x0c03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0ff3c, 0x0ff3c, 0x0e03c, 0x0e07c, 0x0f0f8, 0x0f9f0, 0x0dfe0, 0x0cfc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 71 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 72 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x03fc0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 73 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ff00, 0x0ff00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 74 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f0fc, 0x0f0fc, 0x0f0f0, 0x0f8f0, 0x078f0, 0x078f0, 0x03cf0, 0x03cf0, 0x03cf0, 0x01ff0, 0x01ff0, 0x01ff0, 0x01ff0, 0x03cf0, 0x03cf0, 0x03cf0, 0x078f0, 0x078f0, 0x0f8f0, 0x0f0f0, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 75 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003fc, 0x003fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 76 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fcfc, 0x0fffc, 0x0fffc, 0x0fffc, 0x0f7bc, 0x0f33c, 0x0f33c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 77 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f07c, 0x0f0fc, 0x0f1fc, 0x0f3fc, 0x0f7fc, 0x0ffbc, 0x0ff3c, 0x0fe3c, 0x0fc3c, 0x0f83c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 78 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 79 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffc, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x03ff0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 80 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f33c, 0x0f73c, 0x0ff3c, 0x0fffc, 0x07ff8, 0x01ff0, 0x03e00, 0x07c00, 0x0fc00, 0x0f800, 0x00000, 0x00000, // char 81 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffc, 0x0f8f8, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x03ff0, 0x03ff0, 0x07cf0, 0x078f0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f8, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 82 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0003c, 0x0007c, 0x000f8, 0x003f0, 0x00fe0, 0x01fc0, 0x03f00, 0x07c00, 0x0f800, 0x0f000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 83 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3fffc, 0x3fffc, 0x3fffc, 0x3cf3c, 0x38f1c, 0x30f0c, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 84 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x07878, 0x03ff0, 0x01fe0, 0x00000, 0x00000, 0x00000, 0x00000, // char 85 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00780, 0x00300, 0x00000, 0x00000, 0x00000, 0x00000, // char 86 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0fffc, 0x0fffc, 0x0fffc, 0x07ff8, 0x03cf0, 0x03cf0, 0x01860, 0x00000, 0x00000, 0x00000, 0x00000, // char 87 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x07878, 0x07878, 0x03cf0, 0x03cf0, 0x01fe0, 0x01fe0, 0x01fe0, 0x01fe0, 0x03cf0, 0x03cf0, 0x07878, 0x07878, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 88 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 89 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f07c, 0x0f03c, 0x0f01c, 0x0f80c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0c03c, 0x0e03c, 0x0f03c, 0x0f83c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 90 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x00ff0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 91 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00007, 0x0000f, 0x0001f, 0x0003e, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x07c00, 0x0f800, 0x0f000, 0x0e000, 0x0c000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 92 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x00ff0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 93 0x00000, 0x00000, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03e7c, 0x07c3e, 0x0f81f, 0x0f00f, 0x0e007, 0x0c003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 94 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0ffff, 0x0ffff, 0x00000, 0x00000, // char 95 0x00000, 0x00000, 0x00000, 0x00000, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x001f0, 0x003e0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 96 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03c00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x07e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 97 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fc, 0x000fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x00ff0, 0x01ff0, 0x03ff0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ffc, 0x03f3c, 0x00000, 0x00000, 0x00000, 0x00000, // char 98 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 99 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03f00, 0x03f00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03fc0, 0x03fe0, 0x03ff0, 0x03cf8, 0x03c7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 100 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 101 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x03cf0, 0x038f0, 0x030f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x00ffc, 0x00ffc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 102 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f3f0, 0x0fff8, 0x07e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x03ff8, 0x03ff0, 0x03c00, 0x03c00, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, // char 103 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fc, 0x000fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x03cf0, 0x07ff0, 0x0fff0, 0x0f3f0, 0x0f1f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 104 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00000, 0x00000, 0x00fc0, 0x00fc0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 105 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x00000, 0x00000, 0x03f00, 0x03f00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, // char 106 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fc, 0x000fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x0f0f0, 0x0f8f0, 0x07cf0, 0x03ff0, 0x01ff0, 0x00ff0, 0x00ff0, 0x01ff0, 0x03ff0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 107 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00fc0, 0x00fc0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 108 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0387c, 0x07cfc, 0x0fffc, 0x0fffc, 0x0fffc, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 109 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03e1c, 0x07f3c, 0x0f9f8, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 110 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 111 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0f9f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x03ff0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, // char 112 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f3f0, 0x0fff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x03ff8, 0x03ff0, 0x03c00, 0x03c00, 0x03c00, 0x03c00, 0x0ff00, 0x0ff00, // char 113 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0fff0, 0x0f3f0, 0x0f1f0, 0x0f0f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x001f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 114 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0007c, 0x003f8, 0x007f0, 0x03f80, 0x07f00, 0x0f800, 0x0f000, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 115 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x0c3c0, 0x0e3c0, 0x0f3c0, 0x0ffc0, 0x07f80, 0x03f00, 0x00000, 0x00000, 0x00000, 0x00000, // char 116 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 117 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 118 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0f33c, 0x0fffc, 0x0fffc, 0x0fffc, 0x07ff8, 0x03cf0, 0x00000, 0x00000, 0x00000, 0x00000, // char 119 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 120 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f07c, 0x0fff8, 0x0fff0, 0x0f800, 0x0f800, 0x07c00, 0x03e00, 0x01ff0, 0x00ff0, // char 121 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f83c, 0x0f83c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0f07c, 0x0f07c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 122 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03f00, 0x03f80, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001fc, 0x001fc, 0x003e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007c0, 0x03f80, 0x03f00, 0x00000, 0x00000, 0x00000, 0x00000, // char 123 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x00000, 0x00000, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 124 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fc, 0x001fc, 0x003e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007c0, 0x03f80, 0x03f80, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001fc, 0x000fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 125 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x08040, 0x0e1f0, 0x0fff8, 0x07ffc, 0x03e1c, 0x00804, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 126 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00180, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03e7c, 0x07c3e, 0x0f81f, 0x0f00f, 0x0f00f, 0x0f81f, 0x0ffff, 0x0ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 127 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, 0x11111, 0x04444, // char 128 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, // char 129 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, 0x3bbbb, 0x2eeee, // char 130 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 131 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003e, 0x0001f, 0x0001f, 0x0003e, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 132 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003e, 0x0001f, 0x0000f, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 133 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3f000, 0x3f800, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 134 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, // char 135 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, // char 136 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff8, 0x007fc, 0x003fe, 0x001ff, 0x000ff, 0x0007f, 0x0007f, 0x000ff, 0x001ff, 0x003fe, 0x007fc, 0x00ff8, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 137 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 138 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000f, 0x0001f, 0x0003f, 0x0007f, 0x000ff, 0x001ff, 0x003fe, 0x007fc, 0x00ff8, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 139 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff8, 0x007fc, 0x003fe, 0x001ff, 0x000ff, 0x0007f, 0x0003f, 0x0001f, 0x0000f, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 140 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, // char 141 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, 0x3ff00, // char 142 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000f, 0x0001f, 0x0003e, 0x0007c, 0x000f8, 0x001f0, 0x003e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 143 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x07c00, 0x3f800, 0x3f000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 144 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03e7c, 0x07c3e, 0x3f81f, 0x3f00f, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 145 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3f00f, 0x3f81f, 0x07c3e, 0x03e7c, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 146 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007c0, 0x00f80, 0x01f00, 0x03e00, 0x07c00, 0x3f800, 0x3f800, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 147 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3ffff, 0x3ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 148 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03e7c, 0x07c3e, 0x3f81f, 0x3f81f, 0x07c3e, 0x03e7c, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 149 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 150 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0007c, 0x0003c, 0x0003c, 0x0003c, 0x03fff, 0x03fff, 0x0003c, 0x0003c, 0x03fff, 0x03fff, 0x0003c, 0x0003c, 0x0003c, 0x0007c, 0x0f0f8, 0x0f9f0, 0x07fe0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 151 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x01ff0, 0x03fe0, 0x07fc0, 0x3ff80, 0x3ff00, 0x3fe00, 0x3fc00, 0x3f800, 0x3f000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 152 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3f000, 0x3f800, 0x3fc00, 0x3fe00, 0x3ff00, 0x3ff80, 0x07fc0, 0x03fe0, 0x01ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 153 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x01ff8, 0x03ffc, 0x07ffe, 0x3fe7f, 0x3fc3f, 0x3f81f, 0x3f00f, 0x3e007, 0x3c003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 154 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3c003, 0x3e007, 0x3f00f, 0x3f81f, 0x3fc3f, 0x3fe7f, 0x07ffe, 0x03ffc, 0x01ff8, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 155 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00fe0, 0x01fc0, 0x03f80, 0x07f00, 0x3fe00, 0x3fc00, 0x3f800, 0x3f800, 0x3fc00, 0x3fe00, 0x07f00, 0x03f80, 0x01fc0, 0x00fe0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 156 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x3ffff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 157 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x01ff8, 0x03ffc, 0x07ffe, 0x3ffff, 0x3fe7f, 0x3fc3f, 0x3fc3f, 0x3fe7f, 0x3ffff, 0x07ffe, 0x03ffc, 0x01ff8, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, // char 158 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x007e0, 0x00ff0, 0x01ff8, 0x03ffc, 0x07ffe, 0x3fe7f, 0x3fc3f, 0x3f81f, 0x3f81f, 0x3fc3f, 0x3fe7f, 0x07ffe, 0x03ffc, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, // char 159 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 160 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fe3c, 0x0fffc, 0x007e0, 0x007c0, 0x0ff80, 0x0ff00, // char 161 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 162 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003fc, 0x003fc, 0x000f0, 0x000f0, 0x030f0, 0x038f0, 0x03cf0, 0x03ef0, 0x01ff0, 0x00ff0, 0x007f0, 0x003f8, 0x001fc, 0x000fc, 0x000fc, 0x000fc, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 163 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f87c, 0x07ff8, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x07ff8, 0x0f87c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 164 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x003fc, 0x003fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 165 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0003c, 0x0007c, 0x000f8, 0x003f0, 0x00fe0, 0x01fc0, 0x03f00, 0x07c00, 0x0f800, 0x0f000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 166 0x00000, 0x00000, 0x00000, 0x00000, 0x03ffc, 0x07ffe, 0x0f81f, 0x0f01f, 0x0003e, 0x0007c, 0x00ff8, 0x01ff8, 0x03e7c, 0x07c3e, 0x0f81f, 0x0f00f, 0x0f00f, 0x0f81f, 0x07c3e, 0x03e7c, 0x01ff8, 0x01ff0, 0x03e00, 0x07c00, 0x0f80f, 0x0f81f, 0x07ffe, 0x03ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 167 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 168 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0003c, 0x0007c, 0x000f8, 0x003f0, 0x00fe0, 0x01fc0, 0x03f00, 0x07c00, 0x0f800, 0x0f000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 169 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0003c, 0x0007c, 0x000f8, 0x003f0, 0x00fe0, 0x01fc0, 0x03f00, 0x07c00, 0x0f800, 0x0f000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x03e00, 0x01e00, 0x007f0, 0x003f0, // char 170 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x3fffc, 0x3fffc, 0x3fffc, 0x3cf3c, 0x38f1c, 0x30f0c, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 171 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f07c, 0x0f03c, 0x0f01c, 0x0f80c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0c03c, 0x0e03c, 0x0f03c, 0x0f83c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 172 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 173 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f07c, 0x0f03c, 0x0f01c, 0x0f80c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0c03c, 0x0e03c, 0x0f03c, 0x0f83c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 174 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f07c, 0x0f03c, 0x0f01c, 0x0f80c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0007c, 0x0003c, 0x0c03c, 0x0e03c, 0x0f03c, 0x0f83c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 175 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f0, 0x007f8, 0x00f3c, 0x00e1c, 0x00e1c, 0x00f3c, 0x007f8, 0x003f0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 176 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03c00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x001e0, 0x003c0, 0x03f80, 0x03f00, // char 177 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003e0, 0x001f0, 0x001f0, 0x03fe0, 0x03fc0, // char 178 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00fc0, 0x00fc0, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x0cf00, 0x0ef00, 0x0ff00, 0x0ff00, 0x07f00, 0x03f80, 0x01fc0, 0x00fe0, 0x00ff0, 0x00ff0, 0x00f70, 0x00f30, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 179 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 180 0x00000, 0x00000, 0x3c700, 0x38f00, 0x1fe00, 0x0fe00, 0x007f0, 0x003f0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 181 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0007c, 0x003f8, 0x007f0, 0x03f80, 0x07f00, 0x0f800, 0x0f000, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 182 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 183 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00f00, 0x01f00, 0x03e00, 0x03e00, 0x01ff0, 0x00ff0, // char 184 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0007c, 0x003f8, 0x007f0, 0x03f80, 0x07f00, 0x0f800, 0x0f000, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 185 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0007c, 0x003f8, 0x007f0, 0x03f80, 0x07f00, 0x0f800, 0x0f000, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x01e00, 0x01e00, 0x01ff0, 0x00ff0, // char 186 0x00000, 0x00000, 0x00000, 0x00000, 0x0f000, 0x0f000, 0x0f300, 0x0f380, 0x073c0, 0x033c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x0c3c0, 0x0e3c0, 0x0f3c0, 0x0ffc0, 0x07f80, 0x03f00, 0x00000, 0x00000, 0x00000, 0x00000, // char 187 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f83c, 0x0f83c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0f07c, 0x0f07c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 188 0x00000, 0x00000, 0x00000, 0x00000, 0x0f1c0, 0x0fbe0, 0x07ff0, 0x03ff8, 0x01f7c, 0x00e3c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 189 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f83c, 0x0f83c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0f07c, 0x0f07c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 190 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f83c, 0x0f83c, 0x07c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003e0, 0x001f0, 0x000f8, 0x0f07c, 0x0f07c, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 191 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03ffc, 0x07ffc, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x03ff0, 0x03ff0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 192 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 193 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 194 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 195 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0fffc, 0x0fffc, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 196 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x003fc, 0x003fc, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 197 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0e07c, 0x0c03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0c03c, 0x0e07c, 0x0f0f8, 0x0f9f0, 0x07fe0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 198 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0e07c, 0x0c03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0c03c, 0x0e07c, 0x0f0f8, 0x0f9f0, 0x07fe0, 0x07fc0, 0x0f800, 0x0f800, 0x07ff0, 0x03ff0, // char 199 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03fc0, 0x07fe0, 0x0f9f0, 0x0f0f8, 0x0e07c, 0x0c03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0c03c, 0x0e07c, 0x0f0f8, 0x0f9f0, 0x07fe0, 0x03fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 200 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 201 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x007e0, 0x007c0, 0x0ff80, 0x0ff00, // char 202 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 203 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x0fffc, 0x0fffc, 0x0f8f0, 0x0f0f0, 0x0e0f0, 0x0c0f0, 0x000f0, 0x000f0, 0x00cf0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00ff0, 0x00cf0, 0x000f0, 0x000f0, 0x0c0f0, 0x0e0f0, 0x0f0f0, 0x0f8f0, 0x0fffc, 0x0fffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 204 0x03f00, 0x03f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x00ff0, 0x00ff0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 205 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x00ff0, 0x00ff0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 206 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00ffc, 0x01ffc, 0x03ef0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07cf0, 0x03ef0, 0x01ffc, 0x00ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 207 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffc, 0x01ffc, 0x03ef0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f3fc, 0x0f3fc, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07cf0, 0x03ef0, 0x01ffc, 0x00ffc, 0x00000, 0x00000, 0x00000, 0x00000, // char 208 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f07c, 0x0f0fc, 0x0f1fc, 0x0f3fc, 0x0f7fc, 0x0ffbc, 0x0ff3c, 0x0fe3c, 0x0fc3c, 0x0f83c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 209 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f07c, 0x0f0fc, 0x0f1fc, 0x0f3fc, 0x0f7fc, 0x0ffbc, 0x0ff3c, 0x0fe3c, 0x0fc3c, 0x0f83c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, // char 210 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 211 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 212 0x3c3c0, 0x3e3e0, 0x1f1f0, 0x0f8f8, 0x07c7c, 0x03c3c, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 213 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00000, 0x00000, // char 214 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f87c, 0x07cf8, 0x03ff0, 0x01fe0, 0x00fc0, 0x00fc0, 0x01fe0, 0x03ff0, 0x07cf8, 0x0f87c, 0x0f03c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 215 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03ffc, 0x07ffc, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f8f0, 0x07ff0, 0x03ff0, 0x03ff0, 0x07cf0, 0x0f8f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0fc, 0x0f0fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 216 0x00ff0, 0x01e78, 0x03c3c, 0x03c3c, 0x01e78, 0x00ff0, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 217 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 218 0x3c3c0, 0x3e3e0, 0x1f1f0, 0x0f8f8, 0x07c7c, 0x03c3c, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 219 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 220 0x03f00, 0x03f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x01ff8, 0x00ff0, 0x007e0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 221 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x3fffc, 0x3fffc, 0x3fffc, 0x3cf3c, 0x38f1c, 0x30f0c, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x00f00, 0x03fc0, 0x03fc0, 0x01e00, 0x03e00, 0x01ff0, 0x00ff0, // char 222 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x01ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e3c, 0x01f3c, 0x01f3c, 0x03e3c, 0x07c3c, 0x0f83c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f83c, 0x07c3c, 0x03c3c, 0x0003c, 0x0003c, 0x00000, 0x00000, 0x00000, 0x00000, // char 223 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0fff0, 0x0f3f0, 0x0f1f0, 0x0f0f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 224 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03e00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 225 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03e00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 226 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03e00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 227 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x00000, 0x00000, 0x00ff0, 0x01ff0, 0x03e00, 0x03c00, 0x03c00, 0x03e00, 0x03ff0, 0x03ff8, 0x03e7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 228 0x00000, 0x00000, 0x3c000, 0x3c000, 0x3c000, 0x3c000, 0x1c3f0, 0x0c3f0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 229 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0fc00, 0x0fe00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 230 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x01e00, 0x03e00, 0x01ff0, 0x00ff0, // char 231 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 232 0x00000, 0x00000, 0x00000, 0x00000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 233 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x001e0, 0x001f0, 0x03fe0, 0x03fc0, // char 234 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03cf0, 0x03cf0, 0x03cf0, 0x03cf0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 235 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fffc, 0x0fffc, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 236 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x003f0, 0x003f0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 237 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x003f0, 0x003f0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00ff0, 0x00ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 238 0x00000, 0x00000, 0x3c000, 0x3c000, 0x3c000, 0x3e000, 0x1ff00, 0x0ff00, 0x07c00, 0x03c00, 0x03c00, 0x03c00, 0x03fc0, 0x03fe0, 0x03ff0, 0x03cf8, 0x03c7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 239 0x00000, 0x00000, 0x00000, 0x00000, 0x03f00, 0x03f00, 0x03c00, 0x03c00, 0x0fff0, 0x0fff0, 0x03c00, 0x03c00, 0x03fc0, 0x03fe0, 0x03ff0, 0x03cf8, 0x03c7c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 240 0x00000, 0x00000, 0x00000, 0x00000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0f9f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 241 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0f9f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x0f0f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 242 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 243 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00780, 0x00fc0, 0x01fe0, 0x03cf0, 0x03870, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 244 0x00000, 0x00000, 0x00000, 0x00000, 0x3c3c0, 0x3e3e0, 0x1f1f0, 0x0f8f8, 0x07c7c, 0x03c3c, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 245 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x00000, 0x00000, 0x03ff0, 0x07ff8, 0x0f87c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x07ff8, 0x03ff0, 0x00000, 0x00000, 0x00000, 0x00000, // char 246 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x03ffc, 0x03ffc, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 247 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03870, 0x03cf0, 0x01fe0, 0x00fc0, 0x00000, 0x00000, 0x03f3c, 0x07ffc, 0x0fff0, 0x0f3f0, 0x0f1f0, 0x0f0f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x003fc, 0x003fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 248 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x01e78, 0x03c3c, 0x03c3c, 0x01e78, 0x00ff0, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x07e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 249 0x00000, 0x00000, 0x00000, 0x00000, 0x03c00, 0x03e00, 0x01f00, 0x00f80, 0x007c0, 0x003c0, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x07e7c, 0x0fff8, 0x0f3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 250 0x00000, 0x00000, 0x00000, 0x00000, 0x3c3c0, 0x3e3e0, 0x1f1f0, 0x0f8f8, 0x07c7c, 0x03c3c, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x07e7c, 0x0e7f8, 0x0c3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 251 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x00000, 0x00000, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x03c3c, 0x07e7c, 0x0e7f8, 0x0c3f0, 0x00000, 0x00000, 0x00000, 0x00000, // char 252 0x00000, 0x00000, 0x00000, 0x00000, 0x0f000, 0x0f800, 0x07c00, 0x03e00, 0x01f00, 0x00f00, 0x00000, 0x00000, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f03c, 0x0f87c, 0x0fff8, 0x0fff0, 0x0f800, 0x0f800, 0x07c00, 0x03e00, 0x01ff0, 0x00ff0, // char 253 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x03ffc, 0x03ffc, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x0c3c0, 0x0e3c0, 0x0f3c0, 0x0ffc0, 0x07f80, 0x03f00, 0x01e00, 0x03e00, 0x01ff0, 0x00ff0, // char 254 0x00000, 0x00000, 0x00000, 0x00000, 0x003c0, 0x003c0, 0x003c0, 0x003c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 255 }; libzia-4.67/data/font8x13.inc0000644000175000017500000010326214662101506012650 00000000000000const short font8x13[] = { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 0 0x00000, 0x00000, 0x0007e, 0x00081, 0x00081, 0x000a5, 0x00081, 0x000a5, 0x00099, 0x00081, 0x0007e, 0x00000, 0x00000, // char 1 0x00000, 0x00000, 0x0007e, 0x000db, 0x00081, 0x000db, 0x000ff, 0x000c3, 0x00099, 0x000ff, 0x0007e, 0x00000, 0x00000, // char 2 0x00000, 0x00000, 0x00000, 0x00036, 0x0007f, 0x0007f, 0x0007f, 0x0003e, 0x0001c, 0x00008, 0x00000, 0x00000, 0x00000, // char 3 0x00000, 0x00000, 0x00000, 0x00008, 0x0001c, 0x0003e, 0x0007f, 0x0003e, 0x0001c, 0x00008, 0x00000, 0x00000, 0x00000, // char 4 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0003c, 0x000e7, 0x000e7, 0x00018, 0x00018, 0x0007e, 0x00000, 0x00000, // char 5 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x000ff, 0x0007e, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 6 0x00000, 0x00000, 0x00000, 0x00018, 0x0003c, 0x00024, 0x00066, 0x00042, 0x000ff, 0x000ff, 0x0000c, 0x00006, 0x00000, // char 7 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000e7, 0x000c3, 0x000c3, 0x000e7, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, // char 8 0x00000, 0x00000, 0x00000, 0x0003c, 0x00066, 0x00042, 0x00042, 0x00066, 0x0003c, 0x00000, 0x00000, 0x00000, 0x00000, // char 9 0x000ff, 0x000ff, 0x000ff, 0x000c3, 0x00099, 0x000bd, 0x000bd, 0x00099, 0x000c3, 0x000ff, 0x000ff, 0x000ff, 0x000ff, // char 10 0x00000, 0x00000, 0x000f0, 0x000e0, 0x000b0, 0x00098, 0x0000c, 0x0003e, 0x00063, 0x00063, 0x0003e, 0x00000, 0x00000, // char 11 0x00000, 0x00000, 0x00000, 0x0007e, 0x000c3, 0x000c3, 0x0007e, 0x00018, 0x000ff, 0x000ff, 0x00018, 0x00000, 0x00000, // char 12 0x00000, 0x00000, 0x00000, 0x0007c, 0x0000c, 0x0007c, 0x0000c, 0x0000c, 0x0000e, 0x0000f, 0x00007, 0x00000, 0x00000, // char 13 0x00000, 0x00000, 0x00000, 0x0007e, 0x00066, 0x0007e, 0x00066, 0x00066, 0x00073, 0x00033, 0x00003, 0x00000, 0x00000, // char 14 0x00000, 0x00000, 0x00000, 0x00018, 0x000db, 0x0003c, 0x000e7, 0x0003c, 0x000db, 0x00018, 0x00000, 0x00000, 0x00000, // char 15 0x00000, 0x00000, 0x00006, 0x0000e, 0x0001e, 0x0003e, 0x0007e, 0x0003e, 0x0001e, 0x0000e, 0x00006, 0x00000, 0x00000, // char 16 0x00000, 0x00000, 0x00060, 0x00070, 0x00078, 0x0007c, 0x0007e, 0x0007c, 0x00078, 0x00070, 0x00060, 0x00000, 0x00000, // char 17 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x00018, 0x00018, 0x00018, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, // char 18 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x00000, 0x00066, 0x00066, 0x00000, 0x00000, // char 19 0x00000, 0x00000, 0x0007e, 0x0006d, 0x0006d, 0x0006d, 0x0006e, 0x0006c, 0x0006c, 0x0006c, 0x0006c, 0x00000, 0x00000, // char 20 0x00000, 0x00000, 0x0007e, 0x00082, 0x0003c, 0x00066, 0x000c3, 0x00066, 0x0003c, 0x00060, 0x000c3, 0x0007e, 0x00000, // char 21 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x00000, 0x00000, // char 22 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x00018, 0x00018, 0x0007e, 0x0007e, 0x0003c, 0x00018, 0x0007e, 0x00000, // char 23 0x00000, 0x00000, 0x00018, 0x0003c, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, // char 24 0x00000, 0x00000, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0007e, 0x0007e, 0x0003c, 0x00018, 0x00000, 0x00000, // char 25 0x00000, 0x00000, 0x00000, 0x00010, 0x00030, 0x0007e, 0x000fe, 0x0007e, 0x00030, 0x00010, 0x00000, 0x00000, 0x00000, // char 26 0x00000, 0x00000, 0x00000, 0x00010, 0x00018, 0x000fc, 0x000fe, 0x000fc, 0x00018, 0x00010, 0x00000, 0x00000, 0x00000, // char 27 0x00000, 0x00000, 0x00000, 0x00000, 0x00006, 0x00006, 0x00006, 0x00006, 0x000fe, 0x000fe, 0x00000, 0x00000, 0x00000, // char 28 0x00000, 0x00000, 0x00000, 0x00000, 0x00024, 0x00066, 0x000ff, 0x00066, 0x00024, 0x00000, 0x00000, 0x00000, 0x00000, // char 29 0x00000, 0x00000, 0x00000, 0x00010, 0x00038, 0x00038, 0x0007c, 0x0007c, 0x000fe, 0x000fe, 0x00000, 0x00000, 0x00000, // char 30 0x00000, 0x00000, 0x00000, 0x000fe, 0x000fe, 0x0007c, 0x0007c, 0x00038, 0x00038, 0x00010, 0x00000, 0x00000, 0x00000, // char 31 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 32 0x00000, 0x00000, 0x00018, 0x0003c, 0x0003c, 0x0003c, 0x00018, 0x00018, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 33 0x00000, 0x000c6, 0x000c6, 0x00044, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 34 0x00000, 0x00000, 0x0006c, 0x0006c, 0x000fe, 0x0006c, 0x0006c, 0x0006c, 0x000fe, 0x0006c, 0x0006c, 0x00000, 0x00000, // char 35 0x00018, 0x00018, 0x0007c, 0x000da, 0x0001a, 0x0001a, 0x0007c, 0x000d8, 0x000d8, 0x000da, 0x0007c, 0x00018, 0x00018, // char 36 0x00000, 0x00000, 0x0008e, 0x000ca, 0x0006e, 0x00030, 0x00018, 0x0000c, 0x000e6, 0x000a2, 0x000e0, 0x00000, 0x00000, // char 37 0x00000, 0x0001c, 0x00036, 0x00036, 0x0001c, 0x0009c, 0x000f6, 0x00062, 0x00062, 0x00076, 0x000dc, 0x00000, 0x00000, // char 38 0x00000, 0x00018, 0x00018, 0x0000c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 39 0x00000, 0x00070, 0x00018, 0x0000c, 0x00006, 0x00006, 0x00006, 0x00006, 0x0000c, 0x00018, 0x00070, 0x00000, 0x00000, // char 40 0x00000, 0x0000e, 0x00018, 0x00030, 0x00060, 0x00060, 0x00060, 0x00060, 0x00030, 0x00018, 0x0000e, 0x00000, 0x00000, // char 41 0x00000, 0x00000, 0x00000, 0x00010, 0x000d6, 0x0007c, 0x000fe, 0x0007c, 0x000d6, 0x00010, 0x00000, 0x00000, 0x00000, // char 42 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, // char 43 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x0000c, 0x00004, // char 44 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007e, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 45 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 46 0x00000, 0x00000, 0x00080, 0x000c0, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00002, 0x00000, 0x00000, 0x00000, // char 47 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000e6, 0x000f6, 0x000de, 0x000ce, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 48 0x00000, 0x00000, 0x00018, 0x0001c, 0x0001e, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0007e, 0x00000, 0x00000, // char 49 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 50 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c0, 0x00070, 0x000c0, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 51 0x00000, 0x00000, 0x00040, 0x00060, 0x00070, 0x00078, 0x0006c, 0x0007e, 0x00060, 0x00060, 0x000f0, 0x00000, 0x00000, // char 52 0x00000, 0x00000, 0x000fe, 0x00006, 0x00006, 0x0007e, 0x000c0, 0x000c0, 0x000c0, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 53 0x00000, 0x00000, 0x00078, 0x0000c, 0x00006, 0x00006, 0x0007e, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 54 0x00000, 0x00000, 0x000fe, 0x000c6, 0x000c0, 0x00060, 0x00030, 0x00030, 0x00018, 0x00018, 0x00018, 0x00000, 0x00000, // char 55 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 56 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x00060, 0x00030, 0x0001c, 0x00000, 0x00000, // char 57 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 58 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00018, 0x00018, 0x0000c, 0x00004, // char 59 0x00000, 0x00000, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x00000, 0x00000, // char 60 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x00000, 0x00000, 0x00000, 0x000fe, 0x00000, 0x00000, 0x00000, // char 61 0x00000, 0x00000, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00006, 0x00000, 0x00000, // char 62 0x00000, 0x00000, 0x0007c, 0x000e6, 0x000c2, 0x00060, 0x00030, 0x00018, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, // char 63 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000f6, 0x000de, 0x000de, 0x000b6, 0x00006, 0x0007c, 0x00000, 0x00000, // char 64 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 65 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x000cc, 0x000cc, 0x000cc, 0x0007e, 0x00000, 0x00000, // char 66 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 67 0x00000, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 68 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 69 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0000c, 0x0002c, 0x0003c, 0x0002c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 70 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x000f6, 0x000c6, 0x000cc, 0x000b8, 0x00000, 0x00000, // char 71 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 72 0x00000, 0x00000, 0x00078, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 73 0x00000, 0x00000, 0x000f0, 0x00060, 0x00060, 0x00060, 0x00060, 0x00060, 0x00066, 0x00066, 0x0003c, 0x00000, 0x00000, // char 74 0x00000, 0x00000, 0x000ce, 0x000cc, 0x0006c, 0x0006c, 0x0003c, 0x0006c, 0x0006c, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 75 0x00000, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 76 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000ee, 0x000fe, 0x000d6, 0x000d6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 77 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 78 0x00000, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 79 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 80 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000d6, 0x000f6, 0x0007c, 0x00060, 0x000e0, 0x00000, // char 81 0x00000, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 82 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x0000c, 0x00038, 0x00060, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 83 0x00000, 0x00000, 0x0007e, 0x0007e, 0x0005a, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 84 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 85 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00010, 0x00000, 0x00000, // char 86 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000d6, 0x000d6, 0x000d6, 0x000fe, 0x0006c, 0x0006c, 0x00000, 0x00000, // char 87 0x00000, 0x00000, 0x000c6, 0x000c6, 0x0006c, 0x0006c, 0x00038, 0x0006c, 0x0006c, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 88 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 89 0x00000, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x00086, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 90 0x00000, 0x00000, 0x0003c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0003c, 0x00000, 0x00000, // char 91 0x00000, 0x00000, 0x00000, 0x00002, 0x00006, 0x0000c, 0x00018, 0x00030, 0x00060, 0x000c0, 0x00080, 0x00000, 0x00000, // char 92 0x00000, 0x00000, 0x0003c, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x0003c, 0x00000, 0x00000, // char 93 0x00018, 0x0003c, 0x00066, 0x00042, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 94 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x00000, // char 95 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 96 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 97 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x0003c, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x00076, 0x00000, 0x00000, // char 98 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 99 0x00000, 0x00000, 0x00070, 0x00060, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 100 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000fe, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 101 0x00000, 0x00000, 0x00038, 0x0006c, 0x0004c, 0x0000c, 0x0003e, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 102 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000dc, 0x00066, 0x00066, 0x00066, 0x0007c, 0x00060, 0x00066, 0x0003c, // char 103 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x0006c, 0x000dc, 0x000cc, 0x000cc, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 104 0x00000, 0x00000, 0x00030, 0x00030, 0x00000, 0x00038, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 105 0x00000, 0x00000, 0x00060, 0x00060, 0x00000, 0x00070, 0x00060, 0x00060, 0x00060, 0x00060, 0x00066, 0x00066, 0x0003c, // char 106 0x00000, 0x00000, 0x0000e, 0x0000c, 0x0000c, 0x000cc, 0x0006c, 0x0003c, 0x0003c, 0x0006c, 0x000ce, 0x00000, 0x00000, // char 107 0x00000, 0x00000, 0x00038, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 108 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0006e, 0x000fe, 0x000d6, 0x000d6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 109 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 110 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 111 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0000c, 0x0000c, 0x0001e, // char 112 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000dc, 0x00066, 0x00066, 0x00066, 0x0007c, 0x00060, 0x00060, 0x000f0, // char 113 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00076, 0x000dc, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 114 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x0001c, 0x00070, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 115 0x00000, 0x00000, 0x00010, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00000, 0x00000, // char 116 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 117 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 118 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000d6, 0x000d6, 0x000fe, 0x0006c, 0x00000, 0x00000, // char 119 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x0006c, 0x00038, 0x00038, 0x0006c, 0x000c6, 0x00000, 0x00000, // char 120 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x00060, 0x0003c, // char 121 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000fe, 0x00000, 0x00000, // char 122 0x00000, 0x00000, 0x00070, 0x00018, 0x00018, 0x00018, 0x0000e, 0x00018, 0x00018, 0x00018, 0x00070, 0x00000, 0x00000, // char 123 0x00000, 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x00000, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x00000, 0x00000, // char 124 0x00000, 0x00000, 0x0000e, 0x00018, 0x00018, 0x00018, 0x00070, 0x00018, 0x00018, 0x00018, 0x0000e, 0x00000, 0x00000, // char 125 0x00000, 0x00000, 0x00000, 0x000dc, 0x00076, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 126 0x00000, 0x00000, 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000fe, 0x00000, 0x00000, 0x00000, 0x00000, // char 127 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, 0x00088, 0x00022, // char 128 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, 0x000aa, 0x00055, // char 129 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, 0x000bb, 0x000ee, // char 130 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, // char 131 0x00018, 0x00018, 0x00018, 0x00018, 0x0000c, 0x00006, 0x00003, 0x00006, 0x0000c, 0x00018, 0x00018, 0x00018, 0x00018, // char 132 0x00018, 0x00018, 0x00018, 0x00018, 0x0000c, 0x00006, 0x00003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 133 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c0, 0x00060, 0x00030, 0x00018, 0x00018, 0x00018, 0x00018, // char 134 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, // char 135 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, // char 136 0x0003c, 0x0003c, 0x0003c, 0x0001e, 0x0000f, 0x00007, 0x0000f, 0x0001e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 137 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 138 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00007, 0x0000f, 0x0001e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 139 0x0003c, 0x0003c, 0x0003c, 0x0001e, 0x0000f, 0x00007, 0x00003, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 140 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, 0x0000f, // char 141 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, 0x000f0, // char 142 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00003, 0x00006, 0x0000c, 0x00018, 0x00018, 0x00018, 0x00018, // char 143 0x00018, 0x00018, 0x00018, 0x00018, 0x00030, 0x00060, 0x000c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 144 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00066, 0x000c3, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 145 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000c3, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, // char 146 0x00018, 0x00018, 0x00018, 0x00018, 0x00030, 0x00060, 0x000c0, 0x00060, 0x00030, 0x00018, 0x00018, 0x00018, 0x00018, // char 147 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 148 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00066, 0x000c3, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, // char 149 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 150 0x00000, 0x00000, 0x00078, 0x000cc, 0x00006, 0x0007f, 0x00006, 0x0007f, 0x00006, 0x000cc, 0x00078, 0x00000, 0x00000, // char 151 0x0003c, 0x0003c, 0x0003c, 0x00078, 0x000f0, 0x000e0, 0x000c0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 152 0x00000, 0x00000, 0x00000, 0x00000, 0x000c0, 0x000e0, 0x000f0, 0x00078, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 153 0x0003c, 0x0003c, 0x0003c, 0x0007e, 0x000e7, 0x000c3, 0x00081, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 154 0x00000, 0x00000, 0x00000, 0x00000, 0x00081, 0x000c3, 0x000e7, 0x0007e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 155 0x0003c, 0x0003c, 0x00038, 0x00070, 0x000e0, 0x000c0, 0x000e0, 0x00070, 0x00038, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 156 0x00000, 0x00000, 0x00000, 0x00000, 0x000ff, 0x000ff, 0x000ff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 157 0x0003c, 0x0003c, 0x0003c, 0x0007e, 0x000ff, 0x000e7, 0x000ff, 0x0007e, 0x0003c, 0x0003c, 0x0003c, 0x0003c, 0x0003c, // char 158 0x00018, 0x00018, 0x0003c, 0x0007e, 0x000e7, 0x000c3, 0x000e7, 0x0007e, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, // char 159 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 160 0x00000, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000f6, 0x00018, 0x000f0, // char 161 0x0006c, 0x00038, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 162 0x00000, 0x00000, 0x0001e, 0x0000c, 0x0006c, 0x0003c, 0x0001c, 0x0000e, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 163 0x00000, 0x00000, 0x00000, 0x000c6, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x000c6, 0x00000, 0x00000, 0x00000, // char 164 0x0006c, 0x00038, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 165 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x0000c, 0x00038, 0x00060, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 166 0x00000, 0x0007e, 0x000c3, 0x0003c, 0x00066, 0x000c3, 0x00066, 0x0003c, 0x00060, 0x000c3, 0x0007e, 0x00000, 0x00000, // char 167 0x000c6, 0x000c6, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 168 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x0000c, 0x00038, 0x00060, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 169 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x0000c, 0x00038, 0x00060, 0x000c6, 0x000c6, 0x0007c, 0x00060, 0x0001c, // char 170 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000b6, 0x00030, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00000, 0x00000, // char 171 0x000e0, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 172 0x00000, 0x00000, 0x00000, 0x00000, 0x0007e, 0x00000, 0x0007e, 0x00000, 0x0007e, 0x00000, 0x00000, 0x00000, 0x00000, // char 173 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 174 0x00030, 0x00030, 0x00000, 0x000fe, 0x000c6, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000c6, 0x000fe, 0x00000, 0x00000, // char 175 0x00000, 0x0001c, 0x00036, 0x00036, 0x0001c, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 176 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00018, 0x00070, // char 177 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00018, 0x0000c, 0x00078, // char 178 0x00000, 0x00000, 0x00038, 0x00030, 0x000b0, 0x000f0, 0x00070, 0x00038, 0x0003c, 0x00034, 0x00078, 0x00000, 0x00000, // char 179 0x000e0, 0x00030, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 180 0x00000, 0x000b0, 0x000e0, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 181 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x0001c, 0x00070, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 182 0x0006c, 0x00038, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 183 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00030, 0x00060, 0x0003c, // char 184 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x0001c, 0x00070, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 185 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x0001c, 0x00070, 0x000c6, 0x0007c, 0x00060, 0x0003c, // char 186 0x00000, 0x000c0, 0x000d0, 0x00058, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00000, 0x00000, // char 187 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x000fe, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000fe, 0x00000, 0x00000, // char 188 0x00000, 0x000d8, 0x0006c, 0x00036, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 189 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x000fe, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000fe, 0x00000, 0x00000, // char 190 0x00000, 0x00000, 0x00030, 0x00030, 0x00000, 0x000fe, 0x00060, 0x00030, 0x00018, 0x0000c, 0x000fe, 0x00000, 0x00000, // char 191 0x000e0, 0x00030, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 192 0x000e0, 0x00030, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 193 0x00038, 0x0006c, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 194 0x0006c, 0x00038, 0x00000, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 195 0x00000, 0x000c6, 0x000c6, 0x00010, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000fe, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 196 0x000e0, 0x00030, 0x00000, 0x0001e, 0x0000c, 0x0000c, 0x0000c, 0x0000c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 197 0x000e0, 0x00030, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 198 0x00000, 0x00000, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x000c0, 0x0007c, // char 199 0x0006c, 0x00038, 0x00000, 0x00078, 0x000cc, 0x00086, 0x00006, 0x00006, 0x00086, 0x000cc, 0x00078, 0x00000, 0x00000, // char 200 0x000e0, 0x00030, 0x00000, 0x000fe, 0x000cc, 0x0002c, 0x0003c, 0x0002c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 201 0x00000, 0x00000, 0x00000, 0x000fe, 0x000cc, 0x0002c, 0x0003c, 0x0002c, 0x0008c, 0x000cc, 0x000fe, 0x00018, 0x000f0, // char 202 0x0006c, 0x0006c, 0x00000, 0x000fe, 0x000cc, 0x0002c, 0x0003c, 0x0002c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 203 0x0006c, 0x00038, 0x00000, 0x000fe, 0x000cc, 0x0002c, 0x0003c, 0x0002c, 0x0008c, 0x000cc, 0x000fe, 0x00000, 0x00000, // char 204 0x00070, 0x00018, 0x00000, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 205 0x00038, 0x0006c, 0x00000, 0x0003c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 206 0x0006c, 0x00038, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 207 0x00000, 0x00000, 0x0003e, 0x0006c, 0x000cc, 0x000de, 0x000cc, 0x000cc, 0x000cc, 0x0006c, 0x0003e, 0x00000, 0x00000, // char 208 0x000e0, 0x00030, 0x00000, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 209 0x0006c, 0x00038, 0x00000, 0x000c6, 0x000ce, 0x000de, 0x000f6, 0x000e6, 0x000c6, 0x000c6, 0x000c6, 0x00000, 0x00000, // char 210 0x000e0, 0x00030, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 211 0x00038, 0x0006c, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 212 0x00098, 0x000cc, 0x00066, 0x00000, 0x00038, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 213 0x000c6, 0x000c6, 0x00000, 0x00038, 0x0006c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0006c, 0x00038, 0x00000, 0x00000, // char 214 0x00000, 0x00000, 0x00000, 0x00000, 0x000c6, 0x0006c, 0x00038, 0x00038, 0x0006c, 0x000c6, 0x00000, 0x00000, 0x00000, // char 215 0x0006c, 0x00038, 0x00000, 0x0007e, 0x000cc, 0x000cc, 0x000cc, 0x0007c, 0x0006c, 0x000cc, 0x000ce, 0x00000, 0x00000, // char 216 0x0003c, 0x00066, 0x0003c, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 217 0x000e0, 0x00030, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 218 0x00098, 0x000cc, 0x00066, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 219 0x000c6, 0x000c6, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 220 0x00070, 0x00018, 0x00000, 0x00066, 0x00066, 0x00066, 0x0003c, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 221 0x00000, 0x00000, 0x00000, 0x000fe, 0x000b6, 0x00032, 0x00030, 0x00030, 0x00030, 0x00030, 0x00078, 0x00060, 0x0003c, // char 222 0x00000, 0x00000, 0x00000, 0x0003c, 0x00066, 0x00066, 0x00036, 0x00066, 0x000c6, 0x00066, 0x00006, 0x00000, 0x00000, // char 223 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x00076, 0x000dc, 0x0000c, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 224 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 225 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 226 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 227 0x00000, 0x00000, 0x00066, 0x00066, 0x00000, 0x0003c, 0x00060, 0x0007c, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 228 0x00080, 0x00080, 0x0009c, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 229 0x00000, 0x00000, 0x000e0, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 230 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00060, 0x0003c, // char 231 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x00006, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 232 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x0007c, 0x000c6, 0x000fe, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 233 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x000c6, 0x000fe, 0x00006, 0x000c6, 0x0007c, 0x0000c, 0x00078, // char 234 0x00000, 0x00000, 0x0006c, 0x0006c, 0x00000, 0x0007c, 0x000c6, 0x000fe, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 235 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x0007c, 0x000c6, 0x000fe, 0x00006, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 236 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 237 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0001c, 0x00018, 0x00018, 0x00018, 0x00018, 0x0003c, 0x00000, 0x00000, // char 238 0x00080, 0x00080, 0x000f0, 0x00060, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 239 0x00000, 0x00070, 0x00060, 0x000fc, 0x00060, 0x00078, 0x0006c, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 240 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 241 0x00000, 0x00000, 0x000d8, 0x00070, 0x00000, 0x00076, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x000cc, 0x00000, 0x00000, // char 242 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 243 0x00000, 0x00010, 0x00038, 0x0006c, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 244 0x00000, 0x00098, 0x000cc, 0x00066, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 245 0x00000, 0x00000, 0x000c6, 0x000c6, 0x00000, 0x0007c, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x0007c, 0x00000, 0x00000, // char 246 0x00000, 0x00000, 0x00000, 0x00018, 0x00018, 0x00000, 0x0007e, 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, // char 247 0x00000, 0x00000, 0x0006c, 0x00038, 0x00000, 0x00076, 0x000dc, 0x000cc, 0x0000c, 0x0000c, 0x0001e, 0x00000, 0x00000, // char 248 0x00000, 0x0003c, 0x00066, 0x0003c, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 249 0x00000, 0x00060, 0x00030, 0x00018, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x000dc, 0x00000, 0x00000, // char 250 0x00000, 0x00098, 0x000cc, 0x00066, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0009c, 0x00000, 0x00000, // char 251 0x00000, 0x00000, 0x00066, 0x00066, 0x00000, 0x00066, 0x00066, 0x00066, 0x00066, 0x00066, 0x0009c, 0x00000, 0x00000, // char 252 0x00000, 0x000c0, 0x00060, 0x00030, 0x00000, 0x000c6, 0x000c6, 0x000c6, 0x000c6, 0x000fc, 0x000c0, 0x00060, 0x0003c, // char 253 0x00000, 0x00000, 0x00010, 0x00018, 0x00018, 0x0007e, 0x00018, 0x00018, 0x00098, 0x000d8, 0x00070, 0x00060, 0x0003c, // char 254 0x00000, 0x00018, 0x00018, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 255 }; libzia-4.67/data/Makefile.in0000644000175000017500000003163514752576426012655 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = font13x24.inc font18x32.inc font8x13.inc font9x16.inc all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libzia-4.67/data/font13x24.inc0000644000175000017500000016466314662101506012742 00000000000000const short font13x24[] = { 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 0 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fc, 0x01803, 0x01803, 0x01803, 0x01b1b, 0x01b1b, 0x01b1b, 0x01803, 0x01803, 0x01b1b, 0x018e3, 0x018e3, 0x01803, 0x01803, 0x01803, 0x007fc, 0x00000, 0x00000, 0x00000, // char 1 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00ffe, 0x00ffe, 0x00ce6, 0x00802, 0x00802, 0x00ce6, 0x00ffe, 0x00ffe, 0x00ffe, 0x00c06, 0x00c06, 0x008e2, 0x00ffe, 0x00ffe, 0x003f8, 0x00000, 0x00000, 0x00000, // char 2 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x007bc, 0x00ffe, 0x00ffe, 0x00ffe, 0x00ffe, 0x00ffe, 0x007fc, 0x003f8, 0x001f0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, // char 3 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x003f8, 0x003f8, 0x007fc, 0x00ffe, 0x00ffe, 0x007fc, 0x003f8, 0x003f8, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 4 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x003f8, 0x003f8, 0x003f8, 0x00f1e, 0x00f1e, 0x00f1e, 0x00f1e, 0x000e0, 0x000e0, 0x000e0, 0x007fc, 0x007fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 5 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x003f8, 0x007fc, 0x007fc, 0x00ffe, 0x00ffe, 0x00ffe, 0x007fc, 0x000e0, 0x000e0, 0x000e0, 0x003f8, 0x003f8, 0x00000, 0x00000, 0x00000, 0x00000, // char 6 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x003f8, 0x003f8, 0x003f8, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 7 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01f1f, 0x01f1f, 0x01c07, 0x01c07, 0x01c07, 0x01f1f, 0x01f1f, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, // char 8 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x003f8, 0x00f1e, 0x00f1e, 0x00c06, 0x00c06, 0x00c06, 0x00f1e, 0x00f1e, 0x003f8, 0x003f8, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 9 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01c07, 0x01c07, 0x010e1, 0x010e1, 0x013f9, 0x013f9, 0x013f9, 0x010e1, 0x010e1, 0x01c07, 0x01c07, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, // char 10 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00fc0, 0x00f00, 0x00f80, 0x009c0, 0x008e0, 0x00070, 0x00038, 0x001fc, 0x003fe, 0x00707, 0x00707, 0x00707, 0x00707, 0x003fe, 0x001fc, 0x00000, 0x00000, 0x00000, 0x00000, // char 11 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x007fc, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x007fc, 0x003f8, 0x000e0, 0x00ffe, 0x00ffe, 0x00ffe, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 12 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff0, 0x00ff0, 0x00030, 0x00ff0, 0x00ff0, 0x00030, 0x00030, 0x00030, 0x00030, 0x0003c, 0x0003e, 0x0003e, 0x0003e, 0x0001c, 0x00000, 0x00000, 0x00000, 0x00000, // char 13 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ff8, 0x00ff8, 0x00e38, 0x00ff8, 0x00ff8, 0x00e38, 0x00e38, 0x00e38, 0x00e38, 0x00f8e, 0x00f8e, 0x00f8e, 0x0038e, 0x0038e, 0x0000e, 0x00000, 0x00000, 0x00000, // char 14 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00eee, 0x00eee, 0x001f0, 0x00f1e, 0x00f1e, 0x001f0, 0x00eee, 0x00eee, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, // char 15 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000c, 0x0001c, 0x0003c, 0x0007c, 0x000fc, 0x001fc, 0x003fc, 0x007fc, 0x007fc, 0x003fc, 0x001fc, 0x000fc, 0x0007c, 0x0003c, 0x0001c, 0x0000c, 0x00000, 0x00000, 0x00000, // char 16 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00600, 0x00700, 0x00780, 0x007c0, 0x007e0, 0x007f0, 0x007f8, 0x007fc, 0x007fc, 0x007f8, 0x007f0, 0x007e0, 0x007c0, 0x00780, 0x00700, 0x00600, 0x00000, 0x00000, 0x00000, // char 17 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007fc, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x007fc, 0x003f8, 0x001f0, 0x000e0, 0x00040, 0x00000, 0x00000, 0x00000, // char 18 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x00000, 0x00000, // char 19 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007f8, 0x0066c, 0x00666, 0x00666, 0x00666, 0x00666, 0x0066e, 0x0067c, 0x00678, 0x00660, 0x00660, 0x00660, 0x00660, 0x00660, 0x00660, 0x00660, 0x00000, 0x00000, 0x00000, // char 20 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fc, 0x00e06, 0x00e06, 0x0001c, 0x001f8, 0x003f8, 0x0071c, 0x01c07, 0x01c07, 0x01c07, 0x0071c, 0x007f8, 0x003f0, 0x00700, 0x00c07, 0x00c07, 0x007fc, 0x00000, 0x00000, // char 21 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x00000, 0x00000, 0x00000, // char 22 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007fc, 0x007fc, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x007fc, 0x007fc, 0x003f8, 0x001f0, 0x000e0, 0x00040, 0x007fc, 0x007fc, 0x00000, // char 23 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007fc, 0x007fc, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 24 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x007fc, 0x007fc, 0x003f8, 0x001f0, 0x000e0, 0x00040, 0x00000, 0x00000, // char 25 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00080, 0x00180, 0x00380, 0x007fe, 0x00ffe, 0x00ffe, 0x007fe, 0x00380, 0x00180, 0x00080, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 26 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00020, 0x00030, 0x00038, 0x00ffc, 0x00ffe, 0x00ffe, 0x00ffc, 0x00038, 0x00030, 0x00020, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 27 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x01ffe, 0x01ffe, 0x01ffe, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 28 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00110, 0x00318, 0x0071c, 0x00ffe, 0x00ffe, 0x0071c, 0x00318, 0x00110, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 29 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x001f0, 0x001f0, 0x003f8, 0x003f8, 0x007fc, 0x007fc, 0x00ffe, 0x00ffe, 0x00ffe, 0x00ffe, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 30 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00ffe, 0x00ffe, 0x00ffe, 0x007fc, 0x007fc, 0x003f8, 0x003f8, 0x001f0, 0x001f0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, // char 31 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 32 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x003f8, 0x003f8, 0x003f8, 0x003f8, 0x003f8, 0x003f8, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 33 0x00000, 0x00000, 0x00000, 0x00f1e, 0x00f1e, 0x00f1e, 0x00f1e, 0x00f1e, 0x00318, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 34 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00ffe, 0x00ffe, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00ffe, 0x00ffe, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x00000, 0x00000, // char 35 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x003f8, 0x00eee, 0x00eee, 0x00cee, 0x000ee, 0x000ee, 0x000ee, 0x003f8, 0x003f8, 0x00ee0, 0x00ee0, 0x00ee0, 0x00ee6, 0x00eee, 0x00eee, 0x003f8, 0x000e0, 0x000e0, 0x00000, // char 36 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0001e, 0x00c12, 0x00e12, 0x0071e, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x00f1c, 0x0090e, 0x00906, 0x00f00, 0x00000, 0x00000, 0x00000, // char 37 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000f8, 0x001dc, 0x0018c, 0x0018c, 0x0018c, 0x001dc, 0x000f8, 0x000fc, 0x00dfc, 0x00fce, 0x00787, 0x00307, 0x00307, 0x0078f, 0x00fde, 0x00cfc, 0x00000, 0x00000, 0x00000, // char 38 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00030, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 39 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00780, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x00780, 0x00000, 0x00000, 0x00000, // char 40 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x0003c, 0x00000, 0x00000, 0x00000, // char 41 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x01ce7, 0x01ce7, 0x007fc, 0x01fff, 0x01fff, 0x007fc, 0x01ce7, 0x01ce7, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 42 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x007fc, 0x007fc, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 43 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000f0, 0x00078, 0x00038, 0x00018, // char 44 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fc, 0x007fc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 45 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 46 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00800, 0x00c00, 0x00e00, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0000e, 0x00006, 0x00002, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 47 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f0e, 0x00f8e, 0x00fce, 0x00eee, 0x00e7e, 0x00e3e, 0x00e1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 48 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001c0, 0x001e0, 0x001f0, 0x001f8, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x007f0, 0x00000, 0x00000, 0x00000, // char 49 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071e, 0x00e0e, 0x00e0e, 0x00e00, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0000e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 50 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071e, 0x00e0e, 0x00e0e, 0x00e00, 0x00e00, 0x00700, 0x003c0, 0x003c0, 0x00700, 0x00e00, 0x00e00, 0x00e0e, 0x00e0e, 0x0071e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 51 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e00, 0x00f00, 0x00f80, 0x00fc0, 0x00ee0, 0x00e70, 0x00e38, 0x00e1c, 0x00e0e, 0x01ffe, 0x00e00, 0x00e00, 0x00e00, 0x00e00, 0x00e00, 0x01f00, 0x00000, 0x00000, 0x00000, // char 52 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x003fe, 0x00f00, 0x00e00, 0x00e00, 0x00e00, 0x00e00, 0x00e00, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 53 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003e0, 0x00078, 0x0003c, 0x0001c, 0x0000e, 0x0000e, 0x003fe, 0x0071e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 54 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e00, 0x00700, 0x00700, 0x00380, 0x00380, 0x001c0, 0x001c0, 0x000e0, 0x000e0, 0x00070, 0x00070, 0x00038, 0x00038, 0x00000, 0x00000, 0x00000, // char 55 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 56 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071c, 0x0060e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1c, 0x00ff8, 0x00ff0, 0x00e00, 0x00600, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00078, 0x00000, 0x00000, 0x00000, // char 57 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 58 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000f0, 0x00078, 0x00038, 0x00018, // char 59 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x00000, 0x00000, 0x00000, 0x00000, // char 60 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 61 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x00000, 0x00000, 0x00000, 0x00000, // char 62 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00c06, 0x00c06, 0x00c00, 0x00e00, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x000e0, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 63 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00fce, 0x00eee, 0x00eee, 0x006ee, 0x003ce, 0x0000e, 0x0000e, 0x0000e, 0x0001e, 0x007f8, 0x00000, 0x00000, 0x00000, // char 64 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007bc, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 65 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001fe, 0x0039c, 0x0071c, 0x0071c, 0x0071c, 0x0039c, 0x001fc, 0x001fc, 0x0039c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0039c, 0x001fe, 0x00000, 0x00000, 0x00000, // char 66 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f0, 0x00638, 0x00e1c, 0x00c0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00c0e, 0x00e1c, 0x00638, 0x003f0, 0x00000, 0x00000, 0x00000, // char 67 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x001dc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0031c, 0x0039c, 0x001dc, 0x000fe, 0x00000, 0x00000, 0x00000, // char 68 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 69 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0003e, 0x00000, 0x00000, 0x00000, // char 70 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f0, 0x00e38, 0x00e1c, 0x00c0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00fce, 0x00fce, 0x00e0e, 0x00e1c, 0x00e38, 0x00df0, 0x00000, 0x00000, 0x00000, // char 71 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 72 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 73 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007c0, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x00380, 0x0038e, 0x0038e, 0x0039e, 0x001f8, 0x00000, 0x00000, 0x00000, // char 74 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0071e, 0x0071c, 0x0071c, 0x0039c, 0x0039c, 0x001dc, 0x001dc, 0x000fc, 0x000fc, 0x001dc, 0x001dc, 0x0039c, 0x0039c, 0x0071c, 0x0071c, 0x0071e, 0x00000, 0x00000, 0x00000, // char 75 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 76 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00c06, 0x00e0e, 0x00e0e, 0x00f1e, 0x00fbe, 0x00ffe, 0x00eee, 0x00e4e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 77 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e1e, 0x00e3e, 0x00e7e, 0x00eee, 0x00fce, 0x00f8e, 0x00f0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 78 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f0, 0x007bc, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x007bc, 0x001f0, 0x00000, 0x00000, 0x00000, // char 79 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003fe, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1c, 0x00e1c, 0x0071c, 0x003fc, 0x001fc, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0003e, 0x00000, 0x00000, 0x00000, // char 80 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e4e, 0x00fde, 0x003fc, 0x003f8, 0x00780, 0x00f00, 0x00e00, 0x00000, // char 81 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003fe, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1c, 0x00e1c, 0x0071c, 0x003fc, 0x003fc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1e, 0x00000, 0x00000, 0x00000, // char 82 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x0000e, 0x0001c, 0x00038, 0x000f0, 0x001e0, 0x00380, 0x00700, 0x00e00, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 83 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00ce6, 0x00ce6, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x003f8, 0x00000, 0x00000, 0x00000, // char 84 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 85 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x0071c, 0x003b8, 0x003b8, 0x001f0, 0x001f0, 0x000e0, 0x000e0, 0x00040, 0x00000, 0x00000, 0x00000, // char 86 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e4e, 0x00e4e, 0x006ec, 0x006ec, 0x003b8, 0x003b8, 0x00110, 0x00000, 0x00000, 0x00000, // char 87 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x00318, 0x003b8, 0x001b0, 0x001f0, 0x001f0, 0x001b0, 0x003b8, 0x00318, 0x0071c, 0x0060c, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 88 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x003b8, 0x003b8, 0x001f0, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 89 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x0060e, 0x00306, 0x00380, 0x00180, 0x001c0, 0x000c0, 0x00060, 0x00060, 0x00030, 0x00038, 0x00c18, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 90 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f8, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x001f8, 0x00000, 0x00000, 0x00000, // char 91 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00002, 0x00006, 0x0000e, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x00e00, 0x00c00, 0x00800, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 92 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f8, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001c0, 0x001f8, 0x00000, 0x00000, 0x00000, // char 93 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003b8, 0x0071c, 0x00e0e, 0x00c06, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 94 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00ffe, 0x00000, // char 95 0x00000, 0x00000, 0x00000, 0x00038, 0x00038, 0x00038, 0x00038, 0x00070, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 96 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 97 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0001e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x001fc, 0x0039c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x001e6, 0x00000, 0x00000, 0x00000, // char 98 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 99 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00780, 0x00380, 0x00380, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x00678, 0x00000, 0x00000, 0x00000, // char 100 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00e0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 101 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003e0, 0x00770, 0x00670, 0x00070, 0x00070, 0x00070, 0x00070, 0x001fc, 0x001fc, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x000f8, 0x00000, 0x00000, 0x00000, // char 102 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x006fc, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038c, 0x003f8, 0x003f0, 0x00380, 0x0038e, 0x0038e, 0x001f8, // char 103 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0001e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x001dc, 0x0073c, 0x0073c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071e, 0x00000, 0x00000, 0x00000, // char 104 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x000f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 105 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00700, 0x00700, 0x00700, 0x00000, 0x00000, 0x00780, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x00700, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x003f0, // char 106 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0001e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0071c, 0x0079c, 0x001dc, 0x000dc, 0x000fc, 0x000fc, 0x000fc, 0x001dc, 0x0079c, 0x0071c, 0x0071e, 0x00000, 0x00000, 0x00000, // char 107 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 108 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007be, 0x007fe, 0x00e4e, 0x00e4e, 0x00e4e, 0x00e4e, 0x00e4e, 0x00e4e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 109 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f6, 0x0031c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x00000, 0x00000, // char 110 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 111 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003cc, 0x00738, 0x00e38, 0x00e38, 0x00e38, 0x00e38, 0x00e38, 0x00738, 0x007f8, 0x001f8, 0x00038, 0x00038, 0x00038, 0x0007c, // char 112 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00678, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x003fc, 0x003f0, 0x00380, 0x00380, 0x00380, 0x007c0, // char 113 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007ec, 0x00e78, 0x00e38, 0x00e38, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x0007c, 0x00000, 0x00000, 0x00000, // char 114 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00e1e, 0x00e0e, 0x0001e, 0x00078, 0x001e0, 0x00380, 0x00f00, 0x00e0e, 0x00f0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 115 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x001fc, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00c70, 0x00c70, 0x00ee0, 0x003c0, 0x00000, 0x00000, 0x00000, // char 116 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 117 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0060c, 0x00318, 0x00318, 0x001b0, 0x001f0, 0x000e0, 0x00000, 0x00000, 0x00000, // char 118 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e4e, 0x00e4e, 0x00e4e, 0x00e4e, 0x007fc, 0x007fc, 0x00318, 0x00000, 0x00000, 0x00000, // char 119 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x0060c, 0x00318, 0x003b8, 0x001f0, 0x001f0, 0x003b8, 0x00318, 0x0060c, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 120 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e1c, 0x00ffc, 0x007f0, 0x00600, 0x00300, 0x00380, 0x001f8, // char 121 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 122 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00780, 0x001c0, 0x000e0, 0x000e0, 0x000e0, 0x00060, 0x00070, 0x0003c, 0x0003c, 0x00070, 0x00060, 0x000e0, 0x000e0, 0x000e0, 0x001c0, 0x00780, 0x00000, 0x00000, 0x00000, // char 123 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00000, 0x00000, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00000, 0x00000, 0x00000, // char 124 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0003c, 0x00070, 0x000e0, 0x000e0, 0x000e0, 0x000c0, 0x001c0, 0x00780, 0x00780, 0x001c0, 0x000c0, 0x000e0, 0x000e0, 0x000e0, 0x00070, 0x0003c, 0x00000, 0x00000, 0x00000, // char 125 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00c30, 0x00e78, 0x003ce, 0x00186, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 126 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x0071c, 0x00e0e, 0x00c06, 0x00c06, 0x00c06, 0x00ffe, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 127 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, 0x01111, 0x00444, // char 128 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, 0x01555, 0x00aaa, // char 129 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, 0x01bbb, 0x00eee, // char 130 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 131 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0000f, 0x0000f, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 132 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x00070, 0x00038, 0x0001c, 0x0000f, 0x00007, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 133 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01c00, 0x01e00, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 134 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, // char 135 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, // char 136 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x000fc, 0x0007f, 0x0003f, 0x0001f, 0x0003f, 0x0007f, 0x000fc, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 137 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 138 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00007, 0x0000f, 0x0001f, 0x0003f, 0x0007f, 0x000fc, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 139 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x000fc, 0x0007f, 0x0003f, 0x0001f, 0x0000f, 0x00007, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 140 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, 0x0003f, // char 141 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, 0x01fc0, // char 142 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00007, 0x0000f, 0x0001c, 0x00038, 0x00070, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 143 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x01e00, 0x01c00, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 144 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x003b8, 0x0071c, 0x01e0f, 0x01c07, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 145 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01c07, 0x01e0f, 0x0071c, 0x003b8, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 146 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001c0, 0x00380, 0x00700, 0x01e00, 0x01e00, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 147 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x01fff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 148 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x003b8, 0x0071c, 0x01e0f, 0x01e0f, 0x0071c, 0x003b8, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 149 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 150 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003e0, 0x00e78, 0x00c38, 0x0001c, 0x0001c, 0x0001c, 0x003fe, 0x0001c, 0x0001c, 0x003fe, 0x0001c, 0x0001c, 0x0001c, 0x00c38, 0x00e78, 0x003e0, 0x00000, 0x00000, 0x00000, // char 151 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x003f0, 0x007e0, 0x01fc0, 0x01f80, 0x01f00, 0x01e00, 0x01c00, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 152 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01c00, 0x01e00, 0x01f00, 0x01f80, 0x01fc0, 0x007e0, 0x003f0, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 153 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x003fc, 0x007fe, 0x01fff, 0x01fbf, 0x01f1f, 0x01e0f, 0x01c07, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 154 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01c07, 0x01e0f, 0x01f1f, 0x01fbf, 0x01fff, 0x007fe, 0x003fc, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 155 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x003f0, 0x007e0, 0x01fc0, 0x01f80, 0x01f00, 0x01f80, 0x01fc0, 0x007e0, 0x003f0, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 156 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x01fff, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 157 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x003fc, 0x007fe, 0x01fff, 0x01f9f, 0x01f0f, 0x01f9f, 0x01fff, 0x007fe, 0x003fc, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, 0x001f8, // char 158 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x003f8, 0x007fc, 0x01f1f, 0x01e0f, 0x01c07, 0x01e0f, 0x01f1f, 0x007fc, 0x003f8, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, // char 159 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 160 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x001f0, 0x001f0, 0x003f8, 0x003b8, 0x0071c, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00fce, 0x00070, 0x00070, 0x00fc0, // char 161 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 162 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0007c, 0x00038, 0x00038, 0x00038, 0x00338, 0x003b8, 0x001f8, 0x000f8, 0x00078, 0x0003c, 0x0003e, 0x0003e, 0x00c3a, 0x00e38, 0x00e38, 0x00ffc, 0x00000, 0x00000, 0x00000, // char 163 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x003f8, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x003f8, 0x00e0e, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 164 0x000c6, 0x000ee, 0x0007c, 0x00038, 0x00000, 0x0003e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 165 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x0000e, 0x0001c, 0x00038, 0x000f0, 0x001e0, 0x00380, 0x00700, 0x00e00, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 166 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fc, 0x00e06, 0x00c06, 0x0001c, 0x001f8, 0x003f8, 0x0071c, 0x00c06, 0x00c06, 0x00c06, 0x0071c, 0x007f8, 0x003f0, 0x00700, 0x00c06, 0x00c0e, 0x007fc, 0x00000, 0x00000, // char 167 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 168 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x0000e, 0x0001c, 0x00038, 0x000f0, 0x001e0, 0x00380, 0x00700, 0x00e00, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 169 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x0071c, 0x00e0e, 0x00e0e, 0x0000e, 0x0001c, 0x00038, 0x000f0, 0x001e0, 0x00380, 0x00700, 0x00e00, 0x00e0e, 0x00e0e, 0x0071c, 0x003f8, 0x00300, 0x00380, 0x00078, // char 170 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00ffe, 0x00ce6, 0x00ce6, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 171 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00ffe, 0x00e0e, 0x0060e, 0x00306, 0x00380, 0x00180, 0x001c0, 0x000c0, 0x00060, 0x00060, 0x00030, 0x00038, 0x00c18, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 172 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fc, 0x007fc, 0x00000, 0x00000, 0x007fc, 0x007fc, 0x00000, 0x00000, 0x007fc, 0x007fc, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 173 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00ffe, 0x00e0e, 0x0060e, 0x00306, 0x00380, 0x00180, 0x001c0, 0x000c0, 0x00060, 0x00060, 0x00030, 0x00038, 0x00c18, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 174 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x0060e, 0x00306, 0x00380, 0x00180, 0x001c0, 0x000c0, 0x00060, 0x00060, 0x00030, 0x00038, 0x00c18, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 175 0x00000, 0x00000, 0x00000, 0x00000, 0x00030, 0x000fc, 0x000cc, 0x00186, 0x000cc, 0x000fc, 0x00030, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 176 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00070, 0x00070, 0x003c0, // char 177 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00038, 0x0001c, 0x0001c, 0x001f8, // char 178 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000f0, 0x000e0, 0x000e0, 0x000e0, 0x006e0, 0x007e0, 0x003e0, 0x001e0, 0x000f0, 0x000f8, 0x000fc, 0x000ec, 0x000e4, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 179 0x00180, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 180 0x00000, 0x00000, 0x018c0, 0x01dc0, 0x00f80, 0x00778, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x000f8, 0x00000, 0x00000, 0x00000, // char 181 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00000, 0x003f8, 0x00e1e, 0x00e0e, 0x0001e, 0x00078, 0x001e0, 0x00380, 0x00f00, 0x00e0e, 0x00f0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 182 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 183 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001c0, 0x00380, 0x00380, 0x001f8, // char 184 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003f8, 0x00e1e, 0x00e0e, 0x0001e, 0x00078, 0x001e0, 0x00380, 0x00f00, 0x00e0e, 0x00f0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 185 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00e1e, 0x00e0e, 0x0001e, 0x00078, 0x001e0, 0x00380, 0x00f00, 0x00e0e, 0x00f0e, 0x003f8, 0x00380, 0x00380, 0x001f8, // char 186 0x00000, 0x00000, 0x00000, 0x00e00, 0x00e00, 0x00e40, 0x00670, 0x00270, 0x00070, 0x00070, 0x00070, 0x001fc, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00c70, 0x00c70, 0x00ee0, 0x003c0, 0x00000, 0x00000, 0x00000, // char 187 0x00000, 0x00000, 0x00000, 0x00600, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 188 0x00000, 0x00000, 0x00000, 0x00c60, 0x00e70, 0x00738, 0x0039c, 0x001ce, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 189 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 190 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00ffe, 0x00e0e, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00038, 0x00e1c, 0x00e0e, 0x00ffe, 0x00000, 0x00000, 0x00000, // char 191 0x00180, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x003fe, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1c, 0x00e1c, 0x0071c, 0x003fc, 0x003fc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1e, 0x00000, 0x00000, 0x00000, // char 192 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007bc, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 193 0x001f0, 0x003b8, 0x00318, 0x00000, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007bc, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 194 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007bc, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 195 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00040, 0x000e0, 0x001f0, 0x003f8, 0x007bc, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x00ffe, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 196 0x00180, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x0003e, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 197 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x003f0, 0x00638, 0x00e1c, 0x00c0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00c0e, 0x00e1c, 0x00638, 0x003f0, 0x00000, 0x00000, 0x00000, // char 198 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f0, 0x00638, 0x00e1c, 0x00c0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00c0e, 0x00e1c, 0x00638, 0x003f0, 0x00e00, 0x00e00, 0x003f8, // char 199 0x00630, 0x00770, 0x003e0, 0x001c0, 0x00000, 0x003f0, 0x00638, 0x00e1c, 0x00c0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00c0e, 0x00e1c, 0x00638, 0x003f0, 0x00000, 0x00000, 0x00000, // char 200 0x00180, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 201 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00038, 0x00038, 0x007e0, // char 202 0x001dc, 0x001dc, 0x001dc, 0x00000, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 203 0x0018c, 0x001dc, 0x000f8, 0x00070, 0x00000, 0x007fe, 0x0071c, 0x0071c, 0x0061c, 0x0001c, 0x0001c, 0x000dc, 0x000fc, 0x000fc, 0x000dc, 0x0001c, 0x0001c, 0x0061c, 0x0071c, 0x0071c, 0x007fe, 0x00000, 0x00000, 0x00000, // char 204 0x00180, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 205 0x001f0, 0x003b8, 0x00318, 0x00000, 0x00000, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 206 0x0018c, 0x001dc, 0x000f8, 0x00000, 0x00000, 0x000fe, 0x001dc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0031c, 0x0039c, 0x001dc, 0x000fe, 0x00000, 0x00000, 0x00000, // char 207 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000fe, 0x001dc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x0073e, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0031c, 0x0039c, 0x001dc, 0x000fe, 0x00000, 0x00000, 0x00000, // char 208 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e1e, 0x00e3e, 0x00e7e, 0x00eee, 0x00fce, 0x00f8e, 0x00f0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 209 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e1e, 0x00e3e, 0x00e7e, 0x00eee, 0x00fce, 0x00f8e, 0x00f0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00000, // char 210 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x001f0, 0x007bc, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x007bc, 0x001f0, 0x00000, 0x00000, 0x00000, // char 211 0x000e0, 0x001f0, 0x003b8, 0x00318, 0x00000, 0x001f0, 0x007bc, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x007bc, 0x001f0, 0x00000, 0x00000, 0x00000, // char 212 0x01860, 0x01c70, 0x00e38, 0x0071c, 0x00000, 0x001f0, 0x007bc, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x007bc, 0x001f0, 0x00000, 0x00000, 0x00000, // char 213 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x001f0, 0x007bc, 0x0071c, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0071c, 0x007bc, 0x001f0, 0x00000, 0x00000, 0x00000, // char 214 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x0071c, 0x003b8, 0x001f0, 0x000e0, 0x001f0, 0x003b8, 0x0071c, 0x00e0e, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 215 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003fe, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1c, 0x00e1c, 0x0071c, 0x003fc, 0x003fc, 0x0039c, 0x0031c, 0x0071c, 0x0071c, 0x00e1c, 0x00e1c, 0x00e1e, 0x00000, 0x00000, 0x00000, // char 216 0x001e0, 0x00330, 0x00618, 0x00330, 0x001e0, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 217 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 218 0x00c30, 0x00e38, 0x0071c, 0x0038e, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 219 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x0060c, 0x0071c, 0x003f8, 0x00000, 0x00000, 0x00000, // char 220 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x003b8, 0x003b8, 0x001f0, 0x001f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 221 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00ffe, 0x00ce6, 0x00ce6, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x001c0, 0x001c0, 0x000fc, // char 222 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x001f8, 0x0039c, 0x0030e, 0x0030e, 0x0030e, 0x0038e, 0x001ce, 0x003ce, 0x0038e, 0x0060e, 0x00c0e, 0x00c0e, 0x00c0e, 0x0060e, 0x003ce, 0x001ce, 0x00000, 0x00000, 0x00000, // char 223 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x007ec, 0x00e78, 0x00e38, 0x00e38, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00038, 0x00078, 0x00000, 0x00000, 0x00000, // char 224 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 225 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x001f0, 0x003b8, 0x00318, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 226 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 227 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x00000, 0x00000, 0x001f8, 0x003c0, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 228 0x00000, 0x00000, 0x00000, 0x01800, 0x01c00, 0x00e78, 0x00770, 0x00370, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x000f8, 0x00000, 0x00000, 0x00000, // char 229 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 230 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00f1e, 0x003f8, 0x00380, 0x00380, 0x001f8, // char 231 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 232 0x00000, 0x00000, 0x00000, 0x00000, 0x00600, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00e0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 233 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00e0e, 0x003f8, 0x00038, 0x00038, 0x003f0, // char 234 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x003b8, 0x003b8, 0x003b8, 0x00000, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00e0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 235 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003f8, 0x00e0e, 0x00e0e, 0x00e0e, 0x00ffe, 0x0000e, 0x0000e, 0x0000e, 0x00e0e, 0x00e0e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 236 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x000f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 237 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x001f0, 0x003b8, 0x00318, 0x00000, 0x000f0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x000e0, 0x001f0, 0x00000, 0x00000, 0x00000, // char 238 0x00000, 0x00e00, 0x00c00, 0x01c00, 0x01800, 0x01780, 0x00380, 0x00380, 0x00380, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x00678, 0x00000, 0x00000, 0x00000, // char 239 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00f80, 0x00380, 0x00fe0, 0x00fe0, 0x00380, 0x003f8, 0x0039c, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x00e78, 0x00000, 0x00000, 0x00000, // char 240 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x003f6, 0x0031c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x00000, 0x00000, // char 241 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00318, 0x003b8, 0x001f0, 0x000e0, 0x00000, 0x003f6, 0x0031c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x0071c, 0x00000, 0x00000, 0x00000, // char 242 0x00000, 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 243 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x001f0, 0x003b8, 0x00318, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 244 0x00000, 0x00000, 0x00000, 0x00000, 0x01860, 0x01c70, 0x00e38, 0x0071c, 0x0038e, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 245 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00000, 0x00000, 0x003f8, 0x00f1e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00f1e, 0x003f8, 0x00000, 0x00000, 0x00000, // char 246 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x007fc, 0x007fc, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 247 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0018c, 0x001dc, 0x000f8, 0x00000, 0x003f6, 0x0073c, 0x0071c, 0x0071c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0001c, 0x0003e, 0x00000, 0x00000, 0x00000, // char 248 0x00000, 0x00000, 0x00000, 0x000f0, 0x00198, 0x0030c, 0x00198, 0x000f0, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 249 0x00000, 0x00000, 0x00000, 0x00300, 0x00380, 0x001c0, 0x000e0, 0x00070, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 250 0x00000, 0x00000, 0x00000, 0x01860, 0x01c70, 0x00e38, 0x0071c, 0x0038e, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 251 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x00000, 0x00000, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0038e, 0x0039c, 0x00678, 0x00000, 0x00000, 0x00000, // char 252 0x00000, 0x00000, 0x00000, 0x00600, 0x00700, 0x00380, 0x001c0, 0x000e0, 0x00000, 0x00000, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e0e, 0x00e1c, 0x00ffc, 0x007f0, 0x00600, 0x00300, 0x00380, 0x001f8, // char 253 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00040, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x001fc, 0x00070, 0x00070, 0x00070, 0x00070, 0x00070, 0x00c70, 0x00c70, 0x00ee0, 0x003c0, 0x00380, 0x00380, 0x001f8, // char 254 0x00000, 0x00000, 0x00000, 0x00000, 0x000e0, 0x000e0, 0x000e0, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, // char 255 }; libzia-4.67/m4/0000755000175000017500000000000014752603141010250 500000000000000libzia-4.67/m4/libtool.m40000644000175000017500000113165214672552110012107 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 59 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} _LT_DECL([], [AR], [1], [The archiver]) # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -z "$STRIP"; then AC_MSG_RESULT([no]) else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) 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=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $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 ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_FILECMD # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], [AC_CHECK_TOOL([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS libzia-4.67/m4/ltoptions.m40000644000175000017500000003427514672552110012500 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libzia-4.67/m4/ltversion.m40000644000175000017500000000131214672552110012454 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, # Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4245 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.7]) m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.7' macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libzia-4.67/m4/Makefile.am0000644000175000017500000000015114662101506012217 00000000000000EXTRA_DIST = libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 datarootdir = @datarootdir@ libzia-4.67/m4/lt~obsolete.m40000644000175000017500000001400714672552110013006 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) libzia-4.67/m4/Makefile.in0000644000175000017500000003164114752576426012261 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libzia-4.67/m4/ltsugar.m40000644000175000017500000001045314672552110012116 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 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 ]) libzia-4.67/android-old/0000755000175000017500000000000014752603140012123 500000000000000libzia-4.67/android-old/Makefile.in0000644000175000017500000003165314752576425014137 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = android-old ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = glib-compile libsndfile-compile libzia-compile all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu android-old/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu android-old/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-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: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libzia-4.67/android-old/Makefile.am0000644000175000017500000000013114662101505014070 00000000000000datarootdir = @datarootdir@ EXTRA_DIST = glib-compile libsndfile-compile libzia-compile libzia-4.67/android-old/libsndfile-compile0000755000175000017500000000051114662101505015525 00000000000000#!/bin/bash set -e LIB=$HOME/c/libsndfile cd $LIB if [ "$1" = "clean" ]; then ndk-build NDK_PROJECT_PATH=$LIB APP_BUILD_SCRIPT=$LIB/jni/Android.mk clean exit 0 fi #BUILD_STATIC=true ndk-build NDK_PROJECT_PATH=$LIB APP_BUILD_SCRIPT=$LIB/jni/Android.mk V=1 libzia-4.67/android-old/glib-compile0000755000175000017500000000074514662101505014340 00000000000000#!/bin/bash set -e GLIB=$HOME/c/glib cd $GLIB if [ "$1" = "clean" ]; then ndk-build NDK_PROJECT_PATH=$GLIB APP_BUILD_SCRIPT=$GLIB/Android.mk clean exit 0 fi #BUILD_STATIC=true ndk-build NDK_PROJECT_PATH=$GLIB NDK_APPLICATION_MK=$GLIB/Application.mk APP_BUILD_SCRIPT=$GLIB/Android.mk glib-2.0 ndk-build NDK_PROJECT_PATH=$GLIB NDK_APPLICATION_MK=$GLIB/Application.mk APP_BUILD_SCRIPT=$GLIB/Android.mk gthread-2.0 libzia-4.67/android-old/libzia-compile0000755000175000017500000000133214662101505014666 00000000000000#!/bin/bash set -e set -x tmp=`dirname $0` LIBZIA=`readlink -f $tmp/../src` target=zia if [ "$1" = "clean" ]; then target="clean"; fi cd $LIBZIA/.. bash svnver.sh cd $LIBZIA # BUILD_STATIC=true ndk-build \ CFLAGS=-finput-charset=iso88592 \ NDK_PROJECT_PATH=$LIBZIA \ NDK_APPLICATION_MK=$LIBZIA/Application.mk \ APP_BUILD_SCRIPT=$LIBZIA/Android.mk \ SDL_JAVA_PACKAGE_PATH=cz_nagano_tucnak \ APP_PLATFORM=android-14 \ APP_ABI=armeabi-v7a \ GLIB_TOP=$HOME/c/glib \ SDL_TOP=$HOME/c/libsdl/project \ PNG_TOP=$HOME/c/libpng14 \ USB_TOP=$HOME/c/libusb \ FTDI_TOP=$HOME/c/libftdi \ ICONV_TOP=$HOME/c/libiconv \ OPENSSL_TOP=$HOME/c/openssl/openssl-3.1.4 \ V=1 \ $target libzia-4.67/src/0000755000175000017500000000000014752603141010517 500000000000000libzia-4.67/src/zver.c0000644000175000017500000000062114662101505011565 00000000000000/* svnver - keeps and reports SVN revision number Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include const char *z_svnver(void){ return Z_SVNVER; } libzia-4.67/src/zhash.c0000644000175000017500000002116414662101505011721 00000000000000/* Copyright (C) 2006-2013 Ladislav Vaiz and authors of glib www.gtk.org * */ /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GLib Team and others 1997-1999. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* * MT safe */ #include #include #include #define HASH_TABLE_MIN_SIZE 11 #define HASH_TABLE_MAX_SIZE 13845163 static void z_hash_table_resize (ZHashTable *hash_table); static ZHashNode** z_hash_table_lookup_node (ZHashTable *hash_table, gconstpointer key); static ZHashNode* z_hash_node_new (gpointer key, gpointer value); static void z_hash_node_destroy (ZHashNode *hash_node); static void z_hash_nodes_destroy (ZHashNode *hash_node); //G_LOCK_DEFINE_STATIC (z_hash_global); //static GMutex *z_hash_global_mutex; #ifdef Z_LEAK_DEBUG_LIST char *z_hash_global_file; int z_hash_global_line; #endif ZHashTable* z_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func) { ZHashTable *hash_table; int i; hash_table = g_new (ZHashTable, 1); hash_table->size = HASH_TABLE_MIN_SIZE; hash_table->nnodes = 0; hash_table->frozen = FALSE; hash_table->hash_func = hash_func ? hash_func : g_direct_hash; hash_table->key_compare_func = key_compare_func; hash_table->nodes = g_new (ZHashNode*, hash_table->size); for (i = 0; i < hash_table->size; i++) hash_table->nodes[i] = NULL; return hash_table; } void z_hash_table_destroy (ZHashTable *hash_table) { gint i; g_return_if_fail (hash_table != NULL); for (i = 0; i < hash_table->size; i++) z_hash_nodes_destroy (hash_table->nodes[i]); g_free (hash_table->nodes); g_free (hash_table); } static inline ZHashNode** z_hash_table_lookup_node (ZHashTable *hash_table, gconstpointer key) { ZHashNode **node; node = &hash_table->nodes [(* hash_table->hash_func) (key) % hash_table->size]; /* Hash table lookup needs to be fast. * We therefore remove the extra conditional of testing * whether to call the key_compare_func or not from * the inner loop. */ if (hash_table->key_compare_func) while (*node && !(*hash_table->key_compare_func) ((*node)->key, key)) node = &(*node)->next; else while (*node && (*node)->key != key) node = &(*node)->next; return node; } gpointer z_hash_table_lookup (ZHashTable *hash_table, gconstpointer key) { ZHashNode *node; g_return_val_if_fail (hash_table != NULL, NULL); node = *z_hash_table_lookup_node (hash_table, key); return node ? node->value : NULL; } void z_hash_table_insert (ZHashTable *hash_table, gpointer key, gpointer value) { ZHashNode **node; g_return_if_fail (hash_table != NULL); node = z_hash_table_lookup_node (hash_table, key); if (*node) { /* do not reset node->key in this place, keeping * the old key might be intended. * a z_hash_table_remove/z_hash_table_insert pair * can be used otherwise. * * node->key = key; */ (*node)->value = value; } else { *node = z_hash_node_new (key, value); hash_table->nnodes++; if (!hash_table->frozen) z_hash_table_resize (hash_table); } } void z_hash_table_remove (ZHashTable *hash_table, gconstpointer key) { ZHashNode **node, *dest; g_return_if_fail (hash_table != NULL); node = z_hash_table_lookup_node (hash_table, key); if (*node) { dest = *node; (*node) = dest->next; z_hash_node_destroy (dest); hash_table->nnodes--; if (!hash_table->frozen) z_hash_table_resize (hash_table); } } gboolean z_hash_table_lookup_extended (ZHashTable *hash_table, gconstpointer lookup_key, gpointer *orig_key, gpointer *value) { ZHashNode *node; g_return_val_if_fail (hash_table != NULL, FALSE); node = *z_hash_table_lookup_node (hash_table, lookup_key); if (node) { if (orig_key) *orig_key = node->key; if (value) *value = node->value; return TRUE; } else return FALSE; } /*static void z_hash_table_freeze (ZHashTable *hash_table) { g_return_if_fail (hash_table != NULL); hash_table->frozen++; } static void z_hash_table_thaw (ZHashTable *hash_table) { g_return_if_fail (hash_table != NULL); if (hash_table->frozen) if (!(--hash_table->frozen)) z_hash_table_resize (hash_table); } */ guint z_hash_table_foreach_remove (ZHashTable *hash_table, GHRFunc func, gpointer user_data) { ZHashNode *node, *prev; int i; guint deleted = 0; g_return_val_if_fail (hash_table != NULL, 0); g_return_val_if_fail (func != NULL, 0); for (i = 0; i < hash_table->size; i++) { restart: prev = NULL; for (node = hash_table->nodes[i]; node; prev = node, node = node->next) { if ((* func) (node->key, node->value, user_data)) { deleted += 1; hash_table->nnodes -= 1; if (prev) { prev->next = node->next; z_hash_node_destroy (node); node = prev; } else { hash_table->nodes[i] = node->next; z_hash_node_destroy (node); goto restart; } } } } if (!hash_table->frozen) z_hash_table_resize (hash_table); return deleted; } void z_hash_table_foreach (ZHashTable *hash_table, GHFunc func, gpointer user_data) { ZHashNode *node; gint i; g_return_if_fail (hash_table != NULL); g_return_if_fail (func != NULL); for (i = 0; i < hash_table->size; i++) for (node = hash_table->nodes[i]; node; node = node->next) (* func) (node->key, node->value, user_data); } /* Returns the number of elements contained in the hash table. */ guint z_hash_table_size (ZHashTable *hash_table) { g_return_val_if_fail (hash_table != NULL, 0); return hash_table->nnodes; } static void z_hash_table_resize (ZHashTable *hash_table) { ZHashNode **new_nodes; ZHashNode *node; ZHashNode *next; gfloat nodes_per_list; guint hash_val; gint new_size; gint i; nodes_per_list = (gfloat) hash_table->nnodes / (gfloat) hash_table->size; if ((nodes_per_list > 0.3 || hash_table->size <= HASH_TABLE_MIN_SIZE) && (nodes_per_list < 3.0 || hash_table->size >= HASH_TABLE_MAX_SIZE)) return; new_size = CLAMP(g_spaced_primes_closest (hash_table->nnodes), HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE); new_nodes = g_new0 (ZHashNode*, new_size); for (i = 0; i < hash_table->size; i++) for (node = hash_table->nodes[i]; node; node = next) { next = node->next; hash_val = (* hash_table->hash_func) (node->key) % new_size; node->next = new_nodes[hash_val]; new_nodes[hash_val] = node; } g_free (hash_table->nodes); hash_table->nodes = new_nodes; hash_table->size = new_size; } static ZHashNode* z_hash_node_new (gpointer key, gpointer value) { ZHashNode *hash_node; hash_node = g_new(ZHashNode, 1); hash_node->key = key; hash_node->value = value; hash_node->next = NULL; return hash_node; } static void z_hash_node_destroy (ZHashNode *hash_node) { g_free(hash_node); } static void z_hash_nodes_destroy (ZHashNode *hash_node) { if (hash_node){ ZHashNode *node = hash_node; while (node->next){ ZHashNode *n = node->next; g_free(node); node = n; } } } gboolean free_gpointer_item(gpointer key, gpointer value, gpointer user_data){ if (key) g_free(key); if (value) g_free(value); return TRUE; } #ifndef Z_HAVE_G_HASH_TABLE_REMOVE_ALL void g_hash_table_remove_all(GHashTable *table){ // FIXME does not work if g_hash_table_new_full is created by other free handlers than g_free g_hash_table_foreach_remove(table, free_gpointer_item, NULL); } #endif libzia-4.67/src/zmsgbox.c0000644000175000017500000000572314662101505012300 00000000000000/* zmsgbox.c portable messagebox Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include "windows.h" #endif #ifdef Z_HAVE_GTK #include #endif static int z_msgbox_remap_ret(int ret){ #ifdef WIN32 switch (ret){ case IDCANCEL: return ZMB_CANCEL; case IDOK: return ZMB_OK; case IDYES: return ZMB_YES; case IDNO: return ZMB_NO; default: return -1; } #elif defined(Z_HAVE_GTK) switch (ret){ case GTK_RESPONSE_DELETE_EVENT: return ZMB_CANCEL; case GTK_RESPONSE_CANCEL: return ZMB_CANCEL; case GTK_RESPONSE_OK: return ZMB_OK; case GTK_RESPONSE_YES: return ZMB_YES; case GTK_RESPONSE_NO: return ZMB_NO; default: return -1; } #else return ret; #endif } int z_msgbox_info(const char *caption, const char *fmt, ...){ va_list l; char *c; int ret = -1; va_start(l, fmt); c = g_strdup_vprintf(fmt, l); va_end(l); #ifdef WIN32 ret = MessageBox(NULL, c, caption, MB_OK | MB_ICONINFORMATION); #elif defined(Z_ANDROID) zandroid_messagebox(caption, c); ret = 0; #elif defined(Z_HAVE_GTK) int argc = 0; if (gtk_init_check(&argc, NULL)){ GtkWidget *dlg = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", c); gtk_window_set_title(GTK_WINDOW(dlg), caption); ret = gtk_dialog_run(GTK_DIALOG(dlg)); gtk_widget_destroy(dlg); while (gtk_events_pending()) gtk_main_iteration(); }else #endif { fprintf(stderr, "z_msgbox_info: %s\n%s\n", caption, c); } g_free(c); ret = z_msgbox_remap_ret(ret); return ret; } int z_msgbox_error(const char *caption, const char *fmt, ...){ va_list l; char *c; int ret = -1; va_start(l, fmt); c = g_strdup_vprintf(fmt, l); va_end(l); #ifdef WIN32 ret = MessageBox(NULL, c, caption, MB_OK | MB_ICONSTOP); #elif defined(Z_ANDROID) zandroid_messagebox(caption, c); ret = 0; #elif defined(Z_HAVE_GTK) int argc = 0; if (gtk_init_check(&argc, NULL)){ GtkWidget *dlg = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", c); gtk_window_set_title(GTK_WINDOW(dlg), caption); ret = gtk_dialog_run(GTK_DIALOG(dlg)); gtk_widget_destroy(dlg); while (gtk_events_pending()) gtk_main_iteration(); }else #endif { fprintf(stderr, "z_msgbox_error: %s\n%s\n", caption, c); } g_free(c); ret = z_msgbox_remap_ret(ret); return ret; } libzia-4.67/src/zmisc.c0000644000175000017500000001611014662101505011724 00000000000000/* Misc functions Copyright (C) 2012-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #ifdef Z_HAVE_SHLOBJ_H #include #endif #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_MSC #pragma warning(disable : 4996) #endif #ifdef Z_HAVE_TERMIOS_H #include #ifdef Z_CYGWIN void cfmakeraw(struct termios *t) { t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); t->c_oflag &= ~OPOST; t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); t->c_cflag &= ~(CSIZE|PARENB); t->c_cflag |= CS8; t->c_cc[VMIN] = 1; t->c_cc[VTIME] = 0; } #endif #endif char *z_strdup_home(void){ #ifdef Z_MSC_MINGW char appdata[MAX_PATH]; if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 1 /*SHGFP_TYPE_CURRENT*/, appdata) == S_OK){ return g_strdup(appdata); }else{ return g_strdup("."); } #else return g_strdup(getenv("HOME")); #endif } #ifdef Z_MINGW int setenv(const char *name, const char *value, int overwrite){ char buf[1024]; snprintf(buf, 1023, "%s=%s", name, value); buf[1023] = '\0'; putenv(buf); return 0; } #endif #ifdef Z_MSC int setenv(const char *name, const char *value, int overwrite){ _putenv_s(name, value); return 0; } #endif char *z_username(char *buf, int buflen){ #ifdef Z_MSC_MINGW DWORD dw = buflen; if (!GetUserName(buf, &dw)){ strcpy(buf, ""); } #else g_snprintf(buf, buflen, "%d", getuid()); #endif return buf; } #ifdef Z_UNIX_MINGW #include "settings.c" void z_get_settings(GString *gs){ g_string_append(gs, z_settings); } #endif #ifdef Z_ANDROID void z_get_settings(GString *gs){ SDL_version sdl_compiled; g_string_append_printf(gs, "------ Libzia settings: --------\n"); g_string_append_printf(gs, " version: %s %s\n", Z_PACKAGE, Z_VERSION); g_string_append_printf(gs, " platform: %s\n", Z_PLATFORM); g_string_append_printf(gs, " compiler: gcc %d.%d.%d ", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); g_string_append_printf(gs, " sizes: int=%d, long=%d, long long=%d, void*=%d\n", sizeof(int), sizeof(long), sizeof(long long), sizeof(void *)); g_string_append_printf(gs, " endianity: little\n"); g_string_append_printf(gs, " libglib: yes %d.%d.%d\n", glib_major_version, glib_minor_version, glib_micro_version); g_string_append_printf(gs, " libgtk: no\n"); SDL_VERSION(&sdl_compiled); g_string_append_printf(gs, " libsdl: yes %d.%d.%d\n", sdl_compiled.major, sdl_compiled.minor, sdl_compiled.patch); #ifdef Z_HAVE_LIBPNG g_string_append_printf(gs, " libpng: yes "); zpng_get_version(gs); g_string_append(gs, "\n"); #else g_string_append_printf(gs, " libpng: no\n"); #endif #ifdef Z_HAVE_LIBFTDI g_string_append_printf(gs, " libftdi: yes 0.19\n"); #else g_string_append_printf(gs, " libftdi: no\n"); #endif g_string_append_printf(gs, " libbfd: no \n"); g_string_append_printf(gs, " opts:"); g_string_append(gs, "\n"); } #endif #ifdef Z_MSC void z_get_settings(GString *gs){ SDL_version sdl_compiled; g_string_append_printf(gs, "------ Libzia settings: --------\n"); g_string_append_printf(gs, " version: static\n");//%s-%s %s\n", PACKAGE, Z_PLATFORM, VERSION); g_string_append_printf(gs, " compiler: msvc %d.%02d\n", _MSC_VER / 100, _MSC_VER % 100); g_string_append_printf(gs, " sizes: int=%d, long=%d, long long=%d, void*=%d\n", sizeof(int), sizeof(long), sizeof(long long), sizeof(void *)); g_string_append_printf(gs, " endianity: little\n"); g_string_append_printf(gs, " libglib: yes %d.%d.%d\n", glib_major_version, glib_minor_version, glib_micro_version); g_string_append_printf(gs, " libgtk: no\n"); #ifdef Z_HAVE_SDL SDL_VERSION(&sdl_compiled); g_string_append_printf(gs, " libsdl: yes %d.%d.%d\n", sdl_compiled.major, sdl_compiled.minor, sdl_compiled.patch); #else g_string_append_printf(gs, " libsdl: no\n"); #endif #ifdef Z_HAVE_LIBPNG g_string_append_printf(gs, " libpng: yes "); zpng_get_version(gs); g_string_append(gs, "\n"); #else g_string_append_printf(gs, " libpng: no\n"); #endif #ifdef Z_HAVE_LIBFTDI g_string_append_printf(gs, " libftdi: yes 1.4\n"); #else g_string_append_printf(gs, " libftdi: no\n"); #endif g_string_append_printf(gs, " libbfd: no \n"); g_string_append_printf(gs, " opts:"); #ifdef _MT g_string_append_printf(gs, " MULTITHREAD"); #endif #ifdef _DLL g_string_append_printf(gs, " DLL"); #endif #ifdef _DEBUG g_string_append_printf(gs, " DEBUG"); #endif g_string_append(gs, "\n"); } #endif double z_min3_d(double a, double b, double c) { double min = a; if (b < min) min=b; if (c < min) min=c; return min; } double z_max3_d(double a, double b, double c) { double max = a; if (b > max) max=b; if (c > max) max=c; return max; } #ifdef Z_MSC_MINGW int zreg_getint(HKEY hSecKey, const char *section, const char *entry) { HKEY hKey; DWORD dwValue; DWORD dwType; DWORD dwCount = sizeof(DWORD); int rc; LONG lResult; rc=RegOpenKeyEx(hSecKey, section, 0, KEY_READ, &hKey); if (rc != ERROR_SUCCESS){ return -1; } lResult = RegQueryValueEx(hKey, entry, NULL, &dwType, (LPBYTE)&dwValue, &dwCount); RegCloseKey(hKey); if (lResult != ERROR_SUCCESS) return -1; if (dwType != REG_DWORD) return -1; if (dwCount != sizeof(dwValue)) return -1; return dwValue; } char *zreg_getstr(HKEY hSecKey, const char *section, const char *entry){ DWORD dwType, dwCount; HKEY hKey; int rc; LONG lResult; char *strValue; rc=RegOpenKeyEx(hSecKey, section, 0, KEY_READ, &hKey); if (rc != ERROR_SUCCESS){ return NULL; } lResult = RegQueryValueEx(hKey, entry, NULL, &dwType, NULL, &dwCount); if (lResult != ERROR_SUCCESS){ RegCloseKey(hKey); return NULL; } if (dwType != REG_SZ){ RegCloseKey(hKey); return NULL; } strValue = g_new0(char, dwCount + 1); lResult = RegQueryValueEx(hKey, entry, NULL, &dwType, (LPBYTE)strValue, &dwCount); if (lResult != ERROR_SUCCESS) { RegCloseKey(hKey); return NULL; } if (dwType != REG_SZ){ return NULL; } return strValue; } #endif #ifdef Z_MSC_MINGW int z_browser(char *url){ ShellExecute(NULL, "open", url, NULL, NULL, 0); return 0; } #endif #ifdef Z_ANDROID int z_browser(char *url){ zandroid_browser(url); return 0; } #endif #ifdef Z_UNIX int z_browser(char *url){ char *cmd; int ret; cmd = g_strconcat("xdg-open ", url, NULL); ret = system(cmd); g_free(cmd); return ret; } #endif #if _MSC_VER < 1700 /* 2012 */ double round(double number) { return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5); } #endif libzia-4.67/src/zifaces.c0000644000175000017500000003245314662101505012233 00000000000000/* zifaces.c - Network interfaces detection Copyright (C) 2002-2020 Ladislav Vaiz and authors of samba www.samba.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ /* Unix SMB/Netbios implementation. Version 2.0 return a list of network interfaces Copyright (C) Andrew Tridgell 1998 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* working out the interfaces for a OS is an incredibly non-portable thing. We have several possible implementations below, and autoconf tries each of them to see what works Note that this file does _not_ include includes.h. That is so this code can be called directly from the autoconf tests. That also means this code cannot use any of the normal Samba debug stuff or defines. This is standalone code. */ #include #include #define MAX_INTERFACES 128 #ifndef Z_MSC_MINGW #include #include #include #include #include #include #include #include #ifndef Z_HAVE_LINUX_WIRELESS_H /* avoid redefinition errors */ #include // after sys/socket.h and sys/types.h #endif #ifdef Z_HAVE_IFADDRS_H #include // after net/if.h #endif #ifdef Z_HAVE_LINUX_WIRELESS_H #include #endif #include #include #include /* this works for Linux 2.2, Solaris 2.5, SunOS4, HPUX 10.20, OSF1 V4.0, Ultrix 4.4, SCO Unix 3.2, IRIX 6.4, FreeBSD 3.2. and cygwin It probably also works on any BSD style system. */ #ifndef Z_HAVE_IFADDRS_H static int _interfaces_get(struct ziface_struct *ifaces, int max_interfaces, int up_only) { struct ifconf ifc; char buff[8192]; int fd, i, n; struct ifreq *ifr=NULL; int total = 0; struct in_addr ipaddr; struct in_addr nmask; char *iname; if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { return -1; } ifc.ifc_len = sizeof(buff); ifc.ifc_buf = buff; if (ioctl(fd, SIOCGIFCONF, &ifc) != 0) { close(fd); return -1; } ifr = ifc.ifc_req; n = ifc.ifc_len / sizeof(struct ifreq); /* Loop through interfaces, looking for given IP address */ for (i=n-1;i>=0 && total < max_interfaces;i--) { if (ioctl(fd, SIOCGIFADDR, &ifr[i]) != 0) { continue; } iname = ifr[i].ifr_name; ipaddr = (*(struct sockaddr_in *)&ifr[i].ifr_addr).sin_addr; #ifdef SIOCGIFHWADDR memset(ifaces[total].mac, 0, 6); if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) == 0) { memcpy(ifaces[total].mac, ifr[i].ifr_hwaddr.sa_data, 6); } #endif if (ioctl(fd, SIOCGIFFLAGS, &ifr[i]) != 0) { continue; } if (!(ifr[i].ifr_flags & IFF_UP)) { continue; } if (ioctl(fd, SIOCGIFNETMASK, &ifr[i]) != 0) { continue; } nmask = ((struct sockaddr_in *)&ifr[i].ifr_addr)->sin_addr; strncpy(ifaces[total].name, iname, sizeof(ifaces[total].name)-1); ifaces[total].name[sizeof(ifaces[total].name)-1] = 0; ifaces[total].ip = ipaddr; ifaces[total].netmask = nmask; total++; } close(fd); return total; } #endif #ifdef Z_HAVE_IFADDRS_H static int _interfaces_get_ifaddrs(struct ziface_struct *ifaces, int max_interfaces, int up_only) { struct ifaddrs *interfaceArray = NULL; int total = 0; if (getifaddrs(&interfaceArray) != 0) { dbg("getifaddrs() failed with errno = %d %s \n", errno, strerror(errno)); return -1; } for (struct ifaddrs *tempIfAddr = interfaceArray; tempIfAddr != NULL && total < max_interfaces; tempIfAddr = tempIfAddr->ifa_next) { if (tempIfAddr->ifa_addr == NULL || tempIfAddr->ifa_addr->sa_family != AF_INET) continue; if (up_only && !(tempIfAddr->ifa_flags & IFF_UP)) continue; if (tempIfAddr->ifa_netmask == NULL || tempIfAddr->ifa_netmask->sa_family != AF_INET) continue; strncpy(ifaces[total].name, tempIfAddr->ifa_name, sizeof(ifaces[total].name) - 1); ifaces[total].name[sizeof(ifaces[total].name) - 1] = 0; memcpy(&ifaces[total].ip, &((struct sockaddr_in *)tempIfAddr->ifa_addr)->sin_addr, sizeof(struct in_addr)); memcpy(&ifaces[total].netmask, &((struct sockaddr_in *)tempIfAddr->ifa_netmask)->sin_addr, sizeof(struct in_addr)); total++; } freeifaddrs(interfaceArray); /* free the dynamic memory */ interfaceArray = NULL; /* prevent use after free */ return total; } #endif int ziface_wifi_stats(struct zwifi_stat *stat, char *devname, int clear){ #ifdef Z_HAVE_LINUX_WIRELESS_H int sockfd; struct iw_statistics stats; struct ziface_struct ifaces[MAX_INTERFACES]; int total = zifaces_get(ifaces, MAX_INTERFACES, 1); int i; if (total <= 0) return -1; for (i = 0; i < total; i++){ //int b; //struct in_addr iaddr; if (devname != NULL){ if (strcmp(devname, ifaces[i].name) != 0) continue; } struct iwreq req = { .u.data = { .pointer = &stats, .length = sizeof(struct iw_statistics), .flags = clear } }; //printf("%-10s ", ifaces[i].name); g_strlcpy(req.ifr_name, ifaces[i].name, IFNAMSIZ); /* Any old socket will do, and a datagram socket is pretty cheap */ if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { continue; } /* Perform the ioctl */ if (ioctl(sockfd, SIOCGIWSTATS, &req) == -1) { close(sockfd); continue; } stat->raw_level = stats.qual.level; stat->raw_noise = stats.qual.noise; stat->raw_qual = stats.qual.qual; stat->raw_updated = stats.qual.updated & IW_QUAL_LEVEL_UPDATED; struct iw_range range; req.u.data.pointer = (caddr_t)⦥ req.u.data.length = sizeof(struct iw_range); req.u.data.flags = 0; if (ioctl(sockfd, SIOCGIWRANGE, &req) < 0){ close(sockfd); continue; } stat->raw_max_qual = range.max_qual.qual; close(sockfd); stat->quality_percent = (stat->raw_qual * 100) / stat->raw_max_qual; stat->level_dbm = range.sensitivity - 256 + (unsigned char)stats.qual.level; return 0; } #endif return -1; } #else #include #include #include #include #include #pragma warning(disable : 4996) typedef DWORD (CALLBACK *T_GetAdaptersInfo)(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen); /* GetAdaptersInfo is since Win2k */ int _interfaces_get(struct ziface_struct *ifaces, int max_interfaces, int up_only/*under win32 only up are returned*/){ PIP_ADAPTER_INFO pAdapterInfo; PIP_ADAPTER_INFO pAdapter; int i; T_GetAdaptersInfo p_GetAdaptersInfo = NULL; HMODULE iphlpapi = NULL; ULONG ulOutBufLen = sizeof (IP_ADAPTER_INFO); iphlpapi = LoadLibrary("iphlpapi.dll"); if (!iphlpapi) return 0; p_GetAdaptersInfo = (T_GetAdaptersInfo) GetProcAddress(iphlpapi, "GetAdaptersInfo"); if (!p_GetAdaptersInfo){ FreeLibrary(iphlpapi); return 0; } pAdapterInfo = (IP_ADAPTER_INFO *) g_malloc(sizeof (IP_ADAPTER_INFO)); if (pAdapterInfo == NULL) { FreeLibrary(iphlpapi); return 0; } if (p_GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) { g_free(pAdapterInfo); pAdapterInfo = (IP_ADAPTER_INFO *) g_malloc(ulOutBufLen); if (pAdapterInfo == NULL) { FreeLibrary(iphlpapi); return 0; } } if (p_GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) != NO_ERROR) { g_free(pAdapterInfo); FreeLibrary(iphlpapi); return 0; } FreeLibrary(iphlpapi); for (pAdapter = pAdapterInfo, i = 0; pAdapter != NULL && i < max_interfaces; pAdapter = pAdapter->Next) { if (up_only && z_strcasestr(pAdapter->Description, "VirtualBox") != NULL) { continue; } ifaces[i].ip.S_un.S_addr = inet_addr(pAdapter->IpAddressList.IpAddress.String); if (ifaces[i].ip.S_un.S_addr == 0L) continue; ifaces[i].netmask.S_un.S_addr = inet_addr(pAdapter->IpAddressList.IpMask.String); switch (pAdapter->Type){ case MIB_IF_TYPE_OTHER: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "oth%d", i); break; case MIB_IF_TYPE_ETHERNET: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "eth%d", i); break; case MIB_IF_TYPE_TOKENRING: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "tr%d", i); break; case MIB_IF_TYPE_FDDI: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "fddi%d", i); break; case MIB_IF_TYPE_PPP: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "ppp%d", i); break; case MIB_IF_TYPE_LOOPBACK: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "lo"); break; case MIB_IF_TYPE_SLIP: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "sl%d", i); break; case IF_TYPE_IEEE80211: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "wlan%d", i); break; default: g_snprintf(ifaces[i].name, ZIFACE_NAME_SIZE, "unk%d", i); break; } memcpy(ifaces[i].mac, pAdapter->Address, 6); i++; } return i; } int ziface_wifi_stats(struct zwifi_stat *stat, char *devname, int clear){ static int i = 0; stat->level_dbm = i - 100; stat->quality_percent = i; i += 10; if (i > 100) i = 0; return 0; } #endif static int iface_comp(struct ziface_struct *i1, struct ziface_struct *i2) { int r; r = strcmp(i1->name, i2->name); if (r) return r; r = ntohl(i1->ip.s_addr) - ntohl(i2->ip.s_addr); if (r) return r; r = ntohl(i1->netmask.s_addr) - ntohl(i2->netmask.s_addr); return r; } /* this wrapper is used to remove duplicates from the interface list generated above */ int zifaces_get(struct ziface_struct *ifaces, int max_interfaces, int up_only) { int total, i, j; #ifndef Z_HAVE_IFADDRS_H total = _interfaces_get(ifaces, max_interfaces, up_only); #else total = _interfaces_get_ifaddrs(ifaces, max_interfaces, up_only); #endif if (total <= 0) return total; /* now we need to remove duplicates */ qsort(ifaces, total, sizeof(ifaces[0]), (int (*)(const void *, const void *))iface_comp); for (i=1;i= 0; up_only--){ total = zifaces_get(ifaces, MAX_INTERFACES, up_only); if (total <= 0) return NULL; for (i=0;i This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_SDL #include #include #include #include #include static struct zzsdl *zsdl; struct zchart *zchart_init(SDL_Surface *surface, SDL_Rect *area, int bgcolor){ zsdl = zsdl_instance(); struct zchart *chart = g_new0(struct zchart, 1); chart->surface = surface; memcpy(&chart->area, area, sizeof(SDL_Rect)); chart->bgcolor = bgcolor; chart->sets = g_ptr_array_new(); chart->mx = area->x + area->w - 1; chart->my = 0; return chart; } void zchart_free(struct zchart *chart){ int i; for (i = 0; i < (int)chart->sets->len; i++){ struct zchart_set *set = (struct zchart_set*)g_ptr_array_index(chart->sets, i); g_free(set->desc); g_free(set->fmt); g_array_free(set->values, TRUE); } g_free(chart); } void zchart_clear(struct zchart *chart){ int i; for (i = 0; i < (int)chart->sets->len; i++){ struct zchart_set *set = (struct zchart_set*)g_ptr_array_index(chart->sets, i); g_array_set_size(set->values, 0); set->minx = set->miny = DBL_MAX; set->maxx = set->maxy = DBL_MIN; } } struct zchart_set *zchart_add_set(struct zchart *chart, char *desc, int color){ struct zchart_set *set = g_new0(struct zchart_set, 1); set->chart = chart; set->desc = g_strdup(desc); set->color = color; set->values = g_array_sized_new(FALSE, FALSE, sizeof(struct zchart_val), 1024); set->minx = set->miny = DBL_MAX; set->maxx = set->maxy = DBL_MIN; g_ptr_array_add(chart->sets, set); return set; } void zchart_add(struct zchart *chart, int setnr, double x, double y){ struct zchart_val val; struct zchart_set *set; if (setnr < 0 || setnr >= (int)chart->sets->len) setnr = chart->sets->len - 1; if (setnr < 0) zchart_add_set(chart, "Some data", z_makecol(255, 255, 255)); set = (struct zchart_set*)g_ptr_array_index(chart->sets, setnr); val.x = x; val.y = y; g_array_append_val(set->values, val); if (z_finite(x)){ if (x < set->minx) set->minx = x; if (x > set->maxx) set->maxx = x; } if (z_finite(y)){ if (y < set->miny) set->miny = y; if (y > set->maxy) set->maxy = y; } }; void zchart_redraw(struct zchart *chart){ int setnr; int crosscolor = z_makecol(96, 96, 96); SDL_FillRect(chart->surface, &chart->area, chart->bgcolor); z_line(chart->surface, chart->area.x, chart->my, chart->area.x + chart->area.w - 1, chart->my, crosscolor); z_line(chart->surface, chart->mx, chart->area.y, chart->mx, chart->area.y + chart->area.h - 1, crosscolor); for (setnr = 0; setnr < (int)chart->sets->len; setnr++){ int i, oldx = 0, oldy = 0; double oldd = NAN; struct zchart_set *set = (struct zchart_set*)g_ptr_array_index(chart->sets, setnr); for (i = 0; i < (int)set->values->len; i++){ int x, y; struct zchart_val val; val = g_array_index(set->values, struct zchart_val, i); x = chart->area.x + (int)((val.x - set->minx) * (chart->area.w - 1) / (set->maxx - set->minx)); y = chart->area.y + chart->area.h - 1 - (int)((val.y - set->miny) * (chart->area.h - 1) / (set->maxy - set->miny)); if (z_finite(val.x) && z_finite(val.y) && z_finite(oldd)){ z_line(chart->surface, oldx, oldy, x, y, set->color); //dbg("setnr=%d %d %d %d %d\n", setnr, oldx, x, oldy, y); } oldx = x; oldy = y; oldd = 0.0; if (!z_finite(val.x)) oldd = val.x; if (!z_finite(val.y)) oldd = val.y; } } for (setnr = 0; setnr < (int)chart->sets->len; setnr++){ int x, y, i, j, tw, th; char s[256]; double a, b, c, d; struct zchart_val val; GString *gs = g_string_sized_new(256); GString *gs2 = g_string_sized_new(256); struct zchart_set *set = (struct zchart_set*)g_ptr_array_index(chart->sets, setnr); val.x = (chart->mx - chart->area.x) * (set->maxx - set->minx) / (chart->area.w - 1) + set->minx; val.y = (chart->area.y + chart->area.h - 1 - chart->my) * (set->maxy - set->miny) / (chart->area.h - 1) + set->miny; y = chart->area.y + chart->area.h - 1 - (int)((val.y - set->miny) * (chart->area.h - 1) / (set->maxy - set->miny)); g_string_append_printf(gs, "%s ", set->desc); a = set->maxx; if (a < 0) a *= 10; b = set->minx; if (b < 0) b *= 10; c = Z_MAX(Z_ABS(a), Z_ABS(b)); c = log10(c); if (c < 0) { d = -c + 4; c = 1; }else{ c = ceil(c); d = 4 - c; if (d < 0) d = 0; } if (d > 0) c++; g_snprintf(s, sizeof(s), "%%%d.%df", (int)(c + d), (int)d); g_string_append_printf(gs, s, val.x); a = set->maxy; if (a < 0) a *= 10; b = set->miny; if (b < 0) b *= 10; c = Z_MAX(Z_ABS(a), Z_ABS(b)); c = log10(c); if (c < 0) { d = -c + 4; c = 1; }else{ c = ceil(c); d = 4 - c; if (d < 0) d = 0; } if (d > 0) c++; g_snprintf(s, sizeof(s), " %%%d.%df", (int)(c + d), (int)d); g_string_append_printf(gs, s, val.y); g_string_append_printf(gs2, gs->str, val.x, val.y); tw = gs2->len * zsdl->font_w; th = zsdl->font_h; for (x = chart->area.x; x < chart->area.x + chart->area.w - tw; x += zsdl->font_w){ for (y = chart->area.y; y < chart->area.y + chart->area.h - th; y += zsdl->font_h){ for (i = 0; i < tw; i++){ for (j = 0; j < th; j++){ int c = z_getpixel(chart->surface, x + i, y + j); if (c != chart->bgcolor && c != crosscolor){ y += j; goto occupied; } } } // free space zsdl_printf(chart->surface, x, y, set->color, 0, ZFONT_TRANSP, "%s", gs->str); goto drawn; occupied:; } } drawn:; g_string_free(gs, TRUE); g_string_free(gs2, TRUE); } } void zchart_mouse(struct zchart *chart, int mx, int my){ if (!chart) return; if (mx < chart->area.x) mx = chart->area.x; if (mx >= chart->area.x + chart->area.w) mx = chart->area.x + chart->area.w - 1; if (my < chart->area.y) my = chart->area.y; if (my >= chart->area.y + chart->area.h) my = chart->area.y + chart->area.h - 1; chart->mx = mx; chart->my = my; } #endif libzia-4.67/src/zasyncdns.c0000644000175000017500000001276414662101505012626 00000000000000/* zasyncdns.c - asynchronous DNS queries Copyright (C) 2011-2022 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #ifdef Z_HAVE_NETDB_H #include #endif #ifdef Z_HAVE_NETINET_IN_H #include #endif #include #include #include #ifdef Z_HAVE_WS2TCPIP_H #include #endif #ifdef Z_HAVE_WIN32API_WS2TCPIP_H #include #endif static GPtrArray *gadns_list = NULL; gpointer zasyncdns_thread_func(gpointer arg); struct zasyncdns *zasyncdns_init(void){ struct zasyncdns *adns; if (gadns_list == NULL) gadns_list = g_ptr_array_new(); adns = g_new0(struct zasyncdns, 1); g_ptr_array_add(gadns_list, adns); return adns; } void zasyncdns_free(struct zasyncdns *adns){ if (adns == NULL) return; g_ptr_array_remove(gadns_list, adns); if (adns->thread != NULL){ //dbg("zasyncdns_free: adns=%p\n", adns); g_thread_join(adns->thread); adns->thread = NULL; } g_free(adns->hostname); g_free(adns); } struct zasyncdns *zasyncdns_getaddrinfo( struct zasyncdns *adns, struct zselect *zsel, void (*callback)(struct zasyncdns *adns, int n, int *family, int *socktype, int *protocol, int *addrlen, union zsockaddr *addr, char *errorstr), char *hostname, int socktype, void *arg) { if (adns->thread != NULL){ g_thread_join(adns->thread); adns->thread = NULL; } //dbg("zasyncdns_getaddrinfo('%s')\n", hostname); adns->zsel = zsel; adns->hostname = g_strdup(hostname); adns->callback = callback; adns->arg = arg; adns->socktype = socktype; //adns->thread = g_thread_create(zasyncdns_thread_func, adns, TRUE, NULL); adns->thread = g_thread_try_new("zasyncdns", zasyncdns_thread_func, adns, NULL); return adns; } gpointer zasyncdns_thread_func(gpointer arg){ #ifdef Z_HAVE_GETADDRINFO struct zasyncdns *adns; int ret; struct addrinfo *ai, *result, src; GString *msg; adns = (struct zasyncdns *)arg; zg_thread_set_name("Libzia zasyncdns"); memset(&src, 0, sizeof(src)); src.ai_family = AF_INET6; ret = getaddrinfo(adns->hostname, NULL, NULL/*&src*/, &result); if (ret){ char *e = g_strdup(gai_strerror(ret)); zselect_msg_send(adns->zsel, "ZASYNCDNS;E;%p;%s", adns, z_1250_to_8859_2(e)); g_free(e); dbg("zasyncdns: error\n"); return NULL; } msg = g_string_new("ZASYNCDNS;A"); g_string_append_printf(msg, ";%p", adns); for (ai = result; ai != NULL; ai = ai->ai_next){ zg_string_eprintfa("e", msg, ";%d;%d;%d;%d;", ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); zg_string_eprintfa("b", msg, "%y", ai->ai_addr, ai->ai_addrlen); } g_string_append(msg, "\n"); //dbg("zasyncdns: %s -> %s", adns->hostname, msg->str); zselect_msg_send_raw(adns->zsel, msg->str); freeaddrinfo(result); g_string_free(msg, TRUE); return NULL; #else struct zasyncdns *adns; struct hostent *he; GString *msg; struct sockaddr_in sin; adns = (struct zasyncdns *)arg; he = gethostbyname(adns->hostname); if (!he){ zselect_msg_send(adns->zsel, "ZASYNCDNS;E;0xp;%s", adns, z_host_error()); return NULL; } memset(&sin, 0, sizeof(struct sockaddr_in)); memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length); sin.sin_family = AF_INET; msg = g_string_new("ZASYNCDNS;A"); g_string_append_printf(msg, ";%p", adns); zg_string_eprintfa("e", msg, ";%d;%d;%d;%d;", AF_INET, SOCK_STREAM, IPPROTO_TCP, sizeof(struct sockaddr_in)); zg_string_eprintfa("b", msg, "%y", &sin, sizeof(struct sockaddr_in)); g_string_append(msg, "\n"); //dbg("zasyncdns: '%s'", msg->str); zselect_msg_send_raw(adns->zsel, msg->str); g_string_free(msg, TRUE); return NULL; #endif } void zasyncdns_read_handler(int n, char *items[]){ struct zasyncdns *adns; int i, len; int *family, *socktype, *protocol, *addrlen; union zsockaddr *addr; if (n < 4) return; // malformed adns = (struct zasyncdns *)z_strtop(items[2]); // dbg("zasyncdns_read_handler(%p)\n", adns); for (i = 0; i < (int)gadns_list->len; i++){ struct zasyncdns *a = (struct zasyncdns *)g_ptr_array_index(gadns_list, i); if (a == adns) goto found; } dbg("zasyncdns_read_handler - unknown adns=%p\n", adns); return; found:; g_thread_join(adns->thread); adns->thread = NULL; if (n == 4){ adns->callback(adns, 0, NULL, NULL, NULL, NULL, NULL, items[3]); return; } len = (n - 3) / 5; family = g_new(int, len); socktype = g_new(int, len); protocol = g_new(int, len); addrlen = g_new(int, len); addr = g_new(union zsockaddr, len); for (i = 0; i < len; i++){ family[i] = atoi(items[5 * i + 3]); socktype[i] = atoi(items[5 * i + 4]); protocol[i] = atoi(items[5 * i + 5]); addrlen[i] = atoi(items[5 * i + 6]); //z_base64dec((char *)(addr + i), addrlen[i], NULL, items[5 * i + 7]); z_hexadec((char *)(addr + i), addrlen[i], NULL, items[5 * i + 7]); } adns->callback(adns, len, family, socktype, protocol, addrlen, addr, NULL); g_free(family); g_free(socktype); g_free(protocol); g_free(addrlen); g_free(addr); } libzia-4.67/src/zandroid.c0000644000175000017500000001213114662101505012410 00000000000000/* zandroid.c - Android JNI interface Copyright (C) 2012-2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_ANDROID #include #include #include #include #include #include static JavaVM *jvm; static JNIEnv *genv; static jobject gTucnakActivity; static jclass gTucnakActivityClass; static jmethodID updatePackage; static jmethodID browser; static jmethodID playWav; static jmethodID ssbdAbort; static jmethodID updateLocation; static jmethodID messageBox; struct zselect *zsel_location; #ifdef Z_HAVE_SDL1 JNIEXPORT void JNICALL Java_cz_nagano_tucnak_MainActivity_nativeInitJavaCallbacks(JNIEnv *env, jobject thiz) #endif #ifdef Z_HAVE_SDL2 JNIEXPORT void JNICALL Java_cz_nagano_tucnak_TucnakActivity_nativeInitJavaCallbacks(JNIEnv *env, jobject thiz) #endif { __android_log_print(ANDROID_LOG_DEBUG, "tucnak", "nativeInitJavaCallbacks started env=%p thiz=%p -------------\n", env, thiz); __android_log_print(ANDROID_LOG_DEBUG, "tucnak", "nativeInitJavaCallbacks tid=%d\n", gettid()); (*env)->GetJavaVM(env, &jvm); __android_log_print(ANDROID_LOG_DEBUG, "tucnak", "done\n"); gTucnakActivity = (*env)->NewGlobalRef(env, thiz); gTucnakActivityClass = (*env)->GetObjectClass(env, thiz); //dbg("env=%p, gTucnakActivity=%p, gTucnakActivityClass=%p\n", env, gTucnakActivity, gTucnakActivityClass); updatePackage = (*env)->GetMethodID(env, gTucnakActivityClass, "UpdatePackage", "(Ljava/lang/String;)V"); browser = (*env)->GetMethodID(env, gTucnakActivityClass, "Browser", "(Ljava/lang/String;)V"); playWav = (*env)->GetMethodID(env, gTucnakActivityClass, "PlayWav", "(Ljava/lang/String;)V"); ssbdAbort = (*env)->GetMethodID(env, gTucnakActivityClass, "SsbdAbort", "()V"); updateLocation = (*env)->GetMethodID(env, gTucnakActivityClass, "UpdateLocation", "()V"); messageBox = (*env)->GetMethodID(env, gTucnakActivityClass, "MessageBox", "(Ljava/lang/String;Ljava/lang/String;)V"); #ifdef Z_HAVE_SDL2 SDL_SetHint(SDL_HINT_ANDROID_BLOCK_ON_PAUSE, "0"); #endif __android_log_print(ANDROID_LOG_DEBUG, "tucnak", "nativeInitJavaCallbacks finished\n"); } // called after nativeInitJavaCallbacks void zandroid_init(struct zselect *location){ zsel_location = location; dbg("dbg zandroid_init tid=%d\n", gettid()); int getEnvStat = (*jvm)->GetEnv(jvm, (void**)&genv, JNI_VERSION_1_6); if (getEnvStat == JNI_EDETACHED) { if ((*jvm)->AttachCurrentThread(jvm, (void**)&genv, NULL) != 0) { dbg("Cannot attach current thread to JVM"); } } } void zandroid_update_package(const char *filename){ dbg("zandroid_update_package('%s')\n", filename); //dbg("updatePackage=%p\n", updatePackage); jstring jFileName = (*genv)->NewStringUTF(genv, filename); //dbg("jFileName=%p\n", jFileName); (*genv)->CallVoidMethod(genv, gTucnakActivity, updatePackage, jFileName); dbg("zandroid_update_package return\n"); } void zandroid_browser(const char *url){ dbg("zandroid_browser('%s')\n", url); //dbg("updatePackage=%p\n", updatePackage); jstring jUrl = (*genv)->NewStringUTF(genv, url); //dbg("jFileName=%p\n", jFileName); (*genv)->CallVoidMethod(genv, gTucnakActivity, browser, jUrl); dbg("zandroid_browser return\n"); } void zandroid_play_wav(const char *filename){ dbg("zandroid_play_wav('%s')\n", filename); jstring jFileName = (*genv)->NewStringUTF(genv, filename); (*genv)->CallVoidMethod(genv, gTucnakActivity, playWav, jFileName); dbg("zandroid_play_wav return\n"); } void zandroid_ssbd_abort(){ dbg("zandroid_ssbd_abort()\n"); (*genv)->CallVoidMethod(genv, gTucnakActivity, ssbdAbort); dbg("zandroid_ssbd_abort() RET\n"); } static double myH, myW; static int myState; #ifdef Z_HAVE_SDL1 JNIEXPORT void JNICALL Java_cz_nagano_tucnak_MainActivity_nativeSendLocation(JNIEnv* env, jobject thiz, jdouble jh, jdouble jw, jint jstate) { #endif #ifdef Z_HAVE_SDL2 JNIEXPORT void JNICALL Java_cz_nagano_tucnak_TucnakActivity_nativeSendLocation(JNIEnv *env, jobject thiz, jdouble jh, jdouble jw, jint jstate){ #endif dbg("nativeSendLocation\n"); myH = jh; myW = jw; myState = jstate; if (zsel_location) zselect_msg_send(zsel_location, "TERM"); } void zandroid_get_location(double *h, double *w, int *state){ //dbg("zandroid_get_location\n"); *h = myH; *w = myW; *state = myState; } void zandroid_update_location(){ dbg("zandroid_update_location() tid=%d\n", gettid()); myState = 0; (*genv)->CallVoidMethod(genv, gTucnakActivity, updateLocation); } void zandroid_messagebox(const char *caption, const char *str){ dbg("zandroid_messagebox('%s', '%s')\n", caption, str); jstring jCap = (*genv)->NewStringUTF(genv, caption); jstring jStr = (*genv)->NewStringUTF(genv, str); (*genv)->CallVoidMethod(genv, gTucnakActivity, messageBox, jCap, jStr); dbg("zandroid_messagebox return\n"); } #endif libzia-4.67/src/zgptrarray.c0000644000175000017500000000257114662101505013012 00000000000000/* zgptrarray.c - GPtrArray extension Copyright (C) 2002-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include void zg_ptr_array_free_all(GPtrArray *array){ int i; gpointer item; if (!array) return; for (i=array->len-1; i>=0; i--){ item=g_ptr_array_index(array, i); g_free(item); } g_ptr_array_free(array, TRUE); } void zg_ptr_array_free_items(GPtrArray *array){ int i; gpointer item; if (!array) return; for (i=array->len-1; i>=0; i--){ item=g_ptr_array_index(array, i); g_free(item); g_ptr_array_remove_index(array, i); } } void zg_ptr_array_qsort (GPtrArray *array, int (*compar)(const void *, const void *)){ qsort( (void *)array->pdata, array->len, sizeof(gpointer), compar); } // case sensitive // 0 = found, 1 = not found int zg_ptr_array_find_str(GPtrArray *array, char *needle){ int i; char *item; if (!array) return 1; for (i = 0; (long)i < (long)array->len; i++){ item = (char*)g_ptr_array_index(array, i); if (strcmp(item, needle) == 0) return 0; } return 1; } libzia-4.67/src/zfhs.c0000644000175000017500000000756414662101505011566 00000000000000/* zfhs.c - FHS compliant device locking Copyright (C) 2002-2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #define FHS_RETURN(code) { ret=(code);goto x; } #ifndef WIN32 static int zfhs_kill_stale(FILE *f, const char *lockfile){ int pid, ret, err; char s[256]; s[sizeof(s) - 1]='\0'; if (!fgets(s, sizeof(s) - 1, f)) return 0; pid = atoi(s); // dbg("pid=%d\n", pid); if (!pid) return -4; ret = kill(pid, 0); err = errno; dbg("zfhs_kill_stale(mypid=%d): kill(%d) ret=%d errno=%d EINVAL=%d ESRCH=%d\n", getpid(), pid, ret, errno, EINVAL, ESRCH); if (!ret) { return -7; // process alive }else{ if (err == EINVAL) return -4; // device is locked, details unknown if (err != ESRCH) return -7; // proces alive } if (unlink(lockfile)) { dbg("failed to unlink lockfile\n"); return -1; } dbg("lockfile unlinked\n"); return 0; } #endif #ifndef WIN32 static char *zfhs_get_lockfile(const char *device){ struct stat st; char *c = strrchr(device, '/'); if (!c) return NULL; if (stat("/var/lock/lockdev", &st) == 0){ if ((st.st_mode & S_IWGRP) || (st.st_mode & S_IWOTH)) return g_strdup_printf("/var/lock/lockdev/LCK..%s", c + 1); // it's no writable } // don't exist return g_strdup_printf("/var/lock/LCK..%s", c + 1); } #endif int zfhs_lock(const char *device, int ignore_stale){ int ret = 0; #ifndef WIN32 //__CYGWIN__ char *lockfile = NULL; FILE *f = NULL; lockfile = zfhs_get_lockfile(device); if (!lockfile) FHS_RETURN(-2); f = fopen(lockfile, "rt"); if (f){ if (!ignore_stale){ FHS_RETURN(-3); }else{ if (zfhs_kill_stale(f, lockfile)){ FHS_RETURN(-4); } } fclose(f); /* real unlink is here */ } f=fopen(lockfile, "wt"); if (!f){ FHS_RETURN(-5); }else{ char *filename = z_binary_file_name(); const char *fn = z_filename(filename); fprintf(f, "%10d %s ", (int)getpid(), fn); fprintf(f, "%d\n", (int)getuid()); g_free(filename); } x:; if (f) fclose(f); if (lockfile) g_free(lockfile); #endif return ret; } int zfhs_unlock(const char *device){ int ret = 0; #ifndef WIN32 //__CYGWIN__ char *lockfile = NULL; if (!device) return ret; lockfile = zfhs_get_lockfile(device); if (!lockfile) FHS_RETURN(-2); if (unlink(lockfile)) FHS_RETURN(-6); x:; if (lockfile) g_free(lockfile); #endif return ret; } char *zfhs_strdup_error(int err, const char *device){ switch (err){ case -1: #ifndef WIN32 return z_strdup_strerror(errno); #else return g_strdup("zfhs_strdup_error: case -1 unsupported on this platform"); #endif case -2: return g_strdup_printf("Bad filename %s", device); case -3: case -4: return g_strdup_printf("Device %s is locked", device); case -5: return g_strdup_printf("Can't create lock file for %s", device); case -6: return g_strdup_printf("Can't delete lock file for %s", device); case -7: return g_strdup_printf("Device %s is locked, process alive", device); default: break; } return g_strdup_printf("Unknown lock error %d on device %s", err, device); } libzia-4.67/src/zserial.c0000644000175000017500000003032214662101505012251 00000000000000/* zserial - portable serial port API Copyright (C) 2011-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include //#include //#include #include #include //#include #include //#include //#include //#include #include //#ifdef Z_HAVE_SYS_SELECT //#include //#endif #ifdef Z_HAVE_SYS_SOCKET_H #include #endif //#include //#include //#ifdef Z_HAVE_TERMIOS_H //#include //#endif #ifdef Z_HAVE_UNISTD_H #include #endif //#ifdef Z_HAVE_WINSOCK2_H //#include //#endif //#ifdef Z_HAVE_WINDOWS_H //#include //#endif static void zserial_free_ports(struct zserial *zser); struct zserial *zserial_init(void){ struct zserial *zser = g_new0(struct zserial, 1); #ifdef Z_HAVE_TERMIOS_H zser->fd = -1; #endif #ifdef Z_HAVE_LIBFTDI zser->ftdi = NULL; #endif #ifdef WIN32 zser->handle = INVALID_HANDLE_VALUE; zser->prochandle = INVALID_HANDLE_VALUE; zser->procstdin = INVALID_HANDLE_VALUE; zser->procstdout = INVALID_HANDLE_VALUE; #endif #ifdef Z_HAVE_PTY_H zser->master = -1; #else zser->read_fd = -1; zser->write_fd = -1; #endif zser->errorstr = g_string_new(""); zser->baudrate = 9600; zser->bits = 8; zser->parity = 'N'; zser->stopbits = 1; zser->pipefds[0] = -1; zser->pipefds[1] = -1; zser->sock = -1; // dbg("zserial_init()\n"); MUTEX_INIT(zser->close3); return zser; } struct zserial *zserial_init_serial(const char *device){ #ifdef Z_HAVE_TERMIOS_H return zserial_init_tty(device); #else return zserial_init_win32(device); #endif } struct zserial *zserial_init_process(const char *cmd, const char *arg){ #ifdef Z_MSC_MINGW return zserial_init_proc_win32(cmd, arg); #elif defined(Z_HAVE_PTY_H) return zserial_init_proc_pty(cmd, arg); #else return zserial_init_proc_pipe(cmd, arg); #endif } void zserial_set_line(struct zserial *zser, int baudrate, int bits, char parity, int stopbits){ zser->baudrate = baudrate; zser->bits = bits; zser->parity = parity; zser->stopbits = stopbits; } void zserial_unsupported(struct zserial *zser, const char *fce){ char *typestr; switch (zser->type){ case ZSERTYPE_TTY: typestr = "ZSERTYPE_TTY"; break; case ZSERTYPE_FTDI: typestr = "ZSERTYPE_FTDI"; break; case ZSERTYPE_WIN32: typestr = "ZSERTYPE_WIN32"; break; case ZSERTYPE_TCP: typestr = "ZSERTYPE_TCP"; break; case ZSERTYPE_PROC_WIN32: typestr = "ZSERTYPE_PROC_WIN32"; break; case ZSERTYPE_PROC_PTY: typestr = "ZSERTYPE_PROC_PTY"; break; case ZSERTYPE_PROC_PIPE: typestr = "ZSERTYPE_PROC_PIPE"; break; default: typestr = NULL; break; } if (typestr){ g_string_printf(zser->errorstr, "%s: %s unsupported on this platform", fce, typestr); }else{ g_string_printf(zser->errorstr, "%s: zser type %d unsupported on this platform", fce, zser->type); } } int zserial_open(struct zserial *zser){ if (!zser->zs_open) { zserial_unsupported(zser, __FUNCTION__); return -1; } return zser->zs_open(zser); } int zserial_is_opened(struct zserial* zser) { return zser->opened; } int zserial_read(struct zserial *zser, void *data, int len, int timeout_ms){ if (zserial_open(zser)) return -1; if (!zser->zs_read) { zserial_unsupported(zser, __FUNCTION__); return -1; } return zser->zs_read(zser, data, len, timeout_ms); } int zserial_write(struct zserial *zser, void *data, int len){ int ret; // if (zserial_open(zser)) return -1; ret = zserial_open(zser); //dbg("zserial_open returns %d\n", ret); if (ret) return -1; if (!zser->zs_write) { zserial_unsupported(zser, __FUNCTION__); return -1; } return zser->zs_write(zser, data, len); } int zserial_close(struct zserial *zser){ int ret = 0; //if (zser->thread_break) //return 0; // called probably from zserial_thread_func after TerminateProcess was called, must ignore //if (zser->thread && zser->thread == g_thread_self()) // return 0; // called from zserial_thread_func, must ignore to prevent g_thread_join(self) zser->thread_break = 1; if (zser->zs_close){ ret |= zser->zs_close(zser); } if (zser->pipefds[0] >= 0 && zser->thread != g_thread_self()) { // zser->thread can be NULL closesocket(zser->pipefds[0]); zser->pipefds[0] = -1; } if (zser->pipefds[1] >= 0) { closesocket(zser->pipefds[1]); zser->pipefds[1] = -1; } if (zser->thread){ if (zser->thread != g_thread_self()){ g_thread_join(zser->thread); zser->thread = NULL; } } zser->opened = 0; return ret; } void zserial_free(struct zserial *zser){ // dbg("zserial_free()\n"); zserial_close(zser); g_string_free(zser->errorstr, TRUE); if (zser->filename) g_free(zser->filename); if (zser->cmd) g_free(zser->cmd); if (zser->hostname) g_free(zser->hostname); #ifdef Z_HAVE_LIBFTDI g_free(zser->serial); #endif g_free(zser->id); if (zser->ports){ zserial_free_ports(zser); g_ptr_array_free(zser->ports, TRUE); } g_free(zser); } const char *zserial_errorstr(struct zserial *zser){ return zser->errorstr->str; } void zserial_clear_errorstr(struct zserial *zser){ g_string_truncate(zser->errorstr, 0); } int zserial_dtr(struct zserial *zser, int on){ if (zserial_open(zser)) return -1; if (!zser->zs_dtr){ zserial_unsupported(zser, __FUNCTION__); return -1; } return zser->zs_dtr(zser, on); } int zserial_rts(struct zserial *zser, int on){ if (zserial_open(zser)) return -1; if (!zser->zs_rts){ zserial_unsupported(zser, __FUNCTION__); return -1; } return zser->zs_rts(zser, on); } static char zserial_prot_chk(unsigned char *s, int len){ unsigned char chk, *c; chk=0; for (c=s;len;c++,len--){ chk^=*c; } return chk; } #define STARTB 2 #define STOPB 1 int zserial_prot(struct zserial *zser, char saddr, char fce, char *data, int *len, int timeout){ unsigned char rawdata[550]; int rawlen,written,rawi; int ret, i; if (zserial_open(zser)) return -1; /* clearing queue, filedescriptor is non-blocking */ /* for (i=0; i<10; i++){ if (zserial->read(zserial, rawdata, sizeof(rawdata)-1, 100)<=0) break;}*/ rawlen=0; memset(rawdata, 0xff, STARTB); rawlen+=STARTB; rawdata[rawlen++]=0xc5; rawdata[rawlen++]=fce&0x7f; rawdata[rawlen++]=saddr; rawdata[rawlen++]=(unsigned char)*len; memcpy(rawdata+rawlen, data, *len); rawlen+=*len; rawdata[rawlen]=zserial_prot_chk(rawdata+STARTB, rawlen-STARTB); rawlen++; memset(rawdata+rawlen, 0xff, STOPB); rawlen+=STOPB; written=zserial_write(zser, rawdata, rawlen); if (1){ GString *gs = g_string_new("\nzserial_prot: write("); for (i=0; i 0) g_string_append_c(gs, ' '); g_string_append_printf(gs, "%02x", (unsigned char)rawdata[i]); } g_string_append_printf(gs, ") = %d\n", written); dbg("%s", gs->str); g_string_free(gs, TRUE); } if (written<0) { *len = 0; return written; } if (saddr == 255) return 0; // broadcast rawi=0; while(1){ if (rawi>=sizeof(rawdata)-1) return 20; ret = zserial_read(zser, rawdata+rawi, 1/*sizeof(rawdata)-rawi*/, timeout); // dbg("read=%d\n", ret); if (ret<0) return ret; if (ret==0) return -4; rawi += ret; if (0) { GString *gs = g_string_new("zserial_prot: read=("); int j; for (j=0; j 0) g_string_append_c(gs, ' '); g_string_append_printf(gs, "%02x", (unsigned char)rawdata[j]); } g_string_append(gs, ")\n"); dbg("%s", gs->str); } for (i=0; irawi %d+5>%d=%d\n", i, rawi, i+5>rawi); if (i+5>rawi) goto nextloop; // dbg("i+5+rawdata[i+3]>rawi %d+5+%d>%d\n", i, (unsigned char)rawdata[i+3], rawi); if (i+5+(unsigned char)rawdata[i+3]>rawi) goto nextloop; // dbg("b\n"); if (1) { GString *gs = g_string_new("zserial_prot: read=("); int j; for (j=0; j 0) g_string_append_c(gs, ' '); g_string_append_printf(gs, "%02x", (unsigned char)rawdata[j]); } g_string_append(gs, ")\n"); dbg("%s", gs->str); } if (zserial_prot_chk(rawdata+i, 5+rawdata[i+3]) != 0) return 11; if (rawdata[i+1]==0) return 17; if (rawdata[i+1]==0x80) return 14; if ((rawdata[i+1] & 0x80)==0) continue; // dbg("c\n"); if (rawdata[i+2]!=(unsigned char)saddr) return 16; // dbg("d\n"); if (rawdata[i+1]!=(fce|0x80)) return 16; *len = rawdata[i+3]; memcpy(data, rawdata+i+4, *len); /* { int j; dbg("OK data=\n"); for (j=0; j<*len; j++) dbg("%02x ", (unsigned char)data[j]); dbg("\n"); }*/ return 0; } //dbg("neni C5 0..%d\n", rawi); nextloop:; } return 0; } static gpointer zserial_thread_func(gpointer xxx){ char buf[4096]; int ret; struct zserial *zser = (struct zserial*)xxx; while(!zser->thread_break){ ret = zserial_read(zser, buf, sizeof(buf), 10); if (ret < 0){ return NULL; /*if (zser->thread_break) break; // faster exit usleep(1000000); continue;*/ } if (ret > 0){ send(zser->pipefds[1], buf, ret, 0); } } return NULL; } int zserial_fd(struct zserial *zser){ switch (zser->type){ case ZSERTYPE_TTY: #ifdef Z_HAVE_TERMIOS_H return zser->fd; #else g_string_printf(zser->errorstr, "zserial_fd: ZSERTYPE_TTY unsupported on this platform"); return -1; #endif case ZSERTYPE_TCP: return zser->sock; case ZSERTYPE_FTDI: case ZSERTYPE_WIN32: case ZSERTYPE_PROC_WIN32: if (zser->pipefds[0] < 0){ if (z_pipe(zser->pipefds)) zinternal("Can't create pipe"); zser->thread_break = 0; //zser->thread = g_thread_create(zserial_thread_func, zser, TRUE, NULL); zser->thread = g_thread_try_new("zserial", zserial_thread_func, zser, NULL); } return zser->pipefds[0]; case ZSERTYPE_PROC_PTY: #ifdef Z_HAVE_PTY_H return zser->master; #else return -1; #endif case ZSERTYPE_PROC_PIPE: return zser->read_fd; } return -1; } const char *zserial_id(struct zserial *zser){ return zser->id; } void zserial_nolocks(struct zserial *zser, int nolocks){ zser->nolocks = nolocks; } static void zserial_free_ports(struct zserial *zser){ unsigned i; for (i = 0; i < zser->ports->len; i++){ struct zserial_port *port = (struct zserial_port*)g_ptr_array_index(zser->ports, i); g_free(port->filename); g_free(port->desc); } } int zserial_detect(struct zserial *zser){ if (!zser->ports) zser->ports = g_ptr_array_new(); zserial_free_ports(zser); if (!zser->zs_detect){ zserial_unsupported(zser, __FUNCTION__); return 0; } return zser->zs_detect(zser); } libzia-4.67/src/Makefile.in0000644000175000017500000031766714752576426012547 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @USE_WLMAP_TRUE@bin_PROGRAMS = libzia-@VERSION@.so.d$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } LTLIBRARIES = $(lib_LTLIBRARIES) libzia_la_LIBADD = am_libzia_la_OBJECTS = libzia_la-eprintf.lo libzia_la-regex.lo \ libzia_la-zasyncdns.lo libzia_la-zavgfilter.lo \ libzia_la-zbat.lo libzia_la-zbfd.lo libzia_la-zbinbuf.lo \ libzia_la-zbus.lo libzia_la-zcall.lo libzia_la-zchart.lo \ libzia_la-zclip.lo libzia_la-zcor.lo libzia_la-zdebug.lo \ libzia_la-zdht11.lo libzia_la-zdir.lo libzia_la-zdump.lo \ libzia_la-zerror.lo libzia_la-zfhs.lo libzia_la-zfile.lo \ libzia_la-zfiledlg.lo libzia_la-zftdi.lo libzia_la-zgetopt.lo \ libzia_la-zghash.lo libzia_la-zgpio.lo \ libzia_la-zgpio_sysgpio.lo libzia_la-zgpio_mcp23017.lo \ libzia_la-zgptrarray.lo libzia_la-zhash.lo libzia_la-zhttp.lo \ libzia_la-zhttpd.lo libzia_la-zi2c.lo libzia_la-ziconv.lo \ libzia_la-zifaces.lo libzia_la-zinput.lo libzia_la-zjson0.lo \ libzia_la-zjson.lo libzia_la-zloc.lo libzia_la-zmd5.lo \ libzia_la-zmisc.lo libzia_la-zmsgbox.lo libzia_la-zpath.lo \ libzia_la-zpng.lo libzia_la-zptrarray.lo libzia_la-zrc.lo \ libzia_la-zsdl.lo libzia_la-zselect.lo libzia_la-zserial.lo \ libzia_la-zserial_tty.lo libzia_la-zserial_ftdi.lo \ libzia_la-zserial_win32.lo libzia_la-zserial_tcp.lo \ libzia_la-zserial_proc_win32.lo libzia_la-zserial_proc_pty.lo \ libzia_la-zserial_proc_pipe.lo libzia_la-zsha1.lo \ libzia_la-zsock.lo libzia_la-zspidev.lo libzia_la-zspigpio.lo \ libzia_la-zssd1306.lo libzia_la-zstr.lo libzia_la-zsun.lo \ libzia_la-zthread.lo libzia_la-ztime.lo libzia_la-zver.lo libzia_la_OBJECTS = $(am_libzia_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libzia_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libzia_la_CFLAGS) \ $(CFLAGS) $(libzia_la_LDFLAGS) $(LDFLAGS) -o $@ am_libzia_@VERSION@_so_d_OBJECTS = map2d.$(OBJEXT) libzia_@VERSION@_so_d_OBJECTS = $(am_libzia_@VERSION@_so_d_OBJECTS) libzia_@VERSION@_so_d_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libzia_la-eprintf.Plo \ ./$(DEPDIR)/libzia_la-regex.Plo \ ./$(DEPDIR)/libzia_la-zasyncdns.Plo \ ./$(DEPDIR)/libzia_la-zavgfilter.Plo \ ./$(DEPDIR)/libzia_la-zbat.Plo ./$(DEPDIR)/libzia_la-zbfd.Plo \ ./$(DEPDIR)/libzia_la-zbinbuf.Plo \ ./$(DEPDIR)/libzia_la-zbus.Plo ./$(DEPDIR)/libzia_la-zcall.Plo \ ./$(DEPDIR)/libzia_la-zchart.Plo \ ./$(DEPDIR)/libzia_la-zclip.Plo ./$(DEPDIR)/libzia_la-zcor.Plo \ ./$(DEPDIR)/libzia_la-zdebug.Plo \ ./$(DEPDIR)/libzia_la-zdht11.Plo \ ./$(DEPDIR)/libzia_la-zdir.Plo ./$(DEPDIR)/libzia_la-zdump.Plo \ ./$(DEPDIR)/libzia_la-zerror.Plo \ ./$(DEPDIR)/libzia_la-zfhs.Plo ./$(DEPDIR)/libzia_la-zfile.Plo \ ./$(DEPDIR)/libzia_la-zfiledlg.Plo \ ./$(DEPDIR)/libzia_la-zftdi.Plo \ ./$(DEPDIR)/libzia_la-zgetopt.Plo \ ./$(DEPDIR)/libzia_la-zghash.Plo \ ./$(DEPDIR)/libzia_la-zgpio.Plo \ ./$(DEPDIR)/libzia_la-zgpio_mcp23017.Plo \ ./$(DEPDIR)/libzia_la-zgpio_sysgpio.Plo \ ./$(DEPDIR)/libzia_la-zgptrarray.Plo \ ./$(DEPDIR)/libzia_la-zhash.Plo \ ./$(DEPDIR)/libzia_la-zhttp.Plo \ ./$(DEPDIR)/libzia_la-zhttpd.Plo \ ./$(DEPDIR)/libzia_la-zi2c.Plo \ ./$(DEPDIR)/libzia_la-ziconv.Plo \ ./$(DEPDIR)/libzia_la-zifaces.Plo \ ./$(DEPDIR)/libzia_la-zinput.Plo \ ./$(DEPDIR)/libzia_la-zjson.Plo \ ./$(DEPDIR)/libzia_la-zjson0.Plo \ ./$(DEPDIR)/libzia_la-zloc.Plo ./$(DEPDIR)/libzia_la-zmd5.Plo \ ./$(DEPDIR)/libzia_la-zmisc.Plo \ ./$(DEPDIR)/libzia_la-zmsgbox.Plo \ ./$(DEPDIR)/libzia_la-zpath.Plo ./$(DEPDIR)/libzia_la-zpng.Plo \ ./$(DEPDIR)/libzia_la-zptrarray.Plo \ ./$(DEPDIR)/libzia_la-zrc.Plo ./$(DEPDIR)/libzia_la-zsdl.Plo \ ./$(DEPDIR)/libzia_la-zselect.Plo \ ./$(DEPDIR)/libzia_la-zserial.Plo \ ./$(DEPDIR)/libzia_la-zserial_ftdi.Plo \ ./$(DEPDIR)/libzia_la-zserial_proc_pipe.Plo \ ./$(DEPDIR)/libzia_la-zserial_proc_pty.Plo \ ./$(DEPDIR)/libzia_la-zserial_proc_win32.Plo \ ./$(DEPDIR)/libzia_la-zserial_tcp.Plo \ ./$(DEPDIR)/libzia_la-zserial_tty.Plo \ ./$(DEPDIR)/libzia_la-zserial_win32.Plo \ ./$(DEPDIR)/libzia_la-zsha1.Plo \ ./$(DEPDIR)/libzia_la-zsock.Plo \ ./$(DEPDIR)/libzia_la-zspidev.Plo \ ./$(DEPDIR)/libzia_la-zspigpio.Plo \ ./$(DEPDIR)/libzia_la-zssd1306.Plo \ ./$(DEPDIR)/libzia_la-zstr.Plo ./$(DEPDIR)/libzia_la-zsun.Plo \ ./$(DEPDIR)/libzia_la-zthread.Plo \ ./$(DEPDIR)/libzia_la-ztime.Plo ./$(DEPDIR)/libzia_la-zver.Plo \ ./$(DEPDIR)/map2d.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libzia_la_SOURCES) $(libzia_@VERSION@_so_d_SOURCES) DIST_SOURCES = $(libzia_la_SOURCES) $(libzia_@VERSION@_so_d_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = $(exec_prefix)/lib/$(DEB_HOST_MULTIARCH)/libzia build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libzia.la libzia_la_SOURCES = \ eprintf.c \ regex.c \ zasyncdns.c \ zavgfilter.c \ zbat.c \ zbfd.c \ zbinbuf.c \ zbus.c \ zcall.c \ zchart.c \ zclip.c \ zcor.c \ zdebug.c \ zdht11.c \ zdir.c \ zdump.c \ zerror.c \ zfhs.c \ zfile.c \ zfiledlg.c \ zftdi.c \ zgetopt.c \ zghash.c \ zgpio.c \ zgpio_sysgpio.c \ zgpio_mcp23017.c \ zgptrarray.c \ zhash.c \ zhttp.c \ zhttpd.c \ zi2c.c \ ziconv.c \ zifaces.c \ zinput.c \ zjson0.c \ zjson.c \ zloc.c \ zmd5.c \ zmisc.c \ zmsgbox.c \ zpath.c \ zpng.c \ zptrarray.c \ zrc.c \ zsdl.c \ zselect.c \ zserial.c \ zserial_tty.c \ zserial_ftdi.c \ zserial_win32.c \ zserial_tcp.c \ zserial_proc_win32.c \ zserial_proc_pty.c \ zserial_proc_pipe.c \ zsha1.c \ zsock.c \ zspidev.c \ zspigpio.c \ zssd1306.c \ zstr.c \ zsun.c \ zthread.c \ ztime.c \ zver.c libzia_la_CFLAGS = $(Z_SVNVER) -I../include -I../include/unix libzia_la_LDFLAGS = -release @VERSION@ library_includedir = $(includedir)/libzia #zsdltest_SOURCES = zsdltest.c #zsdltest_LDFLAGS = -lzia #gpiotest_SOURCES = gpiotest.c #gpiotest_LDFLAGS = -lzia EXTRA_DIST = regcomp.c regex_internal.c regexec.c Android.mk zandroid.c CLEANFILES = *.map *.d map2d DISTCLEANFILES = settings.c libzia_@VERSION@_so_d_SOURCES = map2d.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libzia.la: $(libzia_la_OBJECTS) $(libzia_la_DEPENDENCIES) $(EXTRA_libzia_la_DEPENDENCIES) $(AM_V_CCLD)$(libzia_la_LINK) -rpath $(libdir) $(libzia_la_OBJECTS) $(libzia_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-eprintf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-regex.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zasyncdns.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zavgfilter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zbat.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zbfd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zbinbuf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zbus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zcall.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zchart.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zclip.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zcor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zdebug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zdht11.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zdir.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zdump.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zerror.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zfhs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zfile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zfiledlg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zftdi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zgetopt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zghash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zgpio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zgpio_mcp23017.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zgpio_sysgpio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zgptrarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zhash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zhttp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zhttpd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zi2c.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-ziconv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zifaces.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zinput.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zjson.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zjson0.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zmd5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zmisc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zmsgbox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zpath.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zpng.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zptrarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zrc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zsdl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zselect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_ftdi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_proc_pipe.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_proc_pty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_proc_win32.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_tcp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zserial_win32.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zsha1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zsock.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zspidev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zspigpio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zssd1306.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zstr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zsun.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zthread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-ztime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzia_la-zver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map2d.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libzia_la-eprintf.lo: eprintf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-eprintf.lo -MD -MP -MF $(DEPDIR)/libzia_la-eprintf.Tpo -c -o libzia_la-eprintf.lo `test -f 'eprintf.c' || echo '$(srcdir)/'`eprintf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-eprintf.Tpo $(DEPDIR)/libzia_la-eprintf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='eprintf.c' object='libzia_la-eprintf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-eprintf.lo `test -f 'eprintf.c' || echo '$(srcdir)/'`eprintf.c libzia_la-regex.lo: regex.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-regex.lo -MD -MP -MF $(DEPDIR)/libzia_la-regex.Tpo -c -o libzia_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-regex.Tpo $(DEPDIR)/libzia_la-regex.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex.c' object='libzia_la-regex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c libzia_la-zasyncdns.lo: zasyncdns.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zasyncdns.lo -MD -MP -MF $(DEPDIR)/libzia_la-zasyncdns.Tpo -c -o libzia_la-zasyncdns.lo `test -f 'zasyncdns.c' || echo '$(srcdir)/'`zasyncdns.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zasyncdns.Tpo $(DEPDIR)/libzia_la-zasyncdns.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zasyncdns.c' object='libzia_la-zasyncdns.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zasyncdns.lo `test -f 'zasyncdns.c' || echo '$(srcdir)/'`zasyncdns.c libzia_la-zavgfilter.lo: zavgfilter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zavgfilter.lo -MD -MP -MF $(DEPDIR)/libzia_la-zavgfilter.Tpo -c -o libzia_la-zavgfilter.lo `test -f 'zavgfilter.c' || echo '$(srcdir)/'`zavgfilter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zavgfilter.Tpo $(DEPDIR)/libzia_la-zavgfilter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zavgfilter.c' object='libzia_la-zavgfilter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zavgfilter.lo `test -f 'zavgfilter.c' || echo '$(srcdir)/'`zavgfilter.c libzia_la-zbat.lo: zbat.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zbat.lo -MD -MP -MF $(DEPDIR)/libzia_la-zbat.Tpo -c -o libzia_la-zbat.lo `test -f 'zbat.c' || echo '$(srcdir)/'`zbat.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zbat.Tpo $(DEPDIR)/libzia_la-zbat.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbat.c' object='libzia_la-zbat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zbat.lo `test -f 'zbat.c' || echo '$(srcdir)/'`zbat.c libzia_la-zbfd.lo: zbfd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zbfd.lo -MD -MP -MF $(DEPDIR)/libzia_la-zbfd.Tpo -c -o libzia_la-zbfd.lo `test -f 'zbfd.c' || echo '$(srcdir)/'`zbfd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zbfd.Tpo $(DEPDIR)/libzia_la-zbfd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbfd.c' object='libzia_la-zbfd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zbfd.lo `test -f 'zbfd.c' || echo '$(srcdir)/'`zbfd.c libzia_la-zbinbuf.lo: zbinbuf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zbinbuf.lo -MD -MP -MF $(DEPDIR)/libzia_la-zbinbuf.Tpo -c -o libzia_la-zbinbuf.lo `test -f 'zbinbuf.c' || echo '$(srcdir)/'`zbinbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zbinbuf.Tpo $(DEPDIR)/libzia_la-zbinbuf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbinbuf.c' object='libzia_la-zbinbuf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zbinbuf.lo `test -f 'zbinbuf.c' || echo '$(srcdir)/'`zbinbuf.c libzia_la-zbus.lo: zbus.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zbus.lo -MD -MP -MF $(DEPDIR)/libzia_la-zbus.Tpo -c -o libzia_la-zbus.lo `test -f 'zbus.c' || echo '$(srcdir)/'`zbus.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zbus.Tpo $(DEPDIR)/libzia_la-zbus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbus.c' object='libzia_la-zbus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zbus.lo `test -f 'zbus.c' || echo '$(srcdir)/'`zbus.c libzia_la-zcall.lo: zcall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zcall.lo -MD -MP -MF $(DEPDIR)/libzia_la-zcall.Tpo -c -o libzia_la-zcall.lo `test -f 'zcall.c' || echo '$(srcdir)/'`zcall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zcall.Tpo $(DEPDIR)/libzia_la-zcall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zcall.c' object='libzia_la-zcall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zcall.lo `test -f 'zcall.c' || echo '$(srcdir)/'`zcall.c libzia_la-zchart.lo: zchart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zchart.lo -MD -MP -MF $(DEPDIR)/libzia_la-zchart.Tpo -c -o libzia_la-zchart.lo `test -f 'zchart.c' || echo '$(srcdir)/'`zchart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zchart.Tpo $(DEPDIR)/libzia_la-zchart.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zchart.c' object='libzia_la-zchart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zchart.lo `test -f 'zchart.c' || echo '$(srcdir)/'`zchart.c libzia_la-zclip.lo: zclip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zclip.lo -MD -MP -MF $(DEPDIR)/libzia_la-zclip.Tpo -c -o libzia_la-zclip.lo `test -f 'zclip.c' || echo '$(srcdir)/'`zclip.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zclip.Tpo $(DEPDIR)/libzia_la-zclip.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zclip.c' object='libzia_la-zclip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zclip.lo `test -f 'zclip.c' || echo '$(srcdir)/'`zclip.c libzia_la-zcor.lo: zcor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zcor.lo -MD -MP -MF $(DEPDIR)/libzia_la-zcor.Tpo -c -o libzia_la-zcor.lo `test -f 'zcor.c' || echo '$(srcdir)/'`zcor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zcor.Tpo $(DEPDIR)/libzia_la-zcor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zcor.c' object='libzia_la-zcor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zcor.lo `test -f 'zcor.c' || echo '$(srcdir)/'`zcor.c libzia_la-zdebug.lo: zdebug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zdebug.lo -MD -MP -MF $(DEPDIR)/libzia_la-zdebug.Tpo -c -o libzia_la-zdebug.lo `test -f 'zdebug.c' || echo '$(srcdir)/'`zdebug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zdebug.Tpo $(DEPDIR)/libzia_la-zdebug.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zdebug.c' object='libzia_la-zdebug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zdebug.lo `test -f 'zdebug.c' || echo '$(srcdir)/'`zdebug.c libzia_la-zdht11.lo: zdht11.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zdht11.lo -MD -MP -MF $(DEPDIR)/libzia_la-zdht11.Tpo -c -o libzia_la-zdht11.lo `test -f 'zdht11.c' || echo '$(srcdir)/'`zdht11.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zdht11.Tpo $(DEPDIR)/libzia_la-zdht11.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zdht11.c' object='libzia_la-zdht11.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zdht11.lo `test -f 'zdht11.c' || echo '$(srcdir)/'`zdht11.c libzia_la-zdir.lo: zdir.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zdir.lo -MD -MP -MF $(DEPDIR)/libzia_la-zdir.Tpo -c -o libzia_la-zdir.lo `test -f 'zdir.c' || echo '$(srcdir)/'`zdir.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zdir.Tpo $(DEPDIR)/libzia_la-zdir.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zdir.c' object='libzia_la-zdir.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zdir.lo `test -f 'zdir.c' || echo '$(srcdir)/'`zdir.c libzia_la-zdump.lo: zdump.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zdump.lo -MD -MP -MF $(DEPDIR)/libzia_la-zdump.Tpo -c -o libzia_la-zdump.lo `test -f 'zdump.c' || echo '$(srcdir)/'`zdump.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zdump.Tpo $(DEPDIR)/libzia_la-zdump.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zdump.c' object='libzia_la-zdump.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zdump.lo `test -f 'zdump.c' || echo '$(srcdir)/'`zdump.c libzia_la-zerror.lo: zerror.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zerror.lo -MD -MP -MF $(DEPDIR)/libzia_la-zerror.Tpo -c -o libzia_la-zerror.lo `test -f 'zerror.c' || echo '$(srcdir)/'`zerror.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zerror.Tpo $(DEPDIR)/libzia_la-zerror.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zerror.c' object='libzia_la-zerror.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zerror.lo `test -f 'zerror.c' || echo '$(srcdir)/'`zerror.c libzia_la-zfhs.lo: zfhs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zfhs.lo -MD -MP -MF $(DEPDIR)/libzia_la-zfhs.Tpo -c -o libzia_la-zfhs.lo `test -f 'zfhs.c' || echo '$(srcdir)/'`zfhs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zfhs.Tpo $(DEPDIR)/libzia_la-zfhs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zfhs.c' object='libzia_la-zfhs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zfhs.lo `test -f 'zfhs.c' || echo '$(srcdir)/'`zfhs.c libzia_la-zfile.lo: zfile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zfile.lo -MD -MP -MF $(DEPDIR)/libzia_la-zfile.Tpo -c -o libzia_la-zfile.lo `test -f 'zfile.c' || echo '$(srcdir)/'`zfile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zfile.Tpo $(DEPDIR)/libzia_la-zfile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zfile.c' object='libzia_la-zfile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zfile.lo `test -f 'zfile.c' || echo '$(srcdir)/'`zfile.c libzia_la-zfiledlg.lo: zfiledlg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zfiledlg.lo -MD -MP -MF $(DEPDIR)/libzia_la-zfiledlg.Tpo -c -o libzia_la-zfiledlg.lo `test -f 'zfiledlg.c' || echo '$(srcdir)/'`zfiledlg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zfiledlg.Tpo $(DEPDIR)/libzia_la-zfiledlg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zfiledlg.c' object='libzia_la-zfiledlg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zfiledlg.lo `test -f 'zfiledlg.c' || echo '$(srcdir)/'`zfiledlg.c libzia_la-zftdi.lo: zftdi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zftdi.lo -MD -MP -MF $(DEPDIR)/libzia_la-zftdi.Tpo -c -o libzia_la-zftdi.lo `test -f 'zftdi.c' || echo '$(srcdir)/'`zftdi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zftdi.Tpo $(DEPDIR)/libzia_la-zftdi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zftdi.c' object='libzia_la-zftdi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zftdi.lo `test -f 'zftdi.c' || echo '$(srcdir)/'`zftdi.c libzia_la-zgetopt.lo: zgetopt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zgetopt.lo -MD -MP -MF $(DEPDIR)/libzia_la-zgetopt.Tpo -c -o libzia_la-zgetopt.lo `test -f 'zgetopt.c' || echo '$(srcdir)/'`zgetopt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zgetopt.Tpo $(DEPDIR)/libzia_la-zgetopt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zgetopt.c' object='libzia_la-zgetopt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zgetopt.lo `test -f 'zgetopt.c' || echo '$(srcdir)/'`zgetopt.c libzia_la-zghash.lo: zghash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zghash.lo -MD -MP -MF $(DEPDIR)/libzia_la-zghash.Tpo -c -o libzia_la-zghash.lo `test -f 'zghash.c' || echo '$(srcdir)/'`zghash.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zghash.Tpo $(DEPDIR)/libzia_la-zghash.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zghash.c' object='libzia_la-zghash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zghash.lo `test -f 'zghash.c' || echo '$(srcdir)/'`zghash.c libzia_la-zgpio.lo: zgpio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zgpio.lo -MD -MP -MF $(DEPDIR)/libzia_la-zgpio.Tpo -c -o libzia_la-zgpio.lo `test -f 'zgpio.c' || echo '$(srcdir)/'`zgpio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zgpio.Tpo $(DEPDIR)/libzia_la-zgpio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zgpio.c' object='libzia_la-zgpio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zgpio.lo `test -f 'zgpio.c' || echo '$(srcdir)/'`zgpio.c libzia_la-zgpio_sysgpio.lo: zgpio_sysgpio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zgpio_sysgpio.lo -MD -MP -MF $(DEPDIR)/libzia_la-zgpio_sysgpio.Tpo -c -o libzia_la-zgpio_sysgpio.lo `test -f 'zgpio_sysgpio.c' || echo '$(srcdir)/'`zgpio_sysgpio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zgpio_sysgpio.Tpo $(DEPDIR)/libzia_la-zgpio_sysgpio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zgpio_sysgpio.c' object='libzia_la-zgpio_sysgpio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zgpio_sysgpio.lo `test -f 'zgpio_sysgpio.c' || echo '$(srcdir)/'`zgpio_sysgpio.c libzia_la-zgpio_mcp23017.lo: zgpio_mcp23017.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zgpio_mcp23017.lo -MD -MP -MF $(DEPDIR)/libzia_la-zgpio_mcp23017.Tpo -c -o libzia_la-zgpio_mcp23017.lo `test -f 'zgpio_mcp23017.c' || echo '$(srcdir)/'`zgpio_mcp23017.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zgpio_mcp23017.Tpo $(DEPDIR)/libzia_la-zgpio_mcp23017.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zgpio_mcp23017.c' object='libzia_la-zgpio_mcp23017.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zgpio_mcp23017.lo `test -f 'zgpio_mcp23017.c' || echo '$(srcdir)/'`zgpio_mcp23017.c libzia_la-zgptrarray.lo: zgptrarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zgptrarray.lo -MD -MP -MF $(DEPDIR)/libzia_la-zgptrarray.Tpo -c -o libzia_la-zgptrarray.lo `test -f 'zgptrarray.c' || echo '$(srcdir)/'`zgptrarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zgptrarray.Tpo $(DEPDIR)/libzia_la-zgptrarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zgptrarray.c' object='libzia_la-zgptrarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zgptrarray.lo `test -f 'zgptrarray.c' || echo '$(srcdir)/'`zgptrarray.c libzia_la-zhash.lo: zhash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zhash.lo -MD -MP -MF $(DEPDIR)/libzia_la-zhash.Tpo -c -o libzia_la-zhash.lo `test -f 'zhash.c' || echo '$(srcdir)/'`zhash.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zhash.Tpo $(DEPDIR)/libzia_la-zhash.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zhash.c' object='libzia_la-zhash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zhash.lo `test -f 'zhash.c' || echo '$(srcdir)/'`zhash.c libzia_la-zhttp.lo: zhttp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zhttp.lo -MD -MP -MF $(DEPDIR)/libzia_la-zhttp.Tpo -c -o libzia_la-zhttp.lo `test -f 'zhttp.c' || echo '$(srcdir)/'`zhttp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zhttp.Tpo $(DEPDIR)/libzia_la-zhttp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zhttp.c' object='libzia_la-zhttp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zhttp.lo `test -f 'zhttp.c' || echo '$(srcdir)/'`zhttp.c libzia_la-zhttpd.lo: zhttpd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zhttpd.lo -MD -MP -MF $(DEPDIR)/libzia_la-zhttpd.Tpo -c -o libzia_la-zhttpd.lo `test -f 'zhttpd.c' || echo '$(srcdir)/'`zhttpd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zhttpd.Tpo $(DEPDIR)/libzia_la-zhttpd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zhttpd.c' object='libzia_la-zhttpd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zhttpd.lo `test -f 'zhttpd.c' || echo '$(srcdir)/'`zhttpd.c libzia_la-zi2c.lo: zi2c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zi2c.lo -MD -MP -MF $(DEPDIR)/libzia_la-zi2c.Tpo -c -o libzia_la-zi2c.lo `test -f 'zi2c.c' || echo '$(srcdir)/'`zi2c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zi2c.Tpo $(DEPDIR)/libzia_la-zi2c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zi2c.c' object='libzia_la-zi2c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zi2c.lo `test -f 'zi2c.c' || echo '$(srcdir)/'`zi2c.c libzia_la-ziconv.lo: ziconv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-ziconv.lo -MD -MP -MF $(DEPDIR)/libzia_la-ziconv.Tpo -c -o libzia_la-ziconv.lo `test -f 'ziconv.c' || echo '$(srcdir)/'`ziconv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-ziconv.Tpo $(DEPDIR)/libzia_la-ziconv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ziconv.c' object='libzia_la-ziconv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-ziconv.lo `test -f 'ziconv.c' || echo '$(srcdir)/'`ziconv.c libzia_la-zifaces.lo: zifaces.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zifaces.lo -MD -MP -MF $(DEPDIR)/libzia_la-zifaces.Tpo -c -o libzia_la-zifaces.lo `test -f 'zifaces.c' || echo '$(srcdir)/'`zifaces.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zifaces.Tpo $(DEPDIR)/libzia_la-zifaces.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zifaces.c' object='libzia_la-zifaces.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zifaces.lo `test -f 'zifaces.c' || echo '$(srcdir)/'`zifaces.c libzia_la-zinput.lo: zinput.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zinput.lo -MD -MP -MF $(DEPDIR)/libzia_la-zinput.Tpo -c -o libzia_la-zinput.lo `test -f 'zinput.c' || echo '$(srcdir)/'`zinput.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zinput.Tpo $(DEPDIR)/libzia_la-zinput.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zinput.c' object='libzia_la-zinput.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zinput.lo `test -f 'zinput.c' || echo '$(srcdir)/'`zinput.c libzia_la-zjson0.lo: zjson0.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zjson0.lo -MD -MP -MF $(DEPDIR)/libzia_la-zjson0.Tpo -c -o libzia_la-zjson0.lo `test -f 'zjson0.c' || echo '$(srcdir)/'`zjson0.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zjson0.Tpo $(DEPDIR)/libzia_la-zjson0.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zjson0.c' object='libzia_la-zjson0.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zjson0.lo `test -f 'zjson0.c' || echo '$(srcdir)/'`zjson0.c libzia_la-zjson.lo: zjson.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zjson.lo -MD -MP -MF $(DEPDIR)/libzia_la-zjson.Tpo -c -o libzia_la-zjson.lo `test -f 'zjson.c' || echo '$(srcdir)/'`zjson.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zjson.Tpo $(DEPDIR)/libzia_la-zjson.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zjson.c' object='libzia_la-zjson.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zjson.lo `test -f 'zjson.c' || echo '$(srcdir)/'`zjson.c libzia_la-zloc.lo: zloc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zloc.lo -MD -MP -MF $(DEPDIR)/libzia_la-zloc.Tpo -c -o libzia_la-zloc.lo `test -f 'zloc.c' || echo '$(srcdir)/'`zloc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zloc.Tpo $(DEPDIR)/libzia_la-zloc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zloc.c' object='libzia_la-zloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zloc.lo `test -f 'zloc.c' || echo '$(srcdir)/'`zloc.c libzia_la-zmd5.lo: zmd5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zmd5.lo -MD -MP -MF $(DEPDIR)/libzia_la-zmd5.Tpo -c -o libzia_la-zmd5.lo `test -f 'zmd5.c' || echo '$(srcdir)/'`zmd5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zmd5.Tpo $(DEPDIR)/libzia_la-zmd5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zmd5.c' object='libzia_la-zmd5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zmd5.lo `test -f 'zmd5.c' || echo '$(srcdir)/'`zmd5.c libzia_la-zmisc.lo: zmisc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zmisc.lo -MD -MP -MF $(DEPDIR)/libzia_la-zmisc.Tpo -c -o libzia_la-zmisc.lo `test -f 'zmisc.c' || echo '$(srcdir)/'`zmisc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zmisc.Tpo $(DEPDIR)/libzia_la-zmisc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zmisc.c' object='libzia_la-zmisc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zmisc.lo `test -f 'zmisc.c' || echo '$(srcdir)/'`zmisc.c libzia_la-zmsgbox.lo: zmsgbox.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zmsgbox.lo -MD -MP -MF $(DEPDIR)/libzia_la-zmsgbox.Tpo -c -o libzia_la-zmsgbox.lo `test -f 'zmsgbox.c' || echo '$(srcdir)/'`zmsgbox.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zmsgbox.Tpo $(DEPDIR)/libzia_la-zmsgbox.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zmsgbox.c' object='libzia_la-zmsgbox.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zmsgbox.lo `test -f 'zmsgbox.c' || echo '$(srcdir)/'`zmsgbox.c libzia_la-zpath.lo: zpath.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zpath.lo -MD -MP -MF $(DEPDIR)/libzia_la-zpath.Tpo -c -o libzia_la-zpath.lo `test -f 'zpath.c' || echo '$(srcdir)/'`zpath.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zpath.Tpo $(DEPDIR)/libzia_la-zpath.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zpath.c' object='libzia_la-zpath.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zpath.lo `test -f 'zpath.c' || echo '$(srcdir)/'`zpath.c libzia_la-zpng.lo: zpng.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zpng.lo -MD -MP -MF $(DEPDIR)/libzia_la-zpng.Tpo -c -o libzia_la-zpng.lo `test -f 'zpng.c' || echo '$(srcdir)/'`zpng.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zpng.Tpo $(DEPDIR)/libzia_la-zpng.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zpng.c' object='libzia_la-zpng.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zpng.lo `test -f 'zpng.c' || echo '$(srcdir)/'`zpng.c libzia_la-zptrarray.lo: zptrarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zptrarray.lo -MD -MP -MF $(DEPDIR)/libzia_la-zptrarray.Tpo -c -o libzia_la-zptrarray.lo `test -f 'zptrarray.c' || echo '$(srcdir)/'`zptrarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zptrarray.Tpo $(DEPDIR)/libzia_la-zptrarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zptrarray.c' object='libzia_la-zptrarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zptrarray.lo `test -f 'zptrarray.c' || echo '$(srcdir)/'`zptrarray.c libzia_la-zrc.lo: zrc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zrc.lo -MD -MP -MF $(DEPDIR)/libzia_la-zrc.Tpo -c -o libzia_la-zrc.lo `test -f 'zrc.c' || echo '$(srcdir)/'`zrc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zrc.Tpo $(DEPDIR)/libzia_la-zrc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zrc.c' object='libzia_la-zrc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zrc.lo `test -f 'zrc.c' || echo '$(srcdir)/'`zrc.c libzia_la-zsdl.lo: zsdl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zsdl.lo -MD -MP -MF $(DEPDIR)/libzia_la-zsdl.Tpo -c -o libzia_la-zsdl.lo `test -f 'zsdl.c' || echo '$(srcdir)/'`zsdl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zsdl.Tpo $(DEPDIR)/libzia_la-zsdl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zsdl.c' object='libzia_la-zsdl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zsdl.lo `test -f 'zsdl.c' || echo '$(srcdir)/'`zsdl.c libzia_la-zselect.lo: zselect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zselect.lo -MD -MP -MF $(DEPDIR)/libzia_la-zselect.Tpo -c -o libzia_la-zselect.lo `test -f 'zselect.c' || echo '$(srcdir)/'`zselect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zselect.Tpo $(DEPDIR)/libzia_la-zselect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zselect.c' object='libzia_la-zselect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zselect.lo `test -f 'zselect.c' || echo '$(srcdir)/'`zselect.c libzia_la-zserial.lo: zserial.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial.Tpo -c -o libzia_la-zserial.lo `test -f 'zserial.c' || echo '$(srcdir)/'`zserial.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial.Tpo $(DEPDIR)/libzia_la-zserial.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial.c' object='libzia_la-zserial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial.lo `test -f 'zserial.c' || echo '$(srcdir)/'`zserial.c libzia_la-zserial_tty.lo: zserial_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_tty.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_tty.Tpo -c -o libzia_la-zserial_tty.lo `test -f 'zserial_tty.c' || echo '$(srcdir)/'`zserial_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_tty.Tpo $(DEPDIR)/libzia_la-zserial_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_tty.c' object='libzia_la-zserial_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_tty.lo `test -f 'zserial_tty.c' || echo '$(srcdir)/'`zserial_tty.c libzia_la-zserial_ftdi.lo: zserial_ftdi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_ftdi.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_ftdi.Tpo -c -o libzia_la-zserial_ftdi.lo `test -f 'zserial_ftdi.c' || echo '$(srcdir)/'`zserial_ftdi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_ftdi.Tpo $(DEPDIR)/libzia_la-zserial_ftdi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_ftdi.c' object='libzia_la-zserial_ftdi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_ftdi.lo `test -f 'zserial_ftdi.c' || echo '$(srcdir)/'`zserial_ftdi.c libzia_la-zserial_win32.lo: zserial_win32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_win32.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_win32.Tpo -c -o libzia_la-zserial_win32.lo `test -f 'zserial_win32.c' || echo '$(srcdir)/'`zserial_win32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_win32.Tpo $(DEPDIR)/libzia_la-zserial_win32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_win32.c' object='libzia_la-zserial_win32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_win32.lo `test -f 'zserial_win32.c' || echo '$(srcdir)/'`zserial_win32.c libzia_la-zserial_tcp.lo: zserial_tcp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_tcp.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_tcp.Tpo -c -o libzia_la-zserial_tcp.lo `test -f 'zserial_tcp.c' || echo '$(srcdir)/'`zserial_tcp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_tcp.Tpo $(DEPDIR)/libzia_la-zserial_tcp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_tcp.c' object='libzia_la-zserial_tcp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_tcp.lo `test -f 'zserial_tcp.c' || echo '$(srcdir)/'`zserial_tcp.c libzia_la-zserial_proc_win32.lo: zserial_proc_win32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_proc_win32.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_proc_win32.Tpo -c -o libzia_la-zserial_proc_win32.lo `test -f 'zserial_proc_win32.c' || echo '$(srcdir)/'`zserial_proc_win32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_proc_win32.Tpo $(DEPDIR)/libzia_la-zserial_proc_win32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_proc_win32.c' object='libzia_la-zserial_proc_win32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_proc_win32.lo `test -f 'zserial_proc_win32.c' || echo '$(srcdir)/'`zserial_proc_win32.c libzia_la-zserial_proc_pty.lo: zserial_proc_pty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_proc_pty.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_proc_pty.Tpo -c -o libzia_la-zserial_proc_pty.lo `test -f 'zserial_proc_pty.c' || echo '$(srcdir)/'`zserial_proc_pty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_proc_pty.Tpo $(DEPDIR)/libzia_la-zserial_proc_pty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_proc_pty.c' object='libzia_la-zserial_proc_pty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_proc_pty.lo `test -f 'zserial_proc_pty.c' || echo '$(srcdir)/'`zserial_proc_pty.c libzia_la-zserial_proc_pipe.lo: zserial_proc_pipe.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zserial_proc_pipe.lo -MD -MP -MF $(DEPDIR)/libzia_la-zserial_proc_pipe.Tpo -c -o libzia_la-zserial_proc_pipe.lo `test -f 'zserial_proc_pipe.c' || echo '$(srcdir)/'`zserial_proc_pipe.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zserial_proc_pipe.Tpo $(DEPDIR)/libzia_la-zserial_proc_pipe.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zserial_proc_pipe.c' object='libzia_la-zserial_proc_pipe.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zserial_proc_pipe.lo `test -f 'zserial_proc_pipe.c' || echo '$(srcdir)/'`zserial_proc_pipe.c libzia_la-zsha1.lo: zsha1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zsha1.lo -MD -MP -MF $(DEPDIR)/libzia_la-zsha1.Tpo -c -o libzia_la-zsha1.lo `test -f 'zsha1.c' || echo '$(srcdir)/'`zsha1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zsha1.Tpo $(DEPDIR)/libzia_la-zsha1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zsha1.c' object='libzia_la-zsha1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zsha1.lo `test -f 'zsha1.c' || echo '$(srcdir)/'`zsha1.c libzia_la-zsock.lo: zsock.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zsock.lo -MD -MP -MF $(DEPDIR)/libzia_la-zsock.Tpo -c -o libzia_la-zsock.lo `test -f 'zsock.c' || echo '$(srcdir)/'`zsock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zsock.Tpo $(DEPDIR)/libzia_la-zsock.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zsock.c' object='libzia_la-zsock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zsock.lo `test -f 'zsock.c' || echo '$(srcdir)/'`zsock.c libzia_la-zspidev.lo: zspidev.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zspidev.lo -MD -MP -MF $(DEPDIR)/libzia_la-zspidev.Tpo -c -o libzia_la-zspidev.lo `test -f 'zspidev.c' || echo '$(srcdir)/'`zspidev.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zspidev.Tpo $(DEPDIR)/libzia_la-zspidev.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zspidev.c' object='libzia_la-zspidev.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zspidev.lo `test -f 'zspidev.c' || echo '$(srcdir)/'`zspidev.c libzia_la-zspigpio.lo: zspigpio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zspigpio.lo -MD -MP -MF $(DEPDIR)/libzia_la-zspigpio.Tpo -c -o libzia_la-zspigpio.lo `test -f 'zspigpio.c' || echo '$(srcdir)/'`zspigpio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zspigpio.Tpo $(DEPDIR)/libzia_la-zspigpio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zspigpio.c' object='libzia_la-zspigpio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zspigpio.lo `test -f 'zspigpio.c' || echo '$(srcdir)/'`zspigpio.c libzia_la-zssd1306.lo: zssd1306.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zssd1306.lo -MD -MP -MF $(DEPDIR)/libzia_la-zssd1306.Tpo -c -o libzia_la-zssd1306.lo `test -f 'zssd1306.c' || echo '$(srcdir)/'`zssd1306.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zssd1306.Tpo $(DEPDIR)/libzia_la-zssd1306.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zssd1306.c' object='libzia_la-zssd1306.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zssd1306.lo `test -f 'zssd1306.c' || echo '$(srcdir)/'`zssd1306.c libzia_la-zstr.lo: zstr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zstr.lo -MD -MP -MF $(DEPDIR)/libzia_la-zstr.Tpo -c -o libzia_la-zstr.lo `test -f 'zstr.c' || echo '$(srcdir)/'`zstr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zstr.Tpo $(DEPDIR)/libzia_la-zstr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zstr.c' object='libzia_la-zstr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zstr.lo `test -f 'zstr.c' || echo '$(srcdir)/'`zstr.c libzia_la-zsun.lo: zsun.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zsun.lo -MD -MP -MF $(DEPDIR)/libzia_la-zsun.Tpo -c -o libzia_la-zsun.lo `test -f 'zsun.c' || echo '$(srcdir)/'`zsun.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zsun.Tpo $(DEPDIR)/libzia_la-zsun.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zsun.c' object='libzia_la-zsun.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zsun.lo `test -f 'zsun.c' || echo '$(srcdir)/'`zsun.c libzia_la-zthread.lo: zthread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zthread.lo -MD -MP -MF $(DEPDIR)/libzia_la-zthread.Tpo -c -o libzia_la-zthread.lo `test -f 'zthread.c' || echo '$(srcdir)/'`zthread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zthread.Tpo $(DEPDIR)/libzia_la-zthread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zthread.c' object='libzia_la-zthread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zthread.lo `test -f 'zthread.c' || echo '$(srcdir)/'`zthread.c libzia_la-ztime.lo: ztime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-ztime.lo -MD -MP -MF $(DEPDIR)/libzia_la-ztime.Tpo -c -o libzia_la-ztime.lo `test -f 'ztime.c' || echo '$(srcdir)/'`ztime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-ztime.Tpo $(DEPDIR)/libzia_la-ztime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ztime.c' object='libzia_la-ztime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-ztime.lo `test -f 'ztime.c' || echo '$(srcdir)/'`ztime.c libzia_la-zver.lo: zver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -MT libzia_la-zver.lo -MD -MP -MF $(DEPDIR)/libzia_la-zver.Tpo -c -o libzia_la-zver.lo `test -f 'zver.c' || echo '$(srcdir)/'`zver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzia_la-zver.Tpo $(DEPDIR)/libzia_la-zver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zver.c' object='libzia_la-zver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzia_la_CFLAGS) $(CFLAGS) -c -o libzia_la-zver.lo `test -f 'zver.c' || echo '$(srcdir)/'`zver.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 $(PROGRAMS) $(LTLIBRARIES) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -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) -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." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libzia_la-eprintf.Plo -rm -f ./$(DEPDIR)/libzia_la-regex.Plo -rm -f ./$(DEPDIR)/libzia_la-zasyncdns.Plo -rm -f ./$(DEPDIR)/libzia_la-zavgfilter.Plo -rm -f ./$(DEPDIR)/libzia_la-zbat.Plo -rm -f ./$(DEPDIR)/libzia_la-zbfd.Plo -rm -f ./$(DEPDIR)/libzia_la-zbinbuf.Plo -rm -f ./$(DEPDIR)/libzia_la-zbus.Plo -rm -f ./$(DEPDIR)/libzia_la-zcall.Plo -rm -f ./$(DEPDIR)/libzia_la-zchart.Plo -rm -f ./$(DEPDIR)/libzia_la-zclip.Plo -rm -f ./$(DEPDIR)/libzia_la-zcor.Plo -rm -f ./$(DEPDIR)/libzia_la-zdebug.Plo -rm -f ./$(DEPDIR)/libzia_la-zdht11.Plo -rm -f ./$(DEPDIR)/libzia_la-zdir.Plo -rm -f ./$(DEPDIR)/libzia_la-zdump.Plo -rm -f ./$(DEPDIR)/libzia_la-zerror.Plo -rm -f ./$(DEPDIR)/libzia_la-zfhs.Plo -rm -f ./$(DEPDIR)/libzia_la-zfile.Plo -rm -f ./$(DEPDIR)/libzia_la-zfiledlg.Plo -rm -f ./$(DEPDIR)/libzia_la-zftdi.Plo -rm -f ./$(DEPDIR)/libzia_la-zgetopt.Plo -rm -f ./$(DEPDIR)/libzia_la-zghash.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio_mcp23017.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio_sysgpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zgptrarray.Plo -rm -f ./$(DEPDIR)/libzia_la-zhash.Plo -rm -f ./$(DEPDIR)/libzia_la-zhttp.Plo -rm -f ./$(DEPDIR)/libzia_la-zhttpd.Plo -rm -f ./$(DEPDIR)/libzia_la-zi2c.Plo -rm -f ./$(DEPDIR)/libzia_la-ziconv.Plo -rm -f ./$(DEPDIR)/libzia_la-zifaces.Plo -rm -f ./$(DEPDIR)/libzia_la-zinput.Plo -rm -f ./$(DEPDIR)/libzia_la-zjson.Plo -rm -f ./$(DEPDIR)/libzia_la-zjson0.Plo -rm -f ./$(DEPDIR)/libzia_la-zloc.Plo -rm -f ./$(DEPDIR)/libzia_la-zmd5.Plo -rm -f ./$(DEPDIR)/libzia_la-zmisc.Plo -rm -f ./$(DEPDIR)/libzia_la-zmsgbox.Plo -rm -f ./$(DEPDIR)/libzia_la-zpath.Plo -rm -f ./$(DEPDIR)/libzia_la-zpng.Plo -rm -f ./$(DEPDIR)/libzia_la-zptrarray.Plo -rm -f ./$(DEPDIR)/libzia_la-zrc.Plo -rm -f ./$(DEPDIR)/libzia_la-zsdl.Plo -rm -f ./$(DEPDIR)/libzia_la-zselect.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_ftdi.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_pipe.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_pty.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_win32.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_tcp.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_tty.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_win32.Plo -rm -f ./$(DEPDIR)/libzia_la-zsha1.Plo -rm -f ./$(DEPDIR)/libzia_la-zsock.Plo -rm -f ./$(DEPDIR)/libzia_la-zspidev.Plo -rm -f ./$(DEPDIR)/libzia_la-zspigpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zssd1306.Plo -rm -f ./$(DEPDIR)/libzia_la-zstr.Plo -rm -f ./$(DEPDIR)/libzia_la-zsun.Plo -rm -f ./$(DEPDIR)/libzia_la-zthread.Plo -rm -f ./$(DEPDIR)/libzia_la-ztime.Plo -rm -f ./$(DEPDIR)/libzia_la-zver.Plo -rm -f ./$(DEPDIR)/map2d.Po -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-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libzia_la-eprintf.Plo -rm -f ./$(DEPDIR)/libzia_la-regex.Plo -rm -f ./$(DEPDIR)/libzia_la-zasyncdns.Plo -rm -f ./$(DEPDIR)/libzia_la-zavgfilter.Plo -rm -f ./$(DEPDIR)/libzia_la-zbat.Plo -rm -f ./$(DEPDIR)/libzia_la-zbfd.Plo -rm -f ./$(DEPDIR)/libzia_la-zbinbuf.Plo -rm -f ./$(DEPDIR)/libzia_la-zbus.Plo -rm -f ./$(DEPDIR)/libzia_la-zcall.Plo -rm -f ./$(DEPDIR)/libzia_la-zchart.Plo -rm -f ./$(DEPDIR)/libzia_la-zclip.Plo -rm -f ./$(DEPDIR)/libzia_la-zcor.Plo -rm -f ./$(DEPDIR)/libzia_la-zdebug.Plo -rm -f ./$(DEPDIR)/libzia_la-zdht11.Plo -rm -f ./$(DEPDIR)/libzia_la-zdir.Plo -rm -f ./$(DEPDIR)/libzia_la-zdump.Plo -rm -f ./$(DEPDIR)/libzia_la-zerror.Plo -rm -f ./$(DEPDIR)/libzia_la-zfhs.Plo -rm -f ./$(DEPDIR)/libzia_la-zfile.Plo -rm -f ./$(DEPDIR)/libzia_la-zfiledlg.Plo -rm -f ./$(DEPDIR)/libzia_la-zftdi.Plo -rm -f ./$(DEPDIR)/libzia_la-zgetopt.Plo -rm -f ./$(DEPDIR)/libzia_la-zghash.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio_mcp23017.Plo -rm -f ./$(DEPDIR)/libzia_la-zgpio_sysgpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zgptrarray.Plo -rm -f ./$(DEPDIR)/libzia_la-zhash.Plo -rm -f ./$(DEPDIR)/libzia_la-zhttp.Plo -rm -f ./$(DEPDIR)/libzia_la-zhttpd.Plo -rm -f ./$(DEPDIR)/libzia_la-zi2c.Plo -rm -f ./$(DEPDIR)/libzia_la-ziconv.Plo -rm -f ./$(DEPDIR)/libzia_la-zifaces.Plo -rm -f ./$(DEPDIR)/libzia_la-zinput.Plo -rm -f ./$(DEPDIR)/libzia_la-zjson.Plo -rm -f ./$(DEPDIR)/libzia_la-zjson0.Plo -rm -f ./$(DEPDIR)/libzia_la-zloc.Plo -rm -f ./$(DEPDIR)/libzia_la-zmd5.Plo -rm -f ./$(DEPDIR)/libzia_la-zmisc.Plo -rm -f ./$(DEPDIR)/libzia_la-zmsgbox.Plo -rm -f ./$(DEPDIR)/libzia_la-zpath.Plo -rm -f ./$(DEPDIR)/libzia_la-zpng.Plo -rm -f ./$(DEPDIR)/libzia_la-zptrarray.Plo -rm -f ./$(DEPDIR)/libzia_la-zrc.Plo -rm -f ./$(DEPDIR)/libzia_la-zsdl.Plo -rm -f ./$(DEPDIR)/libzia_la-zselect.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_ftdi.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_pipe.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_pty.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_proc_win32.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_tcp.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_tty.Plo -rm -f ./$(DEPDIR)/libzia_la-zserial_win32.Plo -rm -f ./$(DEPDIR)/libzia_la-zsha1.Plo -rm -f ./$(DEPDIR)/libzia_la-zsock.Plo -rm -f ./$(DEPDIR)/libzia_la-zspidev.Plo -rm -f ./$(DEPDIR)/libzia_la-zspigpio.Plo -rm -f ./$(DEPDIR)/libzia_la-zssd1306.Plo -rm -f ./$(DEPDIR)/libzia_la-zstr.Plo -rm -f ./$(DEPDIR)/libzia_la-zsun.Plo -rm -f ./$(DEPDIR)/libzia_la-zthread.Plo -rm -f ./$(DEPDIR)/libzia_la-ztime.Plo -rm -f ./$(DEPDIR)/libzia_la-zver.Plo -rm -f ./$(DEPDIR)/map2d.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile zloc: zloc.c gcc zloc.c -o zloc -DMAIN -l m -I../include -I../include/unix `pkg-config --cflags --libs glib-2.0` libzia-@VERSION@.so.d$(EXEEXT): libzia.la map2d ./map2d libzia.so.map libzia-@VERSION@.so.d map2d: map2d.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) map2d.c -o $@ # 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: libzia-4.67/src/regcomp.c0000644000175000017500000032735514662101505012253 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #pragma warning(disable : 4018) #pragma warning(disable : 4996) #define _CRT_SECURE_NO_WARNINGS static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint); static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, int non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ const char __re_error_msgid[] attribute_hidden = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; const size_t __re_error_msgid_idx[] attribute_hidden = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ const char *re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (reg_syntax_t syntax) { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (struct re_pattern_buffer *bufp) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute ((always_inline)) re_set_fastmap (char *fastmap, int icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char *buf = alloca (dfa->mb_cur_max), *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, 0, buf[0]); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { int i; re_charset_t *cset = dfa->nodes[node].opr.mbcset; if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes || cset->nranges || cset->nchar_classes) { # ifdef _LIBC if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0) { /* In this case we want to catch the bytes which are the first byte of any collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b'. */ const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # else if (dfa->mb_cur_max > 1) for (i = 0; i < SBC_MAX; ++i) if (__btowc (i) == WEOF) re_set_fastmap (fastmap, icase, i); # endif /* not _LIBC */ } for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, 0, *(unsigned char *) buf); } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' to an allocated space for the fastmap; `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ size_t regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, size_t errbuf_size) { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { if (BE (msg_size > errbuf_size, 0)) { #if defined HAVE_MEMPCPY || defined _LIBC *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; #else memcpy (errbuf, msg, errbuf_size - 1); errbuf[errbuf_size - 1] = 0; #endif } else memcpy (errbuf, msg, msg_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX }; #endif static void free_dfa_content (re_dfa_t *dfa) { int i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { unsigned int table_size; #ifndef _LIBC char *codeset_name; #endif memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. */ if (pat_len == SIZE_MAX) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else # ifdef HAVE_LANGINFO_CODESET codeset_name = nl_langinfo (CODESET); # else codeset_name = getenv ("LC_ALL"); if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LC_CTYPE"); if (codeset_name == NULL || codeset_name[0] == '\0') codeset_name = getenv ("LANG"); if (codeset_name == NULL) codeset_name = ""; else if (strchr (codeset_name, '.') != NULL) codeset_name = strchr (codeset_name, '.') + 1; # endif if (strcasecmp (codeset_name, "UTF-8") == 0 || strcasecmp (codeset_name, "UTF8") == 0) dfa->is_utf8 = 1; /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { int i, j, ch; dfa->word_ops_used = 1; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { int first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { int node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; int clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { int dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { int node, i, mb_chars = 0, has_period = 0; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= 0x80) mb_chars = 1; break; case ANCHOR: switch (dfa->nodes[node].opr.idx) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. */ return; } break; case OP_PERIOD: has_period = 1; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. The non-ASCII range starts at 0x80. */ assert (0x80 % BITSET_WORD_BITS == 0); for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) if (dfa->nodes[node].opr.sbcset[i]) return; break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= 0x80) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (int, dfa->nodes_alloc); dfa->org_indices = re_malloc (int, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (int, preg->re_nsub); if (dfa->subexp_map != NULL) { int i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { int other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == -1, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; int idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { int left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (left > -1); assert (right > -1); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, unsigned int init_constraint) { int org_node, clone_node, ret; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { int org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); if (dfa->nodes[org_node].type == ANCHOR) { /* In case of the node has another constraint, append it. */ if (org_node == root_node && clone_node != org_node) { /* ...but if the node is root_node itself, it means the epsilon closure have a loop, then tie it to the destination of the root_node. */ ret = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (ret < 0, 0)) return REG_ESPACE; break; } constraint |= dfa->nodes[org_node].opr.ctx_type; } clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == -1) { /* There are no such a duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There are a duplicated node which satisfy the constraint, use it to avoid infinite loop. */ ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static int search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint) { int idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return -1; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or -1 if insufficient storage is available. */ static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint) { int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != -1, 1)) { dfa->nodes[dup_idx].constraint = constraint; if (dfa->nodes[org_idx].type == ANCHOR) dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { int src, idx, ret; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { int *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ret = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (ret == -1, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { int node_idx, incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = 0; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = 0; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != -1); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of `node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root) { reg_errcode_t err; unsigned int constraint; int i, incomplete; re_node_set eclosure; incomplete = 0; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = -1; constraint = ((dfa->nodes[node].type == ANCHOR) ? dfa->nodes[node].opr.ctx_type : 0); /* If the current node has constraints, duplicate all nodes. Since they must inherit the constraints. */ if (constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; int edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of `edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == -1) { incomplete = 1; continue; } /* If we haven't calculated the epsilon closure of `edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of `edest'. */ re_node_set_merge (&eclosure, &eclosure_elem); /* If the epsilon closure of `edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } /* Epsilon closures include itself. */ re_node_set_insert (&eclosure, node); if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator `|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) return NULL; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { bin_tree_t *tree, *exp; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { exp = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && exp == NULL, 0)) { return NULL; } if (tree != NULL && exp != NULL) { tree = create_tree (dfa, tree, exp, CONCAT); if (tree == NULL) { *err = REG_ESPACE; return NULL; } } else if (tree == NULL) tree = exp; /* Otherwise exp == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "alnum", (const unsigned char *) "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "space", (const unsigned char *) "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) *err = REG_EPAREN; if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; int i, start, end, start_idx = re_string_cur_idx (regexp); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != -2, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : -2)); } if (BE (start == -2 || end == -2, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE (end != -1 && start > end, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : -1; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* This loop is actually executed only when end != -1, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; cmp_buf[0] = start_wc; cmp_buf[4] = end_wc; if (wcscoll (cmp_buf, cmp_buf + 4) > 0) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { cmp_buf[2] = wc; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, int *coll_sym_alloc, const unsigned char *name) # else /* not RE_ENABLE_I18N */ build_collating_symbol (bitset_t sbcset, const unsigned char *name) # endif /* not RE_ENABLE_I18N */ { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size = 0; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } return elem; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; int equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ int non_match = 0; bin_tree_t *work_tree; int token_len; int first_round = 1; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { *err = REG_ESPACE; if (sbcset != NULL) re_free (sbcset); // by cppcheck // if (mbcset != NULL) re_free (mbcset); // by cppcheck return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = 1; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0, is_range_exp = 0; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = 0; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = 1; } } if (is_range_exp == 1) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, 1); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp); if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ int new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, int non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; if (sbcset != NULL) re_free (sbcset); // by cppcheck // if (mbcset != NULL) re_free (mbcset); // by cppcheck return NULL; } if (non_match) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from `input', and return the number. Return -1, if the number field is empty like "{,1}". Return -2, If an error is occured. */ static int fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { int num = -1; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? -2 : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = -1; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { int idx = (int) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } libzia-4.67/src/regexec.c0000644000175000017500000037232514662101505012236 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node, int str_idx, int from, int to) internal_function; static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static int re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop, int ret_len) internal_function; static int re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, int ret_len) internal_function; static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static int check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) internal_function; static int check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static int check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int node, int str_idx, int bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) internal_function; static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) internal_function; static int build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static int check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (const regex_t *__restrict preg, const char *__restrict string, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; int start, length; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } __libc_lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length - start, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length - start, length, nmatch, pmatch, eflags); __libc_lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *__restrict preg, const char *__restrict string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stroed in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ int re_match (struct re_pattern_buffer *bufp, const char *string, int length, int start, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, 0, length, regs, 1); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif int re_search (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, range, length, regs, 0); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif int re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif int re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, 0); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static int re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, ret_len) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop, ret_len; struct re_registers *regs; { const char *str; int rval; int len = length1 + length2; int free_str = 0; if (BE (length1 < 0 || length2 < 0 || stop < 0, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { char *s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); #else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); #endif str = s; free_str = 1; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); if (free_str) re_free ((char *) str); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is nonzero the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static int re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) struct re_pattern_buffer *bufp; const char *string; int length, start, range, stop, ret_len; struct re_registers *regs; { reg_errcode_t result; regmatch_t *pmatch; int nregs, rval; int eflags = 0; re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (start + range > length, 0)) range = length - start; else if (BE (start + range < 0, 0)) range = -start; __libc_lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (range > 0 && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs < bufp->re_nsub + 1, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, range, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: __libc_lock_unlock (dfa->lock); return rval; } static unsigned re_copy_regs (regs, pmatch, nregs, regs_allocated) struct re_registers *regs; regmatch_t *pmatch; int nregs, regs_allocated; { int rval = REGS_REALLOCATE; int i; int need_regs = nregs + 1; /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0) || BE (regs->end == NULL, 0)) return REGS_UNALLOCATED; regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_start == NULL, 0) || BE (new_end == NULL, 0)) return REGS_UNALLOCATED; regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; unsigned num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = (regoff_t *) 0; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same mingings with regexec. START, and RANGE have the same meanings with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (START + RANGE >= 0 && START + RANGE <= LENGTH) */ static reg_errcode_t re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, eflags) const regex_t *preg; const char *string; int length, start, range, stop, eflags; size_t nmatch; regmatch_t pmatch[]; { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int left_lim, right_lim, incr; int fl_longest_match, match_first, match_kind, match_last = -1; int extra_nmatch; int sb, ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate && range && !preg->can_be_null) ? preg->fastmap : NULL; RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (start + range >= 0 && start + range <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && start + range != 0) return REG_NOMATCH; start = range = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, preg->syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (range >= 0 ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ unsigned int offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (unsigned int) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, range >= 0 ? &match_first : NULL); if (match_last != -1) { if (BE (match_last == -2, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = -1; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != -1); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { int reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t prune_impossible_nodes (mctx) re_match_context_t *mctx; { const re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (match_last < 0) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, int idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end, return -1 if not match, or return -2 in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static int internal_function check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int match = 0; int match_last = -1; int cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; int at_init_state = p_match_first != NULL; int next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return -2; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = 0; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { re_dfastate_t *old_state = cur_state; int next_char_idx = re_string_cur_idx (&mctx->input) + 1; if (BE (next_char_idx >= mctx->input.bufs_len, 0) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return -2; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return -2; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = 0; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static int internal_function check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return 0; if (!constraint) return 1; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return 0; return 1; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static int internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) { int i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES, return -1 in case of errors. */ static int internal_function proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs, int *pidx, int node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; int i, err; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -2; /* Pick up a valid destination, or return -1 if none is found. */ for (dest_node = -1, i = 0; i < edests->nelem; ++i) { int candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == -1) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return -2; /* We know we are going to exit. */ break; } } return dest_node; } else { int naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { int subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; } } if (naccepted == 0) { int dest_node; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { int dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return -1; re_node_set_empty (eps_via_nodes); return dest_node; } } return -1; } static reg_errcode_t internal_function push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; int num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static int internal_function pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { int num = --fs->num; assert (num >= 0); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t internal_function set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; int idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; int prev_idx_match_malloced = 0; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = 1; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { int reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (cur_node < 0, 0)) { if (BE (cur_node == -2, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { int fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { int reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If `a' isn't the LAST_NODE and `a' can't epsilon transit to the LAST_NODE, we throw away the node `a'. 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts string `s' and transit to `b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node `a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node `a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; int str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t internal_function build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; int i; /* Then build the next sifted state. We build the next sifted state on `cur_dest', and update `sifted_states[str_idx]' with `cur_dest'. Note: `cur_dest' is the sifted state from `state_log[str_idx + 1]'. `cur_src' points the node_set of the old `state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { int prev_node = cur_src->elems[i]; int naccepted = 0; int ret; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { int to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ret = re_node_set_insert (cur_dest, prev_node); if (BE (ret == -1, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) { int top = mctx->state_log_top; if (next_state_log_idx >= mctx->input.bufs_len || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) { int st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t internal_function add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; int i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes, const re_node_set *candidates) { int ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { int edst1 = dfa->edests[cur_node].elems[0]; int edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : -1); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (edst2 > 0 && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { int idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static int internal_function check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) { const re_dfa_t *const dfa = mctx->dfa; int lim_idx, src_pos, dst_pos; int dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); int src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return 1; } return 0; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; int node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { int node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != -1) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { int dst, cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int from_node, int str_idx, int bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) { reg_errcode_t err; int node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { int ops_node = -1; int cls_node = -1; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (ops_node >= 0) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (cls_node >= 0) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t internal_function sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int node_idx, node; re_sift_context_t local_sctx; int first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == -1) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { int enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { int subexp_len; int to_idx; int dst_node; int ret; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ret = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (ret < 0, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the `multi byte', or the destination was already thrown away, then the node could't accept the current input `multi byte'. */ naccepted = 0; /* Otherwise, it is sure that the node could accept `naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; int cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { int max = mctx->state_log_top; int cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) { const re_dfa_t *const dfa = mctx->dfa; int node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { int node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; int node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { int cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; int cur_node_idx = pstate->nodes.elems[i]; int naccepted, dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts `naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != -1); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int i; int cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { int dest_str_idx, prev_nelem, bkc_idx; int node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is `new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != -1); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { int subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add `new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t internal_function get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != -1) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; int sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { int sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { int cls_node, sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == -1) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) { reg_errcode_t err; int to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static int internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) { int cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { int cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return -1; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t internal_function check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; int subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; int old_alloc = path->alloc; path->alloc += last_str + mctx->max_mb_elem_len + 1; new_array = re_realloc (path->array, re_dfastate_t *, path->alloc); if (BE (new_array == NULL, 0)) { path->alloc = old_alloc; return REG_ESPACE; } path->array = new_array; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t internal_function check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; int result; int cur_idx; reg_errcode_t err = REG_NOERROR; re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; int cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; int next_node = dfa->nexts[cur_node]; int next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } result = re_node_set_insert (&union_set, next_node); if (BE (result < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { result = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (result < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) { reg_errcode_t err; int idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { int cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == -1) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t internal_function check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) { int cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { int err; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; } break; } err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t internal_function expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == -1) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { int to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { int ret; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ret = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ret < 0, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return 1 if succeeded, otherwise return NULL. */ static int internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; int i, j, ch, need_word_trtable = 0; bitset_word_t elem, mask; int dests_node_malloced = 0; int dest_states_malloced = 0; int ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from `state'. `dests_node[i]' represents the nodes which i-th destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return 0; dests_node_malloced = 1; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transiton table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to `state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_alloc); /* Return 0 in case of an error, 1 otherwise. */ if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); return 1; } return 0; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return 0; } dest_states_malloced = 1; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { int next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = 1; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return 1; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static int internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; int result; int i, j, k; int ndests; /* Number of the destinations from `state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to `state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { memset (accepts, '\xff', sizeof (bitset_t) / 2); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the `accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { int accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide `accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and `accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of `accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of `accepts', create a new group state, which has the `remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ result = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (result < 0, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return -1; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node `dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; int i; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); int j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; /* This #include defines a local function! */ # include /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { int cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ #if __GNUC__ >= 2 wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; cmp_buf[2] = wc; #endif for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt, found = 0; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = 1; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (extra[idx] + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static int internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return 0; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return 0; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= 0x80) return 0; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return 0; break; default: return 0; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return 0; } return 1; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function match_ctx_init (re_match_context_t *mctx, int eflags, int n) { mctx->eflags = eflags; mctx->match_last = -1; if (n > 0) { mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { int st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { int sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from, int to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? ~0 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Search for the first entry which has the same str_idx, or -1 if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static int internal_function search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) { int left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return -1; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { int new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { int new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } libzia-4.67/src/zjson0.c0000644000175000017500000002307214663565707012052 00000000000000/* 0bsolete JSON library Copyright (C) 2014-2022 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #include static char *zjson0_get1(const char *str, int ofs, int len){ char *ret, *c, *d; int backslash = 0, u, j; char s[10]; if (len < 0) return NULL; if (len == 0) return g_strdup(""); ret = g_strndup(str + ofs, len + 1); z_trim_end(ret); len = strlen(ret); if (ret[len - 1] == '"') ret[len - 1] = '\0'; // apply backslashes for (c = ret, d = ret; *c != '\0'; c++){ if (backslash){ backslash = 0; switch (*c){ case '\\': *d++ = '\\'; break; case 'n': *d++ = '\n'; break; case 'r': *d++ = '\r'; break; case 'b': *d++ = '\b'; break; case 'f': *d++ = '\f'; break; case 't': *d++ = '\t'; break; case '"': *d++ = '"'; break; case '/': *d++ = '/'; break; case 'u': for (j = 0; j < 4; j++){ c++; if (*c == '\0') goto error; s[j] = *c; } s[j] = '\0'; u = strtol(s, NULL, 16); if (u<0x80) *d++ = u; else if (u<0x800) *d++ = 192 + u / 64, *d++ = 128 + u % 64; else if (u - 0xd800u<0x800) goto error; else if (u<0x10000) *d++ = 224 + u / 4096, *d++ = 128 + u / 64 % 64, *d++ = 128 + u % 64; else if (u<0x110000) *d++ = 240 + u / 262144, *d++ = 128 + u / 4096 % 64, *d++ = 128 + u / 64 % 64, *d++ = 128 + u % 64; else goto error; break; error: error("zjson0: error parsing unicode string.\n"); break; } }else{ if (*c == '\\'){ backslash = 1; continue; } *d++ = *c; } } *d = '\0'; return ret; } char *zjson0_get_str(const char *str, int len, const char *path){ char *ret = NULL, *key, *val; int i, level = 0, ko, kl, vo, vl, po; char *search = g_strdup(path); char *remains = NULL; // char *xx = zjson0_get1(str, 0, len); char *c; //char *cjcjc = g_strndup(str, len); //dbg("%s\n", cjcjc); //g_free(cjcjc); if (path == NULL) return NULL; if (len < 0) len = strlen(str); c = strchr(search, '.'); if (c != NULL) { *c = '\0'; remains = c + 1; } if (str[0] == '['){ int pathint = atoi(path); int ib = 1; int idx = 0; int parcnt = 0; for (i = 1; i < len && ret == NULL; i++){ switch (str[i]){ case '{': parcnt++; break; case '}': parcnt--; break; case ',': if (parcnt > 0) break; if (idx == pathint){ ret = zjson0_get_str(str + ib, i - ib, remains); } ib = i + 1; idx++; break; } if (parcnt == 0 && i + 1 >= len){ if (idx == pathint){ ret = zjson0_get_str(str + ib, i - ib, remains); } } } g_free(search); return ret; } ko = 0; for (i = 1; i < len && ret == NULL; i++){ key = val = NULL; while (i < len && isspace((unsigned char)str[i])) i++; ko = i + 1; while (i < len && str[i] != ':') i++; kl = i - ko - 1; while (i < len && isspace((unsigned char)str[i])) i++; vo = i + 2; if (str[i + 1] == '{'){ while (i < len && str[i] != ',' && str[i] != '{' && str[i] != '}') i++; } else if (str[i + 1] == '"'){ int backslash = 0; for (i = i + 2; i < len; i++){ if (backslash){ backslash = 0; } else { switch (str[i]){ case '\\': backslash = 1; continue; case '"': i++; goto found; } } } found:; } else if (str[i + 1] == '['){ // only for single dimensional arrays for (i = i + 2; i < len; i++){ if (str[i] == ']') break; } }else{ int backslash = 0; vo = i + 1; for (; i < len; i++){ if (backslash){ backslash = 0; } else { switch (str[i]){ case '\\': backslash = 1; continue; case ',': goto found2; } } } found2:; } vl = i - vo - 1; key = zjson0_get1(str, ko, kl); val = zjson0_get1(str, vo, vl); if (val != NULL && strcmp(search, key) == 0 && remains && *remains){ //dbg("pole\n"); ret = zjson0_get_str(str + vo - 1, i - vo + 2, remains); // including [] }else if (val != NULL && strcmp(search, key) == 0) { g_free(key); ret = val; break; } if (str[i] == '{') { po = i; level++; for (i++; i < len && level > 0; i++){ if (str[i] == '{') level++; if (str[i] == '}') level--; } if (strcmp(search, key) == 0) ret = zjson0_get_str(str + po, i - po - 1, remains); } g_free(key); g_free(val); } g_free(search); //dbg("\n"); return ret; } int zjson0_get_int(const char *str, int len, const char *path){ char *c = zjson0_get_str(str, len, path); if (c == NULL) return 0; int ret = atoi(c); g_free(c); return ret; } void zjson0_test(void){ char *key, *r, *u, *b, *s; char *val, *ok; //r = "{\"return\":\"Success\",\"rowids\":[7192,7193]}"; r = "{\"rowids\":[7192,7193]}"; char *rowids = zjson0_get_str(r, -1, "rowids"); dbg("rowids = %p", rowids); r = "{\"song\":\"EJ, PADA, PADA, ROSENKA\"}"; key = "song"; val = zjson0_get_str(r, strlen(r), key); dbg("key='%s' val='%s'\n", key, val); u = "{\"song\":\"VODOP\\u00c1D\"}"; key = "song"; val = zjson0_get_str(u, strlen(u), key); dbg("key='%s' val='%s'\n", key, val); b = "{\"img\":\"https:\\/\\/is5-ssl.mzstatic.com\\/image\\/thumb\\/626x0w.jpg\"}"; key = "img"; ok = "https://is5-ssl.mzstatic.com/image/thumb/626x0w.jpg"; val = zjson0_get_str(b, strlen(b), key); dbg("key='%s' val='%s'\n", key, val); assert(strcmp(val, ok) == 0); s = "{\"login\":{\"result\":\"NeedToken\",\"token\":\"b03a54f2c660eae532eaaab9a272973b\",\"cookieprefix\":\"wiki_krq\",\"sessionid\":\"99611b7e82e04d8a7e2542030d5f18a1\"},\"second\":\"secval\"}"; key = "login.result"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); key = "login.token"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); key = "login"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); key = "neni"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); key = "login.sessionid"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); key = "second"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); s = "{\"query\":{\"pages\":{\"-1\":{\"ns\":0,\"title\":\"Main Page\",\"missing\":\"\",\"starttimestamp\":\"2014-07-15T06:21:10Z\",\"edittoken\":\"43cf06841bc074e7922cece1617f1504+\\\\\"}}}}"; key = "query.pages.-1.edittoken"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); s = "{\"cmd\":\"cfg_set\",\"ch\":\"A\",\"dev\":\"\",\"key\":\"name\",\"val\":\"acko\"}"; key = "dev"; val = zjson0_get_str(s, strlen(s), key); dbg("key='%s' val='%s'\n", key, val); } void zjson0_object_start(GString *gs, char *name){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append_c(gs, '{'); } void zjson0_object_end(GString *gs){ zjson0_strip(gs); g_string_append(gs, "},"); } void zjson0_array_start(GString *gs, char *name){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append_c(gs, '['); } void zjson0_array_end(GString *gs){ zjson0_strip(gs); g_string_append(gs, "],"); } void zjson0_item_int(GString *gs, char *name, int value){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append_printf(gs, "%d, ", value); } void zjson0_item_int64(GString *gs, char *name, int64_t value){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append_printf(gs, "%lld, ", (long long)value); } void zjson0_item_double(GString *gs, char *name, double value, int places){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); if (isnan(value)){ g_string_append_printf(gs, "null, "); }else{ g_string_append_printf(gs, "%0.*f, ", places, value); } } void zjson0_item_string(GString *gs, char *name, const char *value){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); zg_string_eprintfa("j", gs, "\"%s\", ", value); } void zjson0_item_bool(GString *gs, char *name, int value){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append_printf(gs, "%s, ", value ? "true" : "false"); } void zjson0_item_null(GString *gs, char *name){ if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); g_string_append(gs, "null, "); } #ifndef Z_MSC void zjson0_item_sql(GString *gs, char *name, time_t value){ char s[30]; struct tm tm; if (name != NULL) zg_string_eprintfa("j", gs, "\"%s\": ", name); gmtime_r(&value, &tm); strftime(s, sizeof(s), "%Y-%m-%dT%H:%M:%S+00", &tm); zg_string_eprintfa("j", gs, "\"%s\", ", s); } #endif void zjson0_strip(GString *gs){ int i; for (i = gs->len - 1; i >= 0; i--){ if (gs->str[i] == ' ' || gs->str[i] == '\r' || gs->str[i] == '\n' || gs->str[i] == '\t') continue; if (gs->str[i] == ',') g_string_erase(gs, i, -1); break; } } libzia-4.67/src/zdump.c0000644000175000017500000001473014662101505011744 00000000000000/* zdump.c - make core dump Copyright (C) 2012-2022 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif /*#include #include #include #include */ /*#ifdef Z_HAVE_BFD_H #include #endif #ifdef Z_HAVE_EXECINFO_H #include #endif #ifdef Z_HAVE_SIGNAL_H #include #endif #include */ #include static char *zdump_filename = NULL; void (*z_app_crash_handler)(GString *gs) = NULL; static char *zdump_msg_title = NULL; static char *zdump_appddir = NULL; #ifdef Z_MSC_MINGW static int zdumpset = 0; #endif #ifdef Z_HAVE_DBGHELP_H #include "dbghelp.h" BOOL CALLBACK z_minidumpcallback(PVOID pParam, const PMINIDUMP_CALLBACK_INPUT pInput, PMINIDUMP_CALLBACK_OUTPUT pOutput){ if (!pInput) return FALSE; if (!pOutput) return FALSE; switch (pInput->CallbackType) { case IncludeModuleCallback: return TRUE; case IncludeThreadCallback: return TRUE; case ModuleCallback: if (!(pOutput->ModuleWriteFlags & ModuleReferencedByMemory)) pOutput->ModuleWriteFlags &= (~ModuleWriteModule); return TRUE; case ThreadCallback: return TRUE; case ThreadExCallback: return TRUE; case MemoryCallback: return FALSE; default: return FALSE; } } int z_createminidump(char *filename, EXCEPTION_POINTERS *pep) { MINIDUMP_CALLBACK_INFORMATION mci; MINIDUMP_EXCEPTION_INFORMATION mdei; MINIDUMP_TYPE mdt; HANDLE hFile; int ret = 0; #ifndef Z_HAVE_DBGHELP_H HMODULE dll; #endif if (!filename) return -1; hFile = CreateFile(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) return -1; mdei.ThreadId = GetCurrentThreadId(); mdei.ExceptionPointers = pep; mdei.ClientPointers = FALSE; mci.CallbackRoutine = (MINIDUMP_CALLBACK_ROUTINE)z_minidumpcallback; mci.CallbackParam = 0; mdt = (MINIDUMP_TYPE)(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory); #ifdef Z_HAVE_DBGHELP_H ret = MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, mdt, (pep != 0) ? &mdei : 0, 0, &mci) == 0; #else dll = LoadLibrary("DbgHelp.dll"); if (dll){ T_MiniDumpWriteDump P_MiniDumpWriteDump = (T_MiniDumpWriteDump)GetProcAddress(dll, "MiniDumpWriteDump"); ret = P_MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, mdt, (pep != 0) ? &mdei : 0, 0, &mci) == 0; FreeLibrary(dll); }else{ ret = -1; } #endif CloseHandle(hFile); return ret; } #endif //#include #ifdef Z_UNIX_ANDROID void __attribute__((noinline)) z_sig_segv(void *arg, siginfo_t *siginfo, void *ctx){ GString *gs; signal(SIGSEGV, SIG_DFL); dbg("z_sig_segv\n"); gs = g_string_sized_new(2000); if (z_app_crash_handler) z_app_crash_handler(gs); g_string_append(gs, "\n\nBacktrace:\n"); z_dump_backtrace(gs, NULL, ctx, 3); z_msgbox_error(zdump_msg_title ? zdump_msg_title : "Libzia app", "%s", gs->str); raise(SIGSEGV); } #endif #ifdef Z_MSC_MINGW static LONG WINAPI z_crashhandler(EXCEPTION_POINTERS *ex) { GString *gs; int dump = 1; gs = g_string_sized_new(2000); if (z_app_crash_handler) z_app_crash_handler(gs); #ifdef Z_MSC dump = z_createminidump(zdump_filename, ex); if (dump == 0) { if (gs->len > 0) g_string_append(gs, "\n\n"); g_string_append_printf(gs, "Dump is saved to %s", zdump_filename); } #endif g_string_append(gs, "\n\nBacktrace:\n"); z_dump_backtrace(gs, ex, NULL, 0); z_msgbox_error(zdump_msg_title ? zdump_msg_title : "Libzia app", "%s", gs->str); exit(7303); } #endif // can be called more times void z_dump_init(char *filename, void (*handler)(GString *gs), char *msg_title, char *appddir){ zg_free0(zdump_filename); zdump_filename = g_strdup(filename); z_app_crash_handler = handler; zg_free0(zdump_msg_title); zdump_msg_title = g_strdup(msg_title); zdump_appddir = appddir; z_wokna(zdump_filename); zselect_signal_init(); #ifdef Z_UNIX_ANDROID dbg("nastaven SIGSEGV\n"); zselect_signal_set(SIGSEGV, z_sig_segv, NULL, 1); #else dbg("Nejsme Z_UNIX_ANDROID\n"); #endif #ifdef Z_MSC_MINGW if (!zdumpset){ zdumpset = 1; SetUnhandledExceptionFilter(z_crashhandler); } #endif } void z_dump_free(){ if (zdump_filename) zg_free0(zdump_filename); if (zdump_msg_title) zg_free0(zdump_msg_title); #ifdef Z_UNIX_ANDROID zselect_signal_set(SIGSEGV, NULL, NULL, 0); #endif } void z_dump_create(void){ #ifdef Z_MSC z_createminidump(zdump_filename, NULL); #else raise(SIGSEGV); #endif } char *z_dump_backtrace(GString *gs, void *vex, void *ctx, int level){ void *stack[30]; int stacklen; struct zbfd *zbfd; int i; char *filename; zbfd = zbfd_init(); stacklen = z_backtrace(stack, 30, vex, ctx, level); // z_msgbox_info(__FUNCTION__, "stacklen=%d", stacklen); filename = z_binary_file_name(); if (filename && zbfd_open(zbfd, filename, zdump_appddir) == 0){ for (i = 0; i < stacklen; i++){ //g_string_append_printf(gs, "#%-2d 0x%llx", i, (unsigned long long)stack[i]); g_string_append_printf(gs, "#%-2d %p", i, stack[i]); if (zbfd_lookup(zbfd, stack[i]) == 0){ // g_string_append_printf(gs, " in %s() +0x%lX at %s:%d", zbfd->functionname, zbfd->offset, zbfd->filename, zbfd->line); if (zbfd->functionname) { g_string_append_printf(gs, " in %s()", zbfd->functionname); if (zbfd->offset > 0) g_string_append_printf(gs, " +0x%lX", zbfd->offset); } if (zbfd->filename) { g_string_append_printf(gs, " at %s", zbfd->filename); if (zbfd->line) g_string_append_printf(gs, ":%d", zbfd->line); } } g_string_append(gs, " \n"); } zbfd_free(zbfd); }else{ g_string_append_printf(gs, "%s\n", zbfd->errstr->str); for (i = 0; i < stacklen; i++){ //g_string_append_printf(gs, "#%-2d 0x%llx", i, (unsigned long long)stack[i]); g_string_append_printf(gs, "#%-2d %p\n", i, stack[i]); } } if (filename) g_free(filename); return gs->str; } libzia-4.67/src/zpath.c0000644000175000017500000001150214662101505011725 00000000000000/* zfile.c - file utilities Copyright (C) 2011-2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #ifdef Z_HAVE_PSAPI_H #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_STDLIB_H #include #endif char *z_dirname(char *filename){ char *c; if (!filename) return NULL; if (strlen(filename) == 0) return filename; for (c = filename + strlen(filename) - 1; c >= filename; c--) { if (*c != '/' && *c != '\\') continue; *c = '\0'; return filename; } return filename + strlen(filename); // empty string } const char *z_filename(const char *filename){ const char *c; if (!filename) return NULL; if (strlen(filename) == 0) return filename; for (c = filename + strlen(filename) - 1; c >= filename; c--) { if (*c != '/' && *c != '\\') continue; return c + 1; } return filename; } const char *z_extension(const char *filename){ const char *c, *f; f = z_filename(filename); if (!f) return NULL; c = strchr(filename, '.'); if (c == NULL) return filename + strlen(filename); return c; } #ifdef Z_MSC_MINGW char *z_wokna(char *file){ char *c; for (c = file; *c != '\0'; c++) if (*c == '/') *c = '\\'; return file; } #endif char *z_unix(char *file){ char *c; for (c = file; *c != '\0'; c++) if (*c == '\\') *c = '/'; return file; } char *z_optimize_path(char *src){ int first, last, i; gchar **items, *c; GString *gs; if (!src) return NULL; if (src[0]=='\0') return src; for (c = src; *c != '\0'; c++){ if (*c == '\\') *c = '/'; } if (strcmp(src, ".")==0) return src; if (strcmp(src, "./")==0) return src; first=src[0]=='/'; last=src[0]&&src[strlen(src)-1]=='/'; items=g_strsplit(src, "/", 0); if (!items) return src; gs=g_string_sized_new(strlen(src)); g_free(src); src=NULL; if (first) g_string_append_c(gs, '/'); for (i=0; items[i]; i++){ if (strcmp(items[i], ".")==0){ continue; } if (items[i+1] && strcmp(items[i+1], "..")==0){ i++; continue; } if (strlen(items[i])==0) continue; g_string_append(gs, items[i]); if (items[i+1]) g_string_append_c(gs, '/'); } if (last && (!gs->str[0] || (gs->str[0] && gs->str[strlen(gs->str)-1]!='/'))) g_string_append_c(gs, '/'); c=g_strdup(gs->str); g_string_free(gs, TRUE); g_strfreev(items); return c; } char *z_binary_file_name(){ #ifdef Z_MSC_MINGW char path[_MAX_PATH + 1]; // if (GetProcessImageFileName(GetCurrentProcess(), path, _MAX_PATH) == 0) return NULL; if (GetModuleFileName(NULL, path, _MAX_PATH) == 0) return NULL; return g_strdup(path); #endif #ifdef Z_UNIX char path[4096+1]; int len; len = readlink("/proc/self/exe", path, 4096); if (len < 0) return NULL; path[len] = '\0'; return g_strdup(path); #endif return NULL; } char *z_libzia_file_name(void **codebase){ #ifdef Z_MSC_MINGW *codebase = NULL; return NULL; #endif #ifdef Z_UNIX FILE *f; char s[256], *ret = NULL; // char *tkp = getenv("TKP"); f = fopen("/proc/self/maps", "rt"); if (!f) return NULL; // if (tkp) printf("z_libzia_file_name opened /proc/self/maps\n"); while (fgets(s, 255, f)){ char *tok; char *c; s[255] = '\0'; z_strip_crlf(s); // if (tkp) printf("s='%s'\n", s); char *base = strtok_r(s, " \t", &tok); char *flgs = strtok_r(NULL, " \t", &tok); if (!flgs) continue; if (strlen(flgs) < 4) continue; if (flgs[2] != 'x') continue; /*char *offs =*/ strtok_r(NULL, " \t", &tok); /*char *devi =*/ strtok_r(NULL, " \t", &tok); /*char *inod =*/ strtok_r(NULL, " \t", &tok); char *file = strtok_r(NULL, " \t", &tok); // if (tkp) printf("file='%s'\n", file); if (!file) continue; c = strstr(file, "libzia"); if (!c) continue; ret = g_strdup(file); // if (tkp) printf("ret='%s'\n", ret); if (codebase) { // if (tkp) printf("base='%s'\n", base); *codebase = z_strtop(base); // if (tkp) printf("*codebase=%p\n", *codebase); } break; } fclose(f); return ret; #endif return NULL; } libzia-4.67/src/zavgfilter.c0000644000175000017500000000605414662101505012762 00000000000000/* zavgfilter.c - Filters extremes and returns average Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include double zavg(double *data, int cnt){ int i, n = 0; double sum = 0.0; for (i = 0; i < cnt; i++){ if (isnan(data[i])) continue; sum += data[i]; n++; } if (n == 0) return NAN; return sum / n; } double zavgfilter(double *data, int incnt, int outcnt, int step){ while(1){ double avg = zavg(data, incnt); double max = NAN; int maxi = 0; int i, n = 0; for (i = 0; i < incnt; i++){ if (isnan(data[i])) continue; double d = fabs(data[i] - avg); if (isnan(max) || d > max){ max = d; maxi = i; } n++; } if (n <= outcnt || max <= step) return avg; data[maxi] = NAN; } return NAN; } double zstddev(double *data, int cnt){ double avg, ret = 0.0; int i, n; avg = zavg(data, cnt); dbg("avg=%f\n", avg); n = 0; for (i = 0; i < cnt; i++){ if (isnan(data[i])) continue; ret += pow(data[i] - avg, 2); n++; } dbg("n=%d var=%f\n", n, ret); if (n == 0) return NAN; if (n == 1) return 0; ret = sqrt(ret / (n - 1)); dbg("ret=%f\n", ret); return ret; } double zminimum(double *data, int cnt){ int i; double min = DBL_MAX; for (i = 0; i < cnt; i++){ if (isnan(data[i])) continue; if (data[i] < min) min = data[i]; } if (min == DBL_MAX) return NAN; return min; } double zmaximum(double *data, int cnt){ int i; double max = DBL_MIN; for (i = 0; i < cnt; i++){ if (isnan(data[i])) continue; if (data[i] > max) max = data[i]; } if (max == DBL_MAX) return NAN; return max; } void zavgfilter_test(){ double avg; double arr1[] = {10, 0, 9, 30, 11}; avg = zavgfilter(arr1, 5, 3, 2); assert(avg == 10.0); double arr2[] = {10, NAN, 9, 30, 11}; avg = zavgfilter(arr2, 5, 3, 2); assert(avg == 10.0); double arr3[] = {10, NAN, 9, 11}; avg = zavgfilter(arr3, 4, 4, 2); assert(avg == 10.0); double arr4[] = {10, NAN, 9, 11}; avg = zavgfilter(arr4, 4, 3, 2); assert(avg == 10.0); double arr5[] = { NAN, 9, 11}; avg = zavgfilter(arr5, 3, 3, 2); assert(avg == 10.0); double arr6[] = { -1 }; avg = zavgfilter(arr6, 0, 0, 2); assert(isnan(avg)); double arr7[] = { 28, 28, 28, 28, 28, 28, 28, 24, 28, 20}; avg = zavgfilter(arr7, 10, 5, 2); assert(avg == 28); double arr8[] = {27, 27, 27, 27, 27, 27, 26, 27, 27, 27}; avg = zavgfilter(arr8, 10, 5, 2); assert(avg == 26.899999999999999); double arr9[] = { 1206, 1206, 1206, 1206, 1206, 1206, 1189, 1189, 1206, 1206 }; avg = zavgfilter(arr9, 10, 5, 20); assert(avg == 1202.5999999999999); } libzia-4.67/src/zbfd.c0000644000175000017500000003271514662101505011535 00000000000000/* Binary symbols lookup Copyright (C) 2012-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifdef Z_HAVE_LIBBFD #ifndef PACKAGE #define PACKAGE Z_PACKAGE #endif #ifndef PACKAGE_VERSION #define PACKAGE_VERSION Z_PACKAGE_VERSION #endif #endif #include #include #include #include #include #include #ifdef Z_HAVE_EXECINFO_H #include #endif #include #include //#ifdef Z_MINGW struct z_stack_frame{ struct z_stack_frame *next; void *ret; }; //#endif #ifdef __GNUC__ #define STACKSTEP(n) \ if (i >= size) break; \ if (!__builtin_frame_address(n)) break; \ buffer[i++] = __builtin_return_address(n); #endif int z_backtrace(void **buffer, int size, void *vex, void *ctx, int level){ int i = 0; /*#if defined (Z_UNIX) && defined(__GNUC__) do{ i = 0; STACKSTEP(0);STACKSTEP(1);STACKSTEP(2);STACKSTEP(3);STACKSTEP(4); STACKSTEP(5);STACKSTEP(6);STACKSTEP(7);STACKSTEP(8);STACKSTEP(9); STACKSTEP(10);STACKSTEP(11);STACKSTEP(12);STACKSTEP(14);STACKSTEP(15); STACKSTEP(16);STACKSTEP(17);STACKSTEP(18);STACKSTEP(19);STACKSTEP(20); STACKSTEP(20);STACKSTEP(21);STACKSTEP(22);STACKSTEP(24);STACKSTEP(25); STACKSTEP(26);STACKSTEP(27);STACKSTEP(28);STACKSTEP(29);STACKSTEP(30); }while(0); #elif*/ #if defined(Z_MSC) /* HMODULE dll; T_StackWalk64 P_StackWalk64;*/ STACKFRAME64 frame; DWORD ret; EXCEPTION_POINTERS *ex = (EXCEPTION_POINTERS*)vex; /*dll = LoadLibrary("dbghelp.dll"); if (!dll) return 0; P_StackWalk64 = (T_StackWalk64)GetProcAddress(dll, "StackWalk64"); if (!P_StackWalk64) return 0;*/ memset(&frame, 0, sizeof(frame)); frame.AddrPC.Offset = ex->ContextRecord->Eip; frame.AddrPC.Mode = AddrModeFlat; frame.AddrFrame.Offset = ex->ContextRecord->Ebp; frame.AddrFrame.Mode = AddrModeFlat; frame.AddrStack.Offset = ex->ContextRecord->Esp; frame.AddrStack.Mode = AddrModeFlat; for (i = 0; i < size; i++){ ret = StackWalk64(IMAGE_FILE_MACHINE_I386, GetCurrentProcess(), GetCurrentThread(), &frame, NULL, NULL, NULL, NULL, NULL); if (!ret) break; buffer[i] = (void *)frame.AddrPC.Offset; } //FreeLibrary(dll); #elif defined(Z_MINGW) // register struct z_stack_frame *ebp asm("ebp"); EXCEPTION_POINTERS *ex = (EXCEPTION_POINTERS*)vex; struct z_stack_frame *fp = (struct z_stack_frame*)ex->ContextRecord->Ebp; struct z_stack_frame *x; buffer[i++] = (void *)ex->ContextRecord->Eip; for (x = fp; x != NULL && x->ret != NULL; x = x->next){ if (i == size) break; buffer[i++] = x->ret; } #elif defined(Z_ANDROID) /* register struct z_stack_frame *ebp asm("ebp"); TODO FIXME struct z_stack_frame *x; for (x = ebp; x != NULL && x->ret != NULL; x = x->next){ if (i == size) break; buffer[i++] = x->ret; }*/ /* i = 0; do{ STACKSTEP(0);STACKSTEP(1);STACKSTEP(2);STACKSTEP(3);STACKSTEP(4); STACKSTEP(5);STACKSTEP(6);STACKSTEP(7);STACKSTEP(8);STACKSTEP(9); STACKSTEP(10);STACKSTEP(11);STACKSTEP(12);STACKSTEP(14);STACKSTEP(15); STACKSTEP(16);STACKSTEP(17);STACKSTEP(18);STACKSTEP(19);STACKSTEP(20); STACKSTEP(20);STACKSTEP(21);STACKSTEP(22);STACKSTEP(24);STACKSTEP(25); STACKSTEP(26);STACKSTEP(27);STACKSTEP(28);STACKSTEP(29);STACKSTEP(30); }while(0);*/ #else // Z_UNIX i = backtrace(buffer, size); /* if (ctx != NULL && level > 0 && level < i){ #ifdef __x86_64__ ucontext_t *uc = (ucontext_t*)ctx; buffer[level] = (void *)uc->uc_mcontext.gregs[REG_RIP]; #endif #ifdef __i386__ ucontext_t *uc = (ucontext_t*)ctx; buffer[level] = (void *)uc->uc_mcontext.gregs[REG_EIP]; #endif #ifdef __hppa__ ucontext_t *uc = (ucontext_t*)ctx; buffer[level] = (void *)uc->uc_mcontext.sc_iaoq[0] & ~0×3UL ; #endif #if defined (__ppc__) || defined (__powerpc__) ucontext_t *uc = (ucontext_t*)ctx; buffer[level] = (void *)uc->uc_mcontext.regs->nip ; #endif }*/ #endif // Z_UNIX #if 0 { int j; GString *gs = g_string_new(""); g_string_append_printf(gs, "size=%d stacklen=%d\n", size, i); for (j = 0; j < i; j++) g_string_append_printf(gs, "#%-2d %p\n", j, buffer[j]); z_msgbox_info("z_backtrace", "%s", gs->str); g_string_free(gs, TRUE); } #endif return i; } struct zbfd *zbfd_init(){ #ifdef Z_MSC_MINGW HMODULE dll; T_SymInitialize P_SymInitialize; int ret; #endif struct zbfd *zbfd; zbfd = g_new0(struct zbfd, 1); zbfd->errstr = g_string_new(""); #ifdef Z_MSC_MINGW zbfd->symbol = (SYMBOL_INFO *)g_malloc(sizeof(SYMBOL_INFO) + 256 * sizeof(char)); zbfd->symbol->MaxNameLen = 255; zbfd->symbol->SizeOfStruct = sizeof(SYMBOL_INFO); #endif #ifdef Z_MSC_MINGW dll = LoadLibrary("dbghelp.dll"); if (!dll) { g_string_printf(zbfd->errstr, "Can't LoadLibrary(dbghelp.dll), error %d", GetLastError()); }else{ P_SymInitialize = (T_SymInitialize)GetProcAddress(dll, "SymInitialize"); if (!P_SymInitialize) { g_strdup_printf("Can't load SymInitialize from dbghelp.dll, error %d", GetLastError()); }else{ zbfd->SymFromAddr = (T_SymFromAddr)GetProcAddress(dll, "SymFromAddr"); if (!zbfd->SymFromAddr) { g_strdup_printf("Can't load SymFromAddr from dbghelp.dll, error %d", GetLastError()); }else{ ret = P_SymInitialize(GetCurrentProcess(), NULL, TRUE); if (!ret){ int err = GetLastError(); g_string_printf(zbfd->errstr, "SymInitialize failed: error %d ", err); z_lasterror(zbfd->errstr); } } } } //FreeLibrary(dll); #endif #if 0 z_msgbox_info(__FUNCTION__, #ifdef Z_HAVE_EXECINFO_H "Z_HAVE_EXECINFO_H " #endif #ifdef Z_HAVE_LIBBFD "Z_HAVE_LIBBFD " #endif #ifdef Z_MSC "Z_MSC " #endif #ifdef Z_MINGW "Z_MINGW " #endif #if defined (Z_UNIX) && defined(__GNUC__) "UNIX+__GNUC__" #endif ); #endif return zbfd; } void zbfd_free(struct zbfd *zbfd){ g_string_free(zbfd->errstr, TRUE); //zbfd->syms #ifdef Z_HAVE_BFD if (zbfd->bfd) bfd_close(zbfd->bfd); #endif #ifdef Z_MSC_MINGW g_free(zbfd->symbol); #endif #if defined(Z_MINGW) || defined(Z_UNIX) if (zbfd->dbin) fclose(zbfd->dbin); if (zbfd->dzia) fclose(zbfd->dzia); #endif g_free(zbfd); } int zbfd_open(struct zbfd *zbfd, char *filename, char *appddir){ #ifdef Z_HAVE_LIBBFD long storage, symcount; int dynamic = 0; char **matching; zbfd->bfd = bfd_openr(filename, Z_TARGET); if (!zbfd->bfd) { g_string_printf(zbfd->errstr, "bfd_openr() failed: %s", bfd_errmsg(bfd_get_error())); goto failed; } if (bfd_check_format(zbfd->bfd, bfd_archive)){ g_string_printf(zbfd->errstr, "bfd_check_format() failed: %s", bfd_errmsg(bfd_get_error())); goto failed; } if (!bfd_check_format_matches (zbfd->bfd, bfd_object, &matching)){ g_string_printf(zbfd->errstr, "bfd_check_format_matches() failed: %s", bfd_errmsg(bfd_get_error())); goto failed; } if (!(bfd_get_file_flags(zbfd->bfd) & HAS_SYMS)){ g_string_printf(zbfd->errstr, "bfd_get_file_flags() failed: %s", bfd_errmsg(bfd_get_error())); goto failed; } storage = bfd_get_symtab_upper_bound(zbfd->bfd); if (!storage){ storage = bfd_get_dynamic_symtab_upper_bound(zbfd->bfd); dynamic = 1; } if (storage < 0){ g_string_printf(zbfd->errstr, "no bfd symbol storage present\n"); goto failed; } zbfd->syms = (struct bfd_symbol **)g_malloc(storage); if (dynamic) symcount = bfd_canonicalize_dynamic_symtab(zbfd->bfd, zbfd->syms); else symcount = bfd_canonicalize_symtab(zbfd->bfd, zbfd->syms); if (symcount < 0){ g_string_printf(zbfd->errstr, "bfd_canonicalize_(dynamic_)symtab failed: %s", bfd_errmsg(bfd_get_error())); goto failed; } goto afterbfd; failed:; //return -1; afterbfd:; #elif defined(Z_MINGW) || defined(Z_UNIX) char *binfilename = z_binary_file_name(); dbg("\n***\nbinfilename='%s'\n", binfilename); if (binfilename){ GString *gs = g_string_new(""); if (appddir){ g_string_append(gs, appddir); g_string_append(gs, "/tucnak.d"); }else{ #ifdef Z_MSC_MINGW char *c = z_strcasestr(binfilename, ".exe"); if (c) *c = '\0'; #endif g_string_append(gs, binfilename); g_string_append(gs, ".d"); } zbfd->dbin = fopen(gs->str, "rt"); dbg("zbfd_open('%s')=%p\n", gs->str, zbfd->dbin); g_string_free(gs, TRUE); g_free(binfilename); } char *ziafilename = z_libzia_file_name(&zbfd->ziacodebase); dbg("\n***\nziafilename='%s'\n", ziafilename); if (ziafilename){ char *c; GString *gs = g_string_new(""); #ifdef Z_MSC_MINGW c = z_strcasestr(ziafilename, ".dll"); if (c) *c = '\0'; #endif c = strrchr(ziafilename, '/'); if (c) *c = '\0'; g_string_append(gs, ziafilename); g_string_append(gs, "/libzia/"); g_string_append(gs, c+1); g_string_append(gs, ".d"); dbg("d='%s'\n", gs->str); zbfd->dzia = fopen(gs->str, "rt"); dbg("zbfd_open('%s')=%p\n", gs->str, zbfd->dzia); g_string_free(gs, TRUE); g_free(ziafilename); } #endif return 0; } #ifdef Z_HAVE_LIBBFD static void zbfd_find_address_in_section(bfd *bfd, asection *section, void *data){ bfd_vma vma; bfd_size_type size; struct zbfd *zbfd = (struct zbfd *)data; // printf("find_address_in_section(bfd=%p, section=%p, data=%p)\n", bfd, section, data); if (zbfd->found) return; // bfd_get_section_flags is defined only in "older" version (2020) // bfd_section_flags is a static inline function in "newer" version #ifndef bfd_get_section_flags if ((bfd_section_flags(section) & SEC_ALLOC) == 0) return; #else if ((bfd_get_section_flags(bfd, section) & SEC_ALLOC) == 0) return; #endif #ifndef bfd_get_section_flags vma = bfd_section_vma(section); #else vma = bfd_get_section_vma(bfd, section); #endif if (zbfd->pc < vma) return; #ifndef bfd_get_section_flags size = bfd_section_size(section); #else size = bfd_get_section_size(section); #endif if (zbfd->pc >= vma + size) return; zbfd->found = bfd_find_nearest_line(bfd, section, zbfd->syms, zbfd->pc - vma, &zbfd->filename, &zbfd->functionname, &zbfd->line); } #endif int zbfd_lookup(struct zbfd *zbfd, void *addr){ int ret = -1; zbfd->filename = NULL; zbfd->functionname = NULL; zbfd->line = 0; #ifdef Z_HAVE_LIBBFD char s[32]; sprintf(s, "%p", addr); zbfd->pc = bfd_scan_vma(s, NULL, 0); zbfd->found = 0; bfd_map_over_sections(zbfd->bfd, zbfd_find_address_in_section, zbfd); if (zbfd->filename != NULL){ char *c = strrchr(zbfd->filename, '/'); if (c != NULL) zbfd->filename = c + 1; } //z_msgbox_info(__FUNCTION__, "%p %d", addr, zbfd->found); if(zbfd->found) ret = 0; // // if not found take chance to other methods #endif #ifdef Z_MSC_MINGW //z_msgbox_info(__FUNCTION__, "addr=%p", addr); if (!zbfd->SymFromAddr(GetCurrentProcess(), (DWORD64)(long)addr, 0, zbfd->symbol)) { int err = GetLastError(); }else{ zbfd->functionname = zbfd->symbol->Name; zbfd->offset = (long)(((DWORD64)(long)addr) - zbfd->symbol->Address); ret = 0; } #endif #if defined(Z_MINGW) || defined(Z_UNIX) char ss[256], *tok, *sym = NULL; char *max = NULL; strcpy(zbfd->dsym, ""); // dbg("zbfd->dbin=%p\n", zbfd->dbin); if (zbfd->dbin){ fseek(zbfd->dbin, 0, SEEK_SET); // dbg("search for %p\n", addr); while (fgets(ss, sizeof(ss) - 1, zbfd->dbin)){ char *sadr = strtok_r(ss, " \r\n", &tok); char *a = (char *)z_strtop(sadr); // dbg(" a=%p ", a); if (a > (char *)addr) continue; if (a < max) continue; max = a; sym = strtok_r(NULL, " \r\n", &tok); if (!sym) { // last item is .text end strcpy(zbfd->dsym, ""); break; } g_strlcpy(zbfd->dsym, sym, sizeof(zbfd->dsym)); } if (strlen(zbfd->dsym) > 0){ zbfd->functionname = zbfd->dsym; zbfd->offset = (char *)addr - max; ret = 0; } } // dbg("zbfd->dzia=%p\n", zbfd->dzia); if (zbfd->dzia){ fseek(zbfd->dzia, 0, SEEK_SET); // dbg("search for %p\n", addr); while (fgets(ss, sizeof(ss) - 1, zbfd->dzia)){ char *sadr = strtok_r(ss, " \r\n", &tok); char *a = (char *)z_strtop(sadr); // dbg(" a=%p ", a); a += (long)zbfd->ziacodebase; // dbg(" aa=%p \n", a); if (a > (char *)addr) continue; if (a < max) continue; max = a; sym = strtok_r(NULL, " \r\n", &tok); if (!sym) { // last item is .text end strcpy(zbfd->dsym, ""); break; } g_strlcpy(zbfd->dsym, sym, sizeof(zbfd->dsym)); } if (strlen(zbfd->dsym) > 0){ zbfd->functionname = zbfd->dsym; zbfd->offset = (char *)addr - max; ret = 0; } } #endif return ret; // no Z_MSC, return error } libzia-4.67/src/zbus.c0000644000175000017500000000353214662101505011566 00000000000000/* zbus.c - I2C/SPI abstractions Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #define ZBUSDEBUGx int zbus_free(struct zbusdev *dev){ if (!dev) return 0; if (!dev->free) return -1; return dev->free(dev); } int zbus_write(struct zbusdev *dev, void *buf, size_t len){ if (!dev->write) return -1; return dev->write(dev, buf, len); } int zbus_read(struct zbusdev *dev, void *buf, size_t len){ if (!dev->read) return -1; return dev->read(dev, buf, len); } int zbus_write_reg(struct zbusdev *dev, unsigned char addr, unsigned char value){ int ret = 0; char buf[2]; buf[0] = addr; buf[1] = value; #ifdef ZBUSDEBUG dbg("zbus_write_reg(0x%02x, 0x%02x)\n", addr, value); #endif ZRET(zbus_write(dev, buf, 2)); return ret; } int zbus_read_reg(struct zbusdev *dev, unsigned char addr){ unsigned char buf[1]; int ret = 0; ZRET(zbus_read_regs(dev, addr, buf, 1)); #ifdef ZBUSDEBUG dbg("zbus_read_reg(0x%02x) = 0x%02x\n", addr, buf[0]); #endif return buf[0]; } int zbus_read_regs(struct zbusdev *dev, unsigned char addr, void *buf, size_t len){ if (dev->read_regs) return dev->read_regs(dev, addr, buf, len); // I2C can work this way, SPI not int ret = 0; ZRET(zbus_write(dev, &addr, 1)); ZRET(zbus_read(dev, buf, len)); #ifdef ZBUSDEBUG if (zdebug_debug_type){ int i; dbg("zbus_read_regs(0x%02x) =", addr); for (i = 0; i < len; i++) dbg(" %02x", ((unsigned char *)buf)[i]); dbg("\n"); } #endif return ret; } libzia-4.67/src/zclip.c0000644000175000017500000000270214662101505011722 00000000000000/* zclip.c - clipboard functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif int zclip_init(void){ #ifdef Z_MSC_MINGW return 0; #else return 0; #endif } #ifdef Z_HAVE_SDL int zclip_event_filter(const SDL_Event *event){ #ifdef Z_MSC_MINGW return 0; #else return 0; #endif } #endif int zclip_copy(const char *text){ #ifdef Z_MSC_MINGW HGLOBAL data; int ret, size; if (!OpenClipboard(NULL)) return -2; EmptyClipboard(); size = strlen(text) + 1; data = GlobalAlloc(GMEM_DDESHARE, size); g_strlcpy((char *)data, text, size); GlobalUnlock(data); ret = SetClipboardData(CF_TEXT, data) == NULL; CloseClipboard(); return 0; #else return -1; #endif } char *zclip_strdup_paste(void){ #ifdef Z_MSC_MINGW HANDLE data; char *text; if (!OpenClipboard(NULL)) return NULL; data = GetClipboardData(CF_TEXT); if (data == NULL){ CloseClipboard(); return NULL; } text = g_strdup((char *)GlobalLock(data)); GlobalUnlock(data); CloseClipboard(); return text; #else return NULL; #endif } libzia-4.67/src/Android.mk0000644000175000017500000000423714662101505012353 00000000000000 LOCAL_PATH := $(call my-dir) include ../../libpng14/jni/Android.mk include ../../glib/Android.mk include ../../libsdl/project/jni/sdl-1.2/Android.mk include ../../libsdl/project/jni/sdl_main/Android.mk include ../../libsdl1.2-ttf/Android.mk include ../../freetype/Android.mk include ../../libiconv/jni/Android.mk include $(CLEAR_VARS) LOCAL_PATH := /home/ja/c/libzia/src LOCAL_SRC_FILES := \ eprintf.c \ map2d.c \ regex.c \ zandroid.c \ zasyncdns.c \ zbat.c \ zbfd.c \ zbinbuf.c \ zcall.c \ zchart.c \ zclip.c \ zcor.c \ zdebug.c \ zdir.c \ zdump.c \ zerror.c \ zfhs.c \ zfile.c \ zfiledlg.c \ zftdi.c \ zgetopt.c \ zghash.c \ zgptrarray.c \ zhash.c \ zhttp.c \ ziconv.c \ zifaces.c \ zjson0.c \ zjson.c \ zloc.c \ zmd5.c \ zmisc.c \ zmsgbox.c \ zpath.c \ zpng.c \ zptrarray.c \ zsdl.c \ zselect.c \ zserial.c \ zserial_tty.c \ zserial_ftdi.c \ zserial_win32.c \ zserial_tcp.c \ zserial_proc_win32.c \ zserial_proc_pty.c \ zserial_proc_pipe.c \ zsock.c \ zstr.c \ zsun.c \ zthread.c \ ztime.c \ zver.c LOCAL_MODULE := zia LOCAL_CFLAGS := -fPIC -std=gnu99 LOCAL_LDFLAGS := -fPIC LOCAL_C_INCLUDES := \ $(GLIB_TOP) \ $(GLIB_TOP)/glib \ $(GLIB_TOP)/android \ $(GLIB_TOP)/android-internal \ $(SDL_TOP)/jni/sdl-1.2/include \ $(SDL_TTF_TOP) \ $(PNG_TOP)/jni \ $(USB_TOP)/jni \ $(FTDI_TOP)/src \ $(ICONV_TOP)/include \ $(OPENSSL_TOP)/include \ $(LOCAL_PATH)/../ \ $(LOCAL_PATH)/../include \ $(LOCAL_PATH)/../include/android LOCAL_LDLIBS := \ -L$(GLIB_TOP)/obj/local/armeabi \ -L$(SDL_TOP)/libs/armeabi \ -L$(SDL_TTF_TOP)/libs/armeabi \ -L$(PNG_TOP)/libs/armeabi \ -L$(ICONV_TOP)/libs/armeabi \ -L$(OPENSSL_TOP) \ -llog \ -lcrypto-zia -lssl-zia PREBUILT_SHARED_LIBRARIES := \ -L$(GLIB_TOP)/obj/local/armeabi # -lftdi -L$(USB_TOP)/libs/armeabi -L$(FTDI_TOP)/libs/armeabi \ LOCAL_STATIC_LIBRARIES := pngfkk glib-2.0 gthread-2.0 sdl-1.2 iconv SDL_ttf #ifeq ($(BUILD_STATIC),true) #include $(BUILD_STATIC_LIBRARY) #else include $(BUILD_SHARED_LIBRARY) #endif libzia-4.67/src/zserial_proc_win32.c0000644000175000017500000001072014662101505014316 00000000000000/* zserial_proc_win32 - portable serial port API Module for WIN32 process Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #ifdef Z_MSC_MINGW static int zserial_proc_win32_open(struct zserial *zser){ HANDLE tmpstdin, tmpstdout, my; SECURITY_ATTRIBUTES sa; STARTUPINFO si; PROCESS_INFORMATION pi; if (zser->prochandle != INVALID_HANDLE_VALUE) return 0; my = GetCurrentProcess(); sa.nLength= sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = NULL; sa.bInheritHandle = TRUE; ZeroMemory(&si, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; //if (!CreatePipe(&zser->procstdin, &tmpstdin, &sa, 0)) zinternal("Can't create pipe for %s", zser->id); //if (!DuplicateHandle( if (!CreatePipe(&tmpstdout, &si.hStdOutput, &sa, 0)) zinternal("Can't create pipe for %s", zser->id); // stdout -> stderr if (!DuplicateHandle(my, si.hStdOutput, my, &si.hStdError, 0, TRUE, DUPLICATE_SAME_ACCESS)) { g_string_printf(zser->errorstr, "Can't duplicate stdout for %s: ", zser->id); z_lasterror(zser->errorstr); goto cleanup; } // vstup stdoutu duplikovat, protoze jinak by se dedil if (!DuplicateHandle(my, tmpstdout, my, &zser->procstdout, 0, FALSE, DUPLICATE_SAME_ACCESS)) zinternal("Can't duplicate tmpstdout for %s", zser->id); CloseHandle(tmpstdout); // vystup stdinu duplikovat, protoze jinak by se dedil if (!CreatePipe(&si.hStdInput, &tmpstdin, &sa, 0)) zinternal("Can't create pipe for %s", zser->id); if (!DuplicateHandle(my, tmpstdin, my, &zser->procstdin, 0, FALSE, DUPLICATE_SAME_ACCESS)) zinternal("Can't duplicate tmpstdin for %s", zser->id); CloseHandle(tmpstdin); ZeroMemory(&pi, sizeof(PROCESS_INFORMATION)); if (!CreateProcess(NULL, zser->cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)){ g_string_printf(zser->errorstr, "Can't run %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } zser->prochandle = pi.hProcess; // zavrit vsechny handly, co mu drzime CloseHandle(si.hStdInput); CloseHandle(si.hStdOutput); CloseHandle(si.hStdError); zser->opened = 1; cleanup:; return 0; } static int zserial_proc_win32_read(struct zserial *zser, void *data, int len, int timeout_ms){ DWORD dwRead; if (!ReadFile(zser->procstdout, data, len, &dwRead, NULL)){ g_string_printf(zser->errorstr, "Can't read from %s: ", zser->id); z_lasterror(zser->errorstr); if (zser->thread == g_thread_self() && zser->thread_break) { return -1; } zserial_close(zser); return -1; } return dwRead; } static int zserial_proc_win32_write(struct zserial *zser, void *data, int len){ int ret; DWORD written; ret = WriteFile(zser->procstdin, data, len, &written, NULL); if (!ret){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } return written; } static int zserial_proc_win32_close(struct zserial *zser){ int ret = 0; if (zser->prochandle != INVALID_HANDLE_VALUE){ TerminateProcess(zser->prochandle, 1); ret |= !CloseHandle(zser->prochandle); zser->prochandle = INVALID_HANDLE_VALUE; } if (zser->procstdin != INVALID_HANDLE_VALUE) ret |= !CloseHandle(zser->procstdin); zser->procstdin = INVALID_HANDLE_VALUE; if (zser->procstdout != INVALID_HANDLE_VALUE) ret |= !CloseHandle(zser->procstdout); zser->procstdout = INVALID_HANDLE_VALUE; return 0; } #endif struct zserial *zserial_init_proc_win32(const char *cmd, const char *arg){ #ifdef Z_MSC_MINGW char *c; struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_PROC_WIN32; zser->id = g_strdup(cmd); c = strchr(zser->id, ' '); if (c != NULL) *c = '\0'; zser->cmd = g_strdup(cmd); zser->arg = g_strdup(arg); //dbg("zserial_init_process_win32 (%s)\n", cmd); zser->zs_open = zserial_proc_win32_open; zser->zs_read = zserial_proc_win32_read; zser->zs_write = zserial_proc_win32_write; zser->zs_close = zserial_proc_win32_close; return zser; #else return NULL; #endif } libzia-4.67/src/Makefile.am0000644000175000017500000000332214662101505012470 00000000000000datarootdir = @datarootdir@ bindir=$(exec_prefix)/lib/$(DEB_HOST_MULTIARCH)/libzia if USE_WLMAP bin_PROGRAMS = libzia-@VERSION@.so.d #zsdltest gpiotest endif lib_LTLIBRARIES = libzia.la libzia_la_SOURCES = \ eprintf.c \ regex.c \ zasyncdns.c \ zavgfilter.c \ zbat.c \ zbfd.c \ zbinbuf.c \ zbus.c \ zcall.c \ zchart.c \ zclip.c \ zcor.c \ zdebug.c \ zdht11.c \ zdir.c \ zdump.c \ zerror.c \ zfhs.c \ zfile.c \ zfiledlg.c \ zftdi.c \ zgetopt.c \ zghash.c \ zgpio.c \ zgpio_sysgpio.c \ zgpio_mcp23017.c \ zgptrarray.c \ zhash.c \ zhttp.c \ zhttpd.c \ zi2c.c \ ziconv.c \ zifaces.c \ zinput.c \ zjson0.c \ zjson.c \ zloc.c \ zmd5.c \ zmisc.c \ zmsgbox.c \ zpath.c \ zpng.c \ zptrarray.c \ zrc.c \ zsdl.c \ zselect.c \ zserial.c \ zserial_tty.c \ zserial_ftdi.c \ zserial_win32.c \ zserial_tcp.c \ zserial_proc_win32.c \ zserial_proc_pty.c \ zserial_proc_pipe.c \ zsha1.c \ zsock.c \ zspidev.c \ zspigpio.c \ zssd1306.c \ zstr.c \ zsun.c \ zthread.c \ ztime.c \ zver.c libzia_la_CFLAGS = $(Z_SVNVER) -I../include -I../include/unix libzia_la_LDFLAGS = -release @VERSION@ library_includedir = $(includedir)/libzia #zsdltest_SOURCES = zsdltest.c #zsdltest_LDFLAGS = -lzia #gpiotest_SOURCES = gpiotest.c #gpiotest_LDFLAGS = -lzia EXTRA_DIST = regcomp.c regex_internal.c regexec.c Android.mk zandroid.c CLEANFILES = *.map *.d map2d DISTCLEANFILES = settings.c zloc: zloc.c gcc zloc.c -o zloc -DMAIN -l m -I../include -I../include/unix `pkg-config --cflags --libs glib-2.0` libzia_@VERSION@_so_d_SOURCES = map2d.c libzia-@VERSION@.so.d$(EXEEXT): libzia.la map2d ./map2d libzia.so.map libzia-@VERSION@.so.d map2d: map2d.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) map2d.c -o $@ libzia-4.67/src/zgpio.c0000644000175000017500000000306314662101505011732 00000000000000/* zgpio.c - GPIO library Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ // https://stackoverflow.com/questions/19257624/interrupt-handling-and-user-space-notification #include #include #include #include #include #include #include void zgpiochip_free(struct zgpiochip *chip){ if (chip == NULL) return; chip->freechip(chip); g_free(chip); } struct zgpio *zgpio_init_nr(struct zgpiochip *chip, int nr){ return chip->init_nr(chip, nr); } struct zgpio *zgpio_init_name(struct zgpiochip *chip, const char *name){ return chip->init_name(chip, name); } void zgpio_free(struct zgpio *gpio){ if (!gpio) return; gpio->chip->free(gpio); g_free(gpio->name); g_free(gpio); } int zgpio_dir_input(struct zgpio *gpio){ return gpio->chip->dir_input(gpio); } int zgpio_dir_output(struct zgpio *gpio){ return gpio->chip->dir_output(gpio); } int zgpio_write(struct zgpio *gpio, int value){ return gpio->chip->write(gpio, value); } int zgpio_read(struct zgpio *gpio){ return gpio->chip->read(gpio); } int zgpio_set_handler(struct zgpio *gpio, struct zselect *zsel, enum zgpio_edge edge, void (*handler)(struct zgpio *gpio, int value, void *data), void *data){ return gpio->chip->set_handler(gpio, zsel, edge, handler, data); } libzia-4.67/src/zsha1.c0000644000175000017500000001676014662101505011640 00000000000000/* SHA-1 in C By Steve Reid 100% Public Domain Test Vectors (from FIPS PUB 180-1) "abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ /* #define LITTLE_ENDIAN * This should be #define'd already, if true. */ /* #define SHA1HANDSOFF * Copies data before messing with it. */ #define SHA1HANDSOFF #include #include /* for uint32_t */ #include #include #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ /* I got the idea of expanding during the round function from SSLeay */ #if BYTE_ORDER == LITTLE_ENDIAN #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #elif BYTE_ORDER == BIG_ENDIAN #define blk0(i) block->l[i] #else #error "Endianness not defined!" #endif #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); /* Hash a single 512-bit block. This is the core of the algorithm. */ void zsha1_transform( uint32_t state[5], const unsigned char buffer[64] ) { uint32_t a, b, c, d, e; typedef union { unsigned char c[64]; uint32_t l[16]; } CHAR64LONG16; #ifdef SHA1HANDSOFF CHAR64LONG16 block[1]; /* use array to appear as a pointer */ memcpy(block, buffer, 64); #else /* The following had better never be used because it causes the * pointer-to-const buffer to be cast into a pointer to non-const. * And the result is written through. I threw a "const" in, hoping * this will cause a diagnostic. */ CHAR64LONG16 *block = (const CHAR64LONG16 *) buffer; #endif /* Copy context->state[] to working vars */ a = state[0]; b = state[1]; c = state[2]; d = state[3]; e = state[4]; /* 4 rounds of 20 operations each. Loop unrolled. */ R0(a, b, c, d, e, 0); R0(e, a, b, c, d, 1); R0(d, e, a, b, c, 2); R0(c, d, e, a, b, 3); R0(b, c, d, e, a, 4); R0(a, b, c, d, e, 5); R0(e, a, b, c, d, 6); R0(d, e, a, b, c, 7); R0(c, d, e, a, b, 8); R0(b, c, d, e, a, 9); R0(a, b, c, d, e, 10); R0(e, a, b, c, d, 11); R0(d, e, a, b, c, 12); R0(c, d, e, a, b, 13); R0(b, c, d, e, a, 14); R0(a, b, c, d, e, 15); R1(e, a, b, c, d, 16); R1(d, e, a, b, c, 17); R1(c, d, e, a, b, 18); R1(b, c, d, e, a, 19); R2(a, b, c, d, e, 20); R2(e, a, b, c, d, 21); R2(d, e, a, b, c, 22); R2(c, d, e, a, b, 23); R2(b, c, d, e, a, 24); R2(a, b, c, d, e, 25); R2(e, a, b, c, d, 26); R2(d, e, a, b, c, 27); R2(c, d, e, a, b, 28); R2(b, c, d, e, a, 29); R2(a, b, c, d, e, 30); R2(e, a, b, c, d, 31); R2(d, e, a, b, c, 32); R2(c, d, e, a, b, 33); R2(b, c, d, e, a, 34); R2(a, b, c, d, e, 35); R2(e, a, b, c, d, 36); R2(d, e, a, b, c, 37); R2(c, d, e, a, b, 38); R2(b, c, d, e, a, 39); R3(a, b, c, d, e, 40); R3(e, a, b, c, d, 41); R3(d, e, a, b, c, 42); R3(c, d, e, a, b, 43); R3(b, c, d, e, a, 44); R3(a, b, c, d, e, 45); R3(e, a, b, c, d, 46); R3(d, e, a, b, c, 47); R3(c, d, e, a, b, 48); R3(b, c, d, e, a, 49); R3(a, b, c, d, e, 50); R3(e, a, b, c, d, 51); R3(d, e, a, b, c, 52); R3(c, d, e, a, b, 53); R3(b, c, d, e, a, 54); R3(a, b, c, d, e, 55); R3(e, a, b, c, d, 56); R3(d, e, a, b, c, 57); R3(c, d, e, a, b, 58); R3(b, c, d, e, a, 59); R4(a, b, c, d, e, 60); R4(e, a, b, c, d, 61); R4(d, e, a, b, c, 62); R4(c, d, e, a, b, 63); R4(b, c, d, e, a, 64); R4(a, b, c, d, e, 65); R4(e, a, b, c, d, 66); R4(d, e, a, b, c, 67); R4(c, d, e, a, b, 68); R4(b, c, d, e, a, 69); R4(a, b, c, d, e, 70); R4(e, a, b, c, d, 71); R4(d, e, a, b, c, 72); R4(c, d, e, a, b, 73); R4(b, c, d, e, a, 74); R4(a, b, c, d, e, 75); R4(e, a, b, c, d, 76); R4(d, e, a, b, c, 77); R4(c, d, e, a, b, 78); R4(b, c, d, e, a, 79); /* Add the working vars back into context.state[] */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; /* Wipe variables */ a = b = c = d = e = 0; #ifdef SHA1HANDSOFF memset(block, '\0', sizeof(block)); #endif } /* SHA1Init - Initialize new context */ void zsha1_init( zsha1_ctx * context ) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; context->state[1] = 0xEFCDAB89; context->state[2] = 0x98BADCFE; context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; context->count[0] = context->count[1] = 0; } /* Run your data through this. */ void zsha1_update( zsha1_ctx * context, const unsigned char *data, uint32_t len ) { uint32_t i; uint32_t j; j = context->count[0]; if ((context->count[0] += len << 3) < j) context->count[1]++; context->count[1] += (len >> 29); j = (j >> 3) & 63; if ((j + len) > 63) { memcpy(&context->buffer[j], data, (i = 64 - j)); zsha1_transform(context->state, context->buffer); for (; i + 63 < len; i += 64) { zsha1_transform(context->state, &data[i]); } j = 0; } else i = 0; memcpy(&context->buffer[j], &data[i], len - i); } /* Add padding and return the message digest. */ void zsha1_final( unsigned char digest[20], zsha1_ctx * context ) { unsigned i; unsigned char finalcount[8]; unsigned char c; #if 0 /* untested "improvement" by DHR */ /* Convert context->count to a sequence of bytes * in finalcount. Second element first, but * big-endian order within element. * But we do it all backwards. */ unsigned char *fcp = &finalcount[8]; for (i = 0; i < 2; i++) { uint32_t t = context->count[i]; int j; for (j = 0; j < 4; t >>= 8, j++) *--fcp = (unsigned char) t} #else for (i = 0; i < 8; i++) { finalcount[i] = (unsigned char) ((context->count[(i >= 4 ? 0 : 1)] >> ((3 - (i & 3)) * 8)) & 255); /* Endian independent */ } #endif c = 0200; zsha1_update(context, &c, 1); while ((context->count[0] & 504) != 448) { c = 0000; zsha1_update(context, &c, 1); } zsha1_update(context, finalcount, 8); /* Should cause a SHA1Transform() */ for (i = 0; i < 20; i++) { digest[i] = (unsigned char) ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); } /* Wipe variables */ memset(context, '\0', sizeof(*context)); memset(&finalcount, '\0', sizeof(finalcount)); } void zsha1( char *hash_out, const char *str, int len) { zsha1_ctx ctx; int ii; zsha1_init(&ctx); for (ii=0; ii This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_LIBFTDI #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_LIBFTDI #include #endif static int zserial_ftdi_open(struct zserial *zser){ enum ftdi_parity_type par; if (zser->ftdi) return 0; zser->ftdi = ftdi_new(); if (!zser->ftdi){ g_string_printf(zser->errorstr, "Can't alloc ftdi context (out of memory?)"); zserial_close(zser); return -1; } if (zser->serial && *zser->serial){ if (ftdi_usb_open_desc(zser->ftdi, zser->vid, zser->pid, NULL, zser->serial)){ g_string_printf(zser->errorstr, "Can't open FTDI device %04X:%04X-%s : %s", zser->vid, zser->pid, zser->serial, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } zser->id = g_strdup_printf("%04X:%04X-%s", zser->vid, zser->pid, zser->serial); }else{ if (ftdi_usb_open(zser->ftdi, zser->vid, zser->pid)){ g_string_printf(zser->errorstr, "Can't open FTDI device %04X:%04X : %s", zser->vid, zser->pid, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } zser->id = g_strdup_printf("%04X:%04X", zser->vid, zser->pid); } if (ftdi_set_baudrate(zser->ftdi, zser->baudrate)){ g_string_printf(zser->errorstr, "Can't set baudrate for %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } switch(toupper(zser->parity)){ case 'O': par = ODD; break; case 'E': par = EVEN; break; case 'M': par = MARK; break; case 'S': par = SPACE; break; default: par = NONE; break; } if (ftdi_set_line_property(zser->ftdi, zser->bits == 7 ? BITS_7 : BITS_8, zser->stopbits == 2 ? STOP_BIT_2 : STOP_BIT_1, par)){ g_string_printf(zser->errorstr, "Can't set line for %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } zser->opened = 1; return 0; } static int zserial_ftdi_read(struct zserial *zser, void *data, int len, int timeout_ms){ int r, tmo; tmo = ztimeout_init(timeout_ms); while(!ztimeout_occured(tmo)){ r = ftdi_read_data(zser->ftdi, (unsigned char*)data, len); if (r < 0) { // usb device unavailable or usb_bulk_read failed g_string_printf(zser->errorstr, "Can't read from %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } if (r > 0) return r; // no data was available usleep(1000); } return 0; // timeout occured } static int zserial_ftdi_write(struct zserial *zser, void *data, int len){ int ret; ret = ftdi_write_data(zser->ftdi, (unsigned char *)data, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't write to %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); zserial_close(zser); return -1; } return ret; } static int zserial_ftdi_close(struct zserial *zser){ if (zser->ftdi) ftdi_free(zser->ftdi); zser->ftdi = NULL; return 0; } static int zserial_ftdi_dtr(struct zserial *zser, int on){ if (ftdi_setdtr(zser->ftdi, on)){ // TODO polarity g_string_printf(zser->errorstr, "Can't set DTR on %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); return -1; } return 0; } static int zserial_ftdi_rts(struct zserial *zser, int on){ dbg("zserial_rts(zser->ftdi=%p\n", zser->ftdi); if (ftdi_setrts(zser->ftdi, on)){ // TODO polarity g_string_printf(zser->errorstr, "Can't set RTS on %s: %s", zser->id, ftdi_get_error_string(zser->ftdi)); return -1; } return 0; } #endif struct zserial *zserial_init_ftdi(const int vid, const int pid, char *serial){ #ifdef Z_HAVE_LIBFTDI struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_FTDI; zser->id = g_strdup_printf("%04X:%04X", vid, pid); zser->vid = vid; zser->pid = pid; zser->serial = NULL; if (serial) zser->serial = g_strdup(serial); zser->zs_open = zserial_ftdi_open; zser->zs_read = zserial_ftdi_read; zser->zs_write = zserial_ftdi_write; zser->zs_close = zserial_ftdi_close; zser->zs_dtr = zserial_ftdi_dtr; zser->zs_rts = zserial_ftdi_rts; return zser; #else return NULL; #endif } libzia-4.67/src/zspigpio.c0000644000175000017500000001074114662101505012447 00000000000000/* zspigpio.c - SPI over spigpio Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include static int zspigpio_shout(struct zbusdev *dev, void *buf, size_t len){ unsigned char acc; int i, j, ret = 0; unsigned char *data = (unsigned char *)buf; if (dev->miso == dev->mosi){ ZRET(zgpio_dir_output(dev->mosi)); } for (i = 0; i < len; i++){ acc = *data; for (j = 0; j < 8; j++){ ZRET(zgpio_write(dev->mosi, (acc & 0x80) != 0 ? 1 : 0)); ZRET(zgpio_write(dev->sclk, 1)); if (dev->sleep_us > 0) usleep(dev->sleep_us); ZRET(zgpio_write(dev->sclk, 0)); if (dev->sleep_us > 0) usleep(dev->sleep_us); acc <<= 1; } data++; ret++; } return ret; } static int zspigpio_shin(struct zbusdev *dev, void *buf, size_t len){ unsigned char acc; int i, j, ret = 0; unsigned char *data = (unsigned char *)buf; if (dev->miso == dev->mosi){ ZRET(zgpio_dir_input(dev->miso)); } for (i = 0; i < len; i++){ acc = 0; for (j = 0; j < 8; j++){ ZRET(zgpio_write(dev->sclk, 1)); if (dev->sleep_us > 0) usleep(dev->sleep_us); ZRET(zgpio_read(dev->miso)); acc <<= 1; if (ret) acc |= 1; ZRET(zgpio_write(dev->sclk, 0)); if (dev->sleep_us > 0) usleep(dev->sleep_us); } *data = acc; data++; ret++; } return ret; } int zspigpio_write(struct zbusdev *dev, void *buf, size_t len){ int ret; ZRETX(zgpio_write(dev->sclk, 0)); ZRETX(zgpio_write(dev->ss, dev->sspol/*0*/)); ZRETX(zspigpio_shout(dev, buf, len)); x:; zgpio_write(dev->ss, !dev->sspol/*1*/); return ret; } int zspigpio_read(struct zbusdev *dev, void *buf, size_t len){ int ret; ZRETX(zgpio_write(dev->sclk, 0)); ZRETX(zgpio_write(dev->ss, dev->sspol/*0*/)); ZRETX(zspigpio_shin(dev, buf, len)); x:; zgpio_write(dev->ss, !dev->sspol/*1*/); return ret; } int zspigpio_read_regs(struct zbusdev *dev, unsigned char addr, void *buf, size_t len){ int ret; unsigned char b = addr | 0x80; ZRETX(zgpio_write(dev->sclk, 0)); ZRETX(zgpio_write(dev->ss, dev->sspol/*0*/)); ZRETX(zspigpio_shout(dev, &b, 1)); ZRETX(zspigpio_shin(dev, buf, len)); x:; zgpio_write(dev->ss, !dev->sspol/*1*/); return ret; } int zspigpio_free(struct zbusdev *dev){ if (dev->fd >= 0){ close(dev->fd); dev->fd = -1; } return 0; } struct zbusdev *zspigpio_init(struct zgpio *sclk, struct zgpio *mosi, struct zgpio *miso, struct zgpio *ss, int sleep_us, int sspol){ if (!sclk) { error("zspigpio_init: sclk is NULL\n"); return NULL; } if (!mosi) { error("zspigpio_init: mosi is NULL\n"); return NULL; } if (!miso) { error("zspigpio_init: miso is NULL\n"); return NULL; } if (!ss) { error("zspigpio_init: ss is NULL\n"); return NULL; } int ret; ret = zgpio_dir_output(sclk); if (ret < 0) { error("zspigpio_init: Can't set SCLK to output\n"); return NULL; } ret = zgpio_dir_output(mosi); if (ret < 0) { error("zspigpio_init: Can't set MOSI to output\n"); return NULL; } if (miso != mosi){ ret = zgpio_dir_input(miso); if (ret < 0) { error("zspigpio_init: Can't set MISO to input\n"); return NULL; } } ret = zgpio_dir_output(ss); if (ret < 0) { error("zspigpio_init: Can't set SS to output\n"); return NULL; } struct zbusdev *dev = (struct zbusdev *)g_new0(struct zbusdev, 1); dev->sclk = sclk; dev->mosi = mosi; dev->miso = miso; dev->ss = ss; dev->sleep_us = sleep_us; dev->sspol = sspol; dev->free = zspigpio_free; dev->write = zspigpio_write; dev->read = zspigpio_read; dev->read_regs = zspigpio_read_regs; ZRETX(zgpio_write(dev->sclk, 0)); // th(cs_xl, cs_mag) >= 8ns ZRETX(zgpio_write(dev->ss, !dev->sspol/*1*/)); return dev; x:; zbus_free(dev); return NULL; } libzia-4.67/src/regex.c0000644000175000017500000000544614662101505011723 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include #include #ifdef Z_MSC_MINGW_ANDROID #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #endif /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before , which correctly #undefs RE_DUP_MAX and sets it to the right value. */ #include #include "regex_.h" #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif #endif libzia-4.67/src/zthread.c0000644000175000017500000000535214662101505012246 00000000000000/* thread functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_MSC_MINGW #include #endif #ifdef Z_HAVE_SYS_PRCTL_H #include #endif #ifdef Z_MSC //_MINGW error: conflicting types for 'sleep' unsigned int sleep(unsigned int sec){ Sleep(sec * 1000); return 0; // elapsed } #endif #ifdef Z_MSC unsigned int usleep(unsigned int usec){ Sleep(usec / 1000); return 0; // success } #endif #ifndef Z_HAVE_G_THREAD_TRY_NEW GThread *g_thread_try_new(const gchar *name, GThreadFunc func, gpointer data, GError **error){ return g_thread_create(func, data, TRUE, error); } #endif #ifdef Z_MSC_MINGW #pragma pack(push,8) typedef struct tagTHREADNAME_INFO { DWORD dwType; // Must be 0x1000. LPCSTR szName; // Pointer to name (in user addr space). DWORD dwThreadID; // Thread ID (-1=caller thread). DWORD dwFlags; // Reserved for future use, must be zero. } THREADNAME_INFO; #pragma pack(pop) #endif // under linux use ps Hc to show thread name void zg_thread_set_name(char* name) { #ifdef Z_MSC const DWORD MS_VC_EXCEPTION=0x406D1388; THREADNAME_INFO info; info.dwType = 0x1000; info.szName = name; info.dwThreadID = -1; info.dwFlags = 0; __try { RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); } __except(EXCEPTION_EXECUTE_HANDLER) { } /*#elif defined(Z_HAVE_PTHREAD_SETNAME_NP) TODO check on glibc 2.12 pthread_setname_np(pthread_self(), name);*/ #elif defined(Z_HAVE_SYS_PRCTL_H) prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); // dbg("prctl(PR_SET_NAME, '%s')=%d\n", name, ret); #else #endif } #ifdef Z_UNIX_ANDROID int z_cpu_cores(){ int ret = 0; GString *gs = g_string_new(""); FILE *f = fopen("/proc/cpuinfo", "rt"); if (f == NULL) return 1; while (zfile_fgets(gs, f, 1)){ if (zstr_begins_with(gs->str, "processor", 1)) ret++; } fclose(f); g_string_free(gs, TRUE); return ret; } #endif #ifdef Z_MSC_MINGW int z_cpu_cores(){ SYSTEM_INFO si; GetSystemInfo(&si); return si.dwNumberOfProcessors; } #endif #ifdef Z_MSC_MINGW int zg_thread_set_priority(int priority){ int ret; HANDLE thread = GetCurrentThread(); ret = SetThreadPriority(thread, priority); return ret == 0 ? -1 : 0; } #endif #ifdef Z_UNIX_ANDROID int zg_thread_set_priority(int priority){ return 0; } #endif libzia-4.67/src/zerror.c0000644000175000017500000001112214662101505012120 00000000000000/* zerror - error handling Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include #include #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #ifdef Z_HAVE_NETDB_H #include #endif #ifdef Z_MINGW static GStaticMutex strerror_mutex = G_STATIC_MUTEX_INIT; #endif #ifdef Z_MSC char *strerror_r(int err_no, char *buf, size_t size){ strerror_s(buf, size, err_no); return buf; } #endif #ifdef Z_MINGW char *strerror_r(int err_no, char *buf, size_t size){ char *c; g_static_mutex_lock(&strerror_mutex); c = strerror(err_no); g_strlcpy(buf, c, size); g_static_mutex_unlock(&strerror_mutex); return buf; } #endif char *z_strdup_strerror(int err){ char errbuf[1024]; char *c; #ifdef Z_MSC strerror_s(errbuf, sizeof(errbuf), err); c = g_strdup(errbuf); #elif defined(Z_MINGW) g_static_mutex_lock(&strerror_mutex); c = g_strdup(strerror(err)); g_static_mutex_unlock(&strerror_mutex); #elif defined (Z_STRERROR_R_RETURNS_INT) strerror_r(err, errbuf, sizeof(errbuf)); return g_strdup(errbuf); #else c = g_strdup(strerror_r(err, errbuf, sizeof(errbuf))); #endif return c; } void z_strerror(GString *gs, int err){ char errbuf[1024]; #ifdef Z_MSC strerror_s(errbuf, sizeof(errbuf), err); g_string_append(gs, errbuf); #elif defined(Z_MINGW) g_static_mutex_lock(&strerror_mutex); g_string_append(gs, strerror(err)); g_static_mutex_unlock(&strerror_mutex); #elif defined(Z_STRERROR_R_RETURNS_INT) strerror_r(err, errbuf, sizeof(errbuf)); g_string_append(gs, errbuf); #else g_string_append(gs, strerror_r(err, errbuf, sizeof(errbuf))); #endif } #ifdef Z_MSC_MINGW_CYGWIN void z_lasterror(GString *gs){ z_lasterror_e(gs, GetLastError()); } void z_lasterror_e(GString *gs, int err){ char *str; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, // Default language (LPTSTR) &str, 0, NULL); if (!str){ g_string_append_printf(gs, "Windows error %d", err); }else{ z_1250_to_8859_2(str); z_strip_crlf(str); } g_string_append(gs, str); LocalFree(str); } #endif const char *z_host_error(void){ #ifdef Z_MSC_MINGW switch (WSAGetLastError()){ case WSANOTINITIALISED: return "WSA not initialised"; case WSAENETDOWN: return "The network subsystem has failed."; case WSAHOST_NOT_FOUND: return "Host not found"; case WSATRY_AGAIN: return "Temporary name server error"; case WSANO_RECOVERY: return "Name server error"; case WSANO_DATA: return "Host have no IP address"; case WSAEINPROGRESS: return "Operation is in progress"; case WSAEFAULT: return "Invalid hostname"; case WSAEINTR: return "Operation canceled"; default: return "Unknown error"; } #else switch (h_errno){ case HOST_NOT_FOUND: return "Host not found"; //case NO_ADDRESS: case NO_DATA: return "Host have no IP address"; case NO_RECOVERY: return "Name server error"; case TRY_AGAIN: return "Temporary name server error"; default: return "Unknown error"; } #endif } const char *z_sock_strerror_func(int err, char *errbuf, int size){ #ifdef Z_MSC_MINGW char *str; int wsaerr = WSAGetLastError(); FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, // Default language (LPTSTR) &str, 0, NULL); z_strip_crlf(str); z_1250_to_8859_2(str); g_strlcpy(errbuf, str, size); LocalFree(str); return errbuf; #elif defined(Z_STRERROR_R_RETURNS_INT) strerror_r(err, errbuf, size); return g_strdup(errbuf); #else char *ret = strerror_r(errno, errbuf, size); // dbg("strerror_r: ret=%p '%s' errbuf=%p '%s'\n", ret, ret, errbuf, errbuf); return ret; #endif } libzia-4.67/src/ztime.c0000644000175000017500000001027514662101505011735 00000000000000/* time functions Copyright (C) 2011-2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #ifndef Z_HAVE_SYS_TYPES_H #include #endif #ifdef Z_HAVE_SYS_TIMEB_H #include #endif #include #ifdef Z_HAVE_TIME_H #include #endif #ifdef Z_HAVE_SYS_TIME_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifndef Z_HAVE_SYS_TIME_H // todo GetSystemTimeAsFileTime on vista+ int gettimeofday(struct timeval *tv, void *dummy){ struct _timeb t; _ftime_s(&t); tv->tv_sec = (long)t.time; tv->tv_usec = t.millitm * 1000; return 0; } #endif #ifdef Z_MSC struct tm *gmtime_r(time_t *timep, struct tm *result){ gmtime_s(result, timep); return result; } #endif #ifdef Z_MINGW struct tm *gmtime_r(time_t *timep, struct tm *result){ struct tm *tm; GStaticMutex gmtime_r_mutex = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&gmtime_r_mutex); tm = gmtime(timep); memcpy(result, tm, sizeof(struct tm)); g_static_mutex_unlock(&gmtime_r_mutex); return result; } #endif #ifdef Z_MSC struct tm *localtime_r(time_t *timep, struct tm *result){ localtime_s(result, timep); return result; } #endif #ifdef Z_MINGW struct tm *localtime_r(time_t *timep, struct tm *result){ static GStaticMutex localtime_r_mutex = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&localtime_r_mutex); struct tm *x = localtime(timep); memcpy(result, x, sizeof(struct tm)); g_static_mutex_unlock(&localtime_r_mutex); return result; } #endif #ifdef Z_MSC time_t timegm(struct tm *tm){ time_t ret; tm->tm_isdst = 0; ret = _mkgmtime(tm); return ret; } #endif #if defined(Z_MINGW) || defined(Z_ANDROID) time_t timegm(struct tm *tm){ time_t ret, tmp; struct tm tm2; tm->tm_isdst = 0; tmp = mktime(tm); gmtime_r(&tmp, &tm2); tm2.tm_hour += tm->tm_hour - tm2.tm_hour; ret = mktime(&tm2); return ret; } #endif #ifdef Z_MSC_MINGW int settimeofday(const struct timeval *tv, const void *zone){ return 0; } #endif static int z_relative_time(void){ struct timeval tv; gettimeofday(&tv, NULL); return (tv.tv_sec % 10000) * 1000 + tv.tv_usec / 1000; } int ztimeout_init(int timeout_ms){ int tmo; tmo = z_relative_time(); tmo += timeout_ms; return tmo; } int ztimeout_occured(int tmo){ int i; int ret = 0; i = z_relative_time(); if (i < tmo && tmo >= ZTIMEOUT_MOD && i < ZTIMEOUT_MOD / 2) i += ZTIMEOUT_MOD; if (i >= tmo) ret = 1; return ret; } int ztimeout_diff_ms(int *tmo){ int i, d, ret; i = z_relative_time(); d = i - *tmo; if (i < *tmo && *tmo >= ZTIMEOUT_MOD && i < ZTIMEOUT_MOD / 2) d += ZTIMEOUT_MOD; ret = d; *tmo = i; return ret; } int ztimeout_test(int tmo, int i, int res){ int ret = 0; // printf("%d %d\n", i, tmo); if (i < tmo && tmo >= ZTIMEOUT_MOD && i < ZTIMEOUT_MOD / 2) i += ZTIMEOUT_MOD; // printf("%d %d\n", i, tmo); if (i >= tmo) ret=1; if (ret == res) printf("OK"); else printf("FAIL"); return ret; } static int z_global_start; int zst_start(void){ return z_relative_time(); } int zst_stop(int reltime, const char *text){ int i, d; i = z_relative_time(); d = i - reltime; if (i < reltime && reltime >= ZTIMEOUT_MOD && i < ZTIMEOUT_MOD / 2) d += ZTIMEOUT_MOD; dbg("%s:%3d.%03d\n", text, d/1000, d%1000); return z_relative_time(); } void ST_START(){ z_global_start = zst_start(); } void ST_STOP(const char *text){ z_global_start = zst_stop(z_global_start, text); } double z_difftimeval_double(struct timeval *stop, struct timeval *start){ long sec, usec; usec = stop->tv_usec - start->tv_usec; sec = stop->tv_sec - start->tv_sec; if (usec < 0){ usec += 1000000; sec --; } return sec + usec / 1000000.0; } char *z_format_hms(char *s, int len, time_t t){ g_snprintf(s, len, "%02d:%02d:%02d", (int)(t / 3600), (int)((t / 60) % 60), (int)(t % 60)); return s; } libzia-4.67/src/zhttpd.c0000644000175000017500000004750314662101505012126 00000000000000/* zhttpd.c - Simple http daemon Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include "libziaint.h" //#include "eprintf.h" #include #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_HAVE_ARPA_INET_H #include #endif #ifdef Z_MSC #pragma warning(disable : 4996) #endif struct zhttpd *zhttpd_init(struct zselect *zsel, int port, int loopback){ struct zhttpd *zhttpd; struct sockaddr_in sin; char errbuf[100]; zhttpd = g_new0(struct zhttpd, 1); zhttpd->zsel = zsel; zhttpd->port = port; zhttpd->sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (zhttpd->sock < 0){ zinternal("Can't create zhttpd socket"); goto x; } if (z_sock_reuse(zhttpd->sock, 1)){ zinternal("Can't set SO_REUSEADDR\n"); goto x; } if (z_sock_nonblock(zhttpd->sock, 1)){ zinternal("Can't set O_NONBLOCK\n"); goto x; } memset(&sin, 0, sizeof(struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = htons(zhttpd->port); if (loopback) sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); else sin.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(zhttpd->sock, (struct sockaddr *)&sin, sizeof(sin))) { int err = z_sock_errno; if (err == EACCES || err == 10013){ sin.sin_port = htons(zhttpd->port == 80 ? 8080 : 1024 + zhttpd->port); if (bind(zhttpd->sock, (struct sockaddr *)&sin, sizeof(sin))) { int err = z_sock_errno; zinternal("Can't bind port %d or %d, %s\n", zhttpd->port, ntohs(sin.sin_port), z_sock_strerror()); goto x; } }else{ int err = z_sock_errno; zinternal("Can't bind port %d, %s\n", zhttpd->port, z_sock_strerror()); goto x; } } if (listen(zhttpd->sock, 10)){ zinternal("Can't listen on socket %d, tcp port %d \n", zhttpd->sock, zhttpd->port); goto x; } zselect_set(zsel, zhttpd->sock, zhttpd_accept_handler, NULL, NULL, zhttpd); zhttpd->conns = g_ptr_array_new(); g_ptr_array_set_free_func(zhttpd->conns, (GDestroyNotify)zhttpd_free_conn); zhttpd->bindings = g_ptr_array_new(); g_ptr_array_set_free_func(zhttpd->bindings, (GDestroyNotify)zhttpd_free_binding); dbg("zhttpd active on TCP port %d\n", ntohs(sin.sin_port)); return zhttpd; x:; if (zhttpd->sock >= 0) closesocket(zhttpd->sock); zhttpd->sock = -1; g_free(zhttpd); return NULL; } void zhttpd_handlers(struct zhttpd *httpd, void(*conn_new)(struct zhttpconn *conn), void(*conn_close)(struct zhttpconn *conn)){ httpd->conn_new = conn_new; httpd->conn_close = conn_close; } void zhttpd_free(struct zhttpd *zhttpd){ if (!zhttpd) return; if (zhttpd->sock >= 0) { zselect_set(zhttpd->zsel, zhttpd->sock, NULL, NULL, NULL, NULL); closesocket(zhttpd->sock); } g_ptr_array_free(zhttpd->conns, TRUE); g_ptr_array_free(zhttpd->bindings, TRUE); g_free(zhttpd); } void zhttpd_free_conn(struct zhttpconn *conn){ zhttpd_close_conn(conn); if (conn->ws_ping_timer_id > 0) zselect_timer_kill(conn->zhttpd->zsel, conn->ws_ping_timer_id); g_string_free(conn->request, TRUE); MUTEX_LOCK(conn->response); if (conn->response) zbinbuf_free(conn->response); MUTEX_UNLOCK(conn->response); MUTEX_FREE(conn->response); g_free(conn->req_path); g_free(conn->req_args); g_ptr_array_free(conn->memlist, TRUE); if (conn->wsbuf) zbinbuf_free(conn->wsbuf); g_free(conn); } void zhttpd_close_conn(struct zhttpconn *conn){ if (conn->sock >= 0) { zselect_set(conn->zhttpd->zsel, conn->sock, NULL, NULL, NULL, NULL); closesocket(conn->sock); conn->sock = -1; if (conn->zhttpd->conn_close) conn->zhttpd->conn_close(conn); } } void zhttpd_free_binding(struct zhttpdbinding *b){ g_regex_unref(b->regex); g_free(b->file_docroot); g_free(b); } void zhttpd_accept_handler(void *arg){ int sock; socklen_t socklen; struct zhttpconn *conn; struct zhttpd *zhttpd = (struct zhttpd*)arg; conn = g_new0(struct zhttpconn, 1); conn->zhttpd = zhttpd; conn->memlist = g_ptr_array_new_with_free_func(g_free); conn->response_headers = g_ptr_array_new_with_free_func((GDestroyNotify)zhttpd_free_header); MUTEX_INIT(conn->response); socklen = sizeof(conn->peer); sock = accept(zhttpd->sock, (struct sockaddr *)&conn->peer, &socklen); if (!socklen || sock < 0) { g_free(conn); return; } //dbg("Accepted socket %d %s:%d\n", sock, inet_ntoa(conn->peer.sin_addr), ntohs(conn->peer.sin_port)); conn->sock = sock; conn->request = g_string_sized_new(500); conn->response = zbinbuf_init(); zselect_set(zhttpd->zsel, conn->sock, zhttpd_read_handler, NULL, NULL, conn); g_ptr_array_add(zhttpd->conns, conn); if (zhttpd->conn_new) zhttpd->conn_new(conn); } void zhttpd_read_handler(void *arg){ struct zhttpconn *conn; char s[1030], *c, lf; int ret; conn = (struct zhttpconn*)arg; ret = recv(conn->sock, s, 1024, 0); //err=z_sock_errno; if (ret <= 0){ g_ptr_array_remove(conn->zhttpd->conns, conn); return; } s[ret] = '\0'; g_string_append(conn->request, s); lf = 0; for (c = conn->request->str; *c != '\0'; c++){ if (*c == '\r') continue; if (*c != '\n') { lf = 0; continue; } lf++; if (lf < 2) continue; break; } if (lf < 2) return; conn->req_data = c + 1; g_strlcpy(s, conn->request->str, sizeof(s)); c = strchr(s, '\r'); if (c != NULL) *c = '\0'; if (c != NULL && *c=='\n') c++; dbg("HTTP %s: %s\n", inet_ntoa(conn->peer.sin_addr), s); zselect_set_read(conn->zhttpd->zsel, conn->sock, NULL, arg); if (strncasecmp(conn->request->str, "GET ", 4) == 0){ zhttpd_get(conn); }else if (strncasecmp(conn->request->str, "POST ", 5) == 0){ zhttpd_post(conn); }else{ zhttpd_response(conn, 400, NULL); MUTEX_LOCK(conn->response); // v dobe cteni asi nemusi byt zbinbuf_sprintfa(conn->response, "Bad request"); MUTEX_UNLOCK(conn->response); } /* for (i = 0; i < 1000; i++){ g_string_append_c(conn->response, '0' + (i / 100)); }*/ zhttpd_write_response_header(conn); zselect_set_write(conn->zhttpd->zsel, conn->sock, zhttpd_write_handler, conn); } void zhttpd_write_handler(void *arg){ struct zhttpconn *conn; int ret, len; int remove_after = 0; conn = (struct zhttpconn*)arg; MUTEX_LOCK(conn->response); len = conn->response->len - conn->response_i; //printf("len=%d\n", len); if (len > 1400) len = 1400; if (len > 0) { ret = send(conn->sock, conn->response->buf + conn->response_i, len, 0); int err = z_sock_errno; //printf("send(%d) = %d\n", len, ret); if (ret <= 0){ if (err != EWOULDBLOCK){ if (conn->is_stream){ zhttpd_close_conn(conn); } else{ g_ptr_array_remove(conn->zhttpd->conns, conn); } } }else{ if (conn->is_stream){ zbinbuf_erase(conn->response, 0, ret); }else{ conn->response_i += ret; } } }else{ void *read_handler = zselect_get(conn->zhttpd->zsel, conn->sock, H_READ); if (read_handler == NULL) { if (conn->is_stream){ zselect_set_write(conn->zhttpd->zsel, conn->sock, NULL, conn); }else{ remove_after = 1; } }else{ zselect_set_write(conn->zhttpd->zsel, conn->sock, NULL, conn); } } MUTEX_UNLOCK(conn->response); if (remove_after) g_ptr_array_remove(conn->zhttpd->conns, conn); } /*int zhttpd_flush(struct zhttpconn *conn){ int ret, len; len = conn->response->len - conn->response_i; ret = send(conn->sock, conn->response->buf + conn->response_i, len, 0); if (ret > 0) conn->response_i += ret; return ret; } */ void zhttpd_write_response_header(struct zhttpconn *conn){ int i; char *ss; GString *sb; switch (conn->status){ case 101: ss = "Switching Protocols"; break; case 200: ss = "OK"; break; case 405: ss = "Not Found"; break; case 500: ss = "Internal server error"; break; default: ss = "Unknown status"; break; } sb = g_string_sized_new(1024); g_string_append_printf(sb, "HTTP/1.1 %d %s\r\n", conn->status, ss); for (i = 0; i < (int)conn->response_headers->len; i++){ struct zhttpheader *h = (struct zhttpheader *)g_ptr_array_index(conn->response_headers, i); g_string_append_printf(sb, "%s: %s\r\n", h->key, h->value); } g_string_append(sb, "\r\n"); MUTEX_LOCK(conn->response); zbinbuf_prepend(conn->response, sb->str, sb->len); MUTEX_UNLOCK(conn->response); g_string_free(sb, TRUE); } void zhttpd_response(struct zhttpconn *conn, int status, char *contenttype){ char *server; conn->status = status; server = zhttpd_get_header(conn, "Server", NULL); if (server != NULL) zhttpd_add_header(conn, "Server", debug_msg_title); zhttpd_add_header(conn, "Connection", "close"); if (contenttype) zhttpd_add_header(conn, "Content-Type", contenttype); } void zhttpd_add_header(struct zhttpconn *conn, char *key, char *value){ int i; struct zhttpheader *h; for (i = 0; i < (int)conn->response_headers->len; i++){ h = (struct zhttpheader *)g_ptr_array_index(conn->response_headers, i); if (strcasecmp(h->key, key) == 0) { g_free(h->value); h->value = g_strdup(value); return; } } h = g_new0(struct zhttpheader, 1); h->key = g_strdup(key); h->value = g_strdup(value); g_ptr_array_add(conn->response_headers, h); } void zhttpd_free_header(struct zhttpheader *header){ if (!header) return; g_free(header->key); g_free(header->value); g_free(header); } void zhttpd_get(struct zhttpconn *conn){ char *c, *page; int i; //char dir[256]; //GetCurrentDirectory(256, dir); page = g_strdup(conn->request->str + strlen("GET") + 1); while (*page == ' ') page++; c = strchr(page, ' '); if (c != NULL) *c = '\0'; g_free(conn->req_path); g_free(conn->req_args); z_split2(page, '?', &conn->req_path, &conn->req_args, ZSPL_NSTRIP); if (!conn->req_path) conn->req_path = g_strdup(page); if (strcmp(conn->req_path, "/") == 0){ g_free(conn->req_path); conn->req_path = g_strdup("/index.html"); } g_free(page); for (i = 0; i < (int)conn->zhttpd->bindings->len; i++){ //GMatchInfo *mi; struct zhttpdbinding *b = (struct zhttpdbinding *)g_ptr_array_index(conn->zhttpd->bindings, i); if (g_regex_match(b->regex, conn->req_path, (GRegexMatchFlags)0, NULL)) { conn->binding = b; b->handler(conn); return; }; } zhttpd_response(conn, 404, "text/plain"); MUTEX_LOCK(conn->response); zbinbuf_sprintfa(conn->response, "Not found"); MUTEX_UNLOCK(conn->response); } void zhttpd_post(struct zhttpconn *conn){ char *c, *page; int i; page = g_strdup(conn->request->str + strlen("POST") + 1); while (*page == ' ') page++; c = strchr(page, ' '); if (c != NULL) *c = '\0'; g_free(conn->req_path); g_free(conn->req_args); z_split2(page, '?', &conn->req_path, &conn->req_args, ZSPL_NSTRIP); if (!conn->req_path) conn->req_path = g_strdup(page); /*if (strcmp(conn->req_path, "/") == 0){ g_free(conn->req_path); conn->req_path = g_strdup("/index.html"); } */ g_free(page); for (i = 0; i < (int)conn->zhttpd->bindings->len; i++){ //GMatchInfo *mi; struct zhttpdbinding *b = (struct zhttpdbinding *)g_ptr_array_index(conn->zhttpd->bindings, i); //dbg("binding %d '%s' '%s'\n", i, b->regex, conn->req_path); if (g_regex_match(b->regex, conn->req_path, (GRegexMatchFlags)0, NULL)) { conn->binding = b; b->handler(conn); return; }; } zhttpd_response(conn, 404, "text/plain"); MUTEX_LOCK(conn->response); zbinbuf_sprintfa(conn->response, "Not found"); MUTEX_UNLOCK(conn->response); } struct zhttpdbinding *zhttpd_add_binding(struct zhttpd *zhttpd, char *regex, void (*handler)(struct zhttpconn *conn)) { struct zhttpdbinding *b = g_new0(struct zhttpdbinding, 1); b->zhttpd = zhttpd; b->regex = g_regex_new(regex, (GRegexCompileFlags)0, (GRegexMatchFlags)0, NULL); b->handler = handler; g_ptr_array_add(zhttpd->bindings, b); return b; } char *zhttpd_arg(struct zhttpconn *conn, char *key, char *def){ char *args, *c, *token_ptr = NULL, *k, *v; if (!conn->req_args) return def; args = g_strdup(conn->req_args); for (c = strtok_r(args, "&", &token_ptr); c!=NULL; c = strtok_r(NULL, "&", &token_ptr)){ z_split2(c, '=', &k, &v, 0); if (!key) continue; if (strcasecmp(key, k) == 0) { g_free(k); g_ptr_array_add(conn->memlist, v); return v; } g_free(k); g_free(v); } g_free(args); return def; } int zhttpd_arg_int(struct zhttpconn *conn, char *key, int def){ int ret; char *s = zhttpd_arg(conn, key, NULL); if (s == NULL) return def; ret = atoi(s); return ret; } char *zhttpd_get_header(struct zhttpconn *conn, char *header, char *def){ char *v; char *c = conn->request->str; char *lf; while(1){ c = strchr(c, '\n'); if (c == NULL) break; c++; if (strncasecmp(c, header, strlen(header)) != 0) continue; v = c + strlen(header); if (*v != ':') continue; v++; lf = strchr(c, '\n'); v = g_strndup(v, lf - v); g_ptr_array_add(conn->memlist, v); v = z_trim(v); return v; } return NULL; } const char *zhttpd_get_mime(char *path){ const char *ext = z_extension(path); if (strcasecmp(ext, ".html") == 0) return "text/html"; if (strcasecmp(ext, ".css") == 0) return "text/css"; if (strcasecmp(ext, ".png") == 0) return "image/png"; if (strcasecmp(ext, ".json") == 0) return "application/json"; if (strcasecmp(ext, ".js") == 0) return "text/javascript"; return "text/plain"; } void zhttpd_file_handler(struct zhttpconn *conn){ char *filename, *file, *contenttype; filename = g_strdup_printf("%s/%s", "../www", conn->req_path); file = zfile_read_textfile(filename); g_free(filename); if (file == NULL) { zhttpd_response(conn, 404, "text/plain"); MUTEX_LOCK(conn->response); zbinbuf_sprintfa(conn->response, "Not found"); MUTEX_UNLOCK(conn->response); } else{ contenttype = g_strdup(zhttpd_get_mime(conn->req_path)); zhttpd_response(conn, 200, contenttype); MUTEX_LOCK(conn->response); zbinbuf_append(conn->response, file); MUTEX_UNLOCK(conn->response); g_free(contenttype); g_free(file); } } void zhttpd_ws_handshake_handler(struct zhttpconn *conn){ GString *gs = g_string_sized_new(100); // char *upgrade = zhttpd_get_header(conn, "Upgrade", NULL); char *wskey = zhttpd_get_header(conn, "Sec-WebSocket-Key", NULL); char *protocol = zhttpd_get_header(conn, "Sec-WebSocket-Protocol", NULL); char reply[21]; //wskey = "dGhlIHNhbXBsZSBub25jZQ=="; g_string_append(gs, wskey); g_string_append(gs, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); zsha1(reply, gs->str, gs->len); zg_string_eprintf("b", gs, "%b", reply, 20); zhttpd_response(conn, 101, NULL); zhttpd_add_header(conn, "Upgrade", "websocket"); zhttpd_add_header(conn, "Connection", "Upgrade"); zhttpd_add_header(conn, "Sec-WebSocket-Accept", gs->str); g_string_free(gs, TRUE); if (protocol != NULL) zhttpd_add_header(conn, "Sec-WebSocket-Protocol", protocol); zselect_set_read(conn->zhttpd->zsel, conn->sock, zhttpd_ws_read_handler, conn); conn->is_ws = 1; conn->ws_ping_timer_id = zselect_timer_new(conn->zhttpd->zsel, 30000, zhttpd_ws_ping_timer, conn); } void zhttpd_ws_read_handler(void *arg) { struct zhttpconn *conn; char s[1030]; int ret; int opcode, len, ptr, i; char *key; char *packet; conn = (struct zhttpconn*)arg; ret = recv(conn->sock, s, 1024, 0); //err=z_sock_errno; if (ret <= 0){ g_ptr_array_remove(conn->zhttpd->conns, conn); return; } if (!conn->wsbuf) conn->wsbuf = zbinbuf_init(); zbinbuf_append_bin(conn->wsbuf, s, ret); while (conn->wsbuf->len >= 6) // have enough data { ptr = 2; opcode = conn->wsbuf->buf[0] & 0x0f; // ZWS_xxx if ((conn->wsbuf->buf[1] & 0x80) == 0) { g_ptr_array_remove(conn->zhttpd->conns, conn); // RFC6455 5.1 return; } if ((conn->wsbuf->buf[1] & 0x7f) <= 125) { len = conn->wsbuf->buf[1] & 0x7f; }else if ((conn->wsbuf->buf[1] & 0x7f) == 126) { len = ((unsigned char)conn->wsbuf->buf[2]) * 256 + ((unsigned char)conn->wsbuf->buf[3]); ptr += 2; }else if ((conn->wsbuf->buf[1] & 0x7f) == 127) { zinternal("Websocket messages > 64kB not supported"); return; } if (ptr + 4 + len > conn->wsbuf->len) return; // not full packet key = conn->wsbuf->buf + ptr; ptr += 4; packet = (char *)g_malloc(len + 1); for (i = 0; i < len; i++){ packet[i] = conn->wsbuf->buf[ptr + i] ^ key[i % 4]; } packet[i] = '\0'; switch(opcode){ case ZWS_CONTINUE: zinternal("Websocket fragmentation not supported"); break; case ZWS_TEXT: case ZWS_BINARY: if (conn->binding->ws_onmessage) conn->binding->ws_onmessage(conn, opcode, packet, len); break; case ZWS_CLOSE: zhttpd_ws_send(conn, ZWS_CLOSE, packet, len); break; case ZWS_PING: zhttpd_ws_send(conn, ZWS_PONG, packet, len); break; case ZWS_PONG: break; default: zinternal("Websocket opcode %d not supported"); break; } g_free(packet); zbinbuf_erase(conn->wsbuf, 0, ptr + len); } } void zhttpd_ws_send(struct zhttpconn *conn, int opcode, char *s, int len){ unsigned char b; uint16_t u16; if (len < 0) len = strlen(s); MUTEX_LOCK(conn->response); b = opcode | 0x80; // FIN zbinbuf_append_bin(conn->response, &b, 1); if (len <= 125){ b = len; zbinbuf_append_bin(conn->response, &b, 1); }else if (len < 65536){ b = 126; zbinbuf_append_bin(conn->response, &b, 1); u16 = htons(len); zbinbuf_append_bin(conn->response, &u16, 2); }else{ zinternal("Websocket messages > 64KB not supported"); } zbinbuf_append_bin(conn->response, s, len); MUTEX_UNLOCK(conn->response); zselect_set_write(conn->zhttpd->zsel, conn->sock, zhttpd_write_handler, conn); } void zhttpd_ws_send_all(struct zhttpd *zhttpd, int opcode, char *s, int len){ int i; for (i = 0; i < (int)zhttpd->conns->len; i++){ struct zhttpconn *conn = (struct zhttpconn *)g_ptr_array_index(zhttpd->conns, i); if (!conn->is_ws) continue; zhttpd_ws_send(conn, opcode, s, len); } } void zhttpd_ws_ping_timer(void *arg){ struct zhttpconn *conn = (struct zhttpconn*)arg; MUTEX_LOCK(conn->response); zbinbuf_append_bin(conn->response, "\x89\0", 2); MUTEX_UNLOCK(conn->response); conn->ws_ping_timer_id = zselect_timer_new(conn->zhttpd->zsel, 30000, zhttpd_ws_ping_timer, conn); zselect_set_write(conn->zhttpd->zsel, conn->sock, zhttpd_write_handler, conn); } void zhttpd_write(struct zhttpconn *conn, const void *data, int len){ if (conn->sock == -1) return; MUTEX_LOCK(conn->response); zbinbuf_append_bin(conn->response, data, len); MUTEX_UNLOCK(conn->response); zselect_set_write(conn->zhttpd->zsel, conn->sock, zhttpd_write_handler, conn); } int http_response_buf_len(struct zhttpconn *conn){ MUTEX_LOCK(conn->response); int len = conn->response->len; MUTEX_UNLOCK(conn->response); return len; } libzia-4.67/src/zloc.c0000644000175000017500000002452514714333552011566 00000000000000/* zloc.c - Maidenhead WW locator functions Copyright (C) 2002-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #define _USE_MATH_DEFINES // for MSVC #include #include #include #include #undef LOCDEBUG #define sqr(x) ((x)*(x)) static void tostr(GString *gs, double x){ int a,b; x=x*180/M_PI; a=(int)x; if (x>0) x-=a; else x=a-x; x*=60; b=(int)x; if (x>0) x-=b; else x=b-x; x*=60; g_string_append_printf(gs, "%d.%d'%3.1f\"", a, b, x); } /******************* QRB **************************/ double qth(const char *qth,int width) { const char* c; char d; double res; /* dbg("qth('%s',%d)\n", qth, width);*/ c=qth; while (1){ d=tolower(*c); if (!d) return(-100); if (d>='a' || d<='r') break; c++; } if (width&1) c++; d=tolower(*c); if (strlen(c)<3) return(-100); res=(d-106)*M_PI/9.0; c+=2; if (!isdigit(*c)) return(-100); res+=(*c-'0')*M_PI/90.0; c+=2; /* dbg("strlen(c)=%d, strlen(qth)=%d\n", strlen(c), strlen(qth)); */ if (strlen(qth)>=6){ d=tolower(*c); if (d<'a' || d>'x') return(-100); res+=(d-97)*M_PI/2160.0; if (strlen(qth) >= 8) { c += 2; if (isdigit(*c)) res += (*c - '0') * M_PI / 21600.0; }else { res += M_PI / 4320.0; } }else{ if (width&2) res+=M_PI/180; } /*if (strlen(c)>=8){ c+=2; if (isdigit(*c)) res+=(*c-'0')*M_PI/21600.0; if (width&2) res+=M_PI/43200.0; }else{ if (width&2) res+=M_PI/4320.0; }*/ if (width&1) res/=2; return(res); } /* compute QRB, not QSO points! */ int qrbqtf(char *myqth,char *recqth,double *qrb,double *qtf,GString *gs, int flags){ double h1,w1,h2,w2; //char s1[20],s2[20],s3[20],s4[20]; int ret; *qrb=-1; *qtf=-1; if ((h1=qth(myqth,0|flags))<-10) return(-1); if ((w1=qth(myqth,1|flags))<-10) return(-1); if ((h2=qth(recqth,0|flags))<-10) return(-1); if ((w2=qth(recqth,1|flags))<-10) return(-1); /*dbg("h1=%7.4f w1=%7.4f h2=%7.4f w2=%7.4f \n",h1,w1,h2,w2);*/ #ifdef LOCDEBUG fprintf(stderr, "%s->%s, h1=%7.9f w1=%7.9f h2=%7.9f w2=%7.9f \n",myqth,recqth,h1,w1,h2,w2); fprintf(stderr, "h1=%7.9fdeg w1=%7.9fdeg h2=%7.9fdeg w2=%7.9fdeg \n",h1*180.0/M_PI,w1*180.0/M_PI,h2*180.0/M_PI,w2*180.0/M_PI); #endif if (gs!=NULL){ g_string_truncate(gs, 0); g_string_append_printf(gs, "From: "); tostr(gs, h1); g_string_append_printf(gs, "E "); tostr(gs, w1); g_string_append_printf(gs, "N to "); tostr(gs, h2); g_string_append_printf(gs, "E "); tostr(gs, w2); g_string_append_printf(gs, "N"); } ret = hw2qrbqtf(h1, w1, h2, w2, qrb, qtf); *qtf=*qtf * 180.0/M_PI; /*dbg("qrbqtf(%s->%s %5.3fkm %3.0fdeg\n", myqth, recqth, *qrb, *qtf);*/ return ret; } /* compute QRB, not QSO points! */ int hw2qrbqtf(double h1, double w1, double h2, double w2, double *qrb, double *qtf){ double dh,dw; #ifdef LOCDEBUG dbg("h1=%7.9f w1=%7.9f h2=%7.9f w2=%7.9f ",h1,w1,h2,w2); #endif double debil; dh=h2-h1; debil = sin(w1)*sin(w2)+cos(w1)*cos(w2)*cos(dh); if (debil < -1.0) debil = -1.0; if (debil > 1.0) debil = 1.0; *qrb=ZLOC_R_EARTH*acos(debil); dw=tan(w2)*cos(w1)-sin(w1)*cos(dh); #ifdef LOCDEBUG fprintf(stderr, "dh=%7.9f qrb=%7.9f dw=%7.9f\n", dh, *qrb, dw); #endif *qtf=atan2(sin(dh),dw); if (*qtf<0) *qtf+=2*M_PI; return 0; } void hw2km(double h1, double w1, double h2, double w2, int *kx, int *ky){ double qrb, qtf; hw2qrbqtf(h1, w1, h2, w2, &qrb, &qtf); /* dbg("qrb=%f qtf=%f\n", qrb, qtf);*/ *kx = (int)( qrb*sin(qtf)); *ky = (int)(- qrb*cos(qtf)); } void hw2km_d(double h1, double w1, double h2, double w2, double *kx, double *ky){ double qrb, qtf; hw2qrbqtf(h1, w1, h2, w2, &qrb, &qtf); /* dbg("qrb=%f qtf=%f\n", qrb, qtf);*/ *kx = qrb*sin(qtf); *ky = - qrb*cos(qtf); } void hw2km_f(double h1, double w1, double h2, double w2, float *fkx, float *fky){ double kx, ky; hw2km_d(h1, w1, h2, w2, &kx, &ky); /*if (ikx < -32768) ikx = -32768; if (ikx > 32767) ikx = 32767; if (iky < -32768) iky = -32768; if (iky > 32767) iky = 32767;*/ *fkx = (float)kx; *fky = (float)ky; } void km2qrbqtf(int kx, int ky, double *qrb, double *qtf){ int dx, dy; dx=kx; dy=ky; if (qrb){ *qrb=sqrt((double)(sqr(dx)+sqr(dy))); } if (qtf){ *qtf=atan2((double)dx,(double)-dy); if (*qtf<0) *qtf+=2*M_PI; } /* dbg("km2qrbqtf(%d, %d)=%d, %d\n",kx, ky, (int)*qrb, (int)(*qtf*180.0/M_PI));*/ } /*************** REVERSE QRB ***************************/ #define EPSILON 0.00000000005 /* qtf in radian */ int qrbqtf2hw(double h1, double w1, double qrb, double qtf, double *h2, double *w2){ double dh, d; if (qrb>ZLOC_R_EARTH*M_PI) return -1; d = qrb/ZLOC_R_EARTH; *w2 = asin (sin(w1)*cos(d) + cos(w1)*sin(d)*cos(qtf)); if (fabs(cos(*w2))< EPSILON) { *h2 = 0; }else{ dh = atan2(sin(qtf)*sin(d)*cos(w1), cos(d)-sin(w1)*sin(*w2) ); *h2 = fmod (M_PI +h1+dh, 2*M_PI)-M_PI; } return 0; } /*************** WWL RING *****************************/ int qthwr(char *qth,int width) { char *c,d; int res; c=qth; while (1){ d=tolower(*c); if (!d) return(-1000); if (d>='a' || d<='r') break; c++; } if (width) c++; d=tolower(*c); if (strlen(c)<5) return(-1000); res=(d-106)*10; c+=2; if (!isdigit(*c)) return(-1000); res+=(*c-'0'); return(res); } char *mkwwl4(char *buf, int w, int h){ /* dbg("mkwwl4(%d, %d)\n", w, h);*/ w+=90; h+=90; while (w<0) w+=180; while (h<0) h+=180; w%=180; h%=180; buf[0]='A'+ h/10; buf[1]='A'+ w/10; buf[2]='0'+ h%10; buf[3]='0'+ w%10; buf[4]='\0'; return buf; } /* degrees */ char *hw2loc(char *buf, double h, double w, int len){ int i = 0; // JN69QR76BB // h = 13.39209; // w = 49.733556; h+=180; w+=90; h=fmod(h,360.0); w=fmod(w,180.0); buf[i++]='A'+ (int)(h/20.0); buf[i++]='A'+ (int)(w/10.0); if (len <= 2) goto x; h=fmod(h,20); w=fmod(w,10); buf[i++]='0'+ (int)(h/2); buf[i++]='0'+ (int)(w); if (len <= 4) goto x; h=fmod(h,2); w=fmod(w,1); h*=12; w*=24; buf[i++]='A'+ (int)(h); buf[i++]='A'+ (int)(w); if (len <= 6) goto x; h=fmod(h, 1) * 10; w=fmod(w, 1) * 10; buf[i++]='0'+ (int)(h); buf[i++]='0'+ (int)(w); if (len <= 8) goto x; h=fmod(h, 1) * 24; w=fmod(w, 1) * 24; buf[i++]='A'+ (int)(h); buf[i++]='A'+ (int)(w); x:; buf[i]='\0'; return buf; } char *x2gramin(char *buf, int size, double x, char *signs){ double xx; char sign; sign=x<0?signs[1]:signs[0]; x = fabs(fmod(x, 360)); xx = fmod(x, 1)*60.0; g_snprintf(buf, size, "%3d%c%02d", (int)x, sign, (int)xx); return buf; } int qsopwr(char *myqth, char *recqth){ int h1, h2, w1, w2, dh1, dh2, dh, dw, d; if ((h1=qthwr(myqth,0))<=-1000) return(-1); if ((w1=qthwr(myqth,1))<=-1000) return(-1); if ((h2=qthwr(recqth,0))<=-1000) return(-1); if ((w2=qthwr(recqth,1))<=-1000) return(-1); /*dbg("h1=%d w1=%d h2=%d %w2=%d \n",h1,w1,h2,w2);*/ dh1 = h1 - h2; if (dh1 < 0) dh1 += 180; dh2 = h2 - h1; if (dh2 < 0) dh2 += 180; /* dw1 = w1 - w2; if (dw1 < 0) dw1 += 180; dw2 = w2 - w1; if (dw2 < 0) dw2 += 180; */ dh = dh1 < dh2 ? dh1 : dh2; /* dw = dw1 < dw2 ? dw1 : dw2;*/ dw = w2 - w1; if (dw < 0) dw = -dw; d = dh < dw ? dw : dh; return d+2; } char *compute_wwl4(char *s, double h, double w){ int hi, wi; if (h < -180.0 || h > 180.0 || w < -90.0 || w > 90.0) { g_strlcpy(s, "", 5); return s; } h += 180.0; w += 90.0; hi = (int)(h/20); s[0] = 'A' + hi; wi = (int)(w/10); s[1] = 'A' + wi; hi = (int)(h/2); hi %= 10; wi = (int)w; wi %= 10; s[2] = '0' + hi; s[3] = '0' + wi; s[4] = '\0'; return s; } //ctest ? ctest->pwwlo : cfg->pwwlo, void qrb_qtf_int(char *mywwl, char *wwl, int *qrb_int, int *qtf_int){ double qrb, qtf; qrbqtf(mywwl, wwl, &qrb, &qtf, NULL, 0); *qrb_int=(int)qrb; *qtf_int=(int)qtf; /*dbg("qrb_qtf_int(%s->%s %5dkm %3ddeg\n", ctest->pwwlo, wwl, *qrb_int, *qtf_int);*/ } /* Compute points from QRB */ int iaru_round(double qrb){ return ((int)(qrb+1.0)); } /* s = "60AA", my = "JN69UN". Returns JO60AA. Must be enough space in s. All must be uppercase */ void z_nearest_wwl(char *s, char *my){ char loc[8], minloc[8]; double qrb, qtf, minqrb; int i; int dh[] = {-1, -1, -1, 0, 0, +1, +1, +1}; int dw[] = {-1, 0, +1, -1, +1, -1, 0, +1}; if (!s || strlen(s) < 4 || !my || strlen(my) < 6) { g_strlcpy(s, "", 2); return; } g_snprintf(minloc, sizeof(minloc), "%c%c%s", my[0], my[1], s); qrbqtf(my, minloc, &minqrb, &qtf, NULL, 0); for (i = 0; i < 8; i++){ char h = my[0] + dh[i]; char w = my[1] + dw[i]; if (h < 'A') h = 'R'; if (h > 'R') h = 'A'; if (w < 'A') continue; if (h > 'R') continue; g_snprintf(loc, sizeof(loc), "%c%c%s", h, w, s); qrbqtf(my, loc, &qrb, &qtf, NULL, 0); if (qrb > minqrb) continue; minqrb = qrb; g_strlcpy(minloc, loc, sizeof(minloc)); } g_strlcpy(s, minloc, 7); } #ifdef MAIN int main(int argc,char *argv[]){ char s[100],my[100]="jn69pv",rec[100]="jo60lj"; double qrb,qtf; GString *gs = g_string_new(""); while (1) { printf("\n zadej svuj lokator (%s) :",my); fgets(s,90,stdin); s[strlen(s)-1]='\0'; if (strcmp(s,"k")==0) return(1); if (strlen(s)>0) strcpy(my,s); printf(" zadej prijaty lokator (%s) :",rec); fgets(s,90,stdin); s[strlen(s)-1]='\0'; if (strcmp(s,"k")==0) return(1); if (strlen(s)>0) strcpy(rec,s); qrbqtf(my,rec,&qrb,&qtf, gs, 0); printf(" %s \n qrb:%8.1f km qtf:%6.2f \n",gs->str,qrb,qtf); printf("WWL ring: %d ", qsopwr(my,rec)); } } #endif libzia-4.67/src/zcall.c0000644000175000017500000000437014662101505011711 00000000000000/* ham callsign functions Copyright (C) 2011 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include char *z_get_raw_call(char *buf, const char *call){ char s[20], *c; char *token_ptr; z_strlcpy(s, call, 20); for (c = strtok_r(s, "/", &token_ptr); c!=NULL; c = strtok_r(NULL, "/", &token_ptr)){ if (strlen(c) < 3) continue; if (strlen(c) == 3 && c[2] >= '0' && c[2] <= '9') continue; /* 3rd char cannot be number , OK1 vs G8M */ z_strlcpy(buf, c, 20); return buf; } z_strlcpy(buf, call, 20); z_str_uc(buf); return buf; } int z_call_is_rover(const char *callsign){ int len = strlen(callsign); if (len < 2) return 0; if (callsign[len - 2] != '/') return 0; if (z_char_uc(callsign[len - 1]) != 'R') return 0; return 1; } char *z_suffix(gchar *call){ char *needle; if (!call) return NULL; for (needle=call+strlen(call)-1; needle>=call && isalpha(*needle); needle--); return needle+1; } int z_can_be_call_char(const char c, int flags){ if (c >= 'a' && c <= 'z') return 1; if (c >= 'A' && c <= 'Z') return 1; if (c >= '0' && c <= '9') return 1; if (ZCBC_SLASH && c == '/') return 1; if (ZCBC_MINUS && c == '-') return 1; return 0; } int z_can_be_call(const char *call, int flags){ const char *c; int a = 0, n = 0, m = 0; for (c = call; *c != '\0'; c++){ if (*c >= 'a' && *c <= 'z') { a++ ; continue; } if (*c >= 'A' && *c <= 'Z') { a++ ; continue; } if (*c >= '0' && *c <= '9') { n++ ; continue; } if (ZCBC_SLASH && *c == '/') continue; if (ZCBC_MINUS && *c == '-') { m++ ; continue; } return 0; } if (a < 2) return 0; // at least two alphas, also empty string if (n < 1) return 0; // must have a number if (n > 5) return 0; // maximum is like 9A2000X if (m == 0){ // not for OK2M-3 from KST char ch = z_char_uc(call[strlen(call) - 1]); if ((ch < 'A' || ch > 'Z') && (ch < '0' || ch > '9')) return 0; // doesn't end with letter } return 1; } libzia-4.67/src/zserial_tty.c0000644000175000017500000002043314662101505013153 00000000000000/* zserial_tty - portable serial port API Module for UNIX serial port Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #ifdef Z_HAVE_SYS_IOCTL_H #include #endif #include #include #ifdef Z_HAVE_TERMIOS_H #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_TERMIOS_H static int baud(int br){ switch (br){ case 50: return B50; case 75: return B75; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; case 57600: return B57600; case 115200: return B115200; case 230400: return B230400; default: return -1; } } static int cs(int size){ switch(size){ case 5: return CS5; case 6: return CS6; case 7: return CS7; case 8: default: return CS8; } } static int zserial_tty_open(struct zserial *zser){ int ret; struct termios tio; if (zser->fd >= 0) return 0; ret = zfhs_lock(zser->filename, 1); if (ret){ char *c = zfhs_strdup_error(ret, zser->filename); g_string_printf(zser->errorstr, "%s", c); g_free(c); return ret; }else{ zser->locked = 1; } zser->fd = open(zser->filename, O_RDWR | O_SYNC | O_NONBLOCK | O_NOCTTY); if (zser->fd < 0){ g_string_printf(zser->errorstr, "Can't open device %s", zser->id); zfhs_unlock(zser->filename); dbg("zserial_tty_open: can't open %s\n", zser->filename); return -3; } dbg("zserial_tty_open: %s opened fd=%d\n", zser->filename, zser->fd); if (fcntl(zser->fd, F_SETFL, O_NONBLOCK)) { g_string_printf(zser->errorstr, "Can't set O_NONBLOCK on %s: ", zser->id); z_strerror(zser->errorstr, errno); zfhs_unlock(zser->filename); zserial_close(zser); return -4; } if (tcgetattr(zser->fd, &tio) < 0){ g_string_printf(zser->errorstr, "Can't get device attributes for %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); return -1; } cfmakeraw(&tio); int b = baud(zser->baudrate); cfsetispeed(&tio, b); cfsetospeed(&tio, b); tio.c_cflag |= (CLOCAL | CREAD); tio.c_cflag &= ~CSIZE; tio.c_cflag |= cs(zser->bits); switch (zser->stopbits){ case 1: tio.c_cflag &= ~CSTOPB; break; case 2: tio.c_cflag |= CSTOPB; break; } switch (zser->parity){ case 'e': case 'E': tio.c_cflag |= PARENB; tio.c_cflag &= ~PARODD; break; case 'o': case 'O': tio.c_cflag |= PARENB; tio.c_cflag |= PARODD; break; case 'n': case 'N': default: tio.c_cflag &= ~PARENB; break; } tio.c_cflag &= ~CRTSCTS; tio.c_iflag &= ~IXON; tio.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); tio.c_oflag &= ~OPOST; if (tcflush(zser->fd, TCIFLUSH) < 0){ g_string_printf(zser->errorstr, "Can't flush device attributes for %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); return -1; } if (tcsetattr(zser->fd, TCSANOW, &tio) < 0){ g_string_printf(zser->errorstr, "Can't set device attributes for %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); return -1; } zser->opened = 1; return 0; } static int zserial_tty_read(struct zserial *zser, void *data, int len, int timeout_ms){ int ret; fd_set fdr; struct timeval tv; FD_ZERO(&fdr); FD_SET(zser->fd, &fdr); tv.tv_usec = timeout_ms * 1000; tv.tv_sec = 0; ret = select(zser->fd + 1, &fdr, NULL, NULL, &tv); // dbg("select=%d\n", ret); if (ret < 0) { g_string_printf(zser->errorstr, "Can't select %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); return ret; } if (ret == 0) { g_string_printf(zser->errorstr, "Can't read %s: Timeout", zser->id); return 0; } if (!FD_ISSET(zser->fd, &fdr)){ g_string_printf(zser->errorstr, "Can't read %s: Data not available", zser->id); zserial_close(zser); } ret = read(zser->fd, data, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't read from %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_tty_write(struct zserial *zser, void *data, int len){ int ret; ret = write(zser->fd, data, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_tty_close(struct zserial *zser){ if (zser->fd >= 0) { close(zser->fd); dbg("zserial_tty_close: %s closed fd %d\n", zser->filename, zser->fd); } zser->fd = -1; if (zser->locked) zfhs_unlock(zser->filename); zser->locked = 0; return 0; } static int zserial_tty_dtr(struct zserial *zser, int on){ int pin; pin = TIOCM_DTR; if (ioctl(zser->fd, on ? TIOCMBIS : TIOCMBIC, &pin) < 0){ g_string_printf(zser->errorstr, "Can't set DTR on %s: ", zser->id); z_strerror(zser->errorstr, errno); return -1; } return 0; } static int zserial_tty_rts(struct zserial *zser, int on){ int pin; pin = TIOCM_RTS; if (ioctl(zser->fd, on ? TIOCMBIS : TIOCMBIC, &pin) < 0){ g_string_printf(zser->errorstr, "Can't set RTS on %s: ", zser->id); z_strerror(zser->errorstr, errno); return -1; } return 0; } #endif int zserial_tty_detect(struct zserial *zser){ struct dirent *d; DIR *dp = opendir("/sys/class/tty"); if (!dp) return 0; while ((d = readdir(dp)) != NULL){ if (strcmp(d->d_name, ".") == 0) continue; if (strcmp(d->d_name, "..") == 0) continue; char *device = g_strconcat("/sys/class/tty/", d->d_name, "/device", NULL); struct stat st; if (stat(device, &st) < 0){ g_free(device); continue; } g_free(device); if (strncmp(d->d_name, "ttyS", 4) == 0 && strncmp(d->d_name, "ttySAC", 6) != 0){ device = g_strconcat("/sys/class/tty/", d->d_name, "/device/resources", NULL); if (stat(device, &st) < 0){ g_free(device); continue; } g_free(device); } struct zserial_port *port = g_new0(struct zserial_port, 1); port->filename = g_strconcat("/dev/", d->d_name, NULL); if (strncmp(d->d_name, "ttySAC", 6) == 0){ port->desc = g_strdup("Console serial port"); }else if (strncmp(d->d_name, "ttyS", 4) == 0){ port->desc = g_strdup("Serial port"); }else if (strncmp(d->d_name, "ttyUSB", 6) == 0){ port->desc = g_strdup("USB serial port"); }else if (strncmp(d->d_name, "ttyGS", 5) == 0){ port->desc = g_strdup("Gadget serial port"); }else{ port->desc = g_strdup(""); } g_ptr_array_add(zser->ports, port); } closedir(dp); return zser->ports->len; } struct zserial *zserial_init_tty(const char *filename){ #ifdef Z_HAVE_TERMIOS_H struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_TTY; zser->id = g_strdup(filename); zser->filename = g_strdup(filename); zser->zs_open = zserial_tty_open; zser->zs_read = zserial_tty_read; zser->zs_write = zserial_tty_write; zser->zs_close = zserial_tty_close; zser->zs_dtr = zserial_tty_dtr; zser->zs_rts = zserial_tty_rts; zser->zs_detect = zserial_tty_detect; return zser; #else return NULL; #endif } libzia-4.67/src/zjson.c0000644000175000017500000004002714663565707011771 00000000000000#define _XOPEN_SOURCE #define __USE_MISC #include #include #include #include #include #include #include #include #include #include //#include //#include //#include void zjson_begin_object(struct zjson *json){ json->type = "{"; g_string_append(json->gs, "{"); json->aa = json->gs->str; } void zjson_begin_array(struct zjson *json){ json->type = "["; g_string_append(json->gs, "["); json->aa = json->gs->str; } void zjson_end(struct zjson *json){ if (!json->type) return; if (json->type[0] == '{'){ g_string_append(json->gs, "}"); }else if (json->type[0] == '['){ g_string_append(json->gs, "]"); } json->type = NULL; json->aa = json->gs->str; } void zjson_concatEscaped(struct zjson *json, const char *str){ for (const char *c = str; *c != '\0'; c++){ switch (*c) { case '\\': case '"': g_string_append(json->gs, "\\"); g_string_append_c(json->gs, *c); break; case '\b': g_string_append(json->gs, "\\b"); break; case '\t': g_string_append(json->gs, "\\t"); break; case '\n': g_string_append(json->gs, "\\n"); break; case '\f': g_string_append(json->gs, "\\f"); break; case '\r': g_string_append(json->gs, "\\r"); break; default: if (((unsigned char)*c) < ' ') { char s2[30]; sprintf(s2, "\\u%04x", (unsigned char)*c); g_string_append(json->gs, s2); } else { g_string_append_c(json->gs, *c); } } } json->aa = json->gs->str; } void zjson_add_private(struct zjson *json, const char *key, const char *value, bool asStr, bool raw){ if (json->gs->len > 0 && json->gs->str[json->gs->len - 1] != json->type[0]) g_string_append(json->gs, ", "); if (key != NULL){ g_string_append(json->gs, "\""); zjson_concatEscaped(json, key); g_string_append(json->gs, "\":"); } if (asStr) g_string_append(json->gs, "\""); if (raw){ g_string_append(json->gs, value); }else{ zjson_concatEscaped(json, value); } if (asStr) g_string_append(json->gs, "\""); json->aa = json->gs->str; } void zjson_add_str(struct zjson *json, const char *key, const char *value){ zjson_add_private(json, key, value, true, false); } void zjson_add_c(struct zjson *json, const char *key, const char value){ char s[2]; s[0] = value; s[1] = '\0'; zjson_add_private(json, key, s, true, true); } void zjson_add_bool(struct zjson *json, const char *key, const bool value){ zjson_add_private(json, key, value ? "true" : "false", false, false); } void zjson_add_int(struct zjson *json, const char *key, const int value){ char s[30]; g_snprintf(s, sizeof(s), "%d", value); zjson_add_private(json, key, s, false, false); } void zjson_add_long(struct zjson *json, const char *key, const long value){ char s[30]; g_snprintf(s, sizeof(s), "%ld", value); zjson_add_private(json, key, s, false, false); } void zjson_add_epoch(struct zjson *json, const char *key, time_t value, unsigned int places){ char s[30]; g_snprintf(s, sizeof(s), "%0*lld", places, (long long)value); zjson_add_private(json, key, s, false, false); } #ifdef Z_UNIX_ANDROID void zjson_add_sql(struct zjson *json, const char *key, time_t value){ char s[30]; struct tm tm; gmtime_r(&value, &tm); strftime(s, sizeof(s), "%Y-%m-%dT%H:%M:%S+00", &tm); zjson_add_private(json, key, s, false, false); } #endif void zjson_add_float(struct zjson *json, const char *key, const float value, unsigned int places){ bool n = isnan(value); if (n){ return; } char s[30]; g_snprintf(s, sizeof(s), "%.*f", places, value); zjson_add_private(json, key, s, false, false); } void zjson_add_double(struct zjson *json, const char *key, const double value, unsigned int places){ bool n = isnan(value); if (n){ return; } char s[30]; g_snprintf(s, sizeof(s), "%.*f", places, value); zjson_add_private(json, key, s, false, false); } void zjson_add_json(struct zjson *json, const char *key, const struct zjson *src){ zjson_add_private(json, key, json->gs->str, false, true); } void zjson_add_mac(struct zjson *json, const char *key, const uint8_t *mac){ char s[20]; g_snprintf(s, sizeof(s), "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); zjson_add_private(json, key, s, true, false); } void zjson_addln(struct zjson *json){ g_string_append(json->gs, "\r\n"); json->aa = json->gs->str; } struct zjson *zjson_init(const char *src){ struct zjson *json = g_new0(struct zjson, 1); json->gs = g_string_new(""); zjson_begin(json, src); return json; } void zjson_begin(struct zjson *json, const char *src){ if (src == NULL) src = ""; g_string_assign(json->gs, src); zjson_init_parse(json); json->aa = json->gs->str; } void zjson_free(struct zjson *json){ g_string_free(json->gs, TRUE); g_free(json); } void zjson_init_parse(struct zjson *json){ json->c = json->gs->str; json->level = 0; } char *zjson_get1(struct zjson *json, bool escape){ if (*json->c == '\0') return false; GString *ret = g_string_new(""); while (*json->c == '\t' || *json->c == '\r' || *json->c == '\n' || *json->c == ' ') json->c++; bool isString = false, wasString = false; bool backslash = false; int j, u; char s[10]; for (; *json->c != '\0'; json->c++){ if (backslash){ backslash = 0; switch (*json->c){ case '\\': g_string_append(ret, "\\"); break; case 'n': g_string_append(ret, "\n"); break; case 'r': g_string_append(ret, "\r"); break; case 'b': g_string_append(ret, "\b"); break; case 'f': g_string_append(ret, "\f"); break; case 't': g_string_append(ret, "\t"); break; case '"': g_string_append(ret, "\""); break; case '/': g_string_append(ret, "\\"); break; case 'u': for (j = 0; j < 4; j++){ json->c++; if (*json->c == '\0') { g_string_free(ret, TRUE); return NULL; } s[j] = *json->c; } s[j] = '\0'; u = strtol(s, NULL, 16); if (u < 0x80) { g_string_append_c(ret, u); } else if (u < 0x800) { g_string_append_c(ret, 192 + u / 64); g_string_append_c(ret, 128 + u % 64); } else if (u - 0xd800u < 0x800) { g_string_free(ret, TRUE); return NULL; } else if (u < 0x10000) { g_string_append_c(ret, u / 4096); g_string_append_c(ret, 128 + u / 64 % 64); g_string_append_c(ret, 128 + u % 64); } else if (u < 0x110000) { g_string_append_c(ret, 240 + u / 262144); g_string_append_c(ret, 128 + u / 4096 % 64); g_string_append_c(ret, 128 + u / 64 % 64); g_string_append_c(ret, 128 + u % 64); } else { g_string_free(ret, TRUE); return NULL; } } }else{ if (*json->c == '\\' && escape){ backslash = 1; continue; } if (*json->c == '"'){ if (isString){ isString = false; if (escape){ if (json->level == 1) continue; } }else{ wasString = isString = escape || json->level == 1; if (json->level == 1) { if (escape){ g_string_assign(ret, ""); continue; } } } } if (!isString){ if (*json->c == ',') { if (json->level == 1){ json->c++; //printf("get1a1 '%s' wasString='%d'\n", ret.c_str(), wasString); if (!wasString) { zg_string_trim(ret); if (strcmp(ret->str, "null") == 0) g_string_assign(ret, ""); } wasString = false; //printf("get1a2 '%s'\n", ret.c_str()); char *ret2 = ret->str; g_string_free(ret, FALSE); return ret2; } } if (*json->c == ':') { if (json->level == 1){ json->c++; if (!wasString) { zg_string_trim(ret); } wasString = false; //printf("get1b '%s'\n", ret.c_str()); char *ret2 = ret->str; g_string_free(ret, FALSE); return ret2; } } if (*json->c == '{' || *json->c == '['){ json->level++; if (json->level == 1){ continue; } } if (*json->c == '}' || *json->c == ']') { json->level--; if (json->level == 1){ if (!wasString) zg_string_trim(ret); wasString = false; } if (json->level == 0){ if (!wasString) { zg_string_trim(ret); if (strcmp(ret->str, "null") == 0) g_string_assign(ret, ""); } //printf("get1c '%s'\n", ret.c_str()); char *ret2 = ret->str; g_string_free(ret, FALSE); return ret2; } } if (wasString && json->level == 1 && (*json->c == '\t' || *json->c == '\r' || *json->c == '\n' || *json->c == ' ')) continue; } g_string_append_c(ret, *json->c); } } g_string_free(ret, TRUE); return false; } char *zjson_get_private(struct zjson *json, const char *key, bool escape){ char *k = NULL, *v = NULL; if (key != NULL) zjson_init_parse(json); while(true){ if (key != NULL){ k = zjson_get1(json, true); if (!k) return NULL; } v = zjson_get1(json, escape); if (!v){ if (k) g_free(k); return NULL; } //printf("key=%s value=%s\n", k.ss, v.ss); if ((k != NULL && strcmp(k, key) == 0) || key == NULL){ if (k) g_free(k); return v; } g_free(k); k = NULL; g_free(v); v = NULL; } return NULL; } char *zjson_get_str(struct zjson *json, const char *key, const char *def){ char *ret = zjson_get_private(json, key, true); if (!ret){ return g_strdup(def); } return ret; } char zjson_get_c(struct zjson *json, const char *key, char def){ char *s = zjson_get_private(json, key, true); char ret = def; if (s != NULL){ ret = *s; g_free(s); } return ret; } bool zjson_get_bool(struct zjson *json, const char *key, bool def){ char *s = zjson_get_private(json, key, true); bool ret = def; if (s != NULL){ ret = strcmp(s, "true") == 0; g_free(s); } return ret; } int zjson_get_int(struct zjson *json, const char *key, int def){ char *s = zjson_get_private(json, key, true); int ret = def; if (s != NULL){ ret = atoi(s); g_free(s); } return ret; } long zjson_get_long(struct zjson *json, const char *key, long def){ char *s = zjson_get_private(json, key, true); long ret = def; if (s != NULL){ ret = atol(s); g_free(s); } return ret; } uint8_t *zjson_get_mac(struct zjson *json, const char *key, const uint8_t *def){ char *s = zjson_get_private(json, key, true); if (s == NULL){ return zg_memdup(def, 6); }else{ char *buf = g_strdup(s); uint8_t *mac = g_new0(uint8_t, 6); for (int i = 0; i < 6; i++){ char *c = strtok(i == 0 ? buf : NULL, ":-"); if (c == NULL) { g_free(s); g_free(buf); g_free(mac); return zg_memdup(def, 6); } long l = strtol(c, NULL, 16); mac[i] = (uint8_t)l; } g_free(s); g_free(buf); return mac; } } time_t zjson_get_epoch(struct zjson *json, const char *key, time_t def){ time_t ret = (time_t)zjson_get_long(json, key, (long)def); return ret; } /*#ifdef Z_UNIX_ANDROID time_t zjson_get_sql(struct zjson *json, const char *key, time_t def){ char *s = zjson_get_private(json, key, true); time_t ret = def; if (s != NULL){ struct tm tm; char *p = strptime(s, "%Y-%m-%dT%H:%M:%S", &tm); ret = timegm(&tm); g_free(s); } return ret; } #endif*/ float zjson_get_float(struct zjson *json, const char *key, float def){ char *s = zjson_get_private(json, key, true); float ret = def; if (s != NULL){ ret = (float)atof(s); g_free(s); } return ret; } double zjson_get_double(struct zjson *json, const char *key, double def){ char *s = zjson_get_private(json, key, true); double ret = def; if (s != NULL){ ret = atof(s); g_free(s); } return ret; } struct zjson *zjson_get_object(struct zjson *json, const char *key){ char *s = zjson_get_private(json, key, false); if (s == NULL){ return NULL; } struct zjson *ret = zjson_init(s); g_free(s); return ret; } struct zjson *zjson_get_array(struct zjson *json, const char *key){ struct zjson *ret = zjson_get_object(json, key); return ret; } int zjson_array_length(struct zjson *json){ int len = 0; while(true){ char *s = zjson_get_private(json, NULL, false); if (s == NULL) break; g_free(s); len++; } return len; } /////////////////////////////////////////////////////// void zjson_test(void){ char *key; char *val;// , *ok; struct zjson *r = zjson_init("{\"rowids\":[7192,7193]}"); struct zjson *rowids = zjson_get_array(r, "rowids"); dbg("rowids = %p", rowids); g_free(rowids); zjson_free(r); r = zjson_init("{\"song\":\"EJ, PADA, PADA, ROSENKA\"}"); key = "song"; val = zjson_get_str(r, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); zjson_free(r); struct zjson *u = zjson_init("{\"song\":\"VODOP\\u00c1D\"}"); key = "song"; val = zjson_get_str(u, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); zjson_free(u); /*struct zjson *b = zjson_init("{\"img\":\"https:\\/\\/is5-ssl.mzstatic.com\\/image\\/thumb\\/626x0w.jpg\"}"); key = "img"; ok = "https://is5-ssl.mzstatic.com/image/thumb/626x0w.jpg"; val = zjson_get_str(b, key, NULL); dbg("key='%s' val='%s'\n", key, val); assert(strcmp(val, ok) == 0); g_free(val); zjson_free(b);*/ struct zjson *s = zjson_init("{\"login\":{\"result\":\"NeedToken\",\"token\":\"b03a54f2c660eae532eaaab9a272973b\",\"cookieprefix\":\"wiki_krq\",\"sessionid\":\"99611b7e82e04d8a7e2542030d5f18a1\"},\"second\":\"secval\"}"); key = "login.result"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); key = "login.token"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); key = "login"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); key = "neni"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); key = "login.sessionid"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); key = "second"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); zjson_free(s); s = zjson_init("{\"query\":{\"pages\":{\"-1\":{\"ns\":0,\"title\":\"Main Page\",\"missing\":\"\",\"starttimestamp\":\"2014-07-15T06:21:10Z\",\"edittoken\":\"43cf06841bc074e7922cece1617f1504+\\\\\"}}}}"); key = "query.pages.-1.edittoken"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); zjson_free(s); s = zjson_init("{\"cmd\":\"cfg_set\",\"ch\":\"A\",\"dev\":\"\",\"key\":\"name\",\"val\":\"acko\"}"); key = "dev"; val = zjson_get_str(s, key, NULL); dbg("key='%s' val='%s'\n", key, val); g_free(val); zjson_free(s); } libzia-4.67/src/zpng.c0000644000175000017500000002550414662101505011564 00000000000000/* PNG functions Copyright (C) 2002-2020 Ladislav Vaiz and authors of tuxpaint http://www.newbreedsoftware.com/tuxpaint/ and authors of libsdl-image This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_SDL #include #endif #include #include #include #include #include #include #include #ifdef Z_HAVE_LIBPNG #include #endif #ifdef Z_MSC #pragma warning(disable : 4996) #define _CRT_SECURE_NO_WARNINGS #endif /*int zpng_do_save(struct SDL_Surface * surf, char * fname, struct zbinbuf **buf); int zpng_save(struct SDL_Surface * surf, char * fname){ return zpng_do_save(surf, fname, NULL); } int zpng_save_mem(struct SDL_Surface * surf, struct zbinbuf **bbuf){ return zpng_do_save(surf, NULL, bbuf); } */ #if defined(Z_HAVE_SDL) && defined(Z_HAVE_LIBPNG) static void zpng_write_data_fn(png_structp png_ptr, png_bytep data, png_size_t len){ struct zbinbuf *bbuf = (struct zbinbuf *)png_get_io_ptr(png_ptr); zbinbuf_append_bin(bbuf, data, len); } static void zpng_flush_data_fn(png_structp png_ptr){ //struct zbinbuf *bbuf = (struct zbinbuf *)png_get_io_ptr(png_ptr); } #endif int zpng_save(struct SDL_Surface *surf, char *fname, struct zbinbuf *zbb) { #if defined(Z_HAVE_SDL) && defined(Z_HAVE_LIBPNG) png_structp png_ptr; png_infop info_ptr; png_text text_ptr[4]; unsigned char ** png_rows; Uint8 r, g, b; int x, y, count; FILE *fi = NULL; dbg("zpng_save(%s)\n", fname); if (fname){ z_wokna(fname); fi=fopen(fname,"wb"); if (!fi){ return -1; } } png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) { if (fname) fclose(fi); png_destroy_write_struct(&png_ptr, (png_infopp) NULL); return -2; } info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { if (fname) fclose(fi); png_destroy_write_struct(&png_ptr, (png_infopp) NULL); return -3; } if (setjmp(png_jmpbuf(png_ptr))) { if (fname) fclose(fi); png_destroy_write_struct(&png_ptr, (png_infopp) NULL); return -4; } if (fname) png_init_io(png_ptr, fi); if (zbb) { png_set_write_fn(png_ptr, zbb, zpng_write_data_fn, zpng_flush_data_fn); } png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); /* Set headers */ count = 0; text_ptr[count].key = "Software"; text_ptr[count].text = Z_PACKAGE " " Z_VERSION; text_ptr[count].compression = PNG_TEXT_COMPRESSION_NONE; count++; png_set_text(png_ptr, info_ptr, text_ptr, count); png_write_info(png_ptr, info_ptr); /* Save the picture: */ png_rows = (unsigned char **)malloc(sizeof(char *) * surf->h); for (y = 0; y < surf->h; y++) { png_rows[y] = (unsigned char *)malloc(sizeof(char) * 3 * surf->w); for (x = 0; x < surf->w; x++) { SDL_GetRGB(z_getpixel(surf, x, y), surf->format, &r, &g, &b); png_rows[y][x * 3 + 0] = r; png_rows[y][x * 3 + 1] = g; png_rows[y][x * 3 + 2] = b; } } png_write_image(png_ptr, png_rows); for (y = 0; y < surf->h; y++) free(png_rows[y]); free(png_rows); png_write_end(png_ptr, NULL); png_destroy_write_struct(&png_ptr, &info_ptr); if (fname) fclose(fi); return 0; #else return -1; #endif } #define PNG_BYTES_TO_CHECK 4 #if defined(Z_HAVE_SDL) && defined(Z_HAVE_LIBPNG) /* Load a PNG type image from an SDL datasource */ static void png_read_data(png_structp ctx, png_bytep area, png_size_t size) { SDL_RWops *src; src = (SDL_RWops *)png_get_io_ptr(ctx); SDL_RWread(src, area, size, 1); } void zpng_error_fce(png_structp png, png_const_charp ch){ } static SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src) { SDL_Surface *volatile surface; png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height; int bit_depth, color_type, interlace_type; Uint32 Rmask; Uint32 Gmask; Uint32 Bmask; Uint32 Amask; SDL_Palette *palette; png_colorp png_palette; int png_num_palette; png_bytep *volatile row_pointers; int row, i; #ifdef SDL_SRCCOLORKEY volatile int ckey = -1; #endif png_color_16 *transv; if ( !src ) { /* The error message has been set in SDL_RWFromFile */ return NULL; } /* Initialize the data we will clean up when we're done */ png_ptr = NULL; info_ptr = NULL; row_pointers = NULL; surface = NULL; /* Create the PNG loading context structure */ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, zpng_error_fce, NULL); if (png_ptr == NULL){ error("Couldn't allocate memory for PNG file or incompatible PNG dll (%s)\n", PNG_LIBPNG_VER_STRING); goto done; } /* Allocate/initialize the memory for image information. REQUIRED. */ info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { error("Couldn't create image information for PNG file\n"); goto done; } /* Set error handling if you are using setjmp/longjmp method (this is * the normal method of doing things with libpng). REQUIRED unless you * set up your own error handlers in png_create_read_struct() earlier. */ if ( setjmp(png_jmpbuf(png_ptr)) ) { error("Error reading the PNG file.\n"); goto done; } /* Set up the input control */ png_set_read_fn(png_ptr, src, png_read_data); /* Read PNG header info */ png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); /* tell libpng to strip 16 bit/color files down to 8 bits/color */ png_set_strip_16(png_ptr) ; /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single * byte into separate bytes (useful for paletted and grayscale images). */ png_set_packing(png_ptr); /* scale greyscale values to the range 0..255 */ if(color_type == PNG_COLOR_TYPE_GRAY) png_set_expand(png_ptr); /* For images with a single "transparent colour", set colour key; if more than one index has transparency, or if partially transparent entries exist, use full alpha channel */ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { int num_trans; Uint8 *trans; png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &transv); if(color_type == PNG_COLOR_TYPE_PALETTE) { /* Check if all tRNS entries are opaque except one */ int i, t = -1; for(i = 0; i < num_trans; i++) if(trans[i] == 0) { if(t >= 0) break; t = i; } else if(trans[i] != 255) break; if(i == num_trans) { /* exactly one transparent index */ #ifdef SDL_SRCCOLORKEY ckey = t; #endif } else { /* more than one transparent index, or translucency */ png_set_expand(png_ptr); } } else{ #ifdef SDL_SRCCOLORKEY ckey = 0; /* actual value will be set later */ #endif } } if ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) png_set_gray_to_rgb(png_ptr); png_read_update_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); /* Allocate the SDL surface to hold the image */ Rmask = Gmask = Bmask = Amask = 0 ; if ( color_type != PNG_COLOR_TYPE_PALETTE ) { if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) { Rmask = 0x000000FF; Gmask = 0x0000FF00; Bmask = 0x00FF0000; Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; //Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; } else { //int s = (info_ptr->channels == 4) ? 0 : 8; int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; Rmask = 0xFF000000 >> s; Gmask = 0x00FF0000 >> s; Bmask = 0x0000FF00 >> s; Amask = 0x000000FF >> s; } } surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, //bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); if ( surface == NULL ) { error("Out of memory\n"); goto done; } #ifdef SDL_SRCCOLORKEY // on my adroid SDL is not present if(ckey != -1) { if(color_type != PNG_COLOR_TYPE_PALETTE) /* FIXME: Should these be truncated or shifted down? */ ckey = SDL_MapRGB(surface->format, (Uint8)transv->red, (Uint8)transv->green, (Uint8)transv->blue); SDL_SetColorKey(surface, SDL_SRCCOLORKEY, ckey); } #endif /* Create the array of pointers to image data */ row_pointers = (png_bytep*) malloc(sizeof(png_bytep)*height); if (row_pointers == NULL) { error("Out of memory\n"); SDL_FreeSurface(surface); surface = NULL; goto done; } for (row = 0; row < (int)height; row++) { row_pointers[row] = (png_bytep) (Uint8 *)surface->pixels + row*surface->pitch; } /* Read the entire image in one go */ png_read_image(png_ptr, row_pointers); /* and we're done! (png_read_end() can be omitted if no processing of * post-IDAT text/time/etc. is desired) * In some cases it can't read PNG's created by some popular programs (ACDSEE), * we do not want to process comments, so we omit png_read_end png_read_end(png_ptr, info_ptr); */ /* Load the palette, if any */ png_get_PLTE(png_ptr, info_ptr, &png_palette, &png_num_palette); palette = surface->format->palette; if ( palette ) { if(color_type == PNG_COLOR_TYPE_GRAY) { palette->ncolors = 256; for(i = 0; i < 256; i++) { palette->colors[i].r = i; palette->colors[i].g = i; palette->colors[i].b = i; } }else if (png_num_palette > 0 ) { palette->ncolors = png_num_palette; for( i=0; icolors[i].b = png_palette[i].blue; palette->colors[i].g = png_palette[i].green; palette->colors[i].r = png_palette[i].red; } } } done: /* Clean up and return */ png_destroy_read_struct(&png_ptr, info_ptr ? &info_ptr : (png_infopp)0, (png_infopp)0); if ( row_pointers ) { free(row_pointers); } return(surface); } SDL_Surface *zpng_load(const char *filename){ SDL_RWops *src; SDL_Surface *surface; char *f2; f2 = g_strdup(filename); z_wokna(f2); src=SDL_RWFromFile(f2, "rb"); if (!src){ g_free(f2); return NULL; } surface=IMG_LoadPNG_RW(src); SDL_RWclose(src); g_free(f2); return surface; } SDL_Surface *zpng_create(const void *data, int len){ SDL_RWops *src; SDL_Surface *surface; if (len < 67) return NULL; // https://garethrees.org/2007/11/14/pngcrush/ src=SDL_RWFromConstMem(data, len); surface=IMG_LoadPNG_RW(src); SDL_RWclose(src); return surface; } #endif #ifdef Z_HAVE_LIBPNG void zpng_get_version(GString *gs){ g_string_append_printf(gs, "%d.%d.%d", PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE); } #endif libzia-4.67/src/zselect.c0000644000175000017500000006133214662101505012256 00000000000000/* select.c - main application loop Copyright (C) 2002-2022 Ladislav Vaiz and authors of web browser Links 0.96 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #define _USE_MATH_DEFINES // for MSVC #include #include #include #ifdef Z_HAVE_SYS_SELECT_H #include #endif #ifdef Z_HAVE_SYS_TIME_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #include #ifdef Z_MSC #include #endif struct timeval start; struct zselect_fd { int sock; void (*read_func)(void *); char *read_fname; void (*write_func)(void *); char *write_fname; void (*error_func)(void *); char *error_fname; void *arg; #ifdef Z_LEAK_DEBUG_LIST char *file; int line; char *read_fname; char *write_fname; char *error_fname; #endif }; struct ztimer { struct ztimer *next; struct ztimer *prev; ztime interval; void (*func)(void *); void *arg; int id; //#ifdef Z_LEAK_DEBUG_LIST char *fname; //#endif }; struct bottom_half { struct bottom_half *next; struct bottom_half *prev; void (*fn)(void *); void *arg; }; struct zselect{ int terminate; #ifdef Z_MSC_MINGW GPtrArray *fds3; #else struct zselect_fd fds2[FD_SETSIZE]; #endif struct ztimer timers; struct bottom_half bottom_halves; MUTEX_DEFINE(fdsets); fd_set w_read; fd_set w_write; fd_set w_error; // end of mutex protected data int w_max; int timer_id; ztime last_time; void (*redraw)(void); int msgpipe[2]; GString *msg_recv; void (*msg_handler)(struct zselect *, int, char **); int profile; double limit; char hint[100]; int select_running; // run from thread }; #ifdef Z_UNIX_ANDROID #define NUM_SIGNALS 32 struct signal_handler { void (*fn)(void *, siginfo_t *, void *); void *arg; int critical; }; int signal_mask[NUM_SIGNALS]; struct signal_handler signal_handlers[NUM_SIGNALS]; int signal_init = 0; #endif static void zselect_msg_read_handler(void *); struct zselect *zselect_init(void (*redraw)(void)){ struct zselect *zsel = g_new0(struct zselect, 1); init_list(zsel->timers); init_list(zsel->bottom_halves); zsel->timer_id = 1; MUTEX_INIT(zsel->fdsets); FD_ZERO(&zsel->w_read); FD_ZERO(&zsel->w_write); FD_ZERO(&zsel->w_error); zsel->w_max = 0; zsel->last_time = zselect_time(); //#ifdef Z_HAVE_SIGNAL_H //under mingw is signal.h without SIGPIPE #ifdef Z_UNIX signal(SIGPIPE, SIG_IGN); #endif #ifdef Z_MSC_MINGW zsel->fds3 = g_ptr_array_new(); #endif zselect_signal_init(); zsel->redraw = redraw; if (z_pipe(zsel->msgpipe)) zinternal("zselect_init: can't create msg pipe"); zselect_set(zsel, zsel->msgpipe[0], zselect_msg_read_handler, NULL, NULL, zsel); zsel->msg_recv = g_string_sized_new(100); return zsel; } void zselect_free(struct zselect *zsel){ zselect_set(zsel, zsel->msgpipe[0], NULL, NULL, NULL, zsel); MUTEX_FREE(zsel->fdsets); z_pipe_close(zsel->msgpipe[0]); z_pipe_close(zsel->msgpipe[1]); g_string_free(zsel->msg_recv, TRUE); } static struct zselect_fd *get_fd(struct zselect *zsel, int sock){ struct zselect_fd *zfd; #ifdef Z_MSC_MINGW int i; for (i = 0; i < (int)zsel->fds3->len; i++){ zfd = (struct zselect_fd *)g_ptr_array_index(zsel->fds3, i); if (zfd->sock == sock) return zfd; } zfd = g_new0(struct zselect_fd, 1); zfd->sock = sock; g_ptr_array_add(zsel->fds3, zfd); return zfd; //zinternal("get_fd: socket %d not found", sock); #else if (sock < 0 || sock >= FD_SETSIZE){ zinternal("get_fd: handle %d out of bounds", sock); } zfd = zsel->fds2 + sock; zfd->sock = sock; return zfd; #endif } static struct zselect_fd *get_fd_index(struct zselect *zsel, int i){ #ifdef Z_MSC_MINGW return (struct zselect_fd *)g_ptr_array_index(zsel->fds3, i); #else return zsel->fds2 + i; #endif } ztime zselect_time(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * 1000 + tv.tv_usec / 1000; } int zselect_bh_new(struct zselect *zsel, void (*fn)(void *), void *arg) { struct bottom_half *bh; foreach(bh, zsel->bottom_halves) if (bh->fn == fn && bh->arg == arg) return 0; if (!(bh = (struct bottom_half *)g_malloc(sizeof(struct bottom_half)))) return -1; /*dbg("register_bottom_half(0x%x,0x%x)=0x%x\n", fn, arg, bh);*/ bh->fn = fn; bh->arg = arg; add_to_list(zsel->bottom_halves, bh); return 0; } void zselect_bh_check(struct zselect *zsel) { struct bottom_half *bh; void (*fn)(void *); void *arg; rep:; if (list_empty(zsel->bottom_halves)) return; bh = zsel->bottom_halves.prev; fn = bh->fn; arg = bh->arg; del_from_list(bh); g_free(bh); fn(arg); goto rep; } #define CHK_BH if (!list_empty(zsel->bottom_halves)) zselect_bh_check(zsel); static void zselect_timers_check(struct zselect *zsel) { struct ztimer *t; int timer_count = 0; ztime interval = zselect_time() - zsel->last_time; foreach(t, zsel->timers) { t->interval -= interval; timer_count++; } ch: foreach(t, zsel->timers){ if (t->interval <= 0) { struct ztimer *tt = t; del_from_list(tt); #ifdef Z_LEAK_DEBUG_LIST //dbg("---%s\n", tt->fname); #endif if (zsel->profile) gettimeofday(&start, NULL); //dbg("%s\n", tt->fname); tt->func(tt->arg); if (zsel->profile) zselect_handle_profile(zsel, &start, tt->func, tt->fname); g_free(tt); CHK_BH; if (timer_count-- == 0) break; goto ch; }else{ break; } } zsel->last_time += interval; } #ifdef Z_LEAK_DEBUG_LIST int debug_install_timer(char *file, int line, ztime t, void (*func)(void *), void *arg, char *fname) #else //int zselect_timer_new(struct zselect *zsel, ztime t, void (*func)(void *), void *arg) int zselect_timer_new_dbg(struct zselect *zsel, ztime t, void (*func)(void *), char *fname, void *arg) #endif { struct ztimer *tm, *tt; #ifdef Z_LEAK_DEBUG_LIST tm = debug_g_malloc(file, line, sizeof(struct ztimer)); tm->fname = fname; #else tm = g_new(struct ztimer, 1); #endif tm->interval = t; tm->func = func; tm->fname = fname; tm->arg = arg; tm->id = zsel->timer_id++; #if 0 dbg("before:\n"); foreach(tt, timers){ dbg(" id=%d inter=%d fce=%p\n",tt->id, tt->interval, tt->func); } #endif foreach(tt, zsel->timers) if (tt->interval >= t) break; add_at_pos(tt->prev, tm); /*if (t != 50){ dbg("__installed ztimer %d %p t=%d\n",tm->id, func,t ); } */ #if 0 dbg("after:\n"); foreach(tt, timers){ dbg(" id=%d inter=%d fce=%p\n",tt->id, tt->interval, tt->func); } dbg("\n"); #endif return tm->id; } int zselect_timer_new_at(struct zselect *zsel, struct timeval *at, void (*func)(void *), void *arg) { struct ztimer *tm, *tt; #ifdef Z_LEAK_DEBUG_LIST tm = debug_g_malloc(file, line, sizeof(struct ztimer)); tm->fname = fname; #else tm = g_new(struct ztimer, 1); #endif struct timeval now; gettimeofday(&now, NULL); double d = z_difftimeval_double(at, &now); ztime t = (ztime)round(d*1000.0); tm->interval = t; tm->func = func; //tm->fname = fname; tm->arg = arg; tm->id = zsel->timer_id++; #if 0 dbg("before:\n"); foreach(tt, timers){ dbg(" id=%d inter=%d fce=%p\n",tt->id, tt->interval, tt->func); } #endif foreach(tt, zsel->timers) if (tt->interval >= t) break; add_at_pos(tt->prev, tm); /*if (t != 50){ dbg("__installed ztimer %d %p t=%d\n",tm->id, func,t ); } */ #if 0 dbg("after:\n"); foreach(tt, timers){ dbg(" id=%d inter=%d fce=%p\n",tt->id, tt->interval, tt->func); } dbg("\n"); #endif return tm->id; } #ifdef Z_LEAK_DEBUG_LIST void debug_kill_timer(char *file, int line, int id) #else void zselect_timer_kill(struct zselect *zsel, int id) #endif { struct ztimer *tm; int k = 0; //dbg("__kill_timer(%d)\n", id); foreach(tm, zsel->timers) { if (tm->id == id) { struct ztimer *tt = tm; del_from_list(tm); tm = tm->prev; #ifdef Z_LEAK_DEBUG_LIST debug_g_free(file, line, tt); #else g_free(tt); #endif k++; } } if (!k) zinternal("trying to kill nonexisting ztimer id=%d", id); if (k >= 2) zinternal("more timers with same id=%d", id); } ztime zselect_timer_get(struct zselect *zsel, int id) { struct ztimer *tm; foreach(tm, zsel->timers){ if (tm->id == id) { return tm->interval; } } return -1; } void *zselect_get(struct zselect *zsel, int sock, int typ) { struct zselect_fd *zfd = get_fd(zsel, sock); switch (typ) { case H_READ: return zfd->read_func; case H_WRITE: return zfd->write_func; case H_ERROR: return zfd->error_func; case H_DATA: return zfd->arg; } zinternal("get_handler: bad type %d for socket %d", typ, sock); return NULL; } #ifdef Z_LEAK_DEBUG_LIST void debug_set_handlers(char *file, int line, int fd, void (*read_func)(void *), void (*write_func)(void *), void (*error_func)(void *), void *arg, char *read_fname, char *write_fname, char *error_fname) #else //void zselect_set(struct zselect *zsel, int fd, void (*read_func)(void *), void (*write_func)(void *), void (*error_func)(void *), void *arg) void zselect_set_dbg(struct zselect *zsel, int fd, void (*read_func)(void *), char *read_fname, void (*write_func)(void *), char *write_fname, void (*error_func)(void *), char *error_fname, void *arg) #endif { struct zselect_fd *zfd = get_fd(zsel, fd); /*dbg("set_handlers(%d,%p,%p,%p,%p)\n",fd,read_func,write_func,error_func,arg);*/ //if (fd!=0) sock_debug(fd, "set_handlers %p,%p,%p %p",read_func,write_func,error_func,arg); zfd->read_func = read_func; zfd->read_fname = read_fname; zfd->write_func = write_func; zfd->write_fname = write_fname; zfd->error_func = error_func; zfd->error_fname = error_fname; zfd->arg = arg; MUTEX_LOCK(zsel->fdsets); if (read_func) FD_SET(fd, &zsel->w_read); else FD_CLR(fd, &zsel->w_read); if (write_func) FD_SET(fd, &zsel->w_write); else FD_CLR(fd, &zsel->w_write); if (error_func) FD_SET(fd, &zsel->w_error); else FD_CLR(fd, &zsel->w_error); MUTEX_UNLOCK(zsel->fdsets); #ifdef Z_MSC_MINGW if (!read_func && !write_func && !error_func){ g_ptr_array_remove_fast(zsel->fds3, zfd); } zsel->w_max = zsel->fds3->len; #else if (read_func || write_func || error_func) { if (fd >= zsel->w_max) zsel->w_max = fd + 1; } else if (fd == zsel->w_max - 1) { int i; for (i = fd - 1; i >= 0; i--) if (FD_ISSET(i, &zsel->w_read) || FD_ISSET(i, &zsel->w_write) || FD_ISSET(i, &zsel->w_error)) break; zsel->w_max = i + 1; } #endif #ifdef Z_LEAK_DEBUG_LIST zsel->fds[fd].file=file; zsel->fds[fd].line=line; zsel->fds[fd].read_fname = read_fname; zsel->fds[fd].write_fname = write_fname; zsel->fds[fd].error_fname = error_fname; #endif } void zselect_set_read(struct zselect *zsel, int fd, void (*read_func)(void *), void *arg){ struct zselect_fd *zfd = get_fd(zsel, fd); zfd->read_func = read_func; zfd->arg = arg; MUTEX_LOCK(zsel->fdsets); if (read_func) FD_SET(fd, &zsel->w_read); else FD_CLR(fd, &zsel->w_read); MUTEX_UNLOCK(zsel->fdsets); #ifdef Z_MSC_MINGW if (!read_func && !zfd->write_func && !zfd->error_func){ g_ptr_array_remove_fast(zsel->fds3, zfd); } zsel->w_max = zsel->fds3->len; #else if (read_func || zfd->write_func || zfd->error_func) { if (fd >= zsel->w_max) zsel->w_max = fd + 1; } else if (fd == zsel->w_max - 1) { int i; for (i = fd - 1; i >= 0; i--) if (FD_ISSET(i, &zsel->w_read) || FD_ISSET(i, &zsel->w_write) || FD_ISSET(i, &zsel->w_error)) break; zsel->w_max = i + 1; } #endif } void zselect_set_write(struct zselect *zsel, int fd, void (*write_func)(void *), void *arg){ struct zselect_fd *zfd = get_fd(zsel, fd); zfd->write_func = write_func; zfd->arg = arg; MUTEX_LOCK(zsel->fdsets); if (write_func) FD_SET(fd, &zsel->w_write); else FD_CLR(fd, &zsel->w_write); if (zsel->select_running) zselect_msg_send_raw(zsel, "\n"); MUTEX_UNLOCK(zsel->fdsets); #ifdef Z_MSC_MINGW if (!zfd->read_func && !write_func && !zfd->error_func){ g_ptr_array_remove_fast(zsel->fds3, zfd); } zsel->w_max = zsel->fds3->len; #else if (zfd->read_func || write_func || zfd->error_func) { if (fd >= zsel->w_max) zsel->w_max = fd + 1; } else if (fd == zsel->w_max - 1) { int i; for (i = fd - 1; i >= 0; i--) if (FD_ISSET(i, &zsel->w_read) || FD_ISSET(i, &zsel->w_write) || FD_ISSET(i, &zsel->w_error)) break; zsel->w_max = i + 1; } #endif } int critical_section = 0; void check_for_select_race(void); #ifdef Z_UNIX_ANDROID void got_signal(int sig, siginfo_t *siginfo, void *ctx) { dbg("got_signal(%d, %p, %p)\n", sig, siginfo, ctx); if (sig >= NUM_SIGNALS || sig < 0) { error("ERROR: bad signal number: %d", sig); return; } /* for debugging of unknown error */ /*if (sig == 11) { sig_segv(NULL); return; } */ //dbg(" handler[%d] = %p, critical = %d\n", sig, signal_handlers[sig].fn, signal_handlers[sig].critical); if (!signal_handlers[sig].fn) return; if (signal_handlers[sig].critical) { signal_handlers[sig].fn(signal_handlers[sig].arg, siginfo, ctx); return; } signal_mask[sig] = 1; check_for_select_race(); } void zselect_signal_set(int sig, void (*fn)(void *, siginfo_t *, void *ctx), void *arg, int critical) { //#ifdef Z_HAVE_SIGNAL_H //under mingw is signal.h without SIGPIPE struct sigaction sa; dbg("zselect_signal_set(%d, %p, %p, %d)\n", sig, fn, arg, critical); if (sig >= NUM_SIGNALS || sig < 0) { zinternal("bad signal number: %d", sig); return; } memset(&sa, 0, sizeof sa); if (!fn) { sa.sa_handler = SIG_IGN; }else{ sa.sa_sigaction = got_signal; sa.sa_flags |= SA_SIGINFO; } sigfillset(&sa.sa_mask); /*sa.sa_flags = SA_RESTART;*/ if (!fn) sigaction(sig, &sa, NULL); signal_handlers[sig].fn = fn; signal_handlers[sig].arg = arg; signal_handlers[sig].critical = critical; if (fn) sigaction(sig, &sa, NULL); } #endif int pending_alarm = 0; #ifdef Z_UNIX_ANDROID void alarm_handler(void *arg, siginfo_t *siginfo, void *ctx) { pending_alarm = 0; check_for_select_race(); } #endif void check_for_select_race(void) { if (critical_section) { #ifdef SIGALRM zselect_signal_set(SIGALRM, alarm_handler, NULL, 1); #endif pending_alarm = 1; #ifdef Z_HAVE_ALARM /*alarm(1);*/ #endif } } void uninstall_alarm(void) { pending_alarm = 0; #ifdef Z_HAVE_ALARM alarm(0); #endif } #ifdef Z_UNIX static int check_signals(struct zselect *zsel) { int i, r = 0; for (i = 0; i < NUM_SIGNALS; i++) if (signal_mask[i]) { signal_mask[i] = 0; if (signal_handlers[i].fn) signal_handlers[i].fn(signal_handlers[i].arg, NULL, NULL); CHK_BH; r = 1; } return r; } #endif void zselect_loop(struct zselect *zsel) { int err; fd_set x_read; fd_set x_write; fd_set x_error; CHK_BH; while (!zsel->terminate) { int n, i; struct timeval tv; struct timeval *tm = NULL; #ifdef Z_UNIX check_signals(zsel); #endif zselect_timers_check(zsel); if (zsel->redraw) { if (zsel->profile) gettimeofday(&start, NULL); //dbg("redraw\n"); zsel->redraw(); if (zsel->profile) zselect_handle_profile(zsel, &start, NULL, "redraw"); } if (!list_empty(zsel->timers)) { ztime tt = zsel->timers.next->interval + 1; if (tt < 0) tt = 0; tv.tv_sec = tt / 1000; tv.tv_usec = (tt % 1000) * 1000; tm = &tv; } MUTEX_LOCK(zsel->fdsets); memcpy(&x_read, &zsel->w_read, sizeof(fd_set)); memcpy(&x_write, &zsel->w_write, sizeof(fd_set)); memcpy(&x_error, &zsel->w_error, sizeof(fd_set)); MUTEX_UNLOCK(zsel->fdsets); if (zsel->terminate) break; if (!zsel->w_max && list_empty(zsel->timers)) break; #ifdef Z_UNIX critical_section = 1; if (check_signals(zsel)) { critical_section = 0; continue; } #endif /* { int i; printf("\nR:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_read)) printf("%d,", i); printf("\nW:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_write)) printf("%d,", i); printf("\nE:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_error)) printf("%d,", i); fflush(stdout); }*/ CHK_BH; #if 0 if (tm) dbg("SELECT: tm=%d.%06d\n", tm->tv_sec, tm->tv_usec); else dbg("SELECT: no timers-----------------\n"); #endif #if 0 struct ztimer *tt; foreach(tt, timers){ dbg(" id=%d inter=%d fce=%p\n",tt->id, tt->interval, tt->func); } dbg("\n"); #endif /* ST_STOP; sound(0); */ MUTEX_LOCK(zsel->fdsets); zsel->select_running = 1; MUTEX_UNLOCK(zsel->fdsets); n = select(zsel->w_max, &x_read, &x_write, &x_error, tm); MUTEX_LOCK(zsel->fdsets); zsel->select_running = 0; MUTEX_UNLOCK(zsel->fdsets); /* sound(800); ST_START; */ if (n < 0) { err = z_sock_errno; critical_section = 0; uninstall_alarm(); if (err != EINTR) { int i; fd_set x, used; struct timeval tv; GString *gs = g_string_sized_new(1024); g_string_append_printf(gs, "ERROR: select failed: %d", err); FD_ZERO(&used); g_string_append(gs, "\nR:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_read)) { g_string_append_printf(gs, "%d,", i); FD_SET(i, &used); } g_string_append(gs, "\nW:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_write)) { g_string_append_printf(gs, "%d,", i); FD_SET(i, &used); } g_string_append(gs, "\nE:"); for (i = 0; i < 256; i++) if (FD_ISSET(i, &x_error)) { g_string_append_printf(gs, "%d,", i); FD_SET(i, &used); } for (i = 0; i < 256; i++) { if (!FD_ISSET(i, &used)) continue; FD_ZERO(&x); FD_SET(i, &x); tv.tv_sec=0; tv.tv_usec=1; if (select(i+1, &x, NULL, NULL, &tv)<0 && errno==EBADF) #ifdef Z_LEAK_DEBUG_LIST g_string_append_printf(gs, "\nfd %d failed(err=%d) at %s:%d\n", i, errno, zsel->fds[i].file, zsel->fds[i].line); #else g_string_append_printf(gs, "\nfd %d failed(err=%d)\n ", i, errno); #endif } zinternal("%s", gs->str); g_string_free(gs, TRUE); } continue; } critical_section = 0; uninstall_alarm(); #ifdef Z_UNIX check_signals(zsel); #endif /* printf("sel: %d\n", n);*/ /* dbg(".\n");*/ zselect_timers_check(zsel); /*dbg("R:"); for (i = 0; i < 32; i++) if (FD_ISSET(i, &x_read)) {dbg("%d,", i); } dbg(" W:"); for (i = 0; i < 32; i++) if (FD_ISSET(i, &x_write)) {dbg("%d,", i); } dbg(" E:"); for (i = 0; i < 32; i++) if (FD_ISSET(i, &x_error)) {dbg("%d,", i); } dbg("\n");*/ i = -1; while (n > 0 && ++i < zsel->w_max) { int k = 0; struct zselect_fd *zfd = get_fd_index(zsel, i); if (FD_ISSET(zfd->sock, &x_read)) { if (zfd->read_func) { if (zsel->profile) gettimeofday(&start, NULL); //dbg("%s\n", zfd->read_fname); zfd->read_func(zfd->arg); if (zsel->profile) zselect_handle_profile(zsel, &start, zfd->read_func, zfd->read_fname); CHK_BH; } k = 1; } if (FD_ISSET(zfd->sock, &x_write)) { if (zfd->write_func) { if (zsel->profile) gettimeofday(&start, NULL); //dbg("%s\n", zfd->write_fname); zfd->write_func(zfd->arg); if (zsel->profile) zselect_handle_profile(zsel, &start, zfd->write_func, zfd->write_fname); CHK_BH; } k = 1; } if (FD_ISSET(zfd->sock, &x_error)) { if (zfd->error_func) { if (zsel->profile) gettimeofday(&start, NULL); //dbg("%s\n", zfd->error_fname); zfd->error_func(zfd->arg); if (zsel->profile) zselect_handle_profile(zsel, &start, zfd->error_func, zfd->error_fname); CHK_BH; } k = 1; } n -= k; } } } void zselect_terminate(struct zselect *zsel){ zsel->terminate = 1; } int zselect_terminating(struct zselect *zsel){ return zsel->terminate; } int zselect_msg_send(struct zselect *zsel, char *fmt, ...){ va_list l; int ret; GString *gs; gs = g_string_sized_new(256); va_start(l, fmt); ret = zg_string_veprintfa("e", gs, fmt, l); g_string_append(gs, "\n"); va_end(l); zselect_msg_send_raw(zsel, gs->str); g_string_free(gs, TRUE); return ret; } int zselect_msg_send_raw(struct zselect *zsel, char *buf){ int ret, len; len = strlen(buf); ret = z_pipe_write(zsel->msgpipe[1], buf, len); if (ret < 0) zinternal("zselect_msg_send_raw: can't write to msg pipe, error %d", z_sock_errno); if (ret != len) zinternal("zselect_msg_send_raw: written only %d/%d bytes", ret, len); return ret; } int zselect_msg_set(struct zselect *zsel, void (*handler)(struct zselect *, int n, char **items)){ zsel->msg_handler = handler; return 0; } static void zselect_msg_read_handler(void *xxx){ int ret; char buf[1025], *lf, *line; struct zselect *zsel = (struct zselect*)xxx; //struct zsel *sel = (struct zsel*)xxx; ret = z_pipe_read(zsel->msgpipe[0], buf, sizeof(buf)-1); if (ret <= 0) zinternal("zselect_msg_read_handler: can't read from msg pipe, error %d", z_sock_errno); buf[ret] = '\0'; g_string_append(zsel->msg_recv, buf); while(1){ lf = strchr(zsel->msg_recv->str, '\n'); if (!lf) break; line = g_strndup(zsel->msg_recv->str, lf - zsel->msg_recv->str + 1); line[lf - zsel->msg_recv->str] = '\0'; g_string_erase(zsel->msg_recv, 0, lf - zsel->msg_recv->str + 1); if (strlen(line) > 0){ char **items; int i, tokenpos = 0; int n = z_tokens(line); items = g_new0(char *, n + 1); for (i = 0; i < n; i++) { items[i] = g_strdup(z_tokenize(line, &tokenpos)); } if (zsel->msg_handler) zsel->msg_handler(zsel, n, items); for (i = 0; i < n; i++){ g_free(items[i]); } g_free(items); } g_free(line); } } void zselect_start_profile(struct zselect *zsel, double limit){ zsel->profile = 1; zsel->limit = limit; } void zselect_hint(struct zselect *zsel, const char *fmt, ...){ va_list ap; va_start(ap, fmt); g_vsnprintf(zsel->hint, 100, fmt, ap); va_end(ap); } void zselect_handle_profile(struct zselect *zsel, struct timeval *start, void *fce, char *fname){ struct timeval stop; double d; gettimeofday(&stop, NULL); d = z_difftimeval_double(&stop, start); if (d > zsel->limit) { if (fname) dbg("%6.3f: %s %s \n", d, fname, zsel->hint); else dbg("%5.3f: %p %s \n", d, fce, zsel->hint); } *zsel->hint = '\0'; } int zselect_profiling(struct zselect *zsel){ return zsel->profile; } void zselect_abort_exception(void *arg){ zinternal("Socket exception handler called"); } #ifdef Z_UNIX_ANDROID void zselect_sigterm(void *arg, siginfo_t *siginfo, void *ctx) { struct zselect *zsel = (struct zselect *)arg; zselect_terminate(zsel); } #endif void zselect_signal_init(){ #ifdef Z_UNIX if (!signal_init){ signal_init = 1; memset(signal_mask, 0, sizeof signal_mask); memset(signal_handlers, 0, sizeof signal_handlers); } #endif } libzia-4.67/src/zdir.c0000644000175000017500000001732414662101505011557 00000000000000/* zdir.c - directory functions Copyright (C) 2002-2011 Ladislav Vaiz and authors of glibc as seen bellow This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ /* Copyright (C) 1992-1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include #include #include #include #include #ifdef Z_MSC_MINGW #define __builtin_expect(expression, value) (expression) #pragma warning(disable : 4996) #define _CRT_SECURE_NO_WARNINGS #endif //#include //#include #include #include #include #include #ifdef Z_HAVE_DIRECT_H #include #endif #ifndef Z_HAVE_DIRENT_H DIR *opendir(char *name){ size_t base_length; char *all; DIR *dir = 0; if(!name || !*name) { errno = EINVAL; return NULL; } base_length = strlen(name); /* search pattern must end with suitable wildcard */ all = strchr("/\\", name[base_length - 1]) ? "*" : "/*"; if((dir = (DIR *) malloc(sizeof *dir)) != 0 && (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0) { strcat(strcpy(dir->name, name), all); if((dir->handle = (long) _findfirst(dir->name, &dir->info)) != -1) { dir->result.d_name[0] = '\0'; } else /* rollback */ { free(dir->name); free(dir); dir = 0; } } else /* rollback */ { free(dir); dir = 0; errno = ENOMEM; } return dir; } struct dirent *readdir(DIR *dir){ struct dirent *result = 0; if(dir && dir->handle != -1) { if(!dir->result.d_name[0] != '\0' || _findnext(dir->handle, &dir->info) != -1) { result = &dir->result; z_strlcpy(result->d_name, dir->info.name, Z_MAX_PATH); } errno = 0; } else { errno = EBADF; } return result; } int closedir(DIR *dir){ int result = -1; if(dir) { if(dir->handle != -1) { result = _findclose(dir->handle); } free(dir->name); free(dir); } if(result == -1) /* map all errors to EBADF */ { errno = EBADF; } return result; } #endif #ifndef _D_ALLOC_NAMLEN #define _D_ALLOC_NAMLEN(d) (sizeof((d)->d_name)+1) #endif int z_scandir (char *dir, struct dirent ***namelist, int (*select) (const char *dir, const struct dirent *), int (*cmp) (const void *, const void *)) { DIR *dp; struct dirent **v;// = NULL; size_t vsize = 0, i; struct dirent *d; int save; v = NULL; z_wokna(dir); dp = opendir(dir); if (dp == NULL) return -1; save = errno; errno = 0; i = 0; while (1){ struct dirent *vnew; size_t dsize; d = readdir(dp); if (!d) break; if (select != NULL && (*select)(dir, d) == 0) continue; /* Ignore errors from select or readdir */ errno = 0; if (__builtin_expect (i == vsize, 0)){ struct dirent **new_; if (vsize == 0) vsize = 10; else vsize *= 2; new_ = (struct dirent **) realloc (v, vsize * sizeof (*v)); if (new_ == NULL) break; v = new_; } dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d; vnew = (struct dirent *) malloc (dsize); if (vnew == NULL) break; v[i++] = (struct dirent *) memcpy (vnew, d, dsize); } if (__builtin_expect (errno, 0) != 0) { save = errno; while (i > 0) free (v[--i]); free (v); i = -1; } else { /* Sort the list if we have a comparison function to sort with. */ if (cmp != NULL) qsort (v, i, sizeof (*v), cmp); *namelist = v; } closedir (dp); errno = save; return i; } void z_free_namelist(struct dirent ***namelist, int *namelistlen){ int i; for (i = 0; i < *namelistlen; i++) free((*namelist)[i]); free(*namelist); *namelist = NULL; *namelistlen = 0; } int z_select_dir_func(const char *base, const struct dirent *de){ struct stat st; char *full; if (strcmp(de->d_name, ".") == 0) return 0; if (strcmp(de->d_name, "..") == 0) return 0; if (strcmp(de->d_name, ".svn") == 0) return 0; full = g_strconcat(base, "/", de->d_name, NULL); z_wokna(full); if (stat(full, &st)) { g_free(full); return 0; } g_free(full); if (!S_ISDIR(st.st_mode)) return 0; return 1; } int z_select_file_func(const char *base, const struct dirent *de){ struct stat st; char *full = g_strconcat(base, "/", de->d_name, NULL); z_wokna(full); if (stat(full, &st)) { g_free(full); return 0; } g_free(full); if (!S_ISREG(st.st_mode)) return 0; return 1; } int z_compare_name_func(const void *d1, const void *d2){ const struct dirent **pde1, **pde2; pde1=(const struct dirent **)d1; pde2=(const struct dirent **)d2; return strcmp( (*pde1)->d_name, (*pde2)->d_name); } int z_scandir_alphasort(const void *a, const void *b) { return strcoll ((*(const struct dirent **) a)->d_name, (*(const struct dirent **) b)->d_name); } int z_mkdir(const char *s, int mode){ #ifdef Z_MSC_MINGW return _mkdir(s); #else return mkdir(s, mode); #endif } int z_mkdir_p(const char *s, int mode) { struct stat st; gchar *dir,*c, *wdir; char sep[2]; int ret; /*dbg("mkdir_p '%s'\n", s);*/ wdir = g_strdup(s); z_wokna(wdir); if (!stat(wdir, &st)){ if (S_ISDIR(st.st_mode)) { g_free(wdir); return(0); } } dir = g_strdup(wdir); strcpy(sep, "/"); z_wokna(sep); c=strrchr(dir, sep[0]); if (c==NULL) { ret = z_mkdir(wdir,mode); g_free(dir); g_free(wdir); return(-1); } *c='\0'; if (strlen(dir)==0) { g_free(dir); g_free(wdir); return(-1); } z_mkdir_p(dir,mode); ret = z_mkdir(wdir,mode); g_free(dir); g_free(wdir); return(ret); } int z_fmkdir_p(const char *filename, int mode){ gchar *dir,*d; int ret; char sep[2]; /*dbg("fmkdir_p '%s'\n", filename);*/ dir = g_strdup(filename); z_wokna(dir); strcpy(sep, "/"); z_wokna(sep); d = strrchr(dir, sep[0]); ret = -1; if (d){ *d = '\0'; ret = z_mkdir_p(dir, mode); } g_free(dir); return ret; } libzia-4.67/src/zgetopt.c0000644000175000017500000000160114662101505012272 00000000000000/* zgetopt.c - getopt compatibility layer Copyright (C) 2011-2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #ifndef Z_HAVE_GETOPT_H char *optarg; int optind = 1; int opterr = 1; int optopt = '?'; int getopt(int argc, char *argv[], char *optstring){ char c; char *cc; if (optind >= argc) return -1; optarg = argv[optind]; if (optarg[0] != '-') return -1; c = optarg[1]; cc = strchr(optstring, c); if (cc == NULL){ optopt = c; optind++; return '?'; } optarg += 2; if (*optarg == '\0') { if (cc[1] == ':'){ optind++; optarg = argv[optind]; }else{ optarg = NULL; } } optind++; return c; } #endif libzia-4.67/src/zgpio_mcp23017.c0000644000175000017500000001631514662101505013172 00000000000000/* zgpio_mcp23017.c - GPIO chip /sys/class/gpio Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #define IODIR 0x00 #define IPOL 0x01 #define GPINTEN 0x02 #define DEFVALA 0x03 #define INTCON 0x04 #define IOCON 0x05 #define GPPU 0x06 #define INTF 0x07 #define INTCAP 0x08 #define GPIO 0x09 #define OLAT 0x0a static int zgpiochip_mcp23017_write_reg(struct zgpiochip *chip, unsigned char baseaddr, unsigned int ch, unsigned char value){ unsigned char addr = baseaddr * 2 + ch; return zbus_write_reg(chip->dev, addr, value); } static int zgpiochip_mcp23017_read_reg(struct zgpiochip *chip, unsigned char baseaddr, unsigned int ch){ unsigned int addr = baseaddr * 2 + ch; return zbus_read_reg(chip->dev, addr); } static int zgpio_mcp23017_write_reg(struct zgpio *gpio, unsigned char baseaddr, unsigned char value){ return zgpiochip_mcp23017_write_reg(gpio->chip, baseaddr, gpio->nr / 8, value); } static int zgpio_mcp23017_read_reg(struct zgpio *gpio, unsigned char baseaddr){ return zgpiochip_mcp23017_read_reg(gpio->chip, baseaddr, gpio->nr / 8); } static void zgpio_mcp23017_freechip(struct zgpiochip *chip){ int n; for (n = 0; n < chip->gpios->len; n++){ struct zgpio *gpio = (struct zgpio *)g_ptr_array_index(chip->gpios, n); zgpio_free(gpio); } g_ptr_array_free(chip->gpios, TRUE); } static int zgpio_mcp23017_open(struct zgpio *gpio){ int ret = 0; gpio->mask = 1 << (gpio->nr % 8); g_ptr_array_add(gpio->chip->gpios, gpio); ZRET(zgpio_mcp23017_read_reg(gpio, OLAT)); gpio->chip->olat[gpio->nr / 8] = (unsigned char)ret; return 0; } static struct zgpio *zgpio_mcp23017_init_nr(struct zgpiochip *chip, int nr){ struct zgpio *gpio = g_new0(struct zgpio, 1); gpio->chip = chip; gpio->nr = nr; gpio->name = g_strdup_printf("GP%c%d", 'A' + (nr / 8), nr % 8); int ret = zgpio_mcp23017_open(gpio); if (ret < 0){ zgpio_free(gpio); return NULL; } return gpio; } static struct zgpio *zgpio_mcp23017_init_name(struct zgpiochip *chip, const char *name){ struct zgpio *gpio; if (name == NULL || strlen(name) < 3) return NULL; if (z_char_uc(name[0]) != 'G') return NULL; if (z_char_uc(name[1]) != 'P') return NULL; if (z_char_uc(name[2]) != 'A' && z_char_uc(name[2]) != 'B') return NULL; gpio = g_new0(struct zgpio, 1); gpio->chip = chip; gpio->name = g_strdup(name); gpio->nr = atoi(name + 3); gpio->nr += (z_char_uc(gpio->name[2]) - 'A') * 8; int ret = zgpio_mcp23017_open(gpio); if (ret < 0){ zgpio_free(gpio); return NULL; } return gpio; } static void zgpio_mcp23017_free(struct zgpio *gpio){ if (!gpio) return; g_ptr_array_remove(gpio->chip->gpios, gpio); } static int zgpio_mcp23017_dir_input(struct zgpio *gpio){ int reg = zgpio_mcp23017_read_reg(gpio, IODIR); if (reg < 0) return reg; //printf("IODIR=0x%x ", reg); reg |= gpio->mask; //printf("-> 0x%x\n", reg); reg = zgpio_mcp23017_write_reg(gpio, IODIR, reg); return reg; } static int zgpio_mcp23017_dir_output(struct zgpio *gpio){ int reg = zgpio_mcp23017_read_reg(gpio, IODIR); if (reg < 0) return reg; //printf("IODIR=0x%x ", reg); reg &= ~gpio->mask; //printf("-> 0x%x\n", reg); reg = zgpio_mcp23017_write_reg(gpio, IODIR, reg); return reg; } static int zgpio_mcp23017_write(struct zgpio *gpio, int value){ int ret = 0; unsigned char old = gpio->chip->olat[gpio->nr/8]; if (value) gpio->chip->olat[gpio->nr/8] |= gpio->mask; else gpio->chip->olat[gpio->nr/8] &= ~gpio->mask; if (gpio->chip->olat[gpio->nr/8] == old) return 0; ZRET(zgpio_mcp23017_write_reg(gpio, OLAT, gpio->chip->olat[gpio->nr/8])); return ret; } static int zgpio_mcp23017_read(struct zgpio *gpio){ int reg = zgpiochip_mcp23017_read_reg(gpio->chip, GPIO, gpio->nr / 8); if (reg < 0) return reg; gpio->chip->gpio[gpio->nr / 8] = (unsigned char)reg; if ((reg & gpio->mask) != 0) return 1; else return 0; } static void zgpio_mcp23017_inta(struct zgpio *inta, int value, void *data) { struct zgpiochip *chip = (struct zgpiochip*)data; dbg("\n--------------\nzgpio_mcp23017_inta value=0x%02x\n", value); int ch; for (ch = 0; ch < 2; ch++){ int val = zgpiochip_mcp23017_read_reg(chip, INTF, ch); val = zgpiochip_mcp23017_read_reg(chip, INTCAP, ch); //int val = zgpiochip_mcp23017_read_reg(chip, GPIO, ch); dbg("GPIO[%d] = 0x%02x -> 0x%02x\n", ch, chip->gpio[ch], (unsigned char)val); int n; for (n = 0; n < chip->gpios->len; n++){ struct zgpio *gpio = (struct zgpio *)g_ptr_array_index(chip->gpios, n); if (gpio->nr / 8 != ch) continue; //dbg("testing nr=%d\n", gpio->nr); if ((val & gpio->mask) == (chip->gpio[ch] & gpio->mask)) continue; dbg("firing nr=%d\n", gpio->nr); if (gpio->handler){ gpio->handler(gpio, (val & gpio->mask) ? 1 : 0, gpio->data); } } chip->gpio[ch] = (unsigned char)val; } } int zgpio_mcp23017_set_handler(struct zgpio *gpio, struct zselect *zsel, enum zgpio_edge edge, void (*handler)(struct zgpio *gpio, int value, void *data), void *data){ // int ret; if (!gpio) return -1; gpio->edge = edge; gpio->handler = handler; gpio->data = data; int reg = zgpio_mcp23017_read_reg(gpio, GPINTEN); if (reg < 0) return reg; if (edge != ZGPIO_EDGE_NONE){ reg |= gpio->mask; }else{ reg &= ~gpio->mask; } int ret = zgpio_mcp23017_write_reg(gpio, GPINTEN, reg); if (ret < 0) return ret; return 0; } struct zgpiochip *zgpiochip_init_mcp23017(struct zbusdev *dev, struct zgpio *inta, struct zselect *zsel, int mirror){ struct zgpiochip *chip = g_new0(struct zgpiochip, 1); chip->dev = dev; chip->inta = inta; chip->freechip = zgpio_mcp23017_freechip; chip->init_nr = zgpio_mcp23017_init_nr; chip->init_name = zgpio_mcp23017_init_name; chip->free = zgpio_mcp23017_free; chip->dir_input = zgpio_mcp23017_dir_input; chip->dir_output = zgpio_mcp23017_dir_output; chip->write = zgpio_mcp23017_write; chip->read = zgpio_mcp23017_read; chip->set_handler = zgpio_mcp23017_set_handler; chip->mirror = mirror; int ch; for (ch = 0; ch < 2; ch++){ int ret = zgpiochip_mcp23017_read_reg(chip, GPIO, ch); if (ret < 0){ g_free(chip); return NULL; } ret = zgpiochip_mcp23017_read_reg(chip, INTF, ch); } chip->gpios = g_ptr_array_new(); if (inta){ zgpio_set_handler(inta, zsel, ZGPIO_EDGE_RISING, zgpio_mcp23017_inta, chip); } return chip; } libzia-4.67/src/zsdl.c0000644000175000017500000015142114712365047011571 00000000000000/* zsdl.c - reusable SDL functions Copyright (C) 2011-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #ifdef Z_HAVE_SDL #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_SYS_WAIT_H #include #endif #include #include #include #include #ifdef Z_HAVE_SDL #include //#include //#ifdef Z_MSC_MINGW_ANDROID //double fabs(double x); //#endif #include #include #include "../data/font8x13.inc" #include "../data/font9x16.inc" #include "../data/font13x24.inc" #include "../data/font18x32.inc" #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif static struct zzsdl *zsdl = NULL; #ifdef Z_MSC #pragma warning(disable : 4996) #define _CRT_SECURE_NO_WARNINGS #endif static short *outline9x16; #ifdef Z_HAVE_SDL_TTF static void z_free_ttf_font(gpointer xxx) { TTF_Font* ttf = (TTF_Font*)xxx; TTF_CloseFont(ttf); } static TTF_Font* z_sdl_get_ttf(int font_h) { int pt = (int)(font_h * 0.75) + 1; TTF_Font* ret = g_hash_table_lookup(zsdl->ttfs, GINT_TO_POINTER(font_h)); if (ret == NULL) { SDL_RWseek(zsdl->ttf_fontrw, 0, RW_SEEK_SET); ret = TTF_OpenFontRW(zsdl->ttf_fontrw, 0, pt); if (ret != NULL) g_hash_table_insert(zsdl->ttfs, GINT_TO_POINTER(font_h), ret); } return ret; } #endif struct zzsdl *zsdl_init(SDL_Surface *screen, int font_h, int inverse, SDL_RWops* fontRW){ if (zsdl) zsdl_free(); zsdl = g_new0(struct zzsdl, 1); zsdl->screen = screen; zsdl->inverse = inverse; #ifdef Z_HAVE_SDL2 zsdl->renderer = SDL_CreateSoftwareRenderer(zsdl->screen); if (!zsdl->renderer) zinternal("Can't alloc software renderer"); SDL_SetRenderDrawColor(zsdl->renderer, 0xFF, 0xFF, 0xFF, 0xFF); SDL_RenderClear(zsdl->renderer); #endif switch(screen->format->BytesPerPixel){ case 1: zsdl->putpixel = inverse ? z_putpixel8inv : z_putpixel8; break; case 2: zsdl->putpixel = inverse ? z_putpixel16inv : z_putpixel16; break; case 3: zsdl->putpixel = inverse ? z_putpixel24inv : z_putpixel24; if (screen->format->Bmask == 0xff) zsdl->antialiasing_supported = 1; break; case 4: zsdl->putpixel = inverse ? z_putpixel32inv : z_putpixel32; if (screen->format->Bmask == 0xff) zsdl->antialiasing_supported = 1; break; } zsdl->antialiasing = 0; //zsdl->antialiasing_supported = 0; #ifndef Z_HAVE_SDL_TTF zsdl->font_h = font_h; zsdl->font_w = zsdl_h2w(font_h); #endif #ifdef Z_HAVE_SDL_TTF zsdl->font_h = 16; zsdl->font_w = 9; // initial ratio for zsdl_h2w zsdl->font_w = zsdl_h2w(font_h); zsdl->font_h = font_h; TTF_Init(); if (fontRW != NULL) { int w, h; zsdl->ttf_fontrw = fontRW; if (!zsdl->ttfs) zsdl->ttfs = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, z_free_ttf_font); TTF_Font *ttf = z_sdl_get_ttf(font_h); if (ttf != NULL) { TTF_SizeText(ttf, "W", &w, &h); zsdl->font_w = w; zsdl->font_h = h; dbg("zsdl_init: pt=%d font_w=%d font_h=%d\n", (int)(font_h * 0.75) + 1, zsdl->font_w, zsdl->font_h); } } zsdl->ttf_iconv = iconv_open("UTF-8", "ISO8859-2"); if (zsdl->ttf_iconv == (iconv_t)-1) zinternal("Can't create TTF iconv object UTF-8 to ISO8859-2"); #endif //zsdl->format = SDL_GetWindowPixelFormat(screen); //zsdl->pxformat = SDL_AllocFormat(zsdl->format); //dbg("zsdl_init format=%s RMask=%x GMask=%x BMask=%x AMask=%x\n", SDL_GetPixelFormatName(zsdl->format), zsdl->pxformat->Rmask, zsdl->pxformat->Gmask, zsdl->pxformat->Bmask, zsdl->pxformat->Amask); outline9x16 = zfont_create_outline(font9x16, sizeof(font9x16), 16); //zsdl_font_save(screen); //zsdl_font_dump("font8x13.png", "font8x13.inc"); //zsdl_font_dump("font9x16.png", "font9x16.inc"); // zsdl_font_dump("font13x24.png", "font13x24.inc"); //zsdl_font_dump("font18x32.png", "font18x32.inc"); // zsdl_font_dump_skip_red("font8x13red.png", "font8x13.inc"); return zsdl; } void zsdl_free(void){ if (!zsdl) return; g_free(outline9x16); #ifdef Z_HAVE_SDL2 if (zsdl->renderer != NULL) SDL_DestroyRenderer(zsdl->renderer); if (zsdl->pxformat != NULL) SDL_FreeFormat(zsdl->pxformat); #endif #ifdef Z_HAVE_SDL_TTF g_hash_table_destroy(zsdl->ttfs); iconv_close(zsdl->ttf_iconv); #endif if (zsdl->to8b_cd != NULL) iconv_close(zsdl->to8b_cd); zsdl->to8b_cd = NULL; if (zsdl->to8b_gs != NULL) g_string_free(zsdl->to8b_gs, TRUE); g_free(zsdl); zsdl = NULL; } struct zzsdl *zsdl_instance(){ return zsdl; } int zsdl_h2w(int font_h){ #ifdef Z_HAVE_SDL_TTF int ret = (zsdl->font_w * font_h) / zsdl->font_h; return ret; #else switch (font_h){ case 13: return 8; case 16: return 9; case 24: return 13; case 26: return 16; case 32: return 18; case 48: return 26; case 64: return 36; default: return (font_h * 9) / 16; } #endif } SDL_Surface *z_create_surface(struct zzsdl *zsdl, int w, int h){ SDL_Surface *surface; surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, zsdl->pxformat->BitsPerPixel, zsdl->pxformat->Rmask, zsdl->pxformat->Gmask, zsdl->pxformat->Bmask, zsdl->pxformat->Amask); return surface; } #ifdef Z_HAVE_SDL2 void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h){ /*static int iii = 0; SDL_Rect r; r.x = iii * 10; r.y = iii * 10; r.w = 10; r.h = 10; SDL_FillRect(zsdl->screen, &r, rand()); iii++; */ //SDL_RenderPresent(zsdl->renderer); SDL_UpdateWindowSurface(zsdl->window); } #endif int zsdl_max_font_h(int w, int h, char *text){ int l = strlen(text); #ifdef Z_HAVE_SDL_TTF float rx = (float)w / (l * zsdl->font_w); float ry = (float)h / zsdl->font_h; float r = rx < ry ? rx : ry; int fh = (int)floor(r * zsdl->font_h); return fh; #else int ww; ww = zsdl_h2w(64) * l; if (h >= 64 && w >= ww) return 64; ww = zsdl_h2w(48) * l; if (h >= 48 && w >= ww) return 48; ww = zsdl_h2w(32) * l; if (h >= 32 && w >= ww) return 32; ww = zsdl_h2w(26) * l; if (h >= 26 && w >= ww) return 26; ww = zsdl_h2w(24) * l; if (h >= 24 && w >= ww) return 24; ww = zsdl_h2w(16) * l; if (h >= 16 && w >= ww) return 16; return 13; #endif } short *zfont_create_outline(const short *font, int size_b, int font_h){ int i, len = size_b / sizeof(short); short *out = (short *)g_malloc(size_b); for (i = 0; i < len; i++){ out[i] = font[i]; if ((i % font_h) != 0) out[i] |= font[i - 1]; if (((i + 1) % font_h) != 0) out[i] |= font[i + 1]; } for (i = 0; i < len; i++){ out[i] |= ((unsigned short)out[i] << 1) | ((unsigned short)out[i] >> 1); } return out; } /* returns 1 if pixel is out of rect */ int z_clip_pixel(SDL_Rect *clip, int x, int y){ if (x < clip->x || y < clip->y || x >= clip -> x + clip->w || y >= clip -> y + clip->h) return 1; return 0; } int z_overlapped_pixel(SDL_Rect *clip_rect, int x, int y){ int ret; if (x >= clip_rect->x && y >= clip_rect->y && x < clip_rect->x + clip_rect->w && y < clip_rect->y + clip_rect->h) ret=1; else ret=0; /* dbg("overlapper_pixel(%d, %d in %dx%d%+d%+d)=%d\n", x, y, clip_rect->x, clip_rect->y, clip_rect->w, clip_rect->h, ret);*/ return ret; } int z_overlapped_rect(SDL_Rect *a, SDL_Rect *b){ int ret; if ( (a->x+a->w <= b->x) || /* a je vlevo od b */ (b->x+b->w <= a->x) || /* b je vlevo od a */ (a->y+a->h <= b->y) || /* a je nad b */ (b->y+b->h <= a->y)) ret=0; /* b je nad a */ else ret=1; /* dbg("overlapped_rect(%dx%d%+d%+d,%dx%d%+d%+d)=%d\n", a->x, a->y, a->w, a->h, b->x, b->y, b->w, b->h, ret);*/ return ret; } /* * X -> * Y 0110 0010 1010 * | 0100 0000 1000 * V 0101 0001 1001 */ int z_overlapped_line(SDL_Rect *clip_rect, int x1, int y1, int x2, int y2){ int mask1, mask2; mask1=0; if (x1x) mask1|=0x4; else if (x1>=clip_rect->x+clip_rect->w) mask1|=0x8; if (y1y) mask1|=0x2; else if (y1>=clip_rect->y+clip_rect->h) mask1|=0x1; mask2=0; if (x2x) mask2|=0x4; else if (x2>=clip_rect->x+clip_rect->w) mask2|=0x8; if (y2y) mask2|=0x2; else if (y2>=clip_rect->y+clip_rect->h) mask2|=0x1; if ((mask1|mask2)==0) return 1; if (mask1&mask2) return 0; return 1; } void z_putpixel8(SDL_Surface *surface, int x, int y, int color){ Uint8 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint8 *) surface->pixels + y*surface->pitch + x; *p = color; } void z_putpixel16(SDL_Surface *surface, int x, int y, int color){ Uint16 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint16 *) surface->pixels + y*surface->pitch/2 + x; *p = color; } void z_putpixel24(SDL_Surface *surface, int x, int y, int color){ Uint16 *p16; Uint8 *p8; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p16 = (Uint16 *) ((Uint8 *)surface->pixels + y*surface->pitch + x*3); p8 = (Uint8 *) (p16+1); *p16 = color; /* TODO Big endian? */ *p8 = color>>16; } void z_putpixel32(SDL_Surface *surface, int x, int y, int color){ Uint32 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint32 *) surface->pixels + y*surface->pitch/4 + x; *p = color; } void z_putpixel8inv(SDL_Surface *surface, int x, int y, int color){ Uint8 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint8 *) surface->pixels + y*surface->pitch + x; *p = ~color; } void z_putpixel16inv(SDL_Surface *surface, int x, int y, int color){ Uint16 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint16 *) surface->pixels + y*surface->pitch/2 + x; *p = ~color; } void z_putpixel24inv(SDL_Surface *surface, int x, int y, int color){ Uint16 *p16; Uint8 *p8; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p16 = (Uint16 *) ((Uint8 *)surface->pixels + y*surface->pitch + x*3); p8 = (Uint8 *) (p16+1); *p16 = ~color; /* TODO Big endian? */ *p8 = ~(color>>16); } void z_putpixel32inv(SDL_Surface *surface, int x, int y, int color){ Uint32 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint32 *) surface->pixels + y*surface->pitch/4 + x; *p = ~color; } /*void z_putpixel32a(SDL_Surface *surface, double x, double y, int color){ Uint32 *p; double xi, yi; for (xi = floor(x); xi <= ceil(x); xi += 1.0){ for (yi = floor(y); yi <= ceil(y); yi += 1.0){ if (z_clip_pixel(&surface->clip_rect, (int)xi, (int)yi)) return; p = (Uint32 *) surface->pixels + (int)y * surface->pitch / 4 + (int)x; *p = color; } } } */ void z_putpixel_fmt(SDL_Surface *surface, int x, int y, int c, SDL_PixelFormat *format){ Uint8 r, g, b, a; SDL_GetRGBA(c, format, &r, &g, &b, &a); c = SDL_MapRGBA(surface->format, r, g, b, a); z_putpixel(surface, x, y, c); } void z_putpixela(SDL_Surface *surface, int x, int y, int color, int a){ int fr, fg, fb, b, br, bg, bb, c; fr = z_r(surface, color); fg = z_g(surface, color); fb = z_b(surface, color); b = z_getpixel(surface, x, y); br = z_r(surface, b); bg = z_g(surface, b); bb = z_b(surface, b); c = z_makecol(((fr * a) + (br * (255 - a))) / 255, ((fg * a) + (bg * (255 - a))) / 255, ((fb * a) + (bb * (255 - a))) / 255); z_putpixel(surface, x, y, c); /*for (xi = 0; xi < 16; xi++){ for (yi = 0; yi < 16; yi++){ z_putpixel(surface, 30 + x * 16 + xi, 30 + y * 16 + yi, c); } }*/ } /*int z_putalpha(SDL_Surface *surface, int x, int y, Uint32 alpha){ Uint32 *p; if (z_clip_pixel(&surface->clip_rect, x, y)) return; p = (Uint32 *) surface->pixels + y*surface->pitch/4 + x; *p = color; } */ int z_getpixel8(SDL_Surface *surface, int x, int y){ Uint8 *p; p = (Uint8 *) surface->pixels + y*surface->pitch + x; return *p; } int z_getpixel16(SDL_Surface *surface, int x, int y){ Uint16 *p; p = (Uint16 *) surface->pixels + y*surface->pitch/2 + x; return *p; } int z_getpixel24(SDL_Surface *surface, int x, int y){ Uint8 *p; p = (Uint8 *) surface->pixels + y*surface->pitch + x*3; return (p[0]) + ((p[1])<<8) + ((p[2])<<16); /* *p16 = color; */ /* TODO Big endian? */ /* *p8 = color>>16; */ } int z_getpixel32(SDL_Surface *surface, int x, int y){ Uint32 *p; p = (Uint32 *) surface->pixels + y*surface->pitch/4 + x; return *p; } int z_getpixel(SDL_Surface *surface, int x, int y){ if (x < 0 || y < 0 || x >= surface->w || y >= surface->h) return 0; switch(surface->format->BytesPerPixel){ case 1: return z_getpixel8(surface, x, y); case 2: return z_getpixel16(surface, x, y); case 3: return z_getpixel24(surface, x, y); case 4: return z_getpixel32(surface, x, y); default: zinternal("z_getpixel: unknown BytesPerPixel %d\n", surface->format->BytesPerPixel); return 0; } } int z_getpixel_fmt(SDL_Surface *surface, int x, int y, SDL_PixelFormat *format){ Uint8 r, g, b, a; int c = z_getpixel(surface, x, y); SDL_GetRGBA(c, surface->format, &r, &g, &b, &a); c = SDL_MapRGBA(format, r, g, b, a); return c; } //static char bits[]={1, 2, 4, 8, 16, 32, 64, 128}; static int sbits[]={1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576}; #if defined(Z_HAVE_SDL_TTF) && !defined(Z_HAVE_SDL2) int SDL_BlitScaled(SDL_Surface* srcA, SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect) { if (!srcA || !dst) { return -1; } // TTF outputs pixes that differs in alpha SDL_Surface *src = SDL_CreateRGBSurface(SDL_SWSURFACE, srcA->w, srcA->h, dst->format->BitsPerPixel, dst->format->Rmask, dst->format->Gmask, dst->format->Bmask, 0); // without alpha SDL_BlitSurface(srcA, NULL, src, NULL); SDL_Rect full_src = { 0, 0, src->w, src->h }; SDL_Rect full_dst = { 0, 0, dst->w, dst->h }; if (!srcrect) { srcrect = &full_src; } if (!dstrect) { dstrect = &full_dst; } int dstW = dstrect->w; int dstH = dstrect->h; double scaleX = (double)dstW / srcrect->w; double scaleY = (double)dstH / srcrect->h; SDL_LockSurface(src); SDL_LockSurface(dst); for (int y = 0; y < dstH; ++y) { for (int x = 0; x < dstW; ++x) { int srcX = srcrect->x + (int)(x / scaleX); int srcY = srcrect->y + (int)(y / scaleY); int c = z_getpixel(src, srcX, srcY); z_putpixel(dst, dstrect->x + x, dstrect->y + y, c); } } SDL_UnlockSurface(src); SDL_UnlockSurface(dst); SDL_FreeSurface(src); return 0; } #endif int zsdl_print_ttf_char(SDL_Surface* surface, int *x, int y, int color, int bgcolor, int flags, unsigned char c) { #ifdef Z_HAVE_SDL_TTF if (c < 0x20) return 0; if (c >= 0x7f && c <= 0x9f) return 0; //if (c == 0xff) return 0; //if (c == 0xad) return 0; //if (flags & ZFONT_DOUBLEHB) return 1; char s[2]; s[0] = c; s[1] = '\0'; char utf[10]; char* inptr = s; char* outptr = utf; size_t sizein = 1; size_t sizeout = sizeof(utf); size_t ret; ret = iconv(zsdl->ttf_iconv, &inptr, &sizein, &outptr, &sizeout); if (ret == (size_t)-1) { // no reason to fail } else { if (outptr != NULL) *outptr = '\0'; } if (c == 0xad) { strcpy(utf, "\xE2\x89\xA1"); // triple bar horizontal } #ifdef Z_HAVE_SDL1 #define a unused #endif SDL_Color fg = { .r = z_r(surface, color), .g = z_g(surface, color), .b = z_b(surface, color), .a = SDL_ALPHA_OPAQUE }; SDL_Color bg = { .r = z_r(surface, bgcolor), .g = z_g(surface, bgcolor), .b = z_b(surface, bgcolor), .a = SDL_ALPHA_OPAQUE }; #undef a SDL_Rect r = { .x = *x, .y = y, .w = zsdl->font_w, .h = zsdl->font_h }; if ((flags & ZFONT_TRANSP) == 0) SDL_FillRect(surface, &r, bgcolor); int h = zsdl->font_h; if (flags & (ZFONT_DOUBLEHB | ZFONT_DOUBLEHT)) h *= 2; TTF_Font* ttf = z_sdl_get_ttf(h); if (ttf == NULL) return 0; SDL_Surface *src = TTF_RenderUTF8_Blended(ttf, utf, fg); if (flags & ZFONT_OUTLINE) { flags &= ~(ZFONT_DOUBLEHB | ZFONT_DOUBLEHT); ttf = z_sdl_get_ttf(zsdl->font_h); TTF_SetFontOutline(ttf, 1); SDL_Surface *outline = TTF_RenderUTF8_Blended(ttf, utf, bg); SDL_Rect ro = { .x = *x - 1, .y = y - 1 , .w = zsdl->font_w, .h = zsdl->font_h }; SDL_BlitSurface(outline, NULL, surface, &ro); SDL_FreeSurface(outline); TTF_SetFontOutline(ttf, 0); } if (flags & ZFONT_DOUBLEHT) { r.h *= 2; SDL_BlitScaled(src, NULL, surface, &r); }else if (flags & ZFONT_DOUBLEHB) { r.h *= 2; r.y -= zsdl->font_h; SDL_BlitScaled(src, NULL, surface, &r); }else if (flags & ZFONT_USERHFLG) { SDL_BlitSurface(src, NULL, surface, &r); }else{ SDL_BlitSurface(src, NULL, surface, &r); } SDL_FreeSurface(src); *x += zsdl->font_w; return 1; #endif return 0; } void zsdl_printf(SDL_Surface *surface, int x, int y, int color, int bgcolor, int flags, char *m, ...){ int i, j, xx, fi, fj, fw, fh; char *c; const short *fs, *fs2; const int *fint; char *s, ss[2]; va_list l; int font_h; int old_font_w = 0, old_font_h = 0; if (flags & ZFONT_OUTLINE){ int flg = flags & ~ZFONT_OUTLINE; flg |= ZFONT_OUTLINE_FONT; flg |= ZFONT_TRANSP; va_start(l, m); s = g_strdup_vprintf(m, l); va_end(l); zsdl_printf(surface, x, y, bgcolor, 0, flg, "%s", s); g_free(s); } if (flags & ZFONT_USERHFLG) { old_font_w = zsdl->font_w; old_font_h = zsdl->font_h; int fh = (flags >> 16) & 0xff; zsdl->font_w = zsdl_h2w(fh); zsdl->font_h = fh; } font_h = zsdl->font_h; if (SDL_MUSTLOCK(surface)) SDL_LockSurface(surface); if (flags & ZFONT_CHAR){ ss[0] = *m ? *m : ' '; ss[1] = '\0'; s = ss; }else{ va_start(l, m); s = g_strdup_vprintf(m, l); va_end(l); if (flags & ZFONT_UTF8){ if (zsdl->to8b_cd == NULL) zsdl->to8b_cd = iconv_open("iso-8859-2//TRANSLIT", "utf-8"); if (zsdl->to8b_cd == (iconv_t)-1) zinternal("Can't create iconv object iso-8859-2 to utf-8"); if (zsdl->to8b_gs == NULL) zsdl->to8b_gs = g_string_sized_new(strlen(s)); g_string_truncate(zsdl->to8b_gs, 0); ziconv(zsdl->to8b_cd, s, zsdl->to8b_gs); g_free(s); s = g_strdup(zsdl->to8b_gs->str); } } if (flags & ZFONT_CENTERX) x -= (strlen(s) * zsdl->font_w / 2); if (flags & ZFONT_CENTERY) y -= font_h / 2; if (flags & ZFONT_RIGHT) x -= strlen(s) * zsdl->font_w; if (flags & (ZFONT_DOUBLEHT | ZFONT_DOUBLEHB)) font_h *= 2; xx=x; if (zsdl->font_h == 16){ for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; if (flags & ZFONT_OUTLINE_FONT) fs = outline9x16 + ((unsigned char) *c) * 16; else fs = font9x16 + ((unsigned char) *c) * 16; for (i = 0; i < 16; i++){ fi = i; if (flags & (ZFONT_DOUBLEHT | ZFONT_DOUBLEHB)) fi = fi / 2; if (flags & ZFONT_DOUBLEHB) fi += 16 / 2; for (j = 0; j < 9; j++){ if (fs[fi] & sbits[j]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } } x += zsdl->font_w; } }else if (zsdl->font_h == 24){ for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; fs = font13x24 + ((unsigned char)*c) * 24; for (i = 0; i < 24; i++){ fi = i; if (flags & (ZFONT_DOUBLEHT | ZFONT_DOUBLEHB)) fi = fi / 2; if (flags & ZFONT_DOUBLEHB) fi += 24 / 2; for (j = 0; j < 13; j++){ if (fs[fi] & sbits[j]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } //fs++; } x += zsdl->font_w; } }else if (zsdl->font_h == 13){ for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; fs = font8x13 + ((unsigned char) *c) * 13; for (i = 0; i < 13; i++){ fi = i; if (flags & (ZFONT_DOUBLEHT | ZFONT_DOUBLEHB)) fi = fi / 2; if (flags & ZFONT_DOUBLEHB) fi += 13 / 2; for (j = 0; j < 8; j++){ if (fs[fi] & sbits[j]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } } x += zsdl->font_w; } }else if (zsdl->font_h == 32){ for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; fint = font18x32 + ((unsigned char) *c) * 32; for (i = 0; i < 32; i++){ fi = i; if (flags & (ZFONT_DOUBLEHT | ZFONT_DOUBLEHB)) fi = fi / 2; if (flags & ZFONT_DOUBLEHB) fi += 32 / 2; for (j = 0; j < 18; j++){ if (fint[fi] & sbits[j]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } } x += zsdl->font_w; } }else if (zsdl->font_h >= 64){ for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; fint = font18x32 + ((unsigned char) *c) * 32; for (i = 0; i < zsdl->font_h; i++){ fi = i * 32 / font_h; if (flags & ZFONT_DOUBLEHB) fi += 32 / 2; for (j = 0; j < zsdl->font_w; j++){ fj = j * 18 / (zsdl->font_w); if (fint[fi] & sbits[fj]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } } x += zsdl->font_w; } }else{ fw = 9; fh = 16; fs2 = font9x16; if (zsdl->font_h >= 48){ fw = 13; fh = 24; fs2 = font13x24; } for (c = s; *c != '\0'; c++){ if (zsdl_print_ttf_char(surface, &x, y, color, bgcolor, flags, *c)) continue; fs = fs2 + ((unsigned char) *c) * fh; for (i = 0; i < zsdl->font_h; i++){ fi = i * fh / font_h; if (flags & ZFONT_DOUBLEHB) fi += fh / 2; for (j = 0; j < zsdl->font_w; j++){ fj = j * fw / (zsdl->font_w); if (fs[fi] & sbits[fj]) z_putpixel(surface, x + j, y + i, color); else if (!(flags & ZFONT_TRANSP)) z_putpixel(surface, x + j, y + i, bgcolor); } } x += zsdl->font_w; } } if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface); if (flags & ZFONT_SYNC) { int hh = font_h; int ww = xx + strlen(s) * zsdl->font_w; if (xx + ww >= surface->w) ww = surface->w - xx - 1; if (y + hh >= surface->h) hh = surface->h - y - 1; if (xx < 0) { ww += xx - 1; xx = 0; } if (y < 0) { hh += y - 1; y = 0; } SDL_UpdateRect(surface, xx, y, ww, font_h); } if (!(flags & ZFONT_CHAR)) g_free(s); if (flags & ZFONT_USERHFLG) { zsdl->font_w = old_font_w; zsdl->font_h = old_font_h; } } void zsdl_fit(int *flg, int width, int height, char *str){ int widths[] = { 32, 24, 16, 13, 0 }; int i, fw, fh = 16; for (i = 0; widths[i] != 0; i++){ fh = widths[i]; if (fh > height) continue; fw = zsdl_h2w(fh); if (fw * (int)strlen(str) < width) break; } *flg |= ZFONT_USERH(fh); } void z_lineaa(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color){ /*void DrawWuLine (CDC *pDC, short X0, short Y0, short X1, short Y1, short BaseColor, short NumLevels, unsigned short IntensityBits)*/ unsigned short IntensityShift, ErrorAdj, ErrorAcc; unsigned short ErrorAccTemp, Weighting, WeightingComplementMask; short DeltaX, DeltaY, Temp, XDir; unsigned short IntensityBits = 8;//surface->format->BitsPerPixel / 3; short NumLevels = 256; /* Make sure the line runs top to bottom */ if (y1 > y2) { Temp = y1; y1 = y2; y2 = Temp; Temp = x1; x1 = x2; x2 = Temp; } /* Draw the initial pixel, which is always exactly intersected by the line and so needs no weighting */ z_putpixela(surface, x1, y1, color, 255); if ((DeltaX = x2 - x1) >= 0) { XDir = 1; } else { XDir = -1; DeltaX = -DeltaX; /* make DeltaX positive */ } /* Special-case horizontal, vertical, and diagonal lines, which require no weighting because they go right through the center of every pixel */ if ((DeltaY = y2 - y1) == 0) { /* Horizontal line */ while (DeltaX-- != 0) { x1 += XDir; z_putpixel(surface, x1, y1, color); } return; } if (DeltaX == 0) { /* Vertical line */ do { y1++; z_putpixel(surface, x1, y1, color); } while (--DeltaY != 0); return; } if (DeltaX == DeltaY) { /* Diagonal line */ do { x1 += XDir; y1++; z_putpixel(surface, x1, y1, color); } while (--DeltaY != 0); return; } /* Line is not horizontal, diagonal, or vertical */ ErrorAcc = 0; /* initialize the line error accumulator to 0 */ /* # of bits by which to shift ErrorAcc to get intensity level */ IntensityShift = 16 - IntensityBits; /* Mask used to flip all bits in an intensity weighting, producing the result (1 - intensity weighting) */ WeightingComplementMask = NumLevels - 1; /* Is this an X-major or Y-major line? */ if (DeltaY > DeltaX) { /* Y-major line; calculate 16-bit fixed-point fractional part of a pixel that X advances each time Y advances 1 pixel, truncating the result so that we won't overrun the endpoint along the X axis */ ErrorAdj = ((unsigned long) DeltaX << 16) / (unsigned long) DeltaY; /* Draw all pixels other than the first and last */ while (--DeltaY) { ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ ErrorAcc += ErrorAdj; /* calculate error for next pixel */ if (ErrorAcc <= ErrorAccTemp) { /* The error accumulator turned over, so advance the X coord */ x1 += XDir; } y1++; /* Y-major, so always advance Y */ /* The IntensityBits most significant bits of ErrorAcc give us the intensity weighting for this pixel, and the complement of the weighting for the paired pixel */ Weighting = ErrorAcc >> IntensityShift; z_putpixela(surface, x1, y1, color, (Weighting ^ WeightingComplementMask)); z_putpixela(surface, x1 + XDir, y1, color, Weighting); } /* Draw the final pixel, which is always exactly intersected by the line and so needs no weighting */ z_putpixela(surface, x2, y2, color, 255); return; } /* It's an X-major line; calculate 16-bit fixed-point fractional part of a pixel that Y advances each time X advances 1 pixel, truncating the result to avoid overrunning the endpoint along the X axis */ ErrorAdj = ((unsigned long) DeltaY << 16) / (unsigned long) DeltaX; /* Draw all pixels other than the first and last */ while (--DeltaX) { ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */ ErrorAcc += ErrorAdj; /* calculate error for next pixel */ if (ErrorAcc <= ErrorAccTemp) { /* The error accumulator turned over, so advance the Y coord */ y1++; } x1 += XDir; /* X-major, so always advance X */ /* The IntensityBits most significant bits of ErrorAcc give us the intensity weighting for this pixel, and the complement of the weighting for the paired pixel */ Weighting = ErrorAcc >> IntensityShift; z_putpixela(surface, x1, y1, color, (Weighting ^ WeightingComplementMask)); z_putpixela(surface, x1, y1 + 1, color, Weighting); } /* Draw the final pixel, which is always exactly intersected by the line and so needs no weighting */ z_putpixela(surface, x2, y2, color, 255); } void z_line(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color){ int dx, dy, p; int inc, tmp; if (zsdl->antialiasing) { z_lineaa(surface, x1, y1, x2, y2, color); return; } dx=abs(x1-x2); dy=abs(y1-y2); if (dx>=dy){ p = 2*dy-dx; if (x1 >= x2){ tmp=x1;x1=x2;x2=tmp; tmp=y1;y1=y2;y2=tmp; } z_putpixel(surface, x1, y1, color); if (y2>=y1) inc=1; else inc=-1; while(x1 < x2){ x1++; if (p<0) p += 2*dy; else{ y1+=inc; p += 2*(dy-dx); } z_putpixel(surface, x1, y1, color); } }else{ p = 2*dx-dy; if (y1 >= y2){ tmp=x1;x1=x2;x2=tmp; tmp=y1;y1=y2;y2=tmp; } z_putpixel(surface, x1, y1, color); if (x2>=x1) inc=1; else inc=-1; while(y1 < y2){ y1++; if (p<0) p += 2*dx; else{ x1 += inc; p += 2*(dx-dy); } z_putpixel(surface, x1,y1, color); } } } void z_do_line(SDL_Surface *surface, int x1, int y1, int x2, int y2, int color, void (*func)(SDL_Surface *surface, int x, int y, int d) ){ int dx, dy, p; int inc, tmp; func(NULL, 0, 0, 0); // reset state (dashcnt) dx=abs(x1-x2); dy=abs(y1-y2); if (dx>=dy){ p = 2*dy-dx; if (x1 >= x2){ tmp=x1;x1=x2;x2=tmp; tmp=y1;y1=y2;y2=tmp; } func(surface, x1, y1, color); if (y2>=y1) inc=1; else inc=-1; while(x1 < x2){ x1++; if (p<0) p += 2*dy; else{ y1+=inc; p += 2*(dy-dx); } func(surface, x1, y1, color); } }else{ p = 2*dx-dy; if (y1 >= y2){ tmp=x1;x1=x2;x2=tmp; tmp=y1;y1=y2;y2=tmp; } func(surface, x1, y1, color); if (x2>=x1) inc=1; else inc=-1; while(y1 < y2){ y1++; if (p<0) p += 2*dx; else{ x1 += inc; p += 2*(dx-dy); } func(surface, x1,y1, color); } } } #define SWAP(a,b){ int tmp; \ tmp=x##a; x##a=x##b; x##b=tmp;\ tmp=y##a; y##a=y##b; y##b=tmp;} void z_triangle(SDL_Surface *surface, int x1, int y1, int x2, int y2, int x3, int y3, int c){ int a1,b1,c1, a2,b2,c2, a3,b3,c3, xx1, xx2,xx3,y; if (y2x2?x1:x2; if (x3>r.x) r.w=x3; r.w-=r.x; r.h=1; SDL_SetClipRect(surface, rect); SDL_FillRect(surface, &r, c); SDL_SetClipRect(surface, NULL); #else /* i don't want to sort X's :-) */ z_line(surface, x1, y1, x2, y2, c); z_line(surface, x1, y1, x3, y3, c); z_line(surface, x3, y3, x2, y2, c); #endif return; } a1=y2-y3; b1=x3-x2; c1=y3*x2-x3*y2; a2=y1-y2; b2=x2-x1; c2=y2*x1-x2*y1; a3=y1-y3; b3=x3-x1; c3=y3*x1-x3*y1; #ifdef USE_RECT SDL_SetClipRect(surface, rect); #endif for (y=y1;y no iteration */ xx3=-(b3*y+c3)/a3; /* a3=0 not reached because y1=y2 -> y1=y2=y3 */ #ifdef USE_RECT r.x=xx2surface, &r, c); #else z_line(surface, xx2, y, xx3, y, c); #endif } for (y=y2;y no iteration */ xx3=-(b3*y+c3)/a3; #ifdef USE_RECT r.x=xx1x, rect->y, rect->w, rect->h, x, y, r, c);*/ p=1-r; yy=r; for (xx=0; xx<=yy; xx++){ z_putpixel(surface, x+yy, y+xx, c); z_putpixel(surface, x+yy, y-xx, c); z_putpixel(surface, x-yy, y+xx, c); z_putpixel(surface, x-yy, y-xx, c); z_putpixel(surface, x+xx, y+yy, c); z_putpixel(surface, x+xx, y-yy, c); z_putpixel(surface, x-xx, y+yy, c); z_putpixel(surface, x-xx, y-yy, c); if (p<0){ p+=2*xx + 3; }else{ p+=2*xx - 2*yy + 1; yy--; } } } static int dashcnt = 0; void z_dashfce(SDL_Surface *surface, int x, int y, int d) { if (surface == NULL) { dashcnt = 0; return; } if (dashcnt++%6<3) return; z_putpixel(surface, x, y, d); } static int dotcnt = 0; void z_dotfce(SDL_Surface* surface, int x, int y, int d) { if (surface == NULL) { dotcnt = 0; return; } if (dotcnt++ % 2 == 0) return; z_putpixel(surface, x, y, d); } void z_rect(SDL_Surface *surface, int x1, int y1, int x2, int y2, int c){ z_line(surface, x1, y1, x2, y1, c); z_line(surface, x2, y1, x2, y2, c); z_line(surface, x1, y2, x2, y2, c); z_line(surface, x1, y1, x1, y2, c); } void z_rect2(SDL_Surface *surface, SDL_Rect *r, int c){ z_rect(surface, r->x, r->y, r->x+r->w-1, r->y+r->h-1, c); } void z_cross(SDL_Surface *surface, int x, int y, int color, int zoom){ //dbg("zoom=%d\n", zoom); if (zoom<2500){ z_line(surface, x-1, y-1, x+1, y+1, color); z_line(surface, x-1, y+1, x+1, y-1, color); return; } if (zoom<4000){ int c2; z_line(surface, x-2, y-2, x+2, y+2, color); z_line(surface, x-2, y+2, x+2, y-2, color); c2 = z_makecol((5 * z_r(surface, color)) / 10, (5 * z_g(surface, color)) / 10, (5 * z_b(surface, color)) / 10); z_putpixel(surface, x-1, y-2, c2); z_putpixel(surface, x+1, y-2, c2); z_putpixel(surface, x-2, y-1, c2); z_putpixel(surface, x, y-1, c2); z_putpixel(surface, x+2, y-1, c2); z_putpixel(surface, x-1, y, c2); z_putpixel(surface, x+1, y, c2); z_putpixel(surface, x-2, y+1, c2); z_putpixel(surface, x, y+1, c2); z_putpixel(surface, x+2, y+1, c2); z_putpixel(surface, x-1, y+2, c2); z_putpixel(surface, x+1, y+2, c2); return; } if (zoom<10000){ z_line(surface, x-3, y-3, x+3, y+3, color); z_line(surface, x-2, y-3, x+3, y+2, color); z_line(surface, x-3, y-2, x+2, y+3, color); z_line(surface, x-3, y+3, x+3, y-3, color); z_line(surface, x-2, y+3, x+3, y-2, color); z_line(surface, x-3, y+2, x+2, y-3, color); return; } if (zoom>=10000){ z_line(surface, x-4, y-4, x+4, y+4, color); z_line(surface, x-3, y-4, x+4, y+3, color); z_line(surface, x-4, y-3, x+3, y+4, color); z_line(surface, x-4, y+4, x+4, y-4, color); z_line(surface, x-3, y+4, x+4, y-3, color); z_line(surface, x-4, y+3, x+3, y-4, color); return; } } void z_pip(SDL_Surface *surface, int x, int y, int color1, int color2, int zoom){ z_putpixel(surface, x, y-1, color1); z_putpixel(surface, x, y, color1); z_putpixel(surface, x, y+1, color1); z_putpixel(surface, x-1, y, color1); z_putpixel(surface, x+1, y, color1); z_putpixel(surface, x-1, y-1, color2); z_putpixel(surface, x+1, y-1, color2); z_putpixel(surface, x+1, y+1, color2); z_putpixel(surface, x-1, y+1, color2); } int z_makecol(int r, int g, int b){ SDL_PixelFormat *format; format = zsdl->pxformat; return (((r>>format->Rloss)<Rshift)&format->Rmask) | (((g>>format->Gloss)<Gshift)&format->Gmask) | (((b>>format->Bloss)<Bshift)&format->Bmask); } unsigned char z_r(SDL_Surface *surface, int color){ Uint8 r, g, b; SDL_GetRGB(color, surface->format, &r, &g, &b); return r; } unsigned char z_g(SDL_Surface *surface, int color){ Uint8 r, g, b; SDL_GetRGB(color, surface->format, &r, &g, &b); return g; } unsigned char z_b(SDL_Surface *surface, int color){ Uint8 r, g, b; SDL_GetRGB(color, surface->format, &r, &g, &b); return b; } #ifdef Z_HAVE_SDL1 void z_dumpbitmap(SDL_Surface *screen, SDL_Surface *surface){ SDL_Rect r; SDL_Surface *backup; #ifdef SDL_SRCALPHA int screenalpha, surfacealpha; #endif r.x = 0; r.y = 0; r.w = surface->w; r.h = surface->h; backup = SDL_CreateRGBSurface(SDL_SWSURFACE, surface->w, surface->h, zsdl->pxformat->BitsPerPixel, zsdl->pxformat->Rmask, zsdl->pxformat->Gmask, zsdl->pxformat->Bmask, 0); SDL_BlitSurface(screen, &r, backup, NULL); #ifdef SDL_SRCALPHA screenalpha = screen->format->alpha; surfacealpha = surface->format->alpha; #endif SDL_FillRect(screen, &r, z_makecol(50, 50, 50)); SDL_UpdateRect(screen, r.x, r.y, r.w, r.h); usleep(100000); SDL_BlitSurface(surface, NULL, screen, NULL); SDL_UpdateRect(screen, r.x, r.y, r.w, r.h); usleep(300000); SDL_BlitSurface(backup, NULL, screen, NULL); SDL_UpdateRect(screen, r.x, r.y, r.w, r.h); SDL_FreeSurface(backup); #ifdef SDL_SRCALPHA SDL_SetAlpha(screen, SDL_SRCALPHA, screenalpha); SDL_SetAlpha(surface, SDL_SRCALPHA, surfacealpha); #endif } #endif #ifdef Z_HAVE_SDL2 void z_dumpbitmap(SDL_Surface *unused, SDL_Surface *surface){ SDL_Window *window = SDL_CreateWindow("z_dumpbitmap", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, surface->w, surface->h, 0); SDL_Surface *screen = SDL_GetWindowSurface(window); SDL_BlitSurface(surface, NULL, screen, NULL); SDL_UpdateWindowSurface(window); } #endif void zsdl_font_save(SDL_Surface *screen){ #ifdef Z_HAVE_LIBPNG SDL_Surface *surface; int i, x, y; char *filename; int w, h, spacew, spaceh; w = zsdl->font_w; h = zsdl->font_h; spacew = w + 7; spaceh = h + 6; surface = SDL_CreateRGBSurface(SDL_SWSURFACE, spacew * 16, spaceh * 16, screen->format->BitsPerPixel, screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, 0); SDL_FillRect(surface, NULL, z_makecol(0x4f, 0x4f, 0x4f)); for (i=0; i<256; i++){ char ch; x = (i % 16) * spacew; y = (i / 16) * spaceh; ch = (char)i; zsdl_printf(surface, x, y, z_makecol(255, 255, 255), z_makecol(0, 0, 0), ZFONT_CHAR, &ch); } #if 0 for (i=0; i<256; i++){ // for (i=1; i<2; i++){ // char ch; int x0, y0, xd, yd; int white = z_makecol(255, 255, 255); int black = z_makecol(0, 0, 0); int red = z_makecol(255, 0, 0); x0 = (i % 16) * spacew; y0 = (i / 16) * spaceh; for (xd = 0; xd < w; xd += 2){ for (yd = 0; yd < h; yd += 2){ if (z_getpixel(surface, x0 + xd, y0 + yd) == white && z_getpixel(surface, x0 + xd + 2, y0 + yd + 2) == white){ if (z_getpixel(surface, x0 + xd + 2, y0 + yd + 1) == black) z_putpixel(surface, x0 + xd + 2, y0 + yd + 1, red); if (z_getpixel(surface, x0 + xd + 1, y0 + yd + 2) == black) z_putpixel(surface, x0 + xd + 1, y0 + yd + 2, red); } if (z_getpixel(surface, x0 + xd, y0 + yd + 2) == white && z_getpixel(surface, x0 + xd + 2, y0 + yd) == white){ if (z_getpixel(surface, x0 + xd + 1, y0 + yd + 1) == black) z_putpixel(surface, x0 + xd + 1, y0 + yd + 1, red); if (z_getpixel(surface, x0 + xd + 2, y0 + yd + 2) == black) z_putpixel(surface, x0 + xd + 2, y0 + yd + 2, red); } } } } for (x = 0; x < surface->w; x++){ for (y = 0; y < surface->h; y++){ if (z_getpixel(surface, x, y) == z_makecol(255, 0, 0)) z_putpixel(surface, x, y, z_makecol(255, 255, 255)); } } #endif filename = g_strdup_printf("font%dx%d.png", w, h); zpng_save(surface, filename, NULL); g_free(filename); SDL_FreeSurface(surface); #endif } int zsdl_font_dump(const char *pngfilename, const char *txtfilename){ SDL_Surface *surface; int w, h, spacew, spaceh, i, x0, y0, x, y, z, c; FILE *f; int acc; surface = zpng_load(pngfilename); if (!surface) return -1; f = fopen(txtfilename, "wt"); if (!f) return -2; spacew = surface->w / 16; spaceh = surface->h / 16; w = spacew - 7; h = spaceh - 6; fprintf(f, "const short font%dx%d[] = {\n", w, h); for (i = 0; i < 256; i++){ x0 = (i % 16) * spacew; y0 = (i / 16) * spaceh; fprintf(f, " "); for (y = 0; y < h; y++){ acc = 0; z = 1; for (x = 0; x < w; x++){ c = z_getpixel(surface, x0 + x, y0 + y); if (z_r(surface, c) > 0x80) acc |= z; z <<= 1; } if (y > 0) fprintf(f, ", "); fprintf(f, "0x%05x", acc); } fprintf(f, ", // char %d\n", i); } fprintf(f, "};\n"); SDL_FreeSurface(surface); fclose(f); return 0; } int zsdl_font_dump_skip_red(const char *pngfilename, const char *txtfilename){ SDL_Surface *surface; int w, h, spacew, spaceh, i, x0, y0, x, y, z, c, red; FILE *f; short acc; surface = zpng_load(pngfilename); if (!surface) return -1; f = fopen(txtfilename, "wt"); if (!f) return -2; spacew = surface->w / 16; spaceh = surface->h / 16; w = spacew - 7; h = spaceh - 6; red = z_makecol(255, 0, 0); dbg("pngfilename='%s'\n", pngfilename); fprintf(f, "const short font%dx%d[] = {\n", 8, 13); for (i = 0; i < 256; i++){ int first = 1; x0 = (i % 16) * spacew; y0 = (i / 16) * spaceh; fprintf(f, " "); for (y = 0; y < h; y++){ acc = 0; z = 1; c = z_getpixel(surface, x0, y0 + y); if (i < 3) { //dbg("color[%d, %d]=%06x\n", x0, y0 + y, c); } if (c == red /* was 0x0000ff*/){ dbg("red (char %02x, y %d)\n", i, y); continue; } for (x = 0; x < w; x++){ c = z_getpixel(surface, x0 + x, y0 + y); if (z_r(surface, c) > 0x80) acc |= z; z <<= 1; } if (!first) fprintf(f, ", "); first = 0; fprintf(f, "0x%04x", acc); dbg("w y=%d\n", y); } fprintf(f, ", // char %02X\n", i); } fprintf(f, "};\n"); SDL_FreeSurface(surface); fclose(f); return 0; } #endif struct zzsdl *zsdl_get(){ #ifdef Z_HAVE_SDL return zsdl; #else return NULL; #endif } #ifdef Z_HAVE_SDL int zsdl_sys_key_repeat(int delay, int rate){ #ifdef Z_MSC_MINGW int wdelay; DWORD wrate; if (SystemParametersInfo(SPI_GETKEYBOARDDELAY, 0, &wdelay, 0)){ switch (wdelay){ case 0: delay = 250; break; case 1: delay = 500; break; case 2: delay = 750; break; case 3: delay = 1000; break; default: break; // keep default value } } if (SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &wrate, 0)){ if (wrate >= 0 && wrate <= 31){ if (wrate < 2) wrate = 2; rate = wrate; } } #endif #ifdef Z_HAVE_SDL1 SDL_EnableKeyRepeat(delay, rate); // not in 2.0 #endif return 0; } #endif void z_disable_screensaver(void){ #ifdef Z_MSC_MINGW int ret; ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); /*ret = SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, -1); -1 the display is powering on 1 the display is going to low power 2 the display is being shut off*/ #endif #ifdef Z_UNIX char *term, *colorterm; int vcterm; term = getenv("TERM"); if (!term) vcterm = 1; else vcterm = (!strncmp(term, "con", 3) || !strncmp(term, "linux", 5)); /* setterm -blank 0 */ if (vcterm) { printf("\033[9;0]"); fflush(stdout); } #ifdef TIOCLINUX char ioctlarg[2]; /* setterm -powersave off */ ioctlarg[0]=10; ioctlarg[1]=0; /* off */ ioctl(0, TIOCLINUX, ioctlarg); #endif colorterm = getenv("COLORTERM"); if (!colorterm || strcmp(colorterm, "gnome-terminal") != 0){ /* setterm -powerdown 0 */ printf("\033[14;0]"); fflush(stdout); } /* xset -dpms */ if (getenv("DISPLAY")){ // system("xset -dpms ; xset s off"); pid_t pid=fork(); if (pid==0){ int ret = execlp("xset", "xset", "s", "off", "-dpms", NULL); error("execlp xset failed, ret=%d errno=%d\n", ret, errno); exit(-1); }else{ dbg("fork() for xset %d\n", pid); } waitpid(pid, NULL, 0); } #endif #ifdef Z_ANDROID //The screensaver is disabled by default since SDL 2.0.2. #endif } #ifdef Z_HAVE_SDL int zsdl_maximize(struct zzsdl *zsdl, int mode){ // 0=normal, 1=maximize, 2=toggle #ifdef Z_MSC_MINGW SDL_SysWMinfo info; int cmd = SW_MAXIMIZE; WINDOWPLACEMENT plc; SDL_VERSION(&info.version); SDL_GetWindowWMInfo(zsdl->window, &info); switch (mode){ case 0: cmd = SW_RESTORE; break; case 2: memset(&plc, 0, sizeof(plc)); plc.length = sizeof(plc); #ifdef Z_HAVE_SDL1 if (!GetWindowPlacement(info.window, &plc)) break; #endif #ifdef Z_HAVE_SDL2 if (!GetWindowPlacement(info.info.win.window, &plc)) break; #endif if (plc.showCmd == SW_MAXIMIZE) cmd = SW_RESTORE; break; } #ifdef Z_HAVE_SDL1 ShowWindow(info.window, cmd); #endif #ifdef Z_HAVE_SDL2 ShowWindow(info.info.win.window, cmd); #endif #endif return 0; } int zsdl_maximized(struct zzsdl *zsdl, int *w, int *h){ #ifdef Z_MSC_MINGW SDL_SysWMinfo info; int cmd = SW_MAXIMIZE; WINDOWPLACEMENT plc; SDL_VERSION(&info.version); SDL_GetWindowWMInfo(zsdl->window, &info); memset(&plc, 0, sizeof(plc)); plc.length = sizeof(plc); #ifdef Z_HAVE_SDL1 if (!GetWindowPlacement(info.window, &plc)) return 0; #endif #ifdef Z_HAVE_SDL2 if (!GetWindowPlacement(info.info.win.window, &plc)) return 0; #endif if (w != NULL) *w = plc.rcNormalPosition.right - plc.rcNormalPosition.left; if (h != NULL) *h = plc.rcNormalPosition.bottom - plc.rcNormalPosition.top; return (plc.showCmd == SW_MAXIMIZE); #else return 0; #endif } int z_color_from_html(char *htmlcolor){ unsigned int r, g, b, n; char *c = htmlcolor; if (*c == '#') c++; if (strlen(c) < 6) return -1; n = sscanf(c, "%02x%02x%02x", &r, &g, &b); if (n != 3) return -2; return z_makecol(r, g, b); } int z_line_intersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y){ double a1, b1, c1, a3, b3, c3, d, ix, iy; a1 = y2 - y1; b1 = x1 - x2; c1 = 0 - a1 * x1 - b1 * y1; a3 = y4 - y3; b3 = x3 - x4; c3 = 0 - a3 * x3 - b3 * y3; d = a1 * b3 - a3 * b1; if (d == 0) return -1; // parallel ix = (- b3 * c1 + b1 * c3) / d; iy = (- a1 * c3 + a3 * c1) / d; if (fabs(y1 - y2) > fabs(x1 - x2)){ if (iy < Z_MIN(y1, y2)) return 0; // intersect out of segment if (iy > Z_MAX(y1, y2)) return 0; }else{ if (ix < Z_MIN(x1, x2)) return 0; // intersect out of segment if (ix > Z_MAX(x1, x2)) return 0; } if (fabs(y3 - y4) > fabs(x3 - x4)){ if (iy < Z_MIN(y3, y4)) return 0; // intersect out of segment if (iy > Z_MAX(y3, y4)) return 0; }else{ if (ix < Z_MIN(x3, x4)) return 0; // intersect out of segment if (ix > Z_MAX(x3, x4)) return 0; } if (x) *x = ix; if (y) *y = iy; return 1; } int z_point_is_in_quadrangle(double xp, double yp, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4){ double a, b, c, d1, d2; a = y2 - y1; b = x1 - x2; c = 0 - a * x1 - b * y1; d1 = a * xp + b * yp + c; a = y3 - y2; b = x2 - x3; c = 0 - a * x2 - b * y2; d2 = a * xp + b * yp + c; if (d1 < 0 && d2 > 0) return 0; if (d1 > 0 && d2 < 0) return 0; a = y4 - y3; b = x3 - x4; c = 0 - a * x3 - b * y3; d2 = a * xp + b * yp + c; if (d1 < 0 && d2 > 0) return 0; if (d1 > 0 && d2 < 0) return 0; a = y1 - y4; b = x4 - x1; c = 0 - a * x4 - b * y4; d2 = a * xp + b * yp + c; if (d1 < 0 && d2 > 0) return 0; if (d1 > 0 && d2 < 0) return 0; return 1; } #endif libzia-4.67/src/zbinbuf.c0000644000175000017500000001054514662101505012244 00000000000000/* zbinbuf - Binary buffer Copyright (C) 2011-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #ifdef Z_MSC #pragma warning(disable : 4996) #endif struct zbinbuf *zbinbuf_init(void){ struct zbinbuf *zbb; zbb = g_new0(struct zbinbuf, 1); zbb->size = 256; zbb->buf = g_new0(char, zbb->size); zbb->buf[0] = '\0'; zbb->len = 0; zbb->increment = 0; return zbb; } void zbinbuf_free(struct zbinbuf *zbb){ if (zbb == NULL) return; g_free(zbb->buf); g_free(zbb); } void zbinbuf_append_bin(struct zbinbuf *zbb, const void *data, int len){ int size; if (len <= 0) return; size = zbb->len + len + 1; if (size > zbb->size){ size += zbb->increment; zbb->buf = (char *)g_realloc(zbb->buf, size); zbb->size = size; } memcpy(zbb->buf + zbb->len, data, len); zbb->len += len; zbb->buf[zbb->len] = '\0'; } void zbinbuf_append(struct zbinbuf *zbb, const char *str){ zbinbuf_append_bin(zbb, str, strlen(str)); } int zbinbuf_sprintf(struct zbinbuf *zbb, char *fmt, ...) { gchar *c; int len; va_list l; va_start(l, fmt); c = g_strdup_vprintf(fmt, l); len = strlen(c); zbinbuf_truncate(zbb, 0); zbinbuf_append_bin(zbb, c, len); g_free(c); va_end(l); return len; } int zbinbuf_sprintfa(struct zbinbuf *zbb, char *fmt, ...) { gchar *c; int len; va_list l; va_start(l, fmt); c = g_strdup_vprintf(fmt, l); len = strlen(c); zbinbuf_append_bin(zbb, c, len); g_free(c); va_end(l); return len; } void zbinbuf_prepend(struct zbinbuf *zbb, void *data, int len){ int size; if (len <= 0) return; size = zbb->len + len + 1; if (size > zbb->size){ zbb->buf = (char *)g_realloc(zbb->buf, size); zbb->size = size; } memmove(zbb->buf + len, zbb->buf, zbb->len + 1); memcpy(zbb->buf, data, len); zbb->len += len; zbb->buf[zbb->len] = '\0'; } void zbinbuf_erase(struct zbinbuf *zbb, int pos, int len){ int l; if (len <= 0) return; if (pos < 0) pos = 0; l = zbb->len - pos - len; // 012xx56789 pos=3 len=2 if (l > 0){ memmove(zbb->buf + pos, zbb->buf + pos + len, l + 1); } zbb->len -= len; zbb->buf[zbb->len] = '\0'; } void zbinbuf_truncate(struct zbinbuf *zbb, int len){ zbb->len = Z_MIN(len, zbb->size - 1); zbb->buf[zbb->len] = '\0'; } void zbinbuf_getstr(struct zbinbuf *zbb, int pos, char *str, int maxlen){ int len; if (pos < 0){ *str = '\0'; return; } len = zbb->len - pos + 1; if (len <= 0) return; if (maxlen >= 0 && len > maxlen) len = maxlen; g_strlcpy(str, zbb->buf + pos, len); //memcpy(str, zbb->buf + pos, len); untested } void zbinbuf_getline(struct zbinbuf *zbb, int *pos, char *str, int maxlen){ int i; char *src, *dst; if (maxlen <= 0) return; if (pos < 0){ *str = '\0'; return; } src = zbb->buf + *pos; // no dereference until boundary check dst = str; for (i = 0; i < maxlen - 1; i++){ if (*pos >= zbb->len) break; if (*src == '\r' || *src == '\n') break; *dst = *src; dst++; src++; (*pos)++; } *dst = '\0'; } int zbinbuf_append_file(struct zbinbuf *zbb, const char *filename){ FILE *f; int r, total = 0; char buf[65536]; f = fopen(filename, "rb"); if (!f) return -1; while(1){ r = fread(buf, 1, sizeof(buf), f); if (r < 0) { total = -1; break; } if (r == 0) break; zbinbuf_append_bin(zbb, buf, r); total += r; } fclose(f); return total; } int zbinbuf_write_to_file(struct zbinbuf *zbb, const char *filename, int offset, int len){ FILE *f; int ret; f = fopen(filename, "wb"); if (!f) return -1; ret = fwrite(zbb->buf + offset, 1, len, f); fclose(f); return ret; } void zbinbuf_append_le_s16(struct zbinbuf *zbb, int16_t a){ zbinbuf_append_bin(zbb, &a, sizeof(a)); } void zbinbuf_append_le_s32(struct zbinbuf *zbb, int32_t a){ zbinbuf_append_bin(zbb, &a, sizeof(a)); } char *zbinbuf_readline(struct zbinbuf *zbb){ char *c = (char *)memchr(zbb->buf, '\n', zbb->len); if (c == NULL) return NULL; char *ret = g_strndup(zbb->buf, c - zbb->buf + 1); ret[c - zbb->buf] = '\0'; zbinbuf_erase(zbb, 0, c - zbb->buf + 1); z_trim_end(ret); return ret; }libzia-4.67/src/zdebug.c0000644000175000017500000001450314662101505012063 00000000000000/* zdebug.c Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #ifdef Z_HAVE_GETOPT_H #include #endif #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #ifdef Z_HAVE_ANDROID_LOG_H #include #endif #include static int debug_type = 0; static FILE *debug_file = NULL; static void (*debug_free_callback)(void) = NULL; static void (*debug_trace_callback)(char *) = NULL; char *debug_msg_title; void zdebug_init(int argc, char *argv[], void (*free_callback)(void), void (*trace_callback)(char *), char *msg_title){ char *debug_filename = NULL, *s; // int option_index = 0; int c; /*#ifdef Z_HAVE_GETOPT_H static struct option long_options[] = { {"debug", 2, 0, 'd'}, {0, 0, 0, 0} }; #endif*/ debug_free_callback = free_callback; debug_trace_callback = trace_callback; debug_msg_title = g_strdup(msg_title); s = getenv("TUCNAK_DEBUG"); if (s){ if (strlen(s)!=0){ debug_type=1; debug_filename=s; }else{ debug_type=2; } } #ifdef Z_MSC debug_file = stderr; #endif //#ifdef Z_HAVE_GETOPT_H optind = 1; // reset scanning from begin // while((c = getopt_long(argc, argv, "d", long_options, &option_index)) != -1){ while((c = getopt(argc, argv, ":dD:")) != -1){ switch (c){ case 'd': case 'D': if (optarg) { debug_type=1; debug_filename=optarg; }else{ debug_type=2; } break; } } optind = 1; //#endif switch (debug_type){ case 1: debug_file = fopen(debug_filename, "wt"); break; #ifndef Z_MINGW case 2: debug_file = stderr; break; #endif } #ifdef Z_ANDROID debug_file = stderr; #endif /*#ifdef Z_MINGW debug_file = fopen("_stderr.txt", "wt"); #endif*/ g_log_set_default_handler(z_g_log_func, NULL); } void zdebug_free(void){ if (!debug_file) return; if (debug_msg_title) g_free(debug_msg_title); #ifndef Z_MINGW if (debug_file != stderr) fclose(debug_file); #endif } void z_g_log_func(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data){ if (log_level & (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL)){ dbg("%s: %s\n", log_domain, message); }else{ error("%s: %s\n", log_domain, message); } } void z_alsa_error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...){ va_list va; char *c; va_start(va, fmt); c = g_strdup_vprintf(fmt, va); va_end(va); dbg("Alsa error: %s in %s, %s:%d\n", c, function, file, line); g_free(c); } int zdebug_debug_type(void){ return debug_type; } void dbg(char *fmt, ...) { va_list l; #ifndef Z_ANDROID // all logged on android if (!debug_file) return; #endif va_start(l, fmt); if (debug_file) { vfprintf(debug_file, fmt, l); } #ifdef Z_MSC_MINGW { gchar *c = g_strdup_vprintf(fmt, l); OutputDebugString(c); g_free(c); } #endif #ifdef Z_HAVE_ANDROID_LOG_H __android_log_vprint(ANDROID_LOG_INFO, "Tucnak"/*debug_msg_title*/, fmt, l); #endif va_end(l); } void error(char *fmt, ...){ va_list l; FILE *df = debug_file; //z_msgbox_error("error", "fmt='%s' debug_file=%p", fmt, debug_file); #ifndef Z_MINGW if (!df) df = stderr; #endif va_start(l, fmt); // fprintf(df, "ERROR: "); vfprintf(df, fmt, l); #ifdef Z_MSC_MINGW { gchar *c = g_strdup_vprintf(fmt, l); OutputDebugString(c); g_free(c); } #endif #ifdef Z_HAVE_ANDROID_LOG_H __android_log_vprint(ANDROID_LOG_ERROR, "Tucnak" /*debug_msg_title*/, fmt, l); #endif va_end(l); } void trace(int enable, char *fmt, ...) { va_list l; gchar *c; if (!enable) return; if (debug_file){ va_start(l, fmt); vfprintf(debug_file, fmt, l); va_end(l); fprintf(debug_file, "\n"); } va_start(l, fmt); c = g_strdup_vprintf(fmt, l); if (debug_trace_callback) debug_trace_callback(c); #ifdef Z_MSC_MINGW OutputDebugString(c); OutputDebugString("\r\n"); #endif g_free(c); va_end(l); } #ifdef Z_MSC_MINGW void zinternal_error(char *file, int line, char *fmt, ...) { va_list l; GString *gs = g_string_sized_new(100); va_start(l, fmt); g_string_printf(gs, "Internal error at %s:%d\r\n", file, line); g_string_append_vprintf(gs, fmt, l); va_end(l); /* g_string_append(gs, "\r\n"); g_string_append(gs, z_dump_backtrace());*/ z_msgbox_error(debug_msg_title ? debug_msg_title : "Libzia app", gs->str); g_string_free(gs, TRUE); exit(7301); } #else void zinternal_error(char *file, int line, char *fmt, ...) { va_list l; GString *gs = g_string_sized_new(100); int a; char *c; if (debug_free_callback) debug_free_callback(); va_start(l, fmt); #ifdef Z_ANDROID g_string_append_printf(gs, "INTERNAL ERROR in "); a = 0; #else g_string_append_printf(gs, "\007\033[1mINTERNAL ERROR\033[0m in "); a = gs->len; #endif g_string_append_printf(gs, "pid=%d at %s:%d: ", getpid(), file, line); // g_string_append_vprintf is not on Etch c = g_strdup_vprintf(fmt, l); g_string_append(gs, c); g_free(c); va_end(l); /* g_string_append(gs, "\nBacktrace:\n"); g_string_append(gs, z_dump_backtrace(gs, NULL, NULL, 0)); g_string_append(gs, "\n");*/ error("%s", gs->str); if (zsdl_get()){ g_string_erase(gs, 0, a); z_msgbox_error(debug_msg_title ? debug_msg_title : "Libzia app", "%s", gs->str); } sleep(0); zforce_dump(); exit(7302); } #endif void zhexdump(void *buf, size_t len, const char *desc){ size_t i; for (i = 0; i < len; i++){ dbg("%02X ", (unsigned char)((unsigned char*)buf)[i]); } if (desc != NULL) dbg(" %s\n", desc); } libzia-4.67/src/zspidev.c0000644000175000017500000000344014662101505012265 00000000000000/* zspidev.c - SPI over spidev Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #ifdef Z_HAVE_LINUX_SPI_SPIDEV_H #include #endif //#include //#ifdef Z_HAVE_SYS_IOCTL_H //#include //#endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_LINUX_SPI_SPIDEV_H int zspidev_write(struct zbusdev *dev, void *buf, size_t len){ if (dev->fd < 0) return -1; int ret = write(dev->fd, buf, len); if (ret < 0) { close(dev->fd); dev->fd = -1; return -1; } return ret; } int zspidev_read(struct zbusdev *dev, void *buf, size_t len){ if (dev->fd < 0) return -1; int ret = read(dev->fd, buf, len); if (ret < 0) { close(dev->fd); dev->fd = -1; return -1; } return ret; } #endif int zspidev_free(struct zbusdev *dev){ if (dev->fd >= 0){ close(dev->fd); dev->fd = -1; } return 0; } struct zbusdev *zspidev_init(int busnr, int cs){ struct zbusdev *dev = (struct zbusdev *)g_new0(struct zbusdev, 1); dev->busnr = busnr; dev->cs = cs; dev->filename = g_strdup_printf("/dev/spidev%d.%d", dev->busnr, dev->cs); #ifdef Z_HAVE_LINUX_SPI_SPIDEV_H dev->free = zspidev_free; dev->write = zspidev_write; dev->read = zspidev_read; #endif dev->fd = open(dev->filename, O_RDWR); if (dev->fd < 0) { zspidev_free(dev); return NULL; } return dev; } libzia-4.67/src/zi2c.c0000644000175000017500000000444214662101505011453 00000000000000/* zi2c.c - I2C library Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #ifdef Z_HAVE_LINUX_I2C_DEV_H #include #endif #include #ifdef Z_HAVE_SYS_IOCTL_H #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_LINUX_I2C_DEV_H int zi2c_write(struct zbusdev *dev, void *buf, size_t len){ if (dev->fd < 0) return -1; int ret = write(dev->fd, buf, len); if (ret < 0) { close(dev->fd); dev->fd = -1; return -1; } return ret; } int zi2c_read(struct zbusdev *dev, void *buf, size_t len){ if (dev->fd < 0) return -1; int ret = read(dev->fd, buf, len); if (ret < 0) { close(dev->fd); dev->fd = -1; return -1; } return ret; } #else int zi2c_write(struct zbusdev *dev, void *buf, size_t len) { zinternal("zi2c_write not supported on this system"); return -1; } int zi2c_read(struct zbusdev *dev, void *buf, size_t len){ zinternal("zi2c_read not supported on this system"); return -1; } #endif struct zbusdev *zi2c_init(int busnr, int slave){ struct zbusdev *dev = (struct zbusdev *)g_new0(struct zbusdev, 1); dev->busnr = busnr; dev->slave = slave; dev->filename = g_strdup_printf("/dev/i2c-%d", dev->busnr); #ifdef Z_HAVE_LINUX_I2C_DEV_H dev->free = zi2c_free; dev->write = zi2c_write; dev->read = zi2c_read; dev->fd = open(dev->filename, O_RDWR); if (dev->fd < 0) { zi2c_free(dev); return NULL; } //printf("I2C_SLAVE %d %d\n", I2C_SLAVE, dev->slave); int ret = ioctl(dev->fd, I2C_SLAVE, dev->slave); if (ret < 0) { zi2c_free(dev); return NULL; } #endif return dev; } int zi2c_free(struct zbusdev *dev){ if (dev->fd >= 0){ close(dev->fd); dev->fd = -1; } return 0; } libzia-4.67/src/zsun.c0000644000175000017500000001425114662101505011602 00000000000000/* sun.c - Sunrise and sunset Copyright (C) 2010 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Based on http://williams.best.vwh.net/sunrise_sunset_algorithm.htm Source: Almanac for Computers, 1990 published by Nautical Almanac Office United States Naval Observatory Washington, DC 20392 Inputs: day, month, year: date of sunrise/sunset latitude, longitude: location for sunrise/sunset zenith: Sun's zenith for sunrise/sunset offical = 90 degrees 50' civil = 96 degrees nautical = 102 degrees astronomical = 108 degrees NOTE: longitude is positive for East and negative for West NOTE: the algorithm assumes the use of a calculator with the trig functions in "degree" (rather than "radian") mode. Most programming languages assume radian arguments, requiring back and forth convertions. The factor is 180/pi. So, for instance, the equation RA = atan(0.91764 * tan(L)) would be coded as RA = (180/pi)*atan(0.91764 * tan((pi/180)*L)) to give a degree answer with a degree input for L. */ #define _USE_MATH_DEFINES // for MSVC #include #include #include #include #include #include static double dsin(double x){ return sin(x * M_PI/180.0); } static double dcos(double x){ return cos(x * M_PI/180.0); } static double dtan(double x){ return tan(x * M_PI/180.0); } static double dasin(double x){ return asin(x) * 180.0/M_PI; } static double dacos(double x){ return acos(x) * 180.0/M_PI; } static double datan(double x){ return atan(x) * 180.0/M_PI; } static void norm360(double *x){ while (*x < 0.0) *x += 360.0; while (*x >= 360.0) *x -= 360.0; } static void norm24(double *x){ while (*x < 0.0) *x += 24.0; while (*x >= 24.0) *x -= 24.0; } double zsun_riseset(time_t tt, int sunrise, double latitude, double longitude){ struct tm tm; double month, year, day, N1, N2, N3, N, lngHour, t, M, L, RA, sinDec, cosDec, zenith, cosH, H, T, UT; double Lquadrant, RAquadrant, A; // 1. first calculate the day of the year gmtime_r(&tt, &tm); month = tm.tm_mon + 1; year = tm.tm_year + 1900; day = tm.tm_mday; N1 = floor(275 * month / 9); N2 = floor((month + 9) / 12); N3 = (1 + floor((year - 4 * floor(year / 4) + 2) / 3)); N = N1 - (N2 * N3) + day - 30; // 2. convert the longitude to hour value and calculate an approximate time lngHour = longitude / 15; if (sunrise) t = N + ((6 - lngHour) / 24); else t = N + ((18 - lngHour) / 24); // 3. calculate the Sun's mean anomaly M = (0.9856 * t) - 3.289; // 4. calculate the Sun's true longitude L = M + (1.916 * dsin(M)) + (0.020 * dsin(2 * M)) + 282.634; norm360(&L); // NOTE: L potentially needs to be adjusted into the range [0,360) by adding/subtracting 360 // 5a. calculate the Sun's right ascension RA = datan(0.91764 * dtan(L)); //if (sunrise) printf("RA=%f", RA); // NOTE: RA potentially needs to be adjusted into the range [0,360) by adding/subtracting 360 norm360(&RA); //if (sunrise) printf(" ->%f\n", RA); // 5b. right ascension value needs to be in the same quadrant as L Lquadrant = (floor( L/90)) * 90; RAquadrant = (floor(RA/90)) * 90; A = RA + (Lquadrant - RAquadrant); //if (sunrise) printf("A=%f\n", A); // 5c. right ascension value needs to be converted into hours RA = A / 15; // 6. calculate the Sun's declination sinDec = 0.39782 * dsin(L); cosDec = dcos(dasin(sinDec)); // 7a. calculate the Sun's local hour angle zenith = 90.0 + 50/60; cosH = (dcos(zenith) - (sinDec * dsin(latitude))) / (cosDec * dcos(latitude)); if (cosH > 1) return -1; // the sun never rises on this location (on the specified date) if (cosH < -1) return -2; // the sun never sets on this location (on the specified date) // 7b. finish calculating H and convert into hours if (sunrise) H = 360 - dacos(cosH); else H = dacos(cosH); H = H / 15; // 8. calculate local mean time of rising/setting //printf("RA=%f\n", RA); T = H + RA - (0.06571 * t) - 6.622; // 9. adjust back to UTC UT = T - lngHour; // NOTE: UT potentially needs to be adjusted into the range [0,24) by adding/subtracting 24 norm24(&UT); // 10. convert UT value to local time zone of latitude/longitude // double localT = UT + localOffset; return UT; } gchar *zsun_strdup_riseset(time_t t, double latitude, double longitude){ double rise = zsun_riseset(t, 1, latitude, longitude); double set = zsun_riseset(t, 0, latitude, longitude); if (rise == -1 || set == -1){ return g_strdup("polar night"); } if (rise == -2 || set == -2){ return g_strdup("polar day"); } return g_strdup_printf("%02d:%02d-%02d:%02d", (int)rise, ((int)(rise * 60))% 60, (int)set, ((int)(set * 60))%60); } void zsun_test(){ /* latitude = 50.1; longitude = 14.41; day = 23; month = 9; year = 2015;*/ int i; struct tm tm; time_t tt; char *c; GString *gs = g_string_new(""); #if 1 for (i = 0; i < 365; i += 30){ memset(&tm, 0, sizeof(tm)); tm.tm_mday = i + 1; tm.tm_mon = 1 - 1; tm.tm_year = 2015 - 1900; tt = mktime(&tm); gmtime_r(&tt, &tm); c = zsun_strdup_riseset(tt, 50.1, 15); printf("%02d.%02d.%04d: %s\n", tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900, c); g_free(c); } #else memset(&tm, 0, sizeof(tm)); tm.tm_mday = 21 + 1; tm.tm_mon = 6 - 1; tm.tm_year = 2015 - 1900; tt = mktime(&tm); gmtime_r(&tt, &tm); c = zsun_strdup_riseset(tt, 50.1, 15); printf("%02d.%02d.%04d: %s\n", tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900, c); g_free(c); memset(&tm, 0, sizeof(tm)); tm.tm_mday = 22 + 1; tm.tm_mon = 6 - 1; tm.tm_year = 2015 - 1900; tt = mktime(&tm); gmtime_r(&tt, &tm); c = zsun_strdup_riseset(tt, 50.1, 15); printf("%02d.%02d.%04d: %s\n", tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900, c); g_free(c); #endif printf("%s", gs->str); g_string_free(gs, TRUE); } libzia-4.67/src/zbat.c0000644000175000017500000002261014662101505011541 00000000000000/* zbat.c - battery state info Copyright (C) 2013-2014 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #ifdef Z_UNIX_ANDROID #include #include #endif #ifdef Z_MSC // _MINGW #include #include #include #include #endif struct zbat *zbat_init(void){ struct zbat *zbat = g_new0(struct zbat, 1); return zbat; } void zbat_free(struct zbat *zbat){ if (!zbat) return; g_free(zbat->technology); g_free(zbat); } #ifdef Z_UNIX_ANDROID void zbat_getinfo(struct zbat *zbat){ struct dirent *d; long charge_now, charge_full; char s[256]; int n = 0; long sum = 0; zbat->n = 0; DIR *dp = opendir("/sys/class/power_supply"); if (dp) { while ((d = readdir(dp)) != NULL){ if (strcmp(d->d_name, ".") == 0) continue; if (strcmp(d->d_name, "..") == 0) continue; // dbg("found '%d'\n", d->d_name); char *file = g_strconcat("/sys/class/power_supply/", d->d_name, "/technology", NULL); FILE *f = fopen(file, "rt"); g_free(file); if (!f) continue; if (!fgets(s, sizeof(s) - 1, f)){ fclose(f); continue; }; fclose(f); z_strip_crlf(s); // dbg("Battery %s technology %s\n", d->d_name, s); g_free(zbat->technology); zbat->technology = g_strdup(s); file = g_strconcat("/sys/class/power_supply/", d->d_name, "/capacity", NULL); f = fopen(file, "rt"); g_free(file); if (f){ if (!fgets(s, sizeof(s) - 1, f)){ fclose(f); continue; } fclose(f); sum += atoi(s); n++; //dbg("Battery %s %d%% (capacity)\n", d->d_name, atoi(s)); continue; } file = g_strconcat("/sys/class/power_supply/", d->d_name, "/charge_full", NULL); f = fopen(file, "rt"); g_free(file); if (!f) continue; if (!fgets(s, sizeof(s) - 1, f)){ fclose(f); continue; } fclose(f); charge_full = atol(s); file = g_strconcat("/sys/class/power_supply/", d->d_name, "/charge_now", NULL); f = fopen(file, "rt"); g_free(file); if (!f) continue; if (!fgets(s, sizeof(s) - 1, f)){ fclose(f); continue; } fclose(f); charge_now = atol(s); if (charge_now > charge_full) continue; sum += (charge_now * 100) / charge_full; //dbg("Battery %s %d%% (charge_now=%ld, charge_full=%ld)\n", d->d_name, (charge_now * 100) / charge_full, charge_now, charge_full); n++; } closedir(dp); } if (n == 0){ //dbg("n==0\n"); DIR *dp = opendir("/proc/acpi/battery/"); if (dp) { //dbg("dir opened\n"); while ((d = readdir(dp)) != NULL){ if (strcmp(d->d_name, ".") == 0) continue; if (strcmp(d->d_name, "..") == 0) continue; //dbg("%s\n", d->d_name); char *file = g_strconcat("/proc/acpi/battery/", d->d_name, "/state", NULL); FILE *f = fopen(file, "rt"); g_free(file); if (!f) continue; int remaining = -1; while(fgets(s, sizeof(s) - 1, f) != NULL){ char *c; z_strip_crlf(s); c = strchr(s, ':'); if (c == NULL) continue; if (strncmp(s, "remaining capacity", 18) == 0){ remaining = atoi(c + 1); break; } } fclose(f); if (remaining == -1) continue; file = g_strconcat("/proc/acpi/battery/", d->d_name, "/info", NULL); f = fopen(file, "rt"); g_free(file); if (!f) continue; int lastfull = -1; while(fgets(s, sizeof(s) - 1, f) != NULL){ char *c; z_strip_crlf(s); c = strchr(s, ':'); if (c == NULL) continue; if (strncmp(s, "last full capacity", 18) == 0){ lastfull = atoi(c + 1); } if (strncmp(s, "battery type", 12) == 0){ g_free(zbat->technology); zbat->technology = g_strdup(g_strstrip(c + 1)); } } fclose(f); sum += (remaining * 100) / lastfull; // dbg("Battery %s %d%% (remaining=%ld, lastfull=%ld)\n", d->d_name, (remaining * 100) / lastfull, remaining, lastfull); n++; } closedir(dp); } } zbat->n = n; if (n > 0) zbat->capacity = sum / n; //dbg("Sum %d %ld%%\n", zbat->n, zbat->capacity); } #endif #ifdef Z_MSC //_MINGW #define GBS_HASBATTERY 0x1 #define GBS_ONBATTERY 0x2 void zbat_getinfo(struct zbat *zbat){ ULONG sum =0UL, n = 0UL; #if 0 int idev; n = 0UL; HDEVINFO hdev = SetupDiGetClassDevs(&GUID_DEVCLASS_BATTERY, 0, 0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); if (hdev == INVALID_HANDLE_VALUE) return; for (idev = 0; idev < 100; idev++){ DWORD cbRequired = 0; PSP_DEVICE_INTERFACE_DETAIL_DATA pdidd; SP_DEVICE_INTERFACE_DATA did = {0}; did.cbSize = sizeof(did); if (!SetupDiEnumDeviceInterfaces(hdev, 0, &GUID_DEVCLASS_BATTERY, idev, &did)) break; SetupDiGetDeviceInterfaceDetail(hdev, &did, 0, 0, &cbRequired, 0); if (ERROR_INSUFFICIENT_BUFFER != GetLastError()) continue; pdidd = (PSP_DEVICE_INTERFACE_DETAIL_DATA)LocalAlloc(LPTR, cbRequired); if (!pdidd) continue; pdidd->cbSize = sizeof(*pdidd); if (SetupDiGetDeviceInterfaceDetail(hdev, &did, pdidd, cbRequired, &cbRequired, 0)){ BATTERY_QUERY_INFORMATION bqi = {0}; DWORD dwWait = 0; DWORD dwOut; // Enumerated a battery. Ask it for information. HANDLE hBattery = CreateFile(pdidd->DevicePath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hBattery == INVALID_HANDLE_VALUE) continue; // Ask the battery for its tag. if (DeviceIoControl(hBattery, IOCTL_BATTERY_QUERY_TAG, &dwWait, sizeof(dwWait), &bqi.BatteryTag, sizeof(bqi.BatteryTag), &dwOut, NULL) && bqi.BatteryTag) { // With the tag, you can query the battery info. BATTERY_INFORMATION bi = {0}; bqi.InformationLevel = BatteryInformation; if (DeviceIoControl(hBattery, IOCTL_BATTERY_QUERY_INFORMATION, &bqi, sizeof(bqi), &bi, sizeof(bi), &dwOut, NULL)){ BATTERY_WAIT_STATUS bws = {0}; BATTERY_STATUS bs; char chemistry[5]; // Only non-UPS system batteries count //if ((bi.Capabilities & BATTERY_SYSTEM_BATTERY) == 0) //if (!(bi.Capabilities & BATTERY_IS_SHORT_TERM)) dwResult |= GBS_HASBATTERY; // Query the battery status. bws.BatteryTag = bqi.BatteryTag; if (DeviceIoControl(hBattery, IOCTL_BATTERY_QUERY_STATUS, &bws, sizeof(bws), &bs, sizeof(bs), &dwOut, NULL)){ memset(chemistry, 0, sizeof(chemistry)); memcpy(chemistry, bi.Chemistry, 4); /*dbg("power=%d discharging=%d charging=%d critical=%d chemistry='%s' fullchargedcap=%lu highcap=%lu cap=%lu\n" , !!(bs.PowerState & BATTERY_POWER_ON_LINE), !!(bs.PowerState & BATTERY_DISCHARGING), !!(bs.PowerState & BATTERY_CHARGING), !!(bs.PowerState & BATTERY_CRITICAL), chemistry, bi.FullChargedCapacity, bws.HighCapacity, bs.Capacity);*/ if (bs.Capacity > bi.FullChargedCapacity) continue; if (bi.FullChargedCapacity == 0) continue; //TODO BATTERY_CAPACITY_RELATIVE sum += (bs.Capacity * 100) / bi.FullChargedCapacity; n++; g_free(zbat->technology); zbat->technology = g_strdup(chemistry); } } } CloseHandle(hBattery); } LocalFree(pdidd); } SetupDiDestroyDeviceInfoList(hdev); #endif zbat->n = n; if (n > 0) zbat->capacity = sum / n; else zbat->capacity = 0; } #endif #ifdef Z_MINGW void zbat_getinfo(struct zbat *zbat){ zbat->n = 0; } #endif #ifdef Z_HAVE_SDL void zbat_draw(struct zbat *bat, SDL_Surface *surface, int x, int y, int w, int h){ int i, x1, x2, c; int act = z_makecol(0, 200, 0); int bkg = z_makecol(90, 90, 90); int thr = h - (h * bat->capacity) / 100; if (bat->n < 1) return; if (bat->capacity < 25) act = z_makecol(200, 0, 0); for (i = 0; i < h; i++){ x1 = x; x2 = x + w - 1; if (i < h / 6) { // narrower plus x1 += w / 3; x2 -= w / 3; } c = act; if (i < thr) c = bkg; z_line(surface, x1, y + i, x2, y + i, c); } } #endif libzia-4.67/src/zinput.c0000644000175000017500000001077414662101505012142 00000000000000/* zinput.c - Linux input /dev/input/eventX Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. https://gist.github.com/uobikiemukot/457338b890e96babf60b#file-linux_input-c-L2 */ #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_HAVE_SDL #include #endif struct zinput *zinput_open(char *device, struct zselect *zsel){ #ifdef Z_HAVE_LINUX_INPUT_H struct zinput *inp = g_new0(struct zinput, 1); inp->device = g_strdup(device); inp->zsel = zsel; inp->fd = open(inp->device, O_RDONLY); if (inp->fd < 0) { zinput_free(inp); return NULL; } inp->event = g_new0(struct input_event, 1); return inp; #else return NULL; #endif } void zinput_free(struct zinput *inp){ #ifdef Z_HAVE_LINUX_INPUT_H if (!inp) return; if (inp->fd >= 0) { zselect_set(inp->zsel, inp->fd, NULL, NULL, NULL, inp); close(inp->fd); } g_free(inp->device); g_free(inp->event); g_free(inp); #endif } void zinput_calibrate(struct zinput *inp, int swap_xy, int x_res, int y_res, int x_min, int x_max, int y_min, int y_max) { inp->swap_xy = swap_xy; inp->x_res = x_res; inp->y_res = y_res; inp->x_min = x_min; inp->x_max = x_max; inp->y_min = y_min; inp->y_max = y_max; } void zinput_register_touchscreen_sdl(struct zinput *inp){ zselect_set(inp->zsel, inp->fd, zinput_read_handler, NULL, NULL, inp); inp->touch_sdl = 1; } static int zinput_get_px(struct zinput *inp){ int val = inp->swap_xy ? inp->abs_y : inp->abs_x; int px; if (inp->x_min < inp->x_max){ px = ((inp->abs_x - inp->x_min) * inp->x_res) / (inp->x_max - inp->x_min); }else{ px = ((inp->abs_x - inp->x_max) * inp->x_res) / (inp->x_min - inp->x_max); } if (px < 0) px = 0; if (px >= inp->x_res) px = inp->x_res - 1; if (inp->debug) printf("abs=%d -> px=%d\n", val, px); return px; } static int zinput_get_py(struct zinput *inp){ int val = inp->swap_xy ? inp->abs_x : inp->abs_y; int py; if (inp->y_min < inp->y_max){ py = ((inp->abs_y - inp->y_min) * inp->y_res) / (inp->y_max - inp->y_min); }else{ py = ((inp->y_min - inp->abs_y) * inp->y_res) / (inp->y_min - inp->y_max); } if (py < 0) py = 0; if (py >= inp->y_res) py = inp->y_res - 1; if (inp->debug) printf("abs=%d -> py=%d\n", val, py); return py; } void zinput_read_handler(void *xxx){ #ifdef Z_HAVE_SDL #ifdef Z_HAVE_LINUX_INPUT_H struct zinput *inp = (struct zinput*)xxx; SDL_Event ev; int ret = read(inp->fd, inp->event, sizeof(struct input_event)); if (ret < 0) { error("Can't read from %s fd %d, closing", inp->device, inp->fd); zselect_set(inp->zsel, inp->fd, NULL, NULL, NULL, inp); close(inp->fd); inp->fd = -1; } switch(inp->event->type){ case EV_KEY: switch(inp->event->code){ case BTN_TOUCH: inp->btn_touch = inp->event->value; break; } break; case EV_ABS: if (!inp->touch_sdl) break; // code, value switch(inp->event->code){ case ABS_X: inp->abs_x = inp->event->value; break; case ABS_Y: inp->abs_y = inp->event->value; break; } break; case EV_SYN: ev.type = inp->btn_touch ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP; if (inp->btn_touch == inp->old_btn_touch) ev.type = SDL_MOUSEMOTION; inp->old_btn_touch = inp->btn_touch; ev.button.button = SDL_BUTTON_LEFT; ev.button.state = inp->btn_touch ? SDL_PRESSED : SDL_RELEASED; ev.button.x = zinput_get_px(inp); ev.button.y = zinput_get_py(inp); SDL_PushEvent(&ev); #if 0 char *txt = "???"; if (ev.type == SDL_MOUSEMOTION) txt = "MOVE "; if (ev.type == SDL_MOUSEBUTTONDOWN) txt = "DOWN "; if (ev.type == SDL_MOUSEBUTTONUP) txt = "UP "; printf("-%s x=%d y=%d\n", txt, ev.button.x, ev.button.y); #endif break; } #endif #endif } libzia-4.67/src/regex_internal.c0000644000175000017500000013420614662101505013614 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ static void re_string_construct_common (const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) internal_function; /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t internal_function re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { reg_errcode_t ret; int init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t internal_function re_string_construct (re_string_t *pstr, const char *str, int len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { int *new_offsets = re_realloc (pstr->offsets, int, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase ? 1 : 0; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; int byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; int src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen + 2 > 2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (int, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static int internal_function re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; int rawbuf_idx; size_t mbclen; wchar_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { int remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = (wint_t) wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { int char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { int buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function re_string_reconstruct (re_string_t *pstr, int idx, int eflags) { int offset = idx - pstr->raw_mbs_idx; if (BE (offset < 0, 0)) { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { int low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } } else { /* No, skip all characters until IDX. */ int prev_valid_len = pstr->valid_len; #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { int wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *q, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; int mlen = raw + pstr->len - p; unsigned char buf[6]; size_t mbclen; q = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; q = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); mbclen = mbrtowc (&wc2, (const char *) p, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute ((pure)) re_string_peek_byte_case (const re_string_t *pstr, int idx) { int ch, off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function __attribute ((pure)) re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { int off, ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, int idx, int eflags) { int c; if (BE (idx < 0, 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; int wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif --wc_idx; if (wc_idx < 0) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function re_node_set_alloc (re_node_set *set, int size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (int, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function re_node_set_init_1 (re_node_set *set, int elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (int, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function re_node_set_init_2 (re_node_set *set, int elem1, int elem2) { set->alloc = 2; set->elems = re_malloc (int, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t internal_function re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { int i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { int new_alloc = src1->nelem + src2->nelem + dest->alloc; int *new_elems = re_realloc (dest->elems, int, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (id >= 0 && dest->elems[id] > src1->elems[i1]) --id; if (id < 0 || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (--i1 < 0 || --i2 < 0) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (--i2 < 0) break; } else { if (--i1 < 0) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && id >= 0) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { int i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (int)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (int)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function re_node_set_merge (re_node_set *dest, const re_node_set *src) { int is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { int new_alloc = 2 * (src->nelem + dest->alloc); int *new_buffer = re_realloc (dest->elems, int, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (is >= 0) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. return -1 if an error is occured, return 1 otherwise. */ static int internal_function re_node_set_insert (re_node_set *set, int elem) { int idx; /* In case the set is empty. */ if (set->alloc == 0) { if (BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1)) return 1; else return -1; } if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return 1; } /* Realloc if we need. */ if (set->alloc == set->nelem) { int *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, int, set->alloc); if (BE (new_elems == NULL, 0)) return -1; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return 1; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return -1 if an error is occured, return 1 otherwise. */ static int internal_function re_node_set_insert_last (re_node_set *set, int elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { int *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, int, set->alloc); if (BE (new_elems == NULL, 0)) return -1; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return 1; } /* Compare two node sets SET1 and SET2. return 1 if SET1 and SET2 are equivalent, return 0 otherwise. */ static int internal_function __attribute ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { int i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return 0; for (i = set1->nelem ; --i >= 0 ; ) if (set1->elems[i] != set2->elems[i]) return 0; return 1; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static int internal_function __attribute ((pure)) re_node_set_contains (const re_node_set *set, int elem) { unsigned int idx, right, mid; if (set->nelem <= 0) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, int idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return -1, if an error will be occured. */ static int internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { int type = token.type; if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; int *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; /* Avoid overflows. */ if (BE (new_nodes_alloc < dfa->nodes_alloc, 0)) return -1; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return -1; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, int, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) return -1; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; #endif dfa->nexts[dfa->nodes_len] = -1; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static inline unsigned int internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { unsigned int hash = nodes->nelem + context; int i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value indicates the error code if failed. */ static reg_errcode_t register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, unsigned int hash) { struct re_state_table_entry *spot; reg_errcode_t err; int i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { int elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) re_node_set_insert_last (&newstate->non_eps_nodes, elem); } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { int new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) { int i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) { int i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { unsigned int constraint = 0; re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (node->constraint) constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR) constraint = node->opr.ctx_type; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } re_node_set_init_copy (newstate->entrance_nodes, nodes); nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } libzia-4.67/src/zcor.c0000644000175000017500000002510014662101505011553 00000000000000/* zcor.c - Polar map data Copyright (C) 2002-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_SDL #include "zcor.h" //#include "cordata.h" #include "zdebug.h" #include "zloc.h" #include "zthread.h" #include "zselect.h" #define _USE_MATH_DEFINES #include struct zcor *gcor = NULL; static struct zcor *gcor2 = NULL; struct kmarray *kmarray_new(void){ struct kmarray *kma; kma = g_new0(struct kmarray, 1); kma->size=100; kma->data=g_new0(struct kmpoint, kma->size); return kma; } void kmarray_add(GHashTable *hash, gpointer key, struct kmpoint *km){ struct kmarray *kma; gpointer orig_key, value; if (g_hash_table_lookup_extended(hash, key, &orig_key, &value)){ kma=(struct kmarray *)value; }else{ kma=kmarray_new(); /* dbg("new kma for %p: %p\n",key, kma);*/ g_hash_table_insert(hash, key, kma); } if (kma->len == kma->size){ kma->size+=100; kma->data = g_renew(struct kmpoint, kma->data, kma->size); } memcpy(&kma->data[kma->len], km, sizeof(struct kmpoint)); kma->len++; } #define TO_READ 1000 struct zcor *zcor_init(struct zselect *zsel, void(*callback)(void), const struct cpoint *file, int cor_items){ struct zcor *cor; cor = g_new0(struct zcor, 1); cor->km = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_km_value); cor->wwl4 = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_km_value); cor->wwl2 = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_km_value); cor->az = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_km_value); cor->thread_break = 0; cor->file = file; cor->items = cor_items; cor->loc = g_strdup(""); cor->zsel = zsel; cor->callback = callback; return cor; } void zcor_free(struct zcor *cor){ if (!cor) return; if (cor->thread){ cor->thread_break = 1; //dbg("join cor...\n"); g_thread_join(cor->thread); //dbg("done\n"); cor->thread = NULL; } g_free(cor->loc); g_hash_table_destroy(cor->km); g_hash_table_destroy(cor->wwl4); g_hash_table_destroy(cor->wwl2); g_hash_table_destroy(cor->az); g_free(cor); } void zcors_free(){ zcor_free(gcor2); zcor_free(gcor); } struct zcor *zcor_calc(double myh, double myw, gchar *locator, struct zselect *zsel, void (*callback)(void), const struct cpoint *file, int cor_items){ struct zcor *cor = zcor_init(zsel, callback, file, cor_items); if (gcor) cor->nth = gcor->nth + 1; g_free(cor->loc); cor->loc = g_strdup(locator); cor->sw_myw = myw; cor->sw_myh = myh; cor->thread = g_thread_try_new("cor", zcor_thread_func, (gpointer)cor, NULL); if (!cor->thread) zinternal("Can't run cor thread"); if (callback == NULL){ g_thread_join(cor->thread); cor->thread = NULL; } return cor; } void zcors_recalc(double myh, double myw, gchar *locator, struct zselect *zsel, void (*callback)(void), const struct cpoint *file, int cor_items){ char tmploc[10]; hw2loc(tmploc, myh * 180.0/M_PI, myw * 180.0/M_PI, 6); //dbg("--------\ncor_recalc('%s')\n", tmploc); if (gcor && strcmp(gcor->loc, locator) == 0){ //dbg("same locators as gcor\n"); return; } if (gcor2 && strcmp(gcor2->loc, locator) == 0){ //dbg("same locators as gcor2, wait for pending recalc\n"); return; } if (gcor2) { zcor_free(gcor2); } gcor2 = zcor_calc(myh, myw, locator, zsel, callback, file, cor_items); if (callback == NULL) zcor_switch(); } gpointer zcor_thread_func(gpointer arg){ int i,j; const struct cpoint *cp; struct kmpoint km, kmfirst, kmlast; double h2, w2; gpointer hash, oldhash; int kx, ky, color; struct zcor *cor = (struct zcor *)arg; zg_thread_set_name("Libzia cor"); /* dbg("recalc_cor(%s)\n", locator);*/ /* return 0; */ // ST_START; kmfirst.c=0; //dbg("cor_thread_func: items=%d h=%f w=%f\n", cor->items, cor->sw_myh, cor->sw_myw); g_hash_table_remove_all (cor->km); oldhash=(gpointer)-1; for (i=0, cp=cor->file; iitems; i++, cp++){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } w2=(M_PI*(double)cp->w)/18000; h2=(M_PI*(double)cp->h)/18000; hw2km(cor->sw_myh, cor->sw_myw, h2, w2, &kx, &ky); hash=k2key(kx, ky); km.c=cp->c; km.kx=kx; km.ky=ky; // dbg("cp=%d %d %d km=%d %d %d\n", cp->w, cp->h, cp->c, km.kx, km.ky, km.c); if (km.c<0) { memcpy(&kmfirst, &km, sizeof(kmfirst)); } if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->km, oldhash, &km); kmlast.c=kmfirst.c; kmarray_add(cor->km, hash, &kmlast); } kmarray_add(cor->km, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; } /* large wwls (JN69) */ g_hash_table_remove_all(cor->wwl4); for (i=-89;i<90;i++){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } if (i%10==0) color=-128; else color=-127; oldhash=(gpointer)-1; km.c=color; for (j=0;j<=360;j++){ w2=(M_PI*i)/180; h2=(M_PI*j)/180; hw2km(cor->sw_myh, cor->sw_myw, h2, w2, &kx, &ky); hash=k2key(kx, ky); km.kx=kx; km.ky=ky; if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->wwl4, oldhash, &km); kmlast.c=color; kmarray_add(cor->wwl4, hash, &kmlast); km.c=0; } kmarray_add(cor->wwl4, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; km.c=0; } } for (j=0;j<360;j+=2){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } oldhash=(gpointer)-1; if (j%20==0) color=-128; else color=-127; km.c=color; for (i=-89;i<=89;i++){ w2=(M_PI*i)/180; h2=(M_PI*j)/180; hw2km(cor->sw_myh, cor->sw_myw, h2, w2, &kx, &ky); hash=k2key(kx, ky); km.kx=kx; km.ky=ky; if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->wwl4, oldhash, &km); kmlast.c=color; kmarray_add(cor->wwl4, hash, &kmlast); km.c=0; } kmarray_add(cor->wwl4, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; km.c=0; } } /* very large wwls (JN) */ g_hash_table_remove_all(cor->wwl2); for (i=-80;i<90;i+=10){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } if (i%10==0) color=-128; else color=-127; oldhash=(gpointer)-1; km.c=color; for (j=0;j<=360;j++){ w2=(M_PI*i)/180; h2=(M_PI*j)/180; hw2km(cor->sw_myh, cor->sw_myw, h2, w2, &kx, &ky); hash=k2key(kx, ky); km.kx=kx; km.ky=ky; if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->wwl2, oldhash, &km); kmlast.c=color; kmarray_add(cor->wwl2, hash, &kmlast); km.c=0; } kmarray_add(cor->wwl2, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; km.c=0; } } for (j=0;j<360;j+=20){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } oldhash=(gpointer)-1; if (j%10==0) color=-128; else color=-127; km.c=color; for (i=-89;i<=89;i++){ w2=(M_PI*i)/180; h2=(M_PI*j)/180; hw2km(cor->sw_myh, cor->sw_myw, h2, w2, &kx, &ky); hash=k2key(kx, ky); km.kx=kx; km.ky=ky; if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->wwl2, oldhash, &km); kmlast.c=color; kmarray_add(cor->wwl2, hash, &kmlast); km.c=0; } kmarray_add(cor->wwl2, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; km.c=0; } } g_hash_table_remove_all(cor->az); for (j = 0; j < 360; j += 15){ if (cor->thread_break) { dbg("cor thread breaked\n"); return NULL; } oldhash=(gpointer)-1; color = j % 90 ? -127 : -128; km.c = color; for (i = 50; i < (int)(ZLOC_R_EARTH * M_PI); i += 50){ kx = (int)(i * cos(j * M_PI / 180.0)); ky = (int)(i * sin(j * M_PI / 180.0)); hash=k2key(kx, ky); km.kx=kx; km.ky=ky; if (oldhash!=(gpointer)-1 && hash!=oldhash) { kmarray_add(cor->az, oldhash, &km); kmlast.c=color; kmarray_add(cor->az, hash, &kmlast); km.c=0; } kmarray_add(cor->az, hash, &km); memcpy(&kmlast, &km, sizeof(kmlast)); oldhash=hash; km.c=0; } } // ST_STOP; // sleep(5); if (cor->zsel) zselect_msg_send(cor->zsel, "COR"); //dbg("cor finished\n"); return NULL; } void zcor_switch(){ zcor_free(gcor); gcor = gcor2; gcor2 = NULL; } void zcor_read_handler(int n, char **items){ // dbg("cor_read_handler\n"); if (!gcor2 || !gcor2->thread) return; zcor_switch(); if (gcor->callback != NULL) gcor->callback(); //cor_dump(cor); } // gboolean free_km_item(gpointer key, gpointer value, gpointer user_data){ // struct kmarray *kma; // /* key is int, not freeed */ // kma=(struct kmarray *) value; // if (!kma) return 0; // g_free(kma->data); // g_free(kma); // return 1; // } void free_km_value(gpointer value){ struct kmarray *kma = (struct kmarray *) value; if (!kma) return; g_free(kma->data); g_free(kma); } gpointer k2key(int kx, int ky){ return GUINT_TO_POINTER((kx & COR_KM_MASK) | ( (ky & COR_KM_MASK) << 16)) ; } static void zcor_dump1(gpointer key, gpointer value, gpointer data){ FILE *f = (FILE *)data; struct kmarray *kma = (struct kmarray *)value; int i; fprintf(f, "hash=%p\n", key); for (i = 0; i < kma->len; i++){ fprintf(f, "%d %d %d\n", (int)kma->data[i].c, (int)kma->data[i].kx, (int)kma->data[i].ky); } } void zcor_dump(struct zcor *cor){ FILE *f = fopen("cordump.txt", "wt"); if (!f) return; fprintf(f, "cor_dump start\n"); g_hash_table_foreach(cor->km, zcor_dump1, f); fprintf(f, "cor_dump end\n"); fclose(f); } #endif libzia-4.67/src/zdht11.c0000644000175000017500000000610114662101505011711 00000000000000/* dht11.c - DHT11 temperature/humidity sensor Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif // foreign keys #define SYSFS_DIRECTION "/sys/class/gpio/gpio%d/direction" static int zdht11_wait_for(struct zgpio *gpio, int max){ int val, i, sec, usec; struct timeval start, stop; gettimeofday(&start, NULL); for (i = 0; i < max; i++){ val = zgpio_read(gpio); if (val == 1) break; } if (i >= max) return -10; for (i = 0; i < max; i++){ val = zgpio_read(gpio); if (val == 0) break; } if (i >= max) return -11; gettimeofday(&stop, NULL); usec = stop.tv_usec - start.tv_usec; sec = stop.tv_sec - start.tv_sec; if (usec < 0){ usec += 1000000; sec --; } return usec; // nemuze trvat sekundu } // only for sysgpio int zdht11_read_once(struct zdht11 *dht, struct zgpio *gpio, int prot){ char dirfile[64]; int ret; sprintf(dirfile, SYSFS_DIRECTION, gpio->nr); ret = zfile_printfile(dirfile, "out"); if (ret < 0) return -20; zgpio_write(gpio, 0); usleep(18000 + 2000); //zgpio_write(gpio, 1); OPI is too slow // usleep(40); ret = zfile_printfile(dirfile, "in"); if (ret < 0) return -21; ret = zdht11_wait_for(gpio, 30); if (ret < 0) return -22; unsigned char data[5]; int by, bi, i = 0; for (by = 0; by < 5; by++){ data[by] = 0; for (bi = 7; bi >= 0; bi--){ ret = zdht11_wait_for(gpio, 30); if (ret < 0) return -100 - i; if (ret > 100) data[by] |= (1 << bi); i++; } } unsigned char chk = data[0] + data[1] + data[2] + data[3]; dbg("dht%d data: ", prot); for (i = 0; i < 5; i++){ dbg("%02x ", data[i]); } dbg(" computed checksum=%02x \n", chk); if (data[4] != chk) return -24; if (prot == 22){ dht->humidity = ((unsigned char)data[0] * 256 + (unsigned char)data[1] ) / (float)10; dht->temperature = (((unsigned char)data[2] & 0x7f) * 256 + (unsigned char)data[3]) / (float)10; if (data[2] & 0x80) dht->temperature *= -1; }else{ dht->humidity = (signed char)data[0]; dht->temperature = (signed char)data[2]; } // dbg("temp=%3.1f hum=%3.1f\n", dht->temperature, dht->humidity); ret = zfile_printfile(dirfile, "out"); if (ret < 0) return -25; //dbg("return 0\n"); return 0; } int zdht11_read(struct zdht11 *dht, struct zgpio *gpio, int prot){ int i; for (i = 0; i < 5; i++){ int ret = zdht11_read_once(dht, gpio, prot); //dbg("read_once=%d\n", ret); if (ret >= 0) return ret; usleep((i + 1) * 1*1000*1000); } return -1; } libzia-4.67/src/zserial_tcp.c0000644000175000017500000000652314662101505013125 00000000000000/* zserial_tcp - portable serial port API Module for TCP connection Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #ifdef Z_HAVE_SYS_SELECT_H #include #endif #ifdef Z_HAVE_SYS_SOCKET_H #include #endif static int zserial_tcp_open(struct zserial *zser){ int ret; union zsockaddr sa; if (zser->sock >= 0) return 0; dbg("zserial_tcp_open(%s)\n", zser->id); if (z_sock_aton(zser->hostname, zser->port, &sa)) return -1; zser->sock = socket(sa.in.sin_family, SOCK_STREAM, 0); dbg("sock=%d family=%d\n", zser->sock, sa.in.sin_family); if (zser->sock < 0) return -1; ret = z_sock_connect(zser->sock, &sa, 3000); dbg("z_sock_connect=%d\n", ret); if (ret < 0) return -1; ret = z_sock_nonblock(zser->sock, 1); if (ret < 0) return ret; zser->opened = 1; return 0; } static int zserial_tcp_read(struct zserial *zser, void *data, int len, int timeout_ms){ int ret; fd_set fdr; struct timeval tv; FD_ZERO(&fdr); FD_SET(zser->sock, &fdr); tv.tv_usec = timeout_ms * 1000; tv.tv_sec = 0; ret = select(zser->sock + 1, &fdr, NULL, NULL, &tv); // dbg("select=%d\n", ret); if (ret < 0) { g_string_printf(zser->errorstr, "Can't select %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); return ret; } if (ret == 0) { g_string_printf(zser->errorstr, "Can't read %s: Timeout", zser->id); return 0; } if (!FD_ISSET(zser->sock, &fdr)){ g_string_printf(zser->errorstr, "Can't read %s: Data not available", zser->id); zserial_close(zser); } ret = recv(zser->sock, (void *)data, len, 0); if (ret < 0){ g_string_printf(zser->errorstr, "Can't read from %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_tcp_write(struct zserial *zser, void *data, int len){ int ret; ret = send(zser->sock, (void *)data, len, 0); if (ret < 0){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_tcp_close(struct zserial *zser){ int ret = 0; if (zser->sock >= 0) ret = closesocket(zser->sock); zser->sock = -1; return ret; } static int zserial_tcp_dtr(struct zserial *zser, int on){ return -1; } static int zserial_tcp_rts(struct zserial *zser, int on){ return -1; } struct zserial *zserial_init_tcp(const char *hostname, const int tcpport){ struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_TCP; zser->id = g_strdup_printf("TCP:%s:%d", hostname, tcpport); zser->hostname = g_strdup(hostname); zser->port = tcpport; zser->zs_open = zserial_tcp_open; zser->zs_read = zserial_tcp_read; zser->zs_write = zserial_tcp_write; zser->zs_close = zserial_tcp_close; zser->zs_dtr = zserial_tcp_dtr; zser->zs_rts = zserial_tcp_rts; return zser; } libzia-4.67/src/zftdi.c0000644000175000017500000000142614662101505011723 00000000000000/* ftdi functions Copyright (C) 2012 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_FTDI #ifndef Z_HAVE_FTDI_NEW /* compatibility with libftdi < 0.11 */ /* code from libftdi 0.11 */ struct ftdi_context *ftdi_new() { struct ftdi_context * ftdi = (struct ftdi_context *)malloc(sizeof(struct ftdi_context)); if (ftdi == NULL) { return NULL; } if (ftdi_init(ftdi) != 0) { free(ftdi); return NULL; } return ftdi; } void ftdi_free(struct ftdi_context *ftdi) { ftdi_deinit(ftdi); free(ftdi); } #endif #endif libzia-4.67/src/zmd5.c0000644000175000017500000002137114662101505011463 00000000000000/* Modified by Ladislav Vaiz */ /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. * * Equivalent code is available from RSA Data Security, Inc. * This code has been tested against that, and is equivalent, * except that you don't need to include two pages of legalese * with every copy. * * To compute the message digest of a chunk of bytes, declare an * zmd5 structure, pass it to zmd5_init, call zmd5_update as * needed on buffers full of bytes, and then call zmd5_final, which * will fill a supplied 16-byte array with the digest. */ /* Brutally hacked by John Walker back from ANSI C to K&R (no prototypes) to maintain the tradition that Netfone will compile with Sun's original "cc". */ #include /* for memcpy() */ #include #include #include #include #ifdef sgi #define HIGHFIRST #endif #ifdef sun #define HIGHFIRST #endif #ifndef HIGHFIRST #define byteReverse(buf, len) /* Nothing */ #else /* * Note: this code is harmless on little-endian machines. */ void byteReverse(buf, longs) unsigned char *buf; unsigned longs; { uint32_t t; do { t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); *(uint32_t *) buf = t; buf += 4; } while (--longs); } #endif /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ void zmd5_init(struct zmd5 *ctx) { if (sizeof(uint32_t) != 4) zinternal("sizeof(uint32_t)=%d !!!", (int)sizeof(uint32_t)); ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; } /* * Update context to reflect the concatenation of another buffer full * of bytes. */ void zmd5_update(struct zmd5 *ctx, unsigned char *buf, unsigned len) { uint32_t t; /* Update bitcount */ t = ctx->bits[0]; if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ /* Handle any leading odd-sized chunks */ if (t) { unsigned char *p = (unsigned char *) ctx->in + t; t = 64 - t; if (len < t) { memcpy(p, buf, len); return; } memcpy(p, buf, t); byteReverse(ctx->in, 16); zmd5_transform(ctx->buf, (uint32_t *) ctx->in); buf += t; len -= t; } /* Process data in 64-byte chunks */ while (len >= 64) { memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); zmd5_transform(ctx->buf, (uint32_t *) ctx->in); buf += 64; len -= 64; } /* Handle any remaining bytes of data. */ memcpy(ctx->in, buf, len); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void zmd5_final(unsigned char digest[16], struct zmd5 *ctx) { unsigned count; unsigned char *p; uint32_t *tmp; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; /* Set the first char of padding to 0x80. This is safe since there is always at least one byte free */ p = ctx->in + count; *p++ = 0x80; /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); byteReverse(ctx->in, 16); zmd5_transform(ctx->buf, (uint32_t *) ctx->in); /* Now fill the next block with 56 bytes */ memset(ctx->in, 0, 56); } else { /* Pad block to 56 bytes */ memset(p, 0, count - 8); } byteReverse(ctx->in, 14); /* Append length in bits and transform */ //((uint32_t *) ctx->in)[14] = ctx->bits[0]; tmp = (uint32_t *) ctx->in; tmp[14] = ctx->bits[0]; //((uint32_t *) ctx->in)[15] = ctx->bits[1]; tmp = (uint32_t *) ctx->in; tmp[15] = ctx->bits[1]; zmd5_transform(ctx->buf, (uint32_t *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); memset(ctx, 0, sizeof(struct zmd5)); /* In case it's sensitive */ } static unsigned char hch[17]="0123456789ABCDEF"; unsigned char *zmd5_final_str(struct zmd5 *ctx){ unsigned char digest[16]; int i; zmd5_final(digest, ctx); for (i=0; i<16; i++){ ctx->tdigest[2*i] = hch[digest[i]>>4]; ctx->tdigest[2*i+1] = hch[digest[i]&15]; } ctx->tdigest[32]='\0'; return ctx->tdigest; } /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ void zmd5_transform(uint32_t buf[4], uint32_t in[16]) { register uint32_t a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } libzia-4.67/src/zrc.c0000644000175000017500000001222414662101505011377 00000000000000/* rc - config file functions Copyright (C) 2014-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_MSC #pragma warning(disable : 4996) #endif static GHashTable *zrc = NULL; static GHashTable *zarrays = NULL; // reentrant int zrc_read_file(char *filename){ FILE *f; GString *gs; if (!zrc) zrc = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); gs = g_string_new(""); f = fopen(filename, "rt"); if (!f) { int err = errno; g_string_append_printf(gs, "Can't read rc file '%s'. ", filename); z_strerror(gs, err); error("%s\n", gs->str); g_string_free(gs, TRUE); return -1; } while (zfile_fgets(gs, f, 1)){ char *key, *val; GPtrArray *a = NULL; z_split2(gs->str, '=', &key, &val, 0); if (key == NULL) continue; z_strip_from(key, '#'); z_trim(key); if (strlen(key) == 0) continue; z_str_uc(key); z_trim(val); if (zarrays != NULL && (a = g_hash_table_lookup(zarrays, key)) != NULL){ g_ptr_array_add(a, val); }else{ if (g_hash_table_lookup(zrc, key)) g_hash_table_remove(zrc, key); g_hash_table_insert(zrc, key, val); if (strcmp(key, "INCLUDE") == 0){ zrc_read_file(val); } } } g_string_free(gs, TRUE); fclose(f); return 0; } static inline char *zrc_getopt(char *key){ char *up = g_strdup(key); z_str_uc(up); char *v = (char*)g_hash_table_lookup(zrc, up); g_free(up); return v; } char *zrc_str(char *key, char *def){ char *v = zrc_getopt(key); if (v == NULL) return def; return v; } int zrc_int(char *key, int def){ char *v = zrc_getopt(key); if (v == NULL) return def; return atoi(v); } // current locales double zrc_double(char *key, double def){ char *v = zrc_getopt(key); if (v == NULL) return def; return atof(v); } char *zrc_strf(char *def, char *fmt, ...){ va_list l; char *key, *v; va_start(l, fmt); key = g_strdup_vprintf(fmt, l); va_end(l); v = zrc_getopt(key); g_free(key); if (v == NULL) return def; return v; } int zrc_intf(int def, char *fmt, ...){ va_list l; char *key, *v; va_start(l, fmt); key = g_strdup_vprintf(fmt, l); va_end(l); v = zrc_getopt(key); g_free(key); if (v == NULL) return def; return atoi(v); } void zrc_declare_array(char *key){ GPtrArray *a; if (zarrays == NULL) zarrays = g_hash_table_new(g_str_hash, g_str_equal); a = g_hash_table_lookup(zarrays, key); if (a != NULL) return; a = g_ptr_array_new(); g_hash_table_insert(zarrays, key, a); } GPtrArray *zrc_array(char *key){ GPtrArray *a; if (zarrays == NULL) return NULL; a = g_hash_table_lookup(zarrays, key); return a; } static int zrc_error = 0; char zrc_errstr[100]; void zrc_write_str(FILE *f, char *key, char *value){ char *up = g_strdup(key); z_str_uc(up); int ret = fprintf(f, "%s=%s\n", up, value); if (ret <= 0) zrc_error = 1; g_free(up); } void zrc_write_int(FILE *f, char *key, int value){ char *up = g_strdup(key); z_str_uc(up); int ret = fprintf(f, "%s=%d\n", up, value); if (ret <= 0) zrc_error = 1; g_free(up); } void zrc_write_double(FILE *f, char *key, int value, int places){ char fmt[100]; char *up = g_strdup(key); z_str_uc(up); sprintf(fmt, "%%s=%d.%df\n", places+2, places); int ret = fprintf(f, fmt, up, value); if (ret <= 0) zrc_error = 1; g_free(up); } int zrc_save(char *file, void zrc_app_write(FILE *f)){ char *errbuf; strcpy(zrc_errstr, ""); char *tmp = g_strconcat(file, ".tmp", NULL); FILE *f = fopen(tmp, "wt"); if (!f){ errbuf = z_strdup_strerror(errno); g_snprintf(zrc_errstr, sizeof(zrc_errstr), "Can't open %s to write - %s", tmp, errbuf); error("%s", zrc_errstr); g_free(errbuf); g_free(tmp); return -1; } zrc_error = 0; zrc_app_write(f); if (fclose(f) == EOF){ errbuf = z_strdup_strerror(errno); g_snprintf(zrc_errstr, sizeof(zrc_errstr), "Can't close %s - %s", tmp, errbuf); error("%s", zrc_errstr); g_free(errbuf); g_free(tmp); return -1; } if (zrc_error){ g_snprintf(zrc_errstr, sizeof(zrc_errstr), "Can't write into %s", tmp); g_free(tmp); return -1; } if (rename(tmp, file) < 0){ errbuf = z_strdup_strerror(errno); g_snprintf(zrc_errstr, sizeof(zrc_errstr), "Can't rename %s to %s", tmp, file); g_free(errbuf); g_free(tmp); return -1; } g_free(tmp); return 0; } libzia-4.67/src/zserial_win32.c0000644000175000017500000002352214662101505013277 00000000000000/* zserial_win32 - portable serial port API Module for WIN32 serial ports Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. UTF-8 detect: ěščřžýáíé */ #include #include #include #include #include #include #include #ifdef Z_MSC_MINGW #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif static int zserial_win32_open(struct zserial *zser){ char compath[MAX_PATH]; char *settings; DCB dcb; int ret; if (zser->handle != INVALID_HANDLE_VALUE) return 0; g_snprintf(compath, MAX_PATH, "\\\\.\\%s", zser->filename); zser->handle = CreateFile(compath, GENERIC_READ|GENERIC_WRITE/*|FILE_FLAG_NO_BUFFERING*/, 0, 0, OPEN_EXISTING, 0, 0); if (zser->handle == INVALID_HANDLE_VALUE){ g_string_printf(zser->errorstr, "Can't open device %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } settings = g_strdup_printf("%d,%c,%d,%d", zser->baudrate, zser->parity, zser->bits, zser->stopbits); //strcpy(settings, "9600,N,8,1"); memset(&dcb, 0, sizeof(dcb)); dcb.DCBlength=sizeof(dcb); ret = BuildCommDCB(settings, &dcb); g_free(settings); if (!ret){ g_string_printf(zser->errorstr, "zserial_open: BuildCommDCB failed: "); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } /* BuildCommDCB pod win98fe to nenastavuje */ dcb.fDtrControl=1; dcb.fRtsControl=1; /* kompatibilita s mttty */ dcb.fBinary=1; dcb.XonChar=0x11; dcb.XoffChar=0x13; if (!SetCommState(zser->handle, &dcb)) { g_string_printf(zser->errorstr, "Can't set comm state for %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } zser->opened = 1; return 0; } static int zserial_win32_read(struct zserial *zser, void *data, int len, int timeout_ms){ DWORD dwRead; COMMTIMEOUTS timeouts; timeouts.ReadIntervalTimeout = timeout_ms; timeouts.ReadTotalTimeoutMultiplier = 0; timeouts.ReadTotalTimeoutConstant = timeout_ms; timeouts.WriteTotalTimeoutMultiplier = 0; timeouts.WriteTotalTimeoutConstant = 0; if (!SetCommTimeouts(zser->handle, &timeouts)){ g_string_printf(zser->errorstr, "zserial_read: SetCommTimeouts failed: "); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } if (!ReadFile(zser->handle, data, len, &dwRead, NULL)){ g_string_printf(zser->errorstr, "Can't read from %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } return dwRead; } static int zserial_win32_write(struct zserial *zser, void *data, int len){ int ret; DWORD written; ret = WriteFile(zser->handle, data, len, &written, NULL); if (!ret){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } if (!FlushFileBuffers(zser->handle)){ g_string_printf(zser->errorstr, "zserial_write: FlushFileBuffers failed: "); z_lasterror(zser->errorstr); zserial_close(zser); return -1; } return written; } static int zserial_win32_close(struct zserial *zser){ MUTEX_LOCK(zser->close3); if (zser->handle != INVALID_HANDLE_VALUE) CloseHandle(zser->handle); zser->handle = INVALID_HANDLE_VALUE; MUTEX_UNLOCK(zser->close3); return 0; } static int zserial_win32_dtr(struct zserial *zser, int on){ if (!EscapeCommFunction(zser->handle, on ? SETDTR : CLRDTR)){ g_string_printf(zser->errorstr, "Can't set DTR on %s: ", zser->id); z_lasterror(zser->errorstr); return -1; } return 0; } static int zserial_win32_rts(struct zserial *zser, int on){ if (!EscapeCommFunction(zser->handle, on ? SETRTS : CLRRTS)){ g_string_printf(zser->errorstr, "Can't set RTS on %s: ", zser->id); z_lasterror(zser->errorstr); return -1; } return 0; } static gint z_compare_port (gconstpointer a, gconstpointer b){ struct zserial_port **ca = (struct zserial_port**)a; struct zserial_port **cb = (struct zserial_port**)b; if (strlen((*ca)->filename) < 4) return 0; if (strlen((*cb)->filename) < 4) return 0; return atoi((*ca)->filename + 3) - atoi((*cb)->filename + 3); } #define MAX_KEY_LENGTH 255 #define MAX_VALUE_NAME 16383 int zserial_win32_detect(struct zserial *zser){ DWORD dwType, dwCount,ii; int rc, n, i; char *regbase; HKEY hKey; CHAR achKey[MAX_KEY_LENGTH]; // buffer for subkey name DWORD cbName; // size of name string CHAR achClass[MAX_PATH] = ""; // buffer for class name DWORD cchClassName = MAX_PATH; // size of class string DWORD cSubKeys=0; // number of subkeys DWORD cbMaxSubKey; // longest subkey size DWORD cchMaxClass; // longest class string DWORD cValues; // number of values for key DWORD cchMaxValue; // longest value name DWORD cbMaxValueData; // longest value data DWORD cbSecurityDescriptor; // size of security descriptor FILETIME ftLastWriteTime; // last write time DWORD retCode; CHAR achValue[MAX_VALUE_NAME]; DWORD cchValue = MAX_VALUE_NAME; rc=RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_READ, &hKey); if (rc != ERROR_SUCCESS){ return zser->ports->len; } // Get the class name and the value count. retCode = RegQueryInfoKey( hKey, // key handle achClass, // buffer for class name &cchClassName, // size of class string NULL, // reserved &cSubKeys, // number of subkeys &cbMaxSubKey, // longest subkey size &cchMaxClass, // longest class string &cValues, // number of values for this key &cchMaxValue, // longest value name &cbMaxValueData, // longest value data &cbSecurityDescriptor, // security descriptor &ftLastWriteTime); // last write time // Enumerate the subkeys, until RegEnumKeyEx fails. if (cSubKeys) { dbg("Number of subkeys: %d\n", cSubKeys); for (ii=0; iifilename = g_strdup(strValue); port->desc = g_strdup(achValue); g_ptr_array_add(zser->ports, port); } } } } } RegCloseKey(hKey); //qsort (comport, comports, sizeof(*comport), compare_comport); zg_ptr_array_qsort(zser->ports, z_compare_port); /** sériové porty **/ regbase = "System\\CurrentControlSet\\Services\\Serenum\\Enum"; n = zreg_getint(HKEY_LOCAL_MACHINE, regbase, "Count"); /*if (n <= 0){ regbase = "System\\CurrentControlSet\\Services\\Serial\\Enum"; n = zreg_getint(HKEY_LOCAL_MACHINE, regbase, "Count"); } */ for (i = 0; i < n; i++){ char key[256]; char *s, *t, *u; unsigned j; g_snprintf(key, sizeof(key), "%d", i); s = zreg_getstr(HKEY_LOCAL_MACHINE, regbase, key); t = g_strdup_printf("System\\CurrentControlSet\\Enum\\%s\\Device Parameters", s); u = zreg_getstr(HKEY_LOCAL_MACHINE, t, "PortName"); if (u == NULL) continue; for (j = 0; j < zser->ports->len; j++){ struct zserial_port *port = (struct zserial_port *)g_ptr_array_index(zser->ports, j); if (strcmp(u, port->filename)) continue; t = g_strdup_printf("System\\CurrentControlSet\\Enum\\%s", s); g_free(u); u = zreg_getstr(HKEY_LOCAL_MACHINE, t, "FriendlyName"); if (u != NULL){ g_free(port->desc); port->desc = u; // optimized port->desc=g_strdup(u); g_free(u); break; } u = zreg_getstr(HKEY_LOCAL_MACHINE, t, "DeviceDesc"); g_free(port->desc); port->desc = u; // optimized port->desc=g_strdup(u); g_free(u); break; } g_free(s); g_free(t); } return zser->ports->len; } #endif struct zserial *zserial_init_win32(const char *filename){ #ifdef Z_MSC_MINGW struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_WIN32; zser->id = g_strdup(filename); zser->filename = g_strdup(filename); zser->zs_open = zserial_win32_open; zser->zs_read = zserial_win32_read; zser->zs_write = zserial_win32_write; zser->zs_close = zserial_win32_close; zser->zs_dtr = zserial_win32_dtr; zser->zs_rts = zserial_win32_rts; zser->zs_detect = zserial_win32_detect; return zser; #else return NULL; #endif } libzia-4.67/src/eprintf.c0000644000175000017500000002553414662101505012260 00000000000000/* eprintf.c - extended printf Copyright (C) 2002-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include static char *base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static char *hexchars = "0123456789abcdef"; int zg_string_veprintfa(const char *flags, GString *gs, char *fmt, va_list l){ int oldlen, len, i; char *add, *c, *d, *fmt2, type; unsigned char *bin; GString *gs2; oldlen = gs->len; fmt2 = g_new(char, strlen(fmt) + 1); for (c = fmt; *c != '\0'; c++){ int lcnt = 0; if (*c != '%'){ g_string_append_c(gs, *c); continue; } type = '\0'; for (d = fmt2; *c != '\0'; c++, d++){ *d = *c; if (!isalpha(*c)) continue; if (*c == 'l') { lcnt++; continue; } type = *c; *d = tolower(*d); d++; *d = '\0'; break; } add = NULL; switch (tolower(type)){ case 'b': // base64 bin = va_arg(l, unsigned char *); len = va_arg(l, int); for (i = 0; i < len; i+= 3){ g_string_append_c(gs, base64[ bin[i] >> 2 ]); // output char 0 if (i + 1 < len){ g_string_append_c(gs, base64[ ((bin[i] & 0x03) << 4) | ((bin[i + 1] & 0xf0) >> 4)]); // output char 1 if (i + 2 < len){ g_string_append_c(gs, base64[ ((bin[i + 1] & 0x0f) << 2) | ((bin[i + 2] & 0xc0) >> 6)]); // output char 2 g_string_append_c(gs, base64[ bin[i + 2] & 0x3f ]); // output char 3 }else{ g_string_append_c(gs, base64[ (bin[i + 1] & 0x0f) << 2]); // output char 2 g_string_append_c(gs, '='); //output char 3 } }else{ g_string_append_c(gs, base64[ ((bin[i] & 0x03) << 4) ]); // output char 1 g_string_append(gs, "=="); // output chars 2,3 } } break; case 'y': // hexa bin = va_arg(l, unsigned char *); len = va_arg(l, int); for (i = 0; i < len; i++){ g_string_append_c(gs, hexchars[ bin[i] >> 4]); g_string_append_c(gs, hexchars[ bin[i] & 0x0f]); } case 'c': add = g_strdup_printf(fmt2, va_arg(l, int)); // char is promoted to int when passed through ... break; case 'd': case 'i': case 'u': case 'x': if (lcnt == 2){ add = g_strdup_printf(fmt2, va_arg(l, long long)); }else if (lcnt == 1){ add = g_strdup_printf(fmt2, va_arg(l, long)); }else{ add = g_strdup_printf(fmt2, va_arg(l, int)); } break; case 'f': add = g_strdup_printf(fmt2, va_arg(l, double)); break; case 'p': add = g_strdup_printf(fmt2, va_arg(l, void *)); break; case 's': add = g_strdup_printf(fmt2, va_arg(l, char *)); break; default: add = g_strdup(fmt2); break; } if (add != NULL && isupper(type)){ for (d = add; *d != '\0'; d++) *d = toupper(*d); } switch(flags[0]){ case 'b': // handled in code before break; case 'e': // escape with '\' for (d = add; *d != '\0'; d++){ switch(*d){ case ';': g_string_append(gs, "\\;"); break; case '\\': g_string_append(gs, "\\\\"); break; case '\r': g_string_append(gs, "\\r"); break; case '\n': g_string_append(gs, "\\n"); break; default: g_string_append_c(gs, *d); break; } } break; case 'h': // html for (d = add; *d != '\0'; d++){ switch(*d){ case '<': g_string_append(gs, "<"); break; case '>': g_string_append(gs, ">"); break; case '"': g_string_append(gs, """); break; case '&': g_string_append(gs, "&"); break; case '\'': g_string_append(gs, "'"); break; default: g_string_append_c(gs, *d); } } break; case 'j': // json for (d = add; *d != '\0'; d++){ switch (*d){ // case ';': // g_string_append(gs, "\\;"); // break; case '"': g_string_append(gs, "\\\""); break; case '\\': g_string_append(gs, "\\\\"); break; case '\r': g_string_append(gs, "\\r"); break; case '\n': g_string_append(gs, "\\n"); break; default: g_string_append_c(gs, *d); break; } } break; case 'q': // quoted-printable gs2 = g_string_sized_new(strlen(add)); for (d = add; *d != '\0'; d++){ if (gs2->len > 70){ g_string_append(gs, gs2->str); g_string_append(gs, "=\r\n"); g_string_assign(gs2, ""); } if (*d == '\r') continue; if (*d == '\n') { g_string_append(gs, "\r\n"); continue; } if ((*(d+1) == '\r' || *(d+1) == '\n') && (*d == ' ' || *d == '\t')){ g_string_append_printf(gs, "=%02X", (unsigned char)*d); continue; } if (*d & 0x80 || *d == '=' || (*d & 0xf8) == 0){ g_string_append_printf(gs, "=%02X", (unsigned char)*d); continue; } g_string_append_c(gs, *d); } g_string_append(gs, gs2->str); g_string_free(gs, TRUE); break; case 's': // postgresql for (d = add; *d != '\0'; d++){ switch (*c){ case '\'': g_string_append(gs, "''"); break; case '\\': g_string_append(gs, "\\\\"); break; } } break; case 'u': // url for (d = add; *d != '\0'; d++){ if (isalnum(*d) || *d == '_' || *d == '-' || *d == '.'){ g_string_append_c(gs, *d); continue; } g_string_append_c(gs, '%'); g_string_append_printf(gs, "%02X", (unsigned char)*d); } break; case 'w': // wiki g_string_append(gs, ""); for (d = add; *d != '\0'; d++){ switch (*c){ case '<': g_string_append(gs, "<"); break; case '>': g_string_append(gs, ">"); break; case '"': g_string_append(gs, """); break; case '&': g_string_append(gs, "&"); break; case '\'': g_string_append(gs, "'"); break; default: g_string_append_c(gs, *d); } } g_string_append(gs, ""); break; default: g_string_append(gs, add); } // switch if (add) g_free(add); } // for g_free(fmt2); return gs->len - oldlen; } int zg_string_eprintfa(const char *flags, GString *gs, char *fmt, ...){ va_list l; int ret; va_start(l, fmt); ret = zg_string_veprintfa(flags, gs, fmt, l); va_end(l); return ret; } int zg_string_eprintf(const char *flags, GString *gs, char *fmt, ...){ va_list l; int ret; g_string_assign(gs, ""); va_start(l, fmt); ret = zg_string_veprintfa(flags, gs, fmt, l); va_end(l); return ret; } int z_tokens(const char *str){ int backslash=0; int tokens=1; const char *c; for (c = str; *c != '\0'; c++){ if (backslash){ backslash = 0; continue; } switch (*c){ case '\\': backslash = 1; break; case ';': tokens++; break; } } return tokens; } // modifies str! char *z_tokenize(char *str, int *tokenpos){ int backslash = 0; int i; char c, *d, *buf; int len; len = strlen(str + *tokenpos) + *tokenpos; if (*tokenpos >= len) return NULL; if (*tokenpos < 0) return NULL; buf = d = str + *tokenpos; for (i = *tokenpos; i < len; i++){ c = str[i]; if (backslash){ backslash = 0; switch(c){ case '\\': case ';': break; case 'r': c = '\r'; break; case 'n': c = '\n'; break; default: /* error */ //fprintf(stderr, "bad escape \\%c\n", c); TODO what to do? break; } }else{ switch (c){ case '\\': backslash = 1; continue; case ';': *tokenpos = i + 1; *d='\0'; return buf; default: break; } } *d++ = c; } *tokenpos = -1; *d='\0'; return buf; } char *z_base64dec(char *bin, int maxlen, int *plen, char *src){ int i, j, len, c0, c1, c2, c3; if (!plen) plen = &len; *plen = strlen(src); if (*plen <= 0) return bin; if (!bin) bin = g_new0(char, (*plen * 3) / 4 + 1); // yes, we can allocate more than needed for (i = 0, j = 0; i < *plen; ){ char *p; for (; i < *plen; i++) { p = strchr(base64, src[i]); if (p) { i++; break; } } c0 = p - base64; for (; i < *plen; i++) { p = strchr(base64, src[i]); if (p) { i++; break; } } c1 = p - base64; bin[j++] = ((c0 & 0x3f) << 2) | ((c1 & 0x30) >> 4); if (j == maxlen) break; for (; i < *plen; i++) { if (src[i] == '=') goto end; p = strchr(base64, src[i]); if (p) { i++; break; } } c2 = p - base64; bin[j++] = ((c1 & 0x0f) << 4) | ((c2 & 0x3c) >> 2); if (j == maxlen) break; for (; i < *plen; i++) { if (src[i] == '=') goto end; p = strchr(base64, src[i]); if (p) { i++; break; } } c3 = p - base64; bin[j++] = ((c2 & 0x03) << 6) | (c3 & 0x3f); if (j == maxlen) break; } end:; return bin; } char *z_hexadec(char *bin, int maxlen, int *plen, char *src){ int len, i, j; char c; if (!plen) plen = &len; *plen = strlen(src); if (*plen <= 0) return bin; if (!bin) bin = g_new0(char, *plen / 2 + 1); // yes, we can allocate more than needed for (i = 0, j = 0; i < *plen; i++){ c = src[i]; if (c >= '0' && c <= '9') bin[j] = c - '0'; else if (c >= 'a' && c <= 'f') bin[j] = c - 'a' + 10; else if (c >= 'A' && c <= 'F') bin[j] = c - 'A' + 10; bin[j] <<= 4; i++; if (i == *plen) break; c = src[i]; if (c >= '0' && c <= '9') bin[j] |= c - '0'; else if (c >= 'a' && c <= 'f') bin[j] |= c - 'a' + 10; else if (c >= 'A' && c <= 'F') bin[j] |= c - 'A' + 10; j++; if (j == maxlen) break; } return bin; } libzia-4.67/src/zssd1306.c0000644000175000017500000001076514662101505012106 00000000000000/* zssd1306.c - SSD1306 128x64 display Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #define ZSSD1306_CO 0x00 #define ZSSD1306_NOCO 0x80 #define ZSSD1306_COMMAND 0x00 #define ZSSD1306_DATA 0x40 #define SSD1306_SETSTARTLINE 0x40 #define SSD1306_SETCONTRAST 0x81 #define SSD1306_CHARGEPUMP 0x8d #define SSD1306_SETSEGMENTREMAP 0xa0 #define SSD1306_DISENTIREON 0xa4 #define SSD1306_SETNORMAL 0xa6 #define SSD1306_SETINVERTED 0xa7 #define SSD1306_SETMULTIPLEX 0xa8 #define SSD1306_SETCOMSCANINC 0xc0 #define SSD1306_SETCOMSCANDEC 0xc8 #define SSD1306_SETDISPLAYOFFSET 0xd3 #define SSD1306_SETOSCFREQ 0xd5 #define SSD1306_SETCOMPINS 0xda #define SSD1306_DISPLAYOFF 0xae #define SSD1306_DISPLAYON 0xaf #include #include #include #include #include #include void zssd1306_command(struct zbusdev *dev, unsigned char cmd){ char buf[2]; buf[0] = ZSSD1306_CO | ZSSD1306_COMMAND; // control byte buf[1] = cmd; zbus_write(dev, buf, 2); } void zssd1306_command2(struct zbusdev *dev, unsigned char cmd, unsigned char arg){ char buf[3]; buf[0] = ZSSD1306_CO | ZSSD1306_COMMAND; // control byte buf[1] = cmd; buf[2] = arg; zbus_write(dev, buf, 3); } int zssd1306_init(struct zbusdev *dev){ char init[] = { 0x00, // command 0xae, // display off 0xa8, 0x3f, // set multiplex 0xd3, 0x00, // set display offset (vertical shift) 0x40, // set start line 0 0xa0, // set segment remap 0=seg0 // 0xa1, // set segment remap 127=seg0 0xc0, // set com scan direction 0..N-1 // 0xc8, // set com scan direction N-1..0 0xda, 0x12, // set com pins alternative, disable remap 0x81, 0x80, // set contrast 0xa4, // disable entire display on 0xa6, // set normal mode // 0xa7, // set inverted mode 0xd5, 0x80, // set oscillator frequency 0x8d, 0x14, // charge pump 0x20, 0x02, // page addressing mode 0xaf, // display on }; int i; int ret; //for (i = 0; i < 5; i++){ ret = zi2c_write(dev, init, sizeof(init)); // if (ret >= 0) break; // usleep(100000); // dbg("zssd1306_init failed, retrying...\n"); //} if (ret < 0) return ret; int y; for (i = 1; i < 2; i++) { for (y = 0; y < 8; y++){ char buf[129]; buf[0] = 0x40; memset(buf + 1, i % 2 == 0 ? 255 : 0, 128); zssd1306_goto(dev, 0, y); zi2c_write(dev, buf, 129); } } zssd1306_flip(dev, 1); /*zssd1306_goto(dev, 0, 0); zi2c_write(dev, "\x40\xff\x01\x01\x01\x01\x01\x01\x01\x01\xff", 11); zssd1306_goto(dev, 0, 1); zi2c_write(dev, "\x40\xff\x80\x80\x80\x80\x80\x80\x80\x80\xff", 11); zssd1306_goto(dev, 0, 2); zi2c_write(dev, "\x40\xff\x01\x01\x01\x01\x01\x01\x01\x01\xff", 11); zssd1306_goto(dev, 0, 3); zi2c_write(dev, "\x40\xff\x80\x80\x80\x80\x80\x80\x80\x80\xff", 11);*/ return 0; } void zssd1306_free(struct zbusdev *dev){ if (!dev) return; zssd1306_command(dev, 0xae); // display off zbus_free(dev); } void zssd1306_flip(struct zbusdev *dev, char flip){ if (flip){ zssd1306_command(dev, 0xa1); // set segment remap 127=seg0 zssd1306_command(dev, 0xc8); // set com scan direction N-1..0 }else{ zssd1306_command(dev, 0xa0); // set segment remap 0=seg0 zssd1306_command(dev, 0xc0); // set com scan direction 0..N-1 } } void zssd1306_invert(struct zbusdev *dev, char invert){ if (invert){ zssd1306_command(dev, 0xa7); // set inverted mode }else{ zssd1306_command(dev, 0xa6); // set normal mode } } void zssd1306_contrast(struct zbusdev *dev, unsigned char contrast){ zssd1306_command2(dev, 0x81, contrast); // set contrast } void zssd1306_goto(struct zbusdev *dev, unsigned char x, unsigned char y){ unsigned char buf[4]; buf[0] = ZSSD1306_CO | ZSSD1306_COMMAND; // control byte buf[1] = 0xb0 | y; // page y buf[2] = 0x00 | (x & 0x0f); // lower column buf[3] = 0x10 | ((x >> 4) & 0x0f); // upper column zbus_write(dev, buf, sizeof(buf)); } libzia-4.67/src/zghash.c0000644000175000017500000000371414662101505012071 00000000000000/* zghash.c - extension for GHashTable Copyright (C) 2002-2021 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include void zg_hash_safe_insert(GHashTable *table, char *key, char *value){ gpointer orig_key; gpointer orig_value; if (g_hash_table_lookup_extended(table, (gpointer) key, &orig_key, &orig_value)) { g_hash_table_remove(table, orig_key); g_free(orig_key); g_free(orig_value); } g_hash_table_insert(table, key, value); } gboolean zg_hash_free_item(gpointer key, gpointer value, gpointer user_data){ if (key) g_free(key); if (value) g_free(value); if (user_data) g_free(user_data); // sakra fakt? Neni to argument predavany pri ruseni? return TRUE; } gboolean zg_hash_free_key(gpointer key, gpointer value, gpointer user_data){ if (key) { //dbg("zg_hash_free_key(%p)\n", key); g_free(key); } return TRUE; } void zg_hash_free(GHashTable *hash){ if (!hash) return; g_hash_table_foreach_remove(hash, zg_hash_free_item, NULL); g_hash_table_destroy(hash); } static void zg_hash_get_keys(gpointer key, gpointer value, gpointer user_data){ GPtrArray *arr = (GPtrArray*)user_data; g_ptr_array_add(arr, key); } void zg_hash_table_foreach_sorted(GHashTable *hash, GHFunc func, int (*compar)(const void *, const void *), gpointer user_data){ unsigned int i; GPtrArray *keys = g_ptr_array_new(); g_hash_table_foreach(hash, zg_hash_get_keys, keys); zg_ptr_array_qsort(keys, compar); for (i = 0; i < keys->len; i++){ gpointer key = g_ptr_array_index(keys, i); func(key, g_hash_table_lookup(hash, key), user_data); } g_ptr_array_free(keys, FALSE); } libzia-4.67/src/zptrarray.c0000644000175000017500000001713214662101505012642 00000000000000/* zptrarray.c - extended glibc's GPtrArray Copyright (C) 2002-2013 Ladislav Vaiz and authors of glib www.gtk.org */ /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GLib Team and others 1997-1999. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* * MT safe */ #include #include #include #include //#include */ #define MIN_ARRAY_SIZE 16 static gint g_nearest_pow (gint num); static gint g_nearest_pow (gint num) { gint n = 1; while (n < num) n <<= 1; return n; } /* Index arr */ typedef struct _GRealIndexArray GRealIndexArray; struct _GRealIndexArray { gpointer *pdata; guint len; guint alloc; }; static void z_ptr_array_maybe_expand (GRealIndexArray * arr, gint len); #ifdef Z_LEAK_DEBUG_LIST char *index_array_mem_chunk_file; int index_array_mem_chunk_line; #endif ZPtrArray *z_ptr_array_new (void) { GRealIndexArray *arr; //G_LOCK (index_array_mem_chunk); /*MUTEX_LOCK (index_array_mem_chunk); if (!index_array_mem_chunk) index_array_mem_chunk = g_mem_chunk_new ("arr mem chunk", sizeof (GRealIndexArray), 1024, G_ALLOC_AND_FREE); arr = g_chunk_new (GRealIndexArray, index_array_mem_chunk); //G_UNLOCK (index_array_mem_chunk); MUTEX_UNLOCK (index_array_mem_chunk);*/ arr = g_new(GRealIndexArray, 1); arr->pdata = NULL; arr->len = 0; arr->alloc = 0; return (ZPtrArray *) arr; } void z_ptr_array_free (ZPtrArray * arr, gboolean free_segment) { g_return_if_fail (arr); if (free_segment && arr->pdata != NULL) g_free (arr->pdata); /* //G_LOCK (index_array_mem_chunk); MUTEX_LOCK (index_array_mem_chunk); g_mem_chunk_free (index_array_mem_chunk, arr); //G_UNLOCK (index_array_mem_chunk); MUTEX_UNLOCK (index_array_mem_chunk);*/ g_free(arr); } static void z_ptr_array_maybe_expand (GRealIndexArray * arr, gint len) { guint old_alloc; if ((arr->len + len) > arr->alloc) { old_alloc = arr->alloc; arr->alloc = g_nearest_pow (arr->len + len); arr->alloc = MAX (arr->alloc, MIN_ARRAY_SIZE); if (arr->pdata) arr->pdata = (gpointer *)g_realloc (arr->pdata, sizeof (gpointer) * arr->alloc); else arr->pdata = g_new0 (gpointer, arr->alloc); memset (arr->pdata + old_alloc, 0, sizeof (gpointer) * (arr->alloc - old_alloc)); } } void z_ptr_array_set_size (ZPtrArray * farray, gint length) { GRealIndexArray *arr = (GRealIndexArray *) farray; g_return_if_fail (arr); if ((guint)length > arr->len) z_ptr_array_maybe_expand (arr, (length - arr->len)); arr->len = length; } gpointer z_ptr_array_remove_index (ZPtrArray * farray, guint index) { GRealIndexArray *arr = (GRealIndexArray *) farray; gpointer result; g_return_val_if_fail (arr, NULL); g_return_val_if_fail (index < arr->len, NULL); result = arr->pdata[index]; if (index != arr->len - 1){ memmove (arr->pdata + index, arr->pdata + index + 1, sizeof (gpointer) * (arr->len - index - 1)); } arr->pdata[arr->len - 1] = NULL; arr->len -= 1; return result; } gpointer z_ptr_array_remove_index_fast (ZPtrArray * farray, guint index) { GRealIndexArray *arr = (GRealIndexArray *) farray; gpointer result; g_return_val_if_fail (arr, NULL); g_return_val_if_fail (index < arr->len, NULL); result = arr->pdata[index]; if (index != arr->len - 1) arr->pdata[index] = arr->pdata[arr->len - 1]; arr->pdata[arr->len - 1] = NULL; arr->len -= 1; return result; } gboolean z_ptr_array_remove (ZPtrArray * farray, gpointer data) { GRealIndexArray *arr = (GRealIndexArray *) farray; guint i; g_return_val_if_fail (arr, FALSE); for (i = 0; i < arr->len; i += 1) { if (arr->pdata[i] == data) { z_ptr_array_remove_index (farray, i); return TRUE; } } return FALSE; } gboolean z_ptr_array_remove_fast (ZPtrArray * farray, gpointer data) { GRealIndexArray *arr = (GRealIndexArray *) farray; guint i; g_return_val_if_fail (arr, FALSE); for (i = 0; i < arr->len; i += 1) { if (arr->pdata[i] == data) { z_ptr_array_remove_index_fast (farray, i); return TRUE; } } return FALSE; } void z_ptr_array_add (ZPtrArray * farray, gpointer data) { GRealIndexArray *arr = (GRealIndexArray *) farray; g_return_if_fail (arr); z_ptr_array_maybe_expand (arr, 1); arr->pdata[arr->len++] = data; } /* new stuff */ void z_ptr_array_qsort (ZPtrArray *farray, int (*compar)(const void *, const void *)){ GRealIndexArray *arr = (GRealIndexArray *) farray; qsort( (void *)arr->pdata, arr->len, sizeof(gpointer), compar); } void z_ptr_array_uniq (ZPtrArray *farray, int (*compar)(const void *, const void *), int free_dups){ guint i=0; while (i + 1 < farray->len){ if (compar(farray->pdata+i, farray->pdata+i+1) == 0){ if (free_dups) g_free(z_ptr_array_index(farray, i + 1)); z_ptr_array_remove_index(farray, i + 1); }else{ i++; } } } gpointer *z_ptr_array_bsearch(ZPtrArray *farray, const void *key, int (*compar)(const void *, const void *)){ GRealIndexArray *arr = (GRealIndexArray *) farray; return (gpointer) bsearch (key, (void *)arr->pdata, arr->len, sizeof(gpointer), compar); } gint z_ptr_array_bsearch_index(ZPtrArray *farray, const void *key, int (*compar)(const void *, const void *)){ gpointer found; gint index; found = z_ptr_array_bsearch(farray, key, compar); if (!found) return -1; index = (gpointer *)found - (gpointer*)farray->pdata; return index; } void z_ptr_array_free_all(ZPtrArray *arr){ int i; gpointer item; for (i = arr->len-1; i >= 0; i--){ item = z_ptr_array_index(arr, i); g_free(item); } arr->len = 0; z_ptr_array_free(arr, arr->pdata ? TRUE : FALSE); } void z_ptr_array_insert(ZPtrArray * farray, gpointer data, guint index) { GRealIndexArray *arr = (GRealIndexArray *) farray; g_return_if_fail (arr); z_ptr_array_maybe_expand (arr, 1); if (index > arr->len) index = arr->len; if (arr->len - index > 0) memmove(arr->pdata + index + 1, arr->pdata + index, (arr->len - index) * sizeof(gpointer)); arr->pdata[index] = data; arr->len++; } libzia-4.67/src/zsock.c0000644000175000017500000002043714662101505011737 00000000000000/* zsock.c - socket utilities Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #ifdef Z_HAVE_ARPA_INET_H #include #endif #ifdef Z_HAVE_FCNTL_H #include #endif #ifdef Z_HAVE_SYS_IOCTL_H #include #endif #ifdef Z_HAVE_SYS_SELECT_H #include #endif #ifdef Z_HAVE_SYS_TYPES_H #include #endif #ifdef Z_HAVE_UNISTD_H #include #endif #ifdef Z_MSC #pragma warning(disable : 4996) #endif int z_sock_nonblock(int sock, int nonblock){ #ifdef Z_UNIX_CYGWIN_ANDROID return fcntl(sock, F_SETFL, nonblock ? O_NONBLOCK : 0); #else u_long iMode = 0; // If iMode = 0, blocking is enabled; // If iMode != 0, non-blocking mode is enabled. iMode = nonblock; if (ioctlsocket(sock, FIONBIO, &iMode) != NO_ERROR) return -1; return 0; #endif } int z_sock_reuse(int sock, int reuseaddr){ #ifdef Z_MSC_MINGW return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuseaddr, sizeof(reuseaddr)); #else return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr)); #endif } int z_sock_broadcast(int sock, int broadcast){ #ifdef Z_MSC_MINGW return setsockopt(sock, SOL_SOCKET, SO_BROADCAST, (const char *)&broadcast, sizeof(broadcast)); #else return setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast)); #endif } int z_sock_wouldblock(int err){ #ifdef Z_MSC_MINGW if (err == WSAEWOULDBLOCK) return 1; return 0; #else if (err==EWOULDBLOCK || err == EALREADY || err == EINPROGRESS) return 1; return 0; #endif } int z_sock_error(int sock){ socklen_t optlen; int ret, err; optlen = sizeof(err); #ifdef Z_MSC_MINGW ret = getsockopt(sock, SOL_SOCKET, SO_ERROR, (char *)&err, &optlen); #else ret = getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *)&err, &optlen); #endif //dbg("getsockopt(SO_ERROR) returns %d err is %d\n", ret, err); if (ret != 0) return errno; if (err != 0) return err; return 0; } void *z_sockadr_get_addr(union zsockaddr *sa){ switch (sa->sa.sa_family){ case AF_INET: return &sa->in.sin_addr; #ifdef AF_INET6 case AF_INET6: return &sa->in6.sin6_addr; #endif default: return &sa->sa.sa_data; } } int z_sockadr_get_len(union zsockaddr *sa){ switch (sa->sa.sa_family){ case AF_INET: return sizeof(struct sockaddr_in); #ifdef AF_INET6 case AF_INET6: return sizeof(struct sockaddr_in6); #endif default: return sizeof(struct sockaddr); } } char *z_sock_ntoa(GString *gs, int family, union zsockaddr *sa){ char buf[256]; #ifdef Z_MSC_MINGW DWORD size = sizeof(buf); if (WSAAddressToString(&sa->sa, sizeof(union zsockaddr), NULL, buf, &size)){ g_string_append_printf(gs, "[Unknown address, family=%d, error=%d]", family, z_sock_errno); return gs->str; } g_string_append_printf(gs, "%s", buf); #else unsigned short port = 0; if (!inet_ntop(family, z_sockadr_get_addr(sa), buf, sizeof(buf))){ // inet_ntop is not on XP g_string_append_printf(gs, "[Unknown address, family=%d, error=%d]", family, z_sock_errno); return gs->str; } g_string_append_printf(gs, "%s", buf); switch (family){ case AF_INET: port = ntohs(sa->in.sin_port); break; #ifdef AF_INET6 case AF_INET6: port = ntohs(sa->in6.sin6_port); break; #endif } if (port) g_string_append_printf(gs, ":%u", port); #endif return gs->str; } int z_sock_printf(int fd, const char *m, ...){ va_list l; char *c; int ret; va_start(l, m); c = g_strdup_vprintf(m, l); ret = send(fd, c, strlen(c), 0); va_end(l); return ret; } int z_pipe(int fds[2]){ //#ifndef Z_HAVE_UNISTD_H #ifdef WIN32 int port, master; struct sockaddr_in sin; master = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (master == INVALID_SOCKET) { zinternal("pipe: invalid master socket %d", WSAGetLastError()); return -1; } for (port = 2000; port < 2500; port++){ if (port == 2500 - 1){ shutdown(master, SD_BOTH); zinternal("pipe: no free socket"); return -1; } sin.sin_family = AF_INET; sin.sin_addr.S_un.S_addr = inet_addr("127.0.0.1"); sin.sin_port = htons(port); if (bind(master, (struct sockaddr *)&sin, sizeof(sin)) == SOCKET_ERROR){ //if (WSAGetLastError() == WSAEADDRINUSE) continue; continue; } break; } if (listen(master, 5) == SOCKET_ERROR){ shutdown(master, SD_BOTH); zinternal("pipe: listen socket error"); return -1; } fds[0] = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fds[0] == INVALID_SOCKET){ shutdown(master, SD_BOTH); zinternal("pipe: invalid socket 0"); return -1; } if (z_sock_nonblock(fds[0], 1)){ shutdown(master, SD_BOTH); shutdown(fds[0], SD_BOTH); zinternal("pipe: can't set O_NONBLOCK"); return -1; } if (connect(fds[0], (struct sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR){ int err = WSAGetLastError(); if (err != WSAEWOULDBLOCK){ shutdown(master, SD_BOTH); shutdown(fds[0], SD_BOTH); zinternal("pipe: can't connect"); return -1; } } if (z_sock_nonblock(fds[0], 0)){ shutdown(master, SD_BOTH); shutdown(fds[0], SD_BOTH); zinternal("pipe: can't clear O_NONBLOCK"); return -1; } fds[1] = accept(master, NULL, NULL); if (fds[1] == INVALID_SOCKET){ shutdown(master, SD_BOTH); shutdown(fds[0], SD_BOTH); zinternal("pipe: invalid socket accepted"); return -1; } shutdown(master, SD_BOTH); return 0; #else return pipe(fds); #endif } int z_pipe_write(int fd, const void *buf, int count){ #ifdef Z_MSC_MINGW return send(fd, (char *)buf, count, 0); #else return write(fd, buf, count); #endif } int z_pipe_read(int fd, void *buf, int count){ #ifdef Z_MSC_MINGW return recv(fd, (char *)buf, count, 0); #else return read(fd, buf, count); #endif } int z_pipe_close(int fd){ #ifdef Z_MSC_MINGW if ((SOCKET)fd == INVALID_SOCKET || (SOCKET)fd == SOCKET_ERROR) return 0; return closesocket((SOCKET)fd); #else return close(fd); #endif } #ifdef Z_MSC_MINGW int inet_aton(const char *cp, struct in_addr *inp){ unsigned long addr = inet_addr(cp); if (addr == INADDR_NONE) return 0; // invalid inp->S_un.S_addr = addr; return 1; // valid } #endif int z_sock_aton(const char *hostname, int port, union zsockaddr *sa){ int ret; ret = inet_aton(hostname, &(sa->in.sin_addr)); if (ret) { //valid sa->in.sin_family = AF_INET; sa->in.sin_port = htons(port); }else{ #ifdef Z_MSC_MINGW char *rwhost = g_strdup(hostname); int len = sizeof(struct sockaddr_in6); ret = !WSAStringToAddress(rwhost, AF_INET6, NULL, (struct sockaddr *)&sa->in6, &len); // 0 success, SOCKET_ERROR failed g_free(rwhost); #else ret = inet_pton(AF_INET6, hostname, &(sa->in6.sin6_addr)); #endif if (ret) { // valid sa->in6.sin6_family = AF_INET6; sa->in6.sin6_port = htons(port); }else{ sa->in.sin_family = -1; return -1; } } return 0; } void z_sock_set_errno(int err){ #ifdef Z_MSC_MINGW WSASetLastError(err); #else errno = err; #endif } int z_sock_connect(int sock, union zsockaddr *sa, int timeout_ms){ int ret, err; struct sockaddr *xy = &(sa->sa); ret = z_sock_nonblock(sock, 1); if (ret < 0) return ret; ret = connect(sock, xy, z_sockadr_get_len(sa)); err = z_sock_errno; dbg("connect=%d errno=%d xy=%p\n", ret, err, xy); if (ret < 0 && z_sock_wouldblock(err)){ fd_set fds; struct timeval tv; FD_ZERO(&fds); FD_SET(sock, &fds); tv.tv_sec = timeout_ms / 1000; tv.tv_usec = (timeout_ms % 1000) * 1000; ret = select(sock + 1, NULL, &fds, NULL, &tv); if (ret < 0) return ret; // error if (ret == 0) { // timeout #ifdef Z_MSC_MINGW z_sock_set_errno(WSAETIMEDOUT); #else z_sock_set_errno(ETIMEDOUT); #endif return -1; } // socket available for writing - connected or rejected if (z_sock_error(sock) != 0){ // keep errno/WSAGetLastError return -1; } return 0; } return ret; } libzia-4.67/src/zserial_proc_pipe.c0000644000175000017500000001071114662101505014311 00000000000000/* zserial_proc_pipe - portable serial port API Module for unix pipe process Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif static int zserial_proc_pipe_open(struct zserial *zser){ int pipe1[2], pipe2[2]; int ret, err; char *c; //dbg("zserial_open pid=%d read_fd=%d write_fd=%d\n", zser->pid, zser->read_fd, zser->write_fd); if (zser->pid > 0) return 0; if (pipe(pipe1) < 0) return -1; if (pipe(pipe2) < 0) return -1; //dbg("zserial_proc_pipe_open: pipe1=r%d w%d pipe2=r%d w%d\n", pipe1[0], pipe1[1], pipe2[0], pipe2[1]); zser->pid = fork(); if (zser->pid < 0) return -1; if (zser->pid == 0){ /* child */ int i; //error("child alive, closing\n"); for (i = 0; i < 3; i++){ if (i == pipe1[0] || i==pipe2[1]) continue; //error("close(%d)\n", i); close(i); } //error("duping\n"); if (dup(pipe1[0]) < 0) exit(-1); if (dup(pipe2[1]) < 0) exit(-1); if (dup(pipe2[1]) < 0) exit(-1); //error("closing\n"); closesocket(pipe1[0]); closesocket(pipe2[1]); //error("closing up to FD_SETSIZE\n"); for (i = 3; i < FD_SETSIZE; i++) { #ifdef Z_ANDROID if (i == 3) continue; #endif //error("close(%d)\n", i); close(i); } #ifdef Z_ANDROID execlp("/system/bin/sh", "/system/bin/sh", NULL); error("execlp failed, ret=%d errno=%d\n", ret, errno); #else ret = execlp(zser->cmd, zser->cmd, zser->arg, NULL); error("execlp failed, ret=%d errno=%d\n", ret, errno); #endif err = errno; c = z_strdup_strerror(err); error("*** failed exec '%s' errno=%d %s\n", zser->cmd, errno, c); exit(-1); } else{ /* parent */ //dbg("fork() for zserial process %d\n", zser->pid); closesocket(pipe1[0]); closesocket(pipe2[1]); zser->write_fd = pipe1[1]; /* sdin of child, parent must write */ zser->read_fd = pipe2[0]; /* stdout and stderr of child, parent must read */ } zser->opened = 1; return 0; } static int zserial_proc_pipe_read(struct zserial *zser, void *data, int len, int timeout_ms){ int ret; ret = read(zser->read_fd, data, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't read from %s (pipe fd %d): ", zser->id, zser->read_fd); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; // } static int zserial_proc_pipe_write(struct zserial *zser, void *data, int len){ int ret; ret = write(zser->write_fd, data, len); //dbg("zserial_proc_pipe_write pipe(%d) = %d\n", zser->write_fd, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_proc_pipe_close(struct zserial *zser){ int ret = 0; //dbg("zserial_proc_pipe_close() pipe pid=%d\n"); if (zser->pid > 0){ //dbg("kill(%d, %d)\n", zser->pid, SIGTERM); kill(zser->pid, SIGTERM); zser->pid = 0; } if (zser->read_fd >= 0) ret |= closesocket(zser->read_fd); if (zser->write_fd >= 0) ret |= closesocket(zser->write_fd); return ret; } static int zserial_proc_pipe_dtr(struct zserial *zser, int on){ return -1; } static int zserial_proc_pipe_rts(struct zserial *zser, int on){ return -1; } struct zserial *zserial_init_proc_pipe(const char *cmd, const char *arg){ char *c; struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_PROC_PIPE; zser->id = g_strdup(cmd); c = strchr(zser->id, ' '); if (c != NULL) *c = '\0'; zser->cmd = g_strdup(cmd); zser->arg = g_strdup(arg); //dbg("zserial_init_proc_pipe (%s)\n", cmd); zser->zs_open = zserial_proc_pipe_open; zser->zs_read = zserial_proc_pipe_read; zser->zs_write = zserial_proc_pipe_write; zser->zs_close = zserial_proc_pipe_close; zser->zs_dtr = zserial_proc_pipe_dtr; zser->zs_rts = zserial_proc_pipe_rts; return zser; } libzia-4.67/src/map2d.c0000644000175000017500000000336714662101505011614 00000000000000#include #include #include #include int main(int argc, char *argv[]){ FILE *fin, *fout; char s[1024], *addr, *sym, *c; int text = 0, len; long last = 0; if (argc < 3) { fprintf(stderr, "Usage: map2d input.map output.d\n"); return -1; } if (!(fin = fopen(argv[1], "rt"))){ fprintf(stderr, "Can't open '%s' for reading\n", argv[1]); return -1; } if (!(fout = fopen(argv[2], "wt"))){ fclose(fin); fprintf(stderr, "Can't open '%s' for writing\n", argv[2]); return -1; } while (fgets(s, sizeof(s) - 1, fin) != NULL){ len = strlen(s); if (len > 0 && s[len-1]=='\n') s[len-1] = '\0'; len = strlen(s); if (len > 0 && s[len-1]=='\r') s[len-1] = '\0'; // printf("s='%s'\n", s); //if (c[0] == ' ') c++; if (s[0] == '.'){ text = strncmp(s, ".text", 5) == 0; if (text){ strtok(s, " \r\n"); addr = strtok(NULL, " \r\n"); c = strtok(NULL, " \r\n"); // printf("text=%d\n", text); //printf("addr=%s c=%s\n", addr, c); last = strtol(addr, NULL, 16) + strtol(c, NULL, 16); } } // if (c[0] == '*') continue; if (!text) continue; if (strncmp(s, " ", 6) != 0) continue; addr = strtok(s, " "); sym = strtok(NULL, " "); c = strtok(NULL, " "); if (c) continue; if (strncmp(addr, "0x", 2) == 0) addr += 2; while (addr[0] == '0') addr++; if (sym[0] == '_') sym++; fprintf(fout, "%s %s\n", addr, sym); } fprintf(fout, "%lx\n", last); fclose(fin); fclose(fout); return 0; } libzia-4.67/src/zgpio_sysgpio.c0000644000175000017500000001201114662101505013500 00000000000000/* zgpio_sysgpio.c - GPIO chip /sys/class/gpio Copyright (C) 2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif #define SYSFS_EXPORT "/sys/class/gpio/export" #define SYSFS_UNEXPORT "/sys/class/gpio/unexport" #define SYSFS_DIRECTION "/sys/class/gpio/gpio%d/direction" #define SYSFS_VALUE "/sys/class/gpio/gpio%d/value" #define SYSFS_EDGE "/sys/class/gpio/gpio%d/edge" static void zgpio_sysgpio_freechip(struct zgpiochip *chip){ } static int zgpio_sysgpio_open(struct zgpio *gpio){ char file[64]; int ret = zfile_printfile(SYSFS_EXPORT, "%d", gpio->nr); if (ret < 0) return ret; sprintf(file, SYSFS_VALUE, gpio->nr); gpio->value_fd = open(file, O_RDWR); if (gpio->value_fd < 0) return gpio->value_fd; return 0; } static struct zgpio *zgpio_sysgpio_init_nr(struct zgpiochip *chip, int nr){ struct zgpio *gpio = g_new0(struct zgpio, 1); gpio->chip = chip; gpio->nr = nr; gpio->name = g_strdup_printf("P%c%d", 'A' + (nr / 32), nr % 32); int ret = zgpio_sysgpio_open(gpio); if (ret < 0){ zgpio_free(gpio); return NULL; } return gpio; } static struct zgpio *zgpio_sysgpio_init_name(struct zgpiochip *chip, const char *name){ struct zgpio *gpio; if (name == NULL || strlen(name) < 3) return NULL; if (z_char_uc(name[0]) != 'P') return NULL; gpio = g_new0(struct zgpio, 1); gpio->chip = chip; gpio->name = g_strdup(name); gpio->nr = atoi(name + 2); gpio->nr += (z_char_uc(gpio->name[1]) - 'A') * 32; int ret = zgpio_sysgpio_open(gpio); if (ret < 0){ zgpio_free(gpio); return NULL; } return gpio; } static void zgpio_sysgpio_free(struct zgpio *gpio){ char file[64]; if (!gpio) return; if (gpio->edge != ZGPIO_EDGE_NONE){ sprintf(file, SYSFS_EDGE, gpio->nr); zfile_printfile(file, "none"); } if (gpio->value_fd >= 0) { if (gpio->zsel != NULL) zselect_set(gpio->zsel, gpio->value_fd, NULL, NULL, NULL, NULL); close(gpio->value_fd); } if (gpio->unexport_after) { zfile_printfile(SYSFS_UNEXPORT, "%d", gpio->nr); } } static int zgpio_sysgpio_dir_input(struct zgpio *gpio){ char file[64]; sprintf(file, SYSFS_DIRECTION, gpio->nr); return zfile_printfile(file, "in"); } static int zgpio_sysgpio_dir_output(struct zgpio *gpio){ char file[64]; sprintf(file, SYSFS_DIRECTION, gpio->nr); return zfile_printfile(file, "out"); } static int zgpio_sysgpio_write(struct zgpio *gpio, int value){ int ret = lseek(gpio->value_fd, 0, SEEK_SET); if (ret < 0) return ret; ret = write(gpio->value_fd, value ? "1" : "0", 1); return ret; } static int zgpio_sysgpio_read(struct zgpio *gpio){ char buf[2]; int ret = lseek(gpio->value_fd, 0, SEEK_SET); if (ret < 0) return ret; ret = read(gpio->value_fd, buf, 1); if (ret < 0) return ret; return buf[0] != '0'; } static void zgpio_sysgpio_handler(void *xxx) { struct zgpio *gpio = (struct zgpio*)xxx; int value = zgpio_sysgpio_read(gpio); if (gpio->handler){ gpio->handler(gpio, value, gpio->data); } } int zgpio_sysgpio_set_handler(struct zgpio *gpio, struct zselect *zsel, enum zgpio_edge edge, void (*handler)(struct zgpio *gpio, int value, void *data), void *data){ char file[64]; int ret; gpio->edge = edge; gpio->handler = handler; gpio->data = data; sprintf(file, SYSFS_DIRECTION, gpio->nr); ret = zfile_printfile(file, "in"); if (ret < 0) return -1; sprintf(file, SYSFS_EDGE, gpio->nr); switch (edge){ case ZGPIO_EDGE_NONE: ret = zfile_printfile(file, "none"); break; case ZGPIO_EDGE_RISING: ret = zfile_printfile(file, "rising"); break; case ZGPIO_EDGE_FALLING: ret = zfile_printfile(file, "falling"); break; case ZGPIO_EDGE_BOTH: ret = zfile_printfile(file, "both"); break; default: return -1; } if (ret < 0) return ret; zselect_set(zsel, gpio->value_fd, NULL, NULL, zgpio_sysgpio_handler, gpio); return 0; } struct zgpiochip *zgpiochip_init_sysgpio(void){ struct zgpiochip *chip = g_new0(struct zgpiochip, 1); chip->freechip = zgpio_sysgpio_freechip; chip->init_nr = zgpio_sysgpio_init_nr; chip->init_name = zgpio_sysgpio_init_name; chip->free = zgpio_sysgpio_free; chip->dir_input = zgpio_sysgpio_dir_input; chip->dir_output = zgpio_sysgpio_dir_output; chip->write = zgpio_sysgpio_write; chip->read = zgpio_sysgpio_read; chip->set_handler = zgpio_sysgpio_set_handler; return chip; } libzia-4.67/src/ziconv.c0000644000175000017500000000177314662101505012120 00000000000000/* iconv to be easy Copyright (C) 2019 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include int ziconv(iconv_t cd, char *inbuf, GString *outbuf){ char *tmp, *inptr, *outptr; size_t sizein, sizeout, ret, oldsizein, size; if (!inbuf || !*inbuf) return -1; size = strlen(inbuf); tmp = g_malloc(size + 1); inptr = inbuf; sizein = size; while (sizein > 0){ outptr = tmp; sizeout = size; oldsizein = sizein; ret = iconv(cd, &inptr, &sizein, &outptr, &sizeout); if (ret == (size_t)-1){ //int err = errno; // errno is always zero under MSVC //if (err != E2BIG && err != EILSEQ && err != EINVAL) return -1; if (sizein == oldsizein) break; } if (outptr != NULL) *outptr = '\0'; g_string_append(outbuf, tmp); } g_free(tmp); return 0; } libzia-4.67/src/zstr.c0000644000175000017500000003262514662101505011612 00000000000000/* string utilities Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include gint z_compare_string (gconstpointer a, gconstpointer b){ gchar **ca, **cb; ca=(gchar **)a; cb=(gchar **)b; return strcmp(*ca, *cb); } typedef unsigned chartype; char *z_strstr(const char *phaystack, const char *pneedle){ register const unsigned char *haystack, *needle; register chartype b, c; haystack = (const unsigned char *) phaystack; needle = (const unsigned char *) pneedle; b = *needle; if (b != '\0'){ if (b != '.' && b != '?'){ haystack--; /* possible ANSI violation */ do{ c = *++haystack; if (c == '\0') goto ret0; }while (c != b); } c = *++needle; if (c == '\0') goto foundneedle; ++needle; goto jin; for (;;){ register chartype a; register const unsigned char *rhaystack, *rneedle; do{ a = *++haystack; if (a == '\0') goto ret0; if (a == b) break; a = *++haystack; if (a == '\0') goto ret0; shloop:; }while (a != b && b != '.' && b != '?'); jin:; a = *++haystack; if (a == '\0') goto ret0; if (c!='.' && c!='?' && a != c) goto shloop; rhaystack = haystack-- + 1; rneedle = needle; a = *rneedle; if (*rhaystack == a || a=='.' || a=='?') do{ if (a == '\0') goto foundneedle; ++rhaystack; a = *++needle; if (a!='.' && a!='?'){ if (*rhaystack != a) break; } if (a == '\0') goto foundneedle; ++rhaystack; a = *++needle; }while (*rhaystack == a || a == '.' || a=='?'); needle = rneedle; /* took the register-poor approach */ if (a == '\0') break; } } foundneedle:; return (char*) haystack; ret0:; return 0; } char *z_strcasestr(const char *phaystack, const char *pneedle){ register const unsigned char *haystack, *needle; register chartype b, c; haystack = (const unsigned char *) phaystack; needle = (const unsigned char *) pneedle; b = tolower(*needle); if (b != '\0'){ haystack--; /* possible ANSI violation */ do{ c = tolower(*++haystack); if (c == '\0') goto ret0; }while (c != b); c = tolower(*++needle); if (c == '\0') goto foundneedle; ++needle; goto jin; for (;;){ register chartype a; register const unsigned char *rhaystack, *rneedle; do{ a = tolower(*++haystack); if (a == '\0') goto ret0; if (a == b) break; a = tolower(*++haystack); if (a == '\0') goto ret0; shloop:; }while (a != b); jin:; a = tolower(*++haystack); if (a == '\0') goto ret0; if (a != c) goto shloop; rhaystack = haystack-- + 1; rneedle = needle; a = tolower(*rneedle); if (tolower(*rhaystack) == a) do{ if (a == '\0') goto foundneedle; ++rhaystack; a = tolower(*++needle); if (tolower(*rhaystack) != a) break; if (a == '\0') goto foundneedle; ++rhaystack; a = tolower(*++needle); }while (tolower(*rhaystack) == a); needle = rneedle; /* took the register-poor approach */ if (a == '\0') break; } } foundneedle:; return (char*) haystack; ret0:; return 0; } int z_min3(int a, int b, int c) { int min = a; if (b < min) min=b; if (c < min) min=c; return min; } int z_levenshtein(const char *s, const char *t){ int i, j, k, n, m, cost, *d, ret; n = strlen(s); m = strlen(t); if (!n) return -1; if (!m) return -1; // d is a table with n+1 rows and m+1 columns d = (int *)g_malloc(sizeof(int) * (m + 1) * (n + 1)); m++; n++; // step 2 for(k = 0; k < n; k++) d[k] = k; // deletion for(k = 0; k < m; k++) d[k*n] = k; // insertion // step 3 and 4 for(i = 1; i 0) g_string_append_c(gs, ' '); g_string_append_printf(gs, "%02x", (unsigned char)data[i]); } return gs->str; } char *z_strip_crlf(char *str){ if (str == NULL) return NULL; int l = strlen(str); if (l > 0 && str[l-1] == '\n'){ str[l - 1] = '\0'; l--; } if (l > 0 && str[l-1] == '\r') { str[l - 1] = '\0'; } return str; } char *z_strip_from(char *str, char charfrom){ char *c; c = strchr(str, charfrom); if (c) *c = '\0'; return str; } char *z_1250_to_8859_2(char *src){ char *c; for (c = src; *c != '\0'; c++){ switch ((unsigned char)*c){ // win1250 iso8859-2 case 0x9e: *c = 0xbe; break; case 0x9a: *c = 0xb9; break; case 0x9d: *c = 0xbb; break; case 0x8e: *c = 0xae; break; case 0x8a: *c = 0xa9; break; case 0x8d: *c = 0xab; break; } } return src; } void *z_strtop(const char *str){ long int li; #ifdef Z_MSC_MINGW li = strtoul(str, NULL, 16); //dbg("z_strtop('%s') = %lx\n", str, li); #else long long int lli; lli = strtoll(str, NULL, 16); li = (long int) lli; //dbg("z_strtop('%s') = %llx = %lx\n", str, lli, li); #endif return (void *)li; } #ifndef Z_HAVE_G_STRING_APPEND_VPRINTF void g_string_append_vprintf(GString *gs, const gchar *format, va_list args){ char *c; c = g_strdup_vprintf(format, args); g_string_append(gs, c); g_free(c); } #endif #ifdef Z_MINGW static GStaticMutex strtok_mutex = G_STATIC_MUTEX_INIT; char *strtok_r(char *str, const char *delim, char **saveptr){ char *c; g_static_mutex_lock(&strtok_mutex); c = strtok(str, delim); g_static_mutex_unlock(&strtok_mutex); return c; } #endif void z_qrg_format(char *s, int size, double qrg){ int len; g_snprintf(s, size - 3, "%0.0f", qrg); len=strlen(s); if (len > 3) { memmove(s + len - 2, s + len - 3, 4); s[len - 3] = '.'; if (len > 6){ memmove(s + len - 5, s + len - 6, 8); s[len - 6] = '.'; } } if (qrg < 0.0 && len > 2 && s[1] == '.'){ memmove(s + 1, s + 2, len); } } double z_qrg_parse(const char *s){ const char *c; char *d; double f; char *ss = g_new0(char, strlen(s) + 1); for (c = s, d = ss; *c != '\0'; c++){ if (*c == '.') continue; *d++ = *c; } *d = '\0'; f = atof(ss); g_free(ss); return f; } char *z_html2txt(char *html){ GString *gs; char *ret, *c; int i; gs = g_string_new(html); // remove comments z_string_replace_from_to(gs, "", "", ZSR_ALL); // keep only body c = z_strcasestr(gs->str, "str); c = z_strcasestr(gs->str, ""); if (c != NULL) g_string_truncate(gs, (c - gs->str) + 7); // remove CRLF for (i = 0; i < (int)gs->len; i++){ if (gs->str[i] == '\r' || gs->str[i] == '\n' || gs->str[i] == '\t'){ gs->str[i] = ' '; i--; } } // replace some tags with \n z_string_replace(gs, "
", "\n", ZSR_ALL | ZSR_CI); z_string_replace(gs, "", " ", ZSR_ALL); // shrink more spaces to one for (i = 0; i < (int)gs->len; i++){ if (gs->str[i] == ' ' && gs->str[i+1] == ' '){ g_string_erase(gs, i, 1); i--; } } // remove only spaces (" \n") for (i = 0; i < (int)gs->len; i++){ if (gs->str[i] == ' ' && gs->str[i+1] == '\n'){ g_string_erase(gs, i, 1); i--; } } // convert  's to spaces z_string_replace(gs, " ", " ", ZSR_ALL | ZSR_CI); // some other special characters z_string_replace(gs, "©", "(C)", ZSR_ALL | ZSR_CI); // shrink more \n's to two for (i = 0; i < (int)gs->len - 2; i++){ if (gs->str[i] == '\n' && gs->str[i+1] == '\n' && gs->str[i+2] == '\n'){ g_string_erase(gs, i, 1); i--; } } // remove leading \n if (gs->str[0] =='\n') g_string_erase(gs, 0, 1); if (gs->str[0] =='\n') g_string_erase(gs, 0, 1); // remove trailing \n if (gs->len > 0 && gs->str[gs->len - 1] == '\n') g_string_truncate(gs, gs->len - 1); if (gs->len > 0 && gs->str[gs->len - 1] == '\n') g_string_truncate(gs, gs->len - 1); ret = g_strdup(gs->str); g_string_free(gs, TRUE); return ret; } int z_string_replace(GString *gs, char *pattern, char *newstr, int flags){ int pos = -1; int i; char *c; for (i = 0; i < (int)gs->len; i++){ if (flags & ZSR_CI) c = z_strcasestr(gs->str + i, pattern); else c = strstr(gs->str + i, pattern); if (c == NULL) break; pos = c - gs->str; g_string_erase(gs, pos, strlen(pattern)); g_string_insert(gs, pos, newstr); i = pos + strlen(newstr) - 1; if ((flags & ZSR_ALL) == 0) break; } return pos; } int z_string_replace_from_to(GString *gs, char *from, char *to, char *newstr, int flags){ int i; int pos = -1; char *c, *d; for (i = 0; i < (int)gs->len; i++){ if (flags & ZSR_CI) c = z_strcasestr(gs->str + i, from); else c = strstr(gs->str + i, from); if (c == NULL) break; if (flags & ZSR_CI) d = z_strcasestr(c + strlen(from), to); else d = strstr(c + strlen(from), to); if (d == NULL) break; // ignore non-closed combination pos = c - gs->str; g_string_erase(gs, pos, (d - c) + strlen(to)); g_string_insert(gs, pos, newstr); i = pos + strlen(newstr) - 1; if ((flags & ZSR_ALL) == 0) break; } return pos; } void z_split2(char *src, char delimiter, char **key, char **val, int flags){ char *c; const char *kx, *vx; if (!src) { *key = NULL; *val = NULL; return; } c = strchr(src, delimiter); if (!c) { *key = NULL; *val = NULL; return; } *c = '\0'; if (!(flags & ZSPL_NSTRIP)){ kx = z_trim_beg(src); vx = z_trim_beg(c + 1); }else{ kx = src; vx = c + 1; } *key = g_strndup(kx, c - kx); *val = g_strdup(vx); if (!(flags & ZSPL_NSTRIP)){ z_trim_end(*key); z_trim_end(*val); } } int zstr_begins_with(const char *haystack, const char *needle, int casesensitive){ if (casesensitive){ return strncmp(haystack, needle, strlen(needle)) == 0; }else{ return strncasecmp(haystack, needle, strlen(needle)) == 0; } } char *zstr_shorten(const char *src, int maxlen){ char *c; int l = strlen(src); if (maxlen < 3 || l <= maxlen) return g_strdup(src); c = g_new0(char, maxlen + 1); memcpy(c, src, maxlen / 2); c[maxlen/2] = '~'; memcpy(c + maxlen / 2 + 1, src + l - (maxlen + 1)/ 2 + 1, maxlen - maxlen / 2); return c; } void z_string_bytes(GString *gs, long long bytes){ if (bytes < 10*1024LL){ g_string_append_printf(gs, "%d B", (int)bytes); }else if (bytes < 10 * 1024 * 1024LL){ g_string_append_printf(gs, "%3.1f KB", (double)(bytes / 1024.0)); }else if (bytes < 10L * 1024 * 1024 * 1024LL){ g_string_append_printf(gs, "%3.1f MB", (double)(bytes / (1024.0 * 1024.0))); }else{ g_string_append_printf(gs, "%3.1f GB", (double)(bytes / (1024.0 * 1024.0 * 1024.0))); } } void z_strtok_csv_simple(GString *gs, GString *token){ int i, quote = 0; g_string_truncate(token, 0); for (i = 0; i < (int)gs->len; i++){ char c = gs->str[i]; if (quote){ quote = 0; switch (c){ case '"': g_string_append_c(token, c); break; case ';': g_string_erase(gs, 0, i + 1); return; } } else{ switch (c){ case '"': if (i > 0) quote = 1; break; case ';': g_string_erase(gs, 0, i + 1); return; default: g_string_append_c(token, c); break; } } } g_string_erase(gs, 0, i); } void zg_string_trim(GString *gs){ while (gs->len > 0 && isspace(gs->str[0])) { g_string_erase(gs, 0, 1); } while (gs->len > 0 && isspace(gs->str[gs->len - 1])) { g_string_erase(gs, gs->len - 1, 1); } } gpointer zg_memdup(gconstpointer mem, gsize byte_size) { gpointer new_mem; if (mem && byte_size != 0) { new_mem = g_malloc(byte_size); memcpy(new_mem, mem, byte_size); } else new_mem = NULL; return new_mem; }libzia-4.67/src/zfile.c0000644000175000017500000001366114662101505011720 00000000000000/* zfile.c - file utilities Copyright (C) 2011-2018 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. UTF-8 detect: ěščřžýá */ #include #ifdef Z_HAVE_UNISTD_H #include #include #endif #include #include #include #include #ifdef Z_HAVE_WINSOCK2_H #include #endif #ifdef Z_HAVE_WINDOWS_H #include #endif #ifdef Z_HAVE_IO_H #include #endif #ifdef Z_HAVE_ERRNO_H #include #endif #ifdef Z_ANDROID #include #endif #ifdef Z_MSC #pragma warning(disable : 4996) #endif gchar *zfile_fgets(GString *gs, FILE *f, int stripcomment){ char s[102], *c; int len; g_string_truncate(gs, 0); while (1){ c = fgets(s, 100, f); if (!c) { if (gs->len > 0) break; return NULL; } len = strlen(s); if (len>0 && s[len-1]=='\n'){ /* MAC ?*/ s[len-1]='\0'; if (len>1 && s[len-2]=='\r') s[len-2]='\0'; g_string_append(gs, s); break; } g_string_append(gs, s); } if (stripcomment){ char *c; c = strchr(gs->str, '#'); if (c) g_string_truncate(gs, c - gs->str); } /*dbg("%3d '%s'\n",gs->len, gs->str);*/ return gs->str; } gchar *zfile_mgets(GString *gs, const char *file, long int *pos, const long int len, int stripcomment){ const char *c; /*dbg("safe_mgets(%d,%d,%d)\n", *pos, len, stripcomment);*/ g_string_truncate(gs, 0); if (*pos>=len) return NULL; for (c=file+(*pos); c!=file+len; c++,(*pos)++){ switch(*c){ case '\r': continue; case '\n': c++;(*pos)++; goto brk; } g_string_append_c(gs, *c); } brk:; /* dbg("brk at %d\n", *pos);*/ if (stripcomment){ char *c; c = strchr(gs->str, '#'); if (c) g_string_truncate(gs, c - gs->str); } // dbg("safe_mgets: %3d '%s' *pos=%d len=%d\n",gs->len, gs->str, *pos, len); if (*pos>len) return NULL; return gs->str; } double z_df(const char *filename){ double df = -1; #if defined(HAVE_SYS_VFS_H) struct statfs sf; if (statfs(filename, &sf)) return -1.0; df = (double)sf.f_bsize * (double)sf.f_bavail; /* dbg("bsize=%ld, bavail=%ld, ret=%f\n", sf.f_bsize, sf.f_bavail, ret);*/ #elif defined (Z_MSC_MINGW) ULARGE_INTEGER FreeBytesAvailable; char *wfn; wfn = g_strdup(filename); z_wokna(wfn); z_dirname(wfn); if (strncmp(wfn, "\\", 2) == 0){ char *c = wfn; wfn = g_strconcat(c, "\\", NULL); g_free(c); } if (GetDiskFreeSpaceEx(wfn, &FreeBytesAvailable, NULL, NULL)) { df = (double)FreeBytesAvailable.QuadPart; }else{ int x = GetLastError(); int y = x; } g_free(wfn); // (GetDiskFreeSpaceEx("C:\\", &FreeBytesAvailable, NULL, NULL)) df = (double)FreeBytesAvailable.QuadPart; #endif return df; } int z_lockf(int fd, int cmd, off_t ofs, off_t len){ #ifdef Z_MSC_MINGW HANDLE h; OVERLAPPED ov; //zinternal("lockf neotestována"); h = (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } memset(&ov, 0, sizeof(OVERLAPPED)); ov.Offset = ofs; if (!LockFileEx(h, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, len, 0, &ov)) { return -1; } if (cmd == F_TEST){ UnlockFile(h, ofs, 0, len, 0); } return 0; #elif defined(Z_ANDROID) int ret; switch(cmd){ case F_LOCK: //exclusive return flock(fd, LOCK_EX); case F_TLOCK: // non block, returns error if is locked return flock(fd, LOCK_EX | LOCK_NB); case F_ULOCK: // unlock return flock(fd, LOCK_UN); case F_TEST: // 0=unlocked or locked by me, -1=another process hold lock ret = flock(fd, LOCK_EX | LOCK_NB); if (ret != 0) return ret; return flock(fd, LOCK_UN); default: return -1; } #else return lockf(fd, cmd, len); #endif } int z_ftruncate(int fd, off_t length){ #ifdef Z_MSC_MINGW HANDLE h; LARGE_INTEGER large; //zinternal("lockf neotestována"); h = (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } large.QuadPart = length; if (!SetFilePointerEx(h, large, NULL, FILE_BEGIN)){ errno = EIO; return -1; } if (!SetEndOfFile(h)){ errno = EIO; return -1; } return 0; #else return ftruncate(fd, length); #endif } off_t zfile_flen(FILE *f){ off_t pos, len; int ret; pos = ftell(f); if (pos < 0L) return pos; ret = fseek(f, 0L, SEEK_END); if (ret < 0) return ret; len = ftell(f); if (len < 0L) return len; ret = fseek(f, pos, SEEK_SET); return len; } char *z_format_bytes(char *s, int size, long b){ if (b < 10240){ g_snprintf(s, size, "%ldB", b); }else if (b < 10240*1024){ g_snprintf(s, size, "%.1fKB", b/1024.0); }else{ g_snprintf(s, size, "%.2fMB", b/(1024.0*1024.0)); } return s; } char *zfile_read_textfile(char *filename){ GString *gs; char *ret; char buf[65536+1]; FILE *f; z_wokna(filename); f = fopen(filename, "rt"); if (f == NULL) return NULL; gs = g_string_sized_new(zfile_flen(f)); while (1){ int rd = fread(buf, 1, sizeof(buf) - 1, f); if (rd < 0){ fclose(f); g_string_free(gs, TRUE); return NULL; } if (rd == 0) break; buf[rd] = '\0'; g_string_append(gs, buf); } fclose(f); ret = g_strdup(gs->str); g_string_free(gs, TRUE); return ret; } int zfile_printfile(const char *filename, const char *fmt, ...){ va_list va; char *c; int len, wt; FILE *f = fopen(filename, "wb"); if (f == NULL) return -1; va_start(va, fmt); c = g_strdup_vprintf(fmt, va); va_end(va); len = strlen(c); wt = fwrite(c, 1, len, f); g_free(c); if (wt != len) { fclose(f); return -1; } fclose(f); return wt; } libzia-4.67/src/zfiledlg.c0000644000175000017500000001507214662101505012405 00000000000000/* zfiledlg.c - file dialog Copyright (C) 2011-2020 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include //#ifdef Z_HAVE_DLFCN_H //#include //#endif #ifdef Z_HAVE_STDLIB_H #include #endif #include struct zselect; static gpointer zfiledlg_thread_func(gpointer data); struct zfiledlg *zfiledlg_init(void){ struct zfiledlg *dlg; dlg = g_new0(struct zfiledlg, 1); dlg->thread = NULL; dlg->last_dir = NULL; return dlg; } void zfiledlg_free(struct zfiledlg *dlg){ if (dlg->thread != NULL) { g_thread_join(dlg->thread); dlg->thread = NULL; } //dbg("zfiledlg_free\n"); g_free(dlg->last_dir); #ifdef Z_MSC_MINGW g_free(dlg->ofn.lpstrFile); #endif dlg->last_dir = NULL; } int zfiledlg_open(struct zfiledlg *dlg, struct zselect *zsel, void (*fce)(void *, char *), void *arg, const char *filename, const char *ext){ #ifdef Z_MSC_MINGW_CYGWIN int i, l, t; GString *gs; char *c, *ext2; if (dlg->thread != NULL) { g_thread_join(dlg->thread); dlg->thread = NULL; } dlg->zsel = zsel; dlg->fce = fce; dlg->arg = arg; ZeroMemory(&dlg->ofn, sizeof(OPENFILENAME)); dlg->ofn.lStructSize = sizeof(OPENFILENAME); dlg->ofn.lpstrFile = (char *)g_malloc(_MAX_PATH); g_strlcpy(dlg->ofn.lpstrFile, filename, _MAX_PATH); dlg->ofn.nMaxFile = _MAX_PATH; gs = g_string_new(""); ext2 = g_strdup(ext); t = 0; while ((c = z_tokenize(ext2, &t)) != NULL) { char *u = g_strdup(c); z_str_uc(u); g_string_append_printf(gs, "%s files (*.%s)|*.%s|", u, c, c); g_free(u); } g_free(ext2); g_string_append_printf(gs, "All files (*.*)|*.*|", ext, ext); c = g_strdup(gs->str); g_string_free(gs, TRUE); l = strlen(c); for (i = 0; i < l; i++) if (c[i] == '|') c[i] = '\0'; dlg->ofn.lpstrFilter = c; dlg->ofn.nFilterIndex = 1; dlg->ofn.nMaxFileTitle = 0; dlg->ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; //dlg->thread = g_thread_create(zfiledlg_thread_func, dlg, TRUE, NULL); dlg->thread = g_thread_try_new("zfiledlg", zfiledlg_thread_func, dlg, NULL); return 0; #elif defined(Z_HAVE_GTK) if (dlg->thread != NULL) { g_thread_join(dlg->thread); dlg->thread = NULL; } dlg->zsel = zsel; dlg->fce = fce; dlg->arg = arg; dlg->ext2 = g_strdup(ext); /* void *gtkso = dlopen("/usr/lib/libgtk-x11-2.0.so.0", RTLD_LAZY); if (!gtkso) { error("dlopen failed: %s\n", dlerror()); return -1; } dlg->gtk_init = dlsym(gtkso, "gtk_init"); dlg->gtk_file_chooser_dialog_new = dlsym(gtkso, "gtk_file_chooser_dialog_new"); dlg->gtk_dialog_run = dlsym(gtkso, "gtk_dialog_run"); dlg->gtk_file_chooser_get_filename = dlsym(gtkso, "gtk_file_chooser_get_filename"); dlg->gtk_widget_destroy = dlsym(gtkso, "gtk_widget_destroy"); dlg->gtk_events_pending = dlsym(gtkso, "gtk_events_pending"); dlg->gtk_main_iteration = dlsym(gtkso, "gtk_main_iteration"); dlg->gtk_file_chooser_set_current_folder = dlsym(gtkso, "gtk_file_chooser_set_current_folder"); dlg->gtk_file_filter_new = dlsym(gtkso, "gtk_file_filter_new"); dlg->gtk_file_filter_set_name = dlsym(gtkso, "gtk_file_set_name"); dlg->gtk_file_filter_add_pattern = dlsym(gtkso, "gtk_file_add_pattern"); dlg->g_object_set_data = dlsym(gtkso, "g_object_set_data"); dlg->gtk_file_chooser_add_filter = dlsym(gtkso, "gtk_file_chooser_add_filter");*/ gtk_init(0, NULL); dlg->memlist = g_ptr_array_new(); #ifdef Z_MACOS zfiledlg_thread_func(dlg); #else dlg->thread = g_thread_try_new("zfiledlg", zfiledlg_thread_func, dlg, NULL); #endif return 0; #else return -1; #endif } static gpointer zfiledlg_thread_func(gpointer data){ #ifdef Z_MSC_MINGW_CYGWIN struct zfiledlg *dlg = (struct zfiledlg *)data; #endif zg_thread_set_name("Libzia zfiledlg"); #ifdef Z_MSC_MINGW_CYGWIN if (!GetOpenFileName(&dlg->ofn)){ zselect_msg_send(dlg->zsel, "ZFILEDLG;0x%lx;X;%d", (unsigned long)GPOINTER_TO_SIZE(dlg), CommDlgExtendedError()); }else{ zselect_msg_send(dlg->zsel, "ZFILEDLG;0x%lx;F;%s", (unsigned long)GPOINTER_TO_SIZE(dlg), dlg->ofn.lpstrFile); } g_free((void *)dlg->ofn.lpstrFilter); return NULL; #elif defined (Z_HAVE_GTK) int ret; int t; char *c, *d; struct zfiledlg *dlg = (struct zfiledlg *)data; GtkWidget *dialog = gtk_file_chooser_dialog_new("Open file", NULL, GTK_FILE_CHOOSER_ACTION_OPEN, "_Cancel", GTK_RESPONSE_CANCEL, "_Open", GTK_RESPONSE_ACCEPT, NULL); if (dlg->last_dir != NULL) { ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dlg->last_dir); } t = 0; while ((c = z_tokenize(dlg->ext2, &t)) != NULL) { GtkFileFilter *filter = gtk_file_filter_new(); d = g_strdup_printf("%s files (*.%s)", c, c); g_ptr_array_add(dlg->memlist, d); gtk_file_filter_set_name(filter, d); d = g_strdup_printf("*.%s", c); g_ptr_array_add(dlg->memlist, d); gtk_file_filter_add_pattern(filter, d); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); } g_free(dlg->ext2); ret = gtk_dialog_run(GTK_DIALOG(dialog)); if (ret != GTK_RESPONSE_ACCEPT){ zselect_msg_send(dlg->zsel, "ZFILEDLG;0x%lx;X;%d", (unsigned long)GPOINTER_TO_SIZE(dlg), ret); }else{ char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); zselect_msg_send(dlg->zsel, "ZFILEDLG;0x%lx;F;%s", (unsigned long)GPOINTER_TO_SIZE(dlg), file); } gtk_widget_destroy(dialog); while (gtk_events_pending()) gtk_main_iteration(); zg_ptr_array_free_all(dlg->memlist); return NULL; #else return NULL; #endif } void zfiledlg_read_handler(int n, char *items[]){ dbg("zfiledlg_read_handler '%s'\n", items[1]); struct zfiledlg *dlg = (struct zfiledlg *)strtol(items[1], NULL, 16); dbg("zfiledlg_read_handler %p\n", dlg); if (strcmp(items[2], "F") == 0){ g_free(dlg->last_dir); dlg->last_dir = g_strdup(items[3]); z_dirname(dlg->last_dir); dbg("zfiledlg_read_handler: last_dir='%s'\n", dlg->last_dir); dlg->fce(dlg->arg, items[3]); } } libzia-4.67/src/zhttp.c0000644000175000017500000010153414662101505011755 00000000000000/* zhttp.c - http client Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include "libziaint.h" #include "eprintf.h" #include #include #include #include #include #include #include #include #include #include #include #ifdef Z_HAVE_GNUTLS static gnutls_certificate_credentials_t xcred; #endif #ifdef Z_MSC #pragma warning(disable : 4996) #endif #define SLOWDOWNx 100 static void zhttp_adns_callback(struct zasyncdns *adns, int n, int *family, int *socktype, int *protocol, int *addrlen, union zsockaddr *addr, char *errorstr); static void zhttp_connected_handler(void *arg); static void zhttp_write_handler(void *arg); static void zhttp_read_handler(void *arg); static void zhttp_connecting_timer(void *arg); #if defined(Z_HAVE_GNUTLS) || defined(Z_HAVE_OPENSSL) static void zhttp_tls_handshake(void *arg); #endif struct zhttp *zhttp_init(void){ struct zhttp *http = g_new0(struct zhttp, 1); http->request = zbinbuf_init(); http->response = zbinbuf_init(); http->state = ZHTTPST_NEW; http->dataofs = -1; http->cookies = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); http->headers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); /* TODO: who should free it? */ http->sock = -1; //dbg("zhttp_init(%p)\n", http); return http; } void zhttp_free(struct zhttp *http){ //dbg("zhttp_free(%p)\n", http); if (!http) return; if (http->sock >= 0){ zselect_set(http->zsel, http->sock, NULL, NULL, NULL, NULL); #ifdef Z_HAVE_GNUTLS if (http->istls){ gnutls_deinit(http->session); } #endif #ifdef Z_HAVE_OPENSSL if (http->istls /*&& http->ctx != NULL*/) { SSL_shutdown(http->ssl); SSL_free(http->ssl); SSL_CTX_free(http->ctx); } #endif closesocket(http->sock); http->sock = -1; } zbinbuf_free(http->request); zbinbuf_free(http->response); zasyncdns_free(http->adns); g_free(http->errorstr); g_free(http->server); g_free(http->serveraddr); g_free(http->page); g_free(http->url); g_hash_table_destroy(http->cookies); g_hash_table_destroy(http->headers); zhttp_post_free(http); g_free(http->datastr); if (http->connecting_timer_id > 0) zselect_timer_kill(http->zsel, http->connecting_timer_id); if (http->watchdog_timer_id > 0) zselect_timer_kill(http->zsel, http->watchdog_timer_id); g_free(http); } void zhttp_post_free(struct zhttp *http){ unsigned int i; if (!http->posts) return; for (i = 0; i < http->posts->len; i++){ struct zhttp_post_var *var = (struct zhttp_post_var*)g_ptr_array_index(http->posts, i); g_free(var->name); g_free(var->filename); g_free(var->value); g_free(var); } g_ptr_array_free(http->posts, TRUE); http->posts = NULL; } void zhttp_disconnect(struct zhttp *http, char *errorstr){ if (http->sock >= 0){ zselect_set(http->zsel, http->sock, NULL, NULL, NULL, NULL); #ifdef Z_HAVE_GNUTLS if (http->istls){ gnutls_deinit(http->session); } #endif #ifdef Z_HAVE_OPENSSL if (http->istls/* && http->ctx != NULL*/) { SSL_shutdown(http->ssl); SSL_free(http->ssl); SSL_CTX_free(http->ctx); } #endif closesocket(http->sock); http->sock = -1; } g_free(http->errorstr); http->errorstr = errorstr; if (http->errorstr) http->state = ZHTTPST_ERROR; http_get_data(http); if (http->callback) http->callback(http); } static void zhttp_prepare1(struct zhttp *http, struct zselect *zsel, const char *url, void *arg){ char *u, *c, *host = NULL; http->zsel = zsel; http->arg = arg; http->dataofs = -1; http->sent = 0; http->url = g_strdup(url); u = g_strdup(url); c = z_strcasestr(u, "https:"); if (c != NULL){ #if defined(Z_HAVE_GNUTLS) || defined(Z_HAVE_OPENSSL) zhttp_init_tls(); http->istls = 1; c = z_strcasestr(u, "https://"); if (c){ host = c + strlen("https://"); }else{ host = u; } http->port = 443; #else zhttp_disconnect(http, g_strdup("TLS not supported")); #endif }else{ c = z_strcasestr(u, "http:"); if (c != NULL){ host = c + strlen("http://"); }else{ host = u; c = z_strcasestr(u, "://"); if (c != NULL) zhttp_disconnect(http, g_strdup("Unsupported URL schema")); } http->port = 80; } if (http->state == ZHTTPST_ERROR) { g_free(u); return; } c = strchr(host, '/'); if (c){ http->page = g_strdup(c); *c = '\0'; }else{ http->page = g_strdup("/"); } c = strchr(host, ':'); if (c){ http->port = atoi(c + 1); *c = '\0'; } http->server = g_strdup(host); zbinbuf_truncate(http->request, 0); zbinbuf_truncate(http->response, 0); g_free(u); #ifdef Z_HAVE_GNUTLS if (http->istls){ int ret = gnutls_init(&http->session, GNUTLS_CLIENT); if (ret != 0) { zhttp_disconnect(http, g_strdup("Can't init TLS session")); return; } ret = gnutls_server_name_set(http->session, GNUTLS_NAME_DNS, http->server, strlen(http->server)); if (ret != 0){ zhttp_disconnect(http, g_strdup("Can't set TLS server name")); return; } ret = gnutls_set_default_priority(http->session); if (ret != 0){ zhttp_disconnect(http, g_strdup("Can't set TLS default cipher priority")); return; } ret = gnutls_credentials_set(http->session, GNUTLS_CRD_CERTIFICATE, xcred); if (ret != 0){ zhttp_disconnect(http, g_strdup("Can't set TLS credentials")); return; } gnutls_session_set_verify_cert(http->session, http->server, (gnutls_certificate_verify_flags)0); } #endif #ifdef Z_HAVE_OPENSSL if (http->istls) { const SSL_METHOD* method = TLS_client_method(); http->ctx = SSL_CTX_new(method); SSL_CTX_set_verify(http->ctx, SSL_VERIFY_NONE, NULL); // Tucnak needs data also when there is a certificate problem //SSL_CTX_set_verify_depth(ctx, 4); SSL_CTX_set_options(http->ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); // TLS 1.0 and 1.1 are also obsolete //SSL_CTX_set_options(http->ctx, SSL_OP_NO_COMPRESSION); /*int ret = SSL_CTX_load_verify_locations(ctx, http->server, NULL); if (ret != 1) { char errbuf[256]; ERR_error_string_n(SSL_get_error(http->ssl, ret), errbuf, sizeof(errbuf)); zhttp_disconnect(http, g_strdup_printf("Can't verify SSL locations: %s", errbuf)); return; }*/ } #endif } static void http_fill_cookies(gpointer key, gpointer value, gpointer user_data){ GString *gs = (GString *)user_data; if (gs->len > 0) g_string_append(gs, "; "); g_string_append_printf(gs, "%s=%s", (char*)key, (char*)value); } static void http_fill_user_headers(gpointer key, gpointer value, gpointer user_data){ zbinbuf_sprintfa((struct zbinbuf *)user_data, "%s: %s\r\n", key, value); //GString *gs = g_string_new(""); //struct zbinbuf *zb = (struct zbinbuf *)user_data; //g_string_append_printf(gs, "%s: %s\n", (char*)key, (char*)value); //zbinbuf_append(zb, gs->str); //g_string_free(gs, TRUE); } static void zhttp_headers(struct zhttp *http){ zbinbuf_sprintfa(http->request, "Host: %s\r\n", http->server); zbinbuf_append(http->request, "User-Agent: Libzia " Z_VERSION "\r\n"); #ifdef Z_HAVE_ZLIB zbinbuf_append(http->request, "Accept-Encoding: gzip, deflate\r\n"); #else zbinbuf_append(http->request, "Accept-Encoding:\r\n"); #endif zbinbuf_append(http->request, "Connection: close\r\n"); if (g_hash_table_size(http->headers) > 0){ g_hash_table_foreach(http->headers, http_fill_user_headers, http->request); } if (g_hash_table_size(http->cookies) > 0){ GString *cookies = g_string_new(""); g_hash_table_foreach(http->cookies, http_fill_cookies, cookies); zbinbuf_sprintfa(http->request, "Cookie: %s\r\n", cookies->str); g_string_free(cookies, TRUE); } } static void zhttp_do(struct zhttp *http, struct zselect *zsel, void (*callback)(struct zhttp *)){ http->origreqlen = http->request->len; http->adns = zasyncdns_init(); http->callback = callback; zasyncdns_getaddrinfo( http->adns, zsel, zhttp_adns_callback, http->server, AF_INET, http); http->state = ZHTTPST_DNS; } void zhttp_get(struct zhttp *http, struct zselect *zsel, const char *url, void (*callback)(struct zhttp *), void *arg){ zhttp_prepare1(http, zsel, url, arg); if (http->state == ZHTTPST_ERROR){ callback(http); return; } zbinbuf_sprintfa(http->request, "GET %s HTTP/1.0\r\n", http->page); zhttp_headers(http); zbinbuf_append(http->request, "\r\n"); zhttp_do(http, zsel, callback); } void zhttp_add_header(struct zhttp *http, const char *name, const char *value) { g_hash_table_insert(http->headers, g_strdup(name), g_strdup(value)); } void zhttp_raw(struct zhttp *http, struct zselect *zsel, const char *url, const char *raw_request, void (*callback)(struct zhttp *), void *arg){ zhttp_prepare1(http, zsel, url, arg); zbinbuf_append(http->request, raw_request); zhttp_do(http, zsel, callback); } void zhttp_post(struct zhttp *http, struct zselect *zsel, const char *url, void (*callback)(struct zhttp *), void *arg){ struct zbinbuf *zbb; char *boundary = g_strdup_printf("---------------------------%d%d%d%d", rand(), rand(), rand(), rand()); zhttp_prepare1(http, zsel, url, arg); zbinbuf_sprintfa(http->request, "POST %s HTTP/1.1\r\n", http->page); zhttp_headers(http); zbinbuf_sprintfa(http->request, "Content-Type: multipart/form-data; boundary=%s\r\n", boundary); zbb = zbinbuf_init(); if (http->posts){ unsigned int i; for (i = 0; i < http->posts->len; i++){ struct zhttp_post_var *var = (struct zhttp_post_var*)g_ptr_array_index(http->posts, i); zbinbuf_sprintfa(zbb, "--%s\r\n", boundary); if (var->filename != NULL) { char *contenttype = "application/octet-stream"; const char *ext = z_extension(var->filename); if (strcasecmp(ext, ".png") == 0) contenttype = "image/png"; if (strcasecmp(ext, ".csv") == 0) contenttype = "text/plain"; zbinbuf_sprintfa(zbb, "Content-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\n", var->name, var->filename); zbinbuf_sprintfa(zbb, "Content-Type: %s\r\n", contenttype); zbinbuf_sprintfa(zbb, "\r\n"); if (var->localfilename != NULL) zbinbuf_append_file(zbb, var->localfilename); else zbinbuf_append(zbb, var->value); zbinbuf_sprintfa(zbb, "\r\n"); }else{ zbinbuf_sprintfa(zbb, "Content-Disposition: form-data; name=\"%s\"\r\n", var->name); zbinbuf_sprintfa(zbb, "\r\n"); zbinbuf_sprintfa(zbb, "%s\r\n", var->value); } } zbinbuf_sprintfa(zbb, "--%s--\r\n", boundary); } zbinbuf_sprintfa(http->request, "Content-Length: %d\r\n", zbb->len); zbinbuf_append(http->request, "\r\n"); zbinbuf_append_bin(http->request, zbb->buf, zbb->len); /* { static int fileN = 1; #warning TODO char fn[256]; sprintf(fn, "post%d.bin", fileN++); zbinbuf_write_to_file(http->request, fn); }*/ zhttp_do(http, zsel, callback); zbinbuf_free(zbb); g_free(boundary); } void zhttp_post_add(struct zhttp *http, const char *name, const char *value){ struct zhttp_post_var *var = g_new0(struct zhttp_post_var, 1); var->name = g_strdup(name); var->value = g_strdup(value); if (!http->posts) http->posts = g_ptr_array_new(); g_ptr_array_add(http->posts, var); } void zhttp_post_add_file_mem(struct zhttp *http, const char *name, const char *filename, const char *value){ struct zhttp_post_var *var = g_new0(struct zhttp_post_var, 1); var->name = g_strdup(name); var->filename = g_strdup(filename); var->value = g_strdup(value); if (!http->posts) http->posts = g_ptr_array_new(); g_ptr_array_add(http->posts, var); } void zhttp_post_add_file_disk(struct zhttp *http, const char *name, const char *filename, const char *localfilename){ struct zhttp_post_var *var = g_new0(struct zhttp_post_var, 1); var->name = g_strdup(name); var->filename = g_strdup(filename); var->localfilename = g_strdup(localfilename); if (!http->posts) http->posts = g_ptr_array_new(); g_ptr_array_add(http->posts, var); } static void zhttp_adns_callback(struct zasyncdns *adns, int n, int *family, int *socktype, int *protocol, int *addrlen, union zsockaddr *addr, char *errorstr){ struct zhttp *http = (struct zhttp *)adns->arg; int i, ret; char errbuf[256]; GString *gs2; int port = http->port; if (errorstr != NULL){ http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Can't resolve %s: %s", http->server, errorstr); http->callback(http); return; } if (n == 0){ http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Can't resolve %s: No data returned", http->server); http->callback(http); return; } for (i = 0; i < n; i++){ // dbg("socket(%d, %d, %d)\n", family[i], socktype[i], protocol[i]); //http->sock = socket(family[i], socktype[i], protocol[i]); http->sock = socket(family[i], SOCK_STREAM, 0); if (http->sock < 0) continue; if (z_sock_nonblock(http->sock, 1)){ closesocket(http->sock); http->sock = -1; continue; } switch (family[i]){ case AF_INET: ((struct sockaddr_in *)(addr + i))->sin_port = htons(port); break; #ifdef AF_INET6 case AF_INET6: ((struct sockaddr_in6 *)(addr + i))->sin6_port = htons(port); break; #endif default: closesocket(http->sock); http->sock = -1; continue; // unsupported protocol family } gs2 = g_string_new(""); z_sock_ntoa(gs2, family[i], addr + i); g_free(http->serveraddr); http->serveraddr = g_strdup(gs2->str); g_string_free(gs2, TRUE); //addr[i].in.sin_addr.S_un.S_un_b.s_b1 = 127; //nefunguje //addr[i].in.sin_addr.S_un.S_un_b.s_b2 = 0; //addr[i].in.sin_addr.S_un.S_un_b.s_b3 = 0; //addr[i].in.sin_addr.S_un.S_un_b.s_b4 = 1; //((struct sockaddr_in *)(addr + i))->sin_port = htons(8888); ret = connect(http->sock, (struct sockaddr *)(addr + i), addrlen[i]); if (ret < 0){ int err = z_sock_errno; if (z_sock_wouldblock(err)){ //dbg("connecting to %s\n", http->serveraddr); zselect_set(adns->zsel, http->sock, NULL, zhttp_connected_handler, NULL, http); http->state = ZHTTPST_CONNECTING; http->connecting_timer_id = zselect_timer_new(http->zsel, 30000, zhttp_connecting_timer, http); }else{ http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Can't connect to %s, %s", http->serveraddr, z_sock_strerror()); closesocket(http->sock); http->sock = -1; } } else{ zhttp_connected_handler(http); } break; } }; static void zhttp_connecting_timer(void *arg){ struct zhttp *http = (struct zhttp*)arg; http->connecting_timer_id = -1; zhttp_disconnect(http, g_strdup_printf("Timeout connecting to %s:%d", http->server, http->port)); } static void zhttp_watchdog_timer(void* arg) { struct zhttp* http = (struct zhttp*)arg; if (http->watchdog_flag == 0) { http->watchdog_timer_id = -1; zhttp_disconnect(http, g_strdup_printf("Timeout during transfer %s:%d", http->server, http->port)); return; } http->watchdog_flag = 0; http->watchdog_timer_id = zselect_timer_new(http->zsel, 30000, zhttp_watchdog_timer, http); } static void zhttp_connected_handler(void *arg){ struct zhttp *http = (struct zhttp *)arg; char errbuf[256]; if (http->connecting_timer_id > 0) { zselect_timer_kill(http->zsel, http->connecting_timer_id); http->connecting_timer_id = -1; } http->watchdog_flag = 0; http->watchdog_timer_id = zselect_timer_new(http->zsel, 30000, zhttp_watchdog_timer, http); int err = z_sock_error(http->sock); if (err){ zhttp_disconnect(http, g_strdup_printf("Can't connect to %s:%d, %s", http->server, http->port, z_sock_strerror())); return; } #ifdef Z_HAVE_GNUTLS if (http->istls){ gnutls_transport_set_int(http->session, http->sock); gnutls_handshake_set_timeout(http->session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT); zselect_set(http->zsel, http->sock, zhttp_tls_handshake, zhttp_tls_handshake, NULL, http); http->state = ZHTTPST_TLS_HANDSHAKE; } else #endif #ifdef Z_HAVE_OPENSSL if (http->istls) { http->ssl = SSL_new(http->ctx); if (http->ssl == NULL) { zhttp_disconnect(http, g_strdup("SSL_new failed")); return; } int ret = SSL_set_fd(http->ssl, http->sock); if (ret != 1) { zhttp_disconnect(http, g_strdup("SSL_set_fd failed")); return; } long lret = SSL_set_tlsext_host_name(http->ssl, http->server); // needed for SNI enabled servers if (lret != SSL_TLSEXT_ERR_OK && lret != SSL_TLSEXT_ERR_ALERT_WARNING) { zhttp_disconnect(http, g_strdup_printf("SSL_set_tlsext_host_name failed, error %ld", lret)); return; } SSL_set_connect_state(http->ssl); zselect_set(http->zsel, http->sock, zhttp_tls_handshake, zhttp_tls_handshake, NULL, http); http->state = ZHTTPST_TLS_HANDSHAKE; } else #endif { zselect_set(http->zsel, http->sock, NULL, zhttp_write_handler, NULL, http); http->state = ZHTTPST_REQUEST; } } #ifdef Z_HAVE_GNUTLS static void zhttp_tls_handshake(void *arg){ struct zhttp *http = (struct zhttp*)arg; int ret = gnutls_handshake(http->session); if (ret < 0 && gnutls_error_is_fatal(ret) == 0){ // like EWOULDBLOCK return; } else if (ret < 0) { if (ret == GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR) { /* check certificate verification status */ int type = gnutls_certificate_type_get(http->session); unsigned status = gnutls_session_get_verify_cert_status(http->session); gnutls_datum_t out; int ret2 = gnutls_certificate_verification_status_print(status, type, &out, 0); if (ret2 == 0){ zhttp_disconnect(http, g_strdup_printf("Cert verify failed: %s", out.data)); }else{ zhttp_disconnect(http, g_strdup_printf("Cert verify failed")); } gnutls_free(out.data); return; } zhttp_disconnect(http, g_strdup_printf("Handshake failed: %s", gnutls_strerror(ret))); return; } //char *desc = gnutls_session_get_desc(http->session); //dbg("Session info: %s\n", desc); //gnutls_free(desc); zselect_set(http->zsel, http->sock, NULL, zhttp_write_handler, NULL, http); http->state = ZHTTPST_REQUEST; } #endif #ifdef Z_HAVE_OPENSSL static void zhttp_tls_handshake(void* arg) { struct zhttp* http = (struct zhttp*)arg; int ret = SSL_do_handshake(http->ssl); if (ret <= 0) { int error = SSL_get_error(http->ssl, ret); //dbg("SSL_do_handshake ret=%d error=%d %s\n", ret, error, http->url); switch (error) { case SSL_ERROR_WANT_READ: return; case SSL_ERROR_WANT_WRITE: return; break; default: break; } }else{ //dbg("SSL_do_handshake ret=%d %s\n", ret, http->url); } if (ret != 1) { char errbuf[256]; ERR_error_string_n(SSL_get_error(http->ssl, ret), errbuf, sizeof(errbuf)); zhttp_disconnect(http, g_strdup_printf("SSL_do_handshake failed: ret=%d, %s", ret, errbuf)); return; } //STACK_OF(X509) *cert = SSL_get_peer_cert_chain(http->ssl); // refcnt not incremented //ret = SSL_get_verify_result(http->ssl); zselect_set(http->zsel, http->sock, NULL, zhttp_write_handler, NULL, http); http->state = ZHTTPST_REQUEST; } #endif static void zhttp_write_handler(void *arg){ struct zhttp *http = (struct zhttp *)arg; int ret, tosend; char errbuf[256]; tosend = http->request->len; #ifdef SLOWDOWN tosend = Z_MIN(tosend, SLOWDOWN); usleep(100000); #endif #ifdef Z_HAVE_GNUTLS if (http->istls){ ret = gnutls_record_send(http->session, http->request->buf, tosend); if (ret < 0){ if (gnutls_error_is_fatal(ret) == 0) return; zhttp_disconnect(http, g_strdup_printf("Error writing gnutls: %s", gnutls_strerror(ret))); return; } }else #endif #ifdef Z_HAVE_OPENSSL if (http->istls) { ret = SSL_write(http->ssl, http->request->buf, tosend); //dbg("SSL_write(%d) = %d\n", tosend, ret); if (ret <= 0) { // yes, <= char errbuf[256]; ERR_error_string_n(SSL_get_error(http->ssl, ret), errbuf, sizeof(errbuf)); zhttp_disconnect(http, g_strdup_printf("SSL_write failed: %s", errbuf)); return; } } else #endif { ret = send(http->sock, http->request->buf, tosend, 0); int err = z_sock_errno; if (ret <= 0){ zhttp_disconnect(http, g_strdup_printf("Error writing http socket: %s", z_sock_strerror())); return; } } //dbg("send(%d) = %d\n", tosend, ret); http->watchdog_flag = 1; http->sent += ret; //dbg("buf=%d -> ", http->request->len); zbinbuf_erase(http->request, 0, ret); //dbg("%d\n", http->request->len); if (http->request->len == 0){ zselect_set(http->zsel, http->sock, zhttp_read_handler, NULL, NULL, http); http->state = ZHTTPST_HEADER; } #ifdef Z_HAVE_GNUTLS if (http->istls){ size_t pending = gnutls_record_check_pending(http->session); if (pending > 0){ zhttp_read_handler(arg); } } #endif #ifdef Z_HAVE_OPENSSL if (http->istls) { int pending = SSL_pending(http->ssl); if (pending > 0) { zhttp_read_handler(arg); } } #endif } #define ZHTTP_BUFSIZE 4096 static void zhttp_read_handler(void *arg){ struct zhttp *http = (struct zhttp *)arg; int ret; char buf[ZHTTP_BUFSIZE]; char errbuf[256]; char *c; int i, ncnt, torecv; torecv = ZHTTP_BUFSIZE; #ifdef SLOWDOWN torecv = Z_MIN(ZHTTP_BUFSIZE, SLOWDOWN); usleep(100000); #endif #ifdef Z_HAVE_GNUTLS if (http->istls){ ret = gnutls_record_recv(http->session, buf, torecv); if (ret < 0){ if (gnutls_error_is_fatal(ret) == 0) return; if (ret == GNUTLS_E_PREMATURE_TERMINATION){ // fix for https://tilecache.rainviewer.asia ret = 0; }else{ zhttp_disconnect(http, g_strdup_printf("Error reading gnutls: %s", gnutls_strerror(ret))); // return ??? } } }else #endif #ifdef Z_HAVE_OPENSSL if (http->istls) { ret = SSL_read(http->ssl, buf, torecv); if (ret <= 0) { int error = SSL_get_error(http->ssl, ret); //dbg("SSL_read ret=%d error=%d %s\n", ret, error, http->url); switch (error) { case SSL_ERROR_WANT_READ: return; case SSL_ERROR_WANT_WRITE: return; default: break; } if (error != SSL_ERROR_ZERO_RETURN) { char errbuf[256]; ERR_error_string_n(SSL_get_error(http->ssl, ret), errbuf, sizeof(errbuf)); zhttp_disconnect(http, g_strdup_printf("SSL_read failed: %s", errbuf)); return; } }else{ //dbg("SSL_read(%d) = %d\n", torecv, ret); } } else #endif { ret = recv(http->sock, buf, torecv, 0); int err = z_sock_errno; if (ret < 0){ zhttp_disconnect(http, g_strdup_printf("Error reading http socket: %s", z_sock_strerror())); return; } } if (ret == 0){ int ofs = 0; // parse status code http->status = 0; for (i = 0; i < http->response->len; i++){ if (http->response->buf[i] == '\n'){ zhttp_disconnect(http, g_strdup("Can't parse status line")); return; } if (http->response->buf[i] == ' '){ char s[100]; ofs = i + 1; zbinbuf_getline(http->response, &ofs, s, sizeof(s)); http->status = atoi(s); if (http->status != 200){ zhttp_disconnect(http, g_strdup_printf("HTTP error %s", s)); return; } break; } } if (!http->status){ zhttp_disconnect(http, g_strdup("Can't parse status code")); return; } http->state = ZHTTPST_DONE; #ifdef Z_HAVE_ZLIB char *content_encoding = http_get_header(http, "Content-Encoding"); if (content_encoding != NULL && strcmp(content_encoding, "gzip") == 0) { g_free(content_encoding); if (zhttp_decode_gzip(http) < 0) { return; // disconnect allready called } } #endif zhttp_disconnect(http, NULL); return; } http->watchdog_flag = 1; zbinbuf_append_bin(http->response, buf, ret); if (http->dataofs < 0){ c = http->response->buf; ncnt = 0; for (i = 0; i < http->response->len; i++, c++){ if (*c == '\r') continue; if (*c != '\n') { ncnt = 0; continue; } ncnt++; if (ncnt == 2){ http->dataofs = i + 1; http->state = ZHTTPST_DATA; // save cookies zhttp_store_cookies(http, http->response->buf, i); break; } } } } #ifdef Z_HAVE_ZLIB int zhttp_decode_gzip(struct zhttp* http) { z_stream stream; struct zbinbuf* decompressed = zbinbuf_init(); char buf[4096]; stream.zalloc = Z_NULL; stream.zfree = Z_NULL; stream.opaque = Z_NULL; // setup "b" as the input and "c" as the compressed output stream.avail_in = (uInt)http->response->len - http->dataofs; // size of input stream.next_in = (Bytef*)http->response->buf + http->dataofs; // input char array inflateInit2(&stream, 16 + MAX_WBITS); do { stream.avail_out = (uInt)sizeof(buf); // size of output stream.next_out = (Bytef*)buf; // output char array int ret = inflate(&stream, Z_NO_FLUSH); switch (ret) { case Z_NEED_DICT: ret = Z_DATA_ERROR; /* and fall through */ case Z_DATA_ERROR: case Z_STREAM_ERROR: case Z_MEM_ERROR: (void)inflateEnd(&stream); zbinbuf_free(decompressed); zhttp_disconnect(http, "gzip decompress error"); return -1; } zbinbuf_append_bin(decompressed, buf, sizeof(buf) - stream.avail_out); } while (stream.avail_out == 0); inflateEnd(&stream); zbinbuf_prepend(decompressed, http->response->buf, http->dataofs); zbinbuf_free(http->response); http->response = decompressed; return 0; } #endif void zhttp_status(struct zhttp *http, GString *gs){ switch (http->state){ case ZHTTPST_NEW: g_string_append(gs, "Waiting for command"); break; case ZHTTPST_DNS: g_string_append_printf(gs, "Resolving %s", http->server); break; case ZHTTPST_CONNECTING: g_string_append_printf(gs, "Connecting to %s", http->serveraddr); break; case ZHTTPST_REQUEST: g_string_append_printf(gs, "Sending request %d KB / %d KB", http->sent / 1024, http->origreqlen / 1024); break; case ZHTTPST_HEADER: g_string_append(gs, "Fetching headers"); break; case ZHTTPST_DATA: g_string_printf(gs, "Downloading %d KB", (http->response->len - http->dataofs) / 1024); break; case ZHTTPST_DONE: g_string_append(gs, "Done"); break; default: g_string_append_printf(gs, "Unknown state %d", (int)http->state); break; } if (http->url) { char *c = g_strdup(http->url); z_strip_from(c, '?'); g_string_append_printf(gs, "\n%s", c); g_free(c); } } int zhttp_write_data(struct zhttp *http, const char *filename){ int towrite, ret; char *wfn; FILE *f; towrite = http->response->len - http->dataofs; if (towrite <= 0 || http->dataofs <= 0){ http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Bad http response (len=%d ofs=%d)", http->response->len, http->dataofs); return -1; } wfn = g_strdup(filename); z_wokna(wfn); f = fopen(wfn, "wb"); if (!f){ http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Can't write %s", wfn); g_free(wfn); return -2; } ret = fwrite(http->response->buf + http->dataofs, 1, towrite, f); if (ret != towrite){ fclose(f); http->state = ZHTTPST_ERROR; g_free(http->errorstr); http->errorstr = g_strdup_printf("Can't write to %s", wfn); g_free(wfn); return -3; } fclose(f); g_free(wfn); return 0; } #define SCLEN 11 void zhttp_store_cookies(struct zhttp *http, const char *data, int len){ int i; const char *s, *pos; for (i = 0; i < len; i++){ s = data + i; pos = strchr(s, '\n'); if (pos == NULL) break; if (strncasecmp(s, "Set-Cookie:", SCLEN) == 0){ char *key, *val, *oldval; char *d = g_strndup(s + SCLEN, (pos - s) - SCLEN); key = z_trim(d); z_strip_from(d, ';'); val = strchr(key, '='); if (val != NULL){ *val = '\0'; val++; oldval = (char *)g_hash_table_lookup(http->cookies, key); if (oldval != NULL) g_hash_table_remove(http->cookies, key); g_hash_table_insert(http->cookies, g_strdup(key), g_strdup(val)); } g_free(d); } i += (pos - s); } } char *http_get_data(struct zhttp *http){ int size; zg_free0(http->datastr); if (http->dataofs <= 0) size = 1; else size = http->response->len - http->dataofs + 1 + 1; http->datastr = (char *)g_malloc(size); zbinbuf_getstr(http->response, http->dataofs, http->datastr, size); return http->datastr; } void zhttp_post_json(struct zhttp *http, struct zselect *zsel, const char *url, const char *json, void (*callback)(struct zhttp *), void *arg){ zhttp_prepare1(http, zsel, url, arg); zbinbuf_sprintfa(http->request, "POST %s HTTP/1.1\r\n", http->page); zhttp_headers(http); zbinbuf_sprintfa(http->request, "Content-Type: application/json\r\n"); zbinbuf_sprintfa(http->request, "Content-Length: %d\r\n", strlen(json)); zbinbuf_append(http->request, "\r\n"); zbinbuf_append_bin(http->request, json, strlen(json)); /*{ #warning TODO char fn[256]; sprintf(fn, "post%d.bin", fileN++); zbinbuf_write_to_file(http->request, fn, 0, http->request->len); exit(-1); }*/ zhttp_do(http, zsel, callback); } #ifdef Z_HAVE_GNUTLS static int zgnutls_initialized = 0; void zhttp_init_tls(void){ if (zgnutls_initialized) return; zgnutls_initialized = 1; if (sizeof(ssize_t) != sizeof(size_t)) zinternal("sizeof(ssize_t) != sizeof(size_t) %d != %d", sizeof(ssize_t), sizeof(size_t)); if (gnutls_check_version("3.5.8") == NULL) zinternal("GnuTLS 3.5.8 or later is required"); int ret = gnutls_global_init(); if (ret) zinternal("Can't init gnutls"); ret = gnutls_certificate_allocate_credentials(&xcred); if (ret) zinternal("Can't allocate certificate credentials"); ret = gnutls_certificate_set_x509_system_trust(xcred); if (ret < 0) zinternal("Can't set the system trusted CAs"); } #endif #ifdef Z_HAVE_OPENSSL static int zopenssl_initialized = 0; #ifndef OPENSSL_NO_TRACE size_t* openssl_trace_cb(const char* buffer, size_t count, int category, int cmd, void* data) { char* c = g_strndup(buffer, count); dbg("openssl: %s\n", c); g_free(c); } #endif void zhttp_init_tls(void) { if (zopenssl_initialized) return; zopenssl_initialized = 1; //OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ERR_clear_error(); #ifndef OPENSSL_NO_TRACE OSSL_trace_set_callback(OSSL_TRACE_CATEGORY_ALL, openssl_trace_cb, NULL); #endif } #endif char *http_get_header(struct zhttp *http, const char *header_name){ if (http->dataofs < 0) return NULL; if (http->response == NULL) return NULL; if (http->response->buf == NULL) return NULL; char *c; for (c = http->response->buf; *c != '\0'; c++){ char *colon = strchr(c, ':'); char *lf = strchr(c, '\n'); if (colon != NULL && lf != NULL){ int n = Z_MIN(colon - c, lf - c); if (strncasecmp(c, header_name, n) == 0){ char *ct = g_strndup(colon + 1, lf - (colon + 1)); char *ret = z_strdup_trim(ct); g_free(ct); return ret; } } if (lf == NULL) break; c = lf; } return NULL; } int http_is_content_type(struct zhttp *http, const char *content_type){ int ret = 0; char *ct = http_get_header(http, "content-type"); if (!ct) return ret; z_strip_from(ct, ';'); ret = (strcasecmp(ct, content_type) == 0); g_free(ct); return ret; } void zhttp_auth_basic(struct zhttp* http, const char* username, const char* password) { if (!username || !*username || !password) return; GString* gs = g_string_sized_new(100); g_string_append(gs, "Basic "); char* a = g_strdup_printf("%s:%s", username, password); zg_string_eprintfa("b", gs, "%b", a, strlen(a)); zhttp_add_header(http, "Authorization", gs->str); g_free(a); g_string_free(gs, TRUE); } libzia-4.67/src/zserial_proc_pty.c0000644000175000017500000000616114662101505014174 00000000000000/* zserial_proc_pty - portable serial port API Module for PTY process Copyright (C) 2012-2023 Ladislav Vaiz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include #ifdef Z_HAVE_PTY_H #include #include #include #include #include #include #include #include #ifdef Z_HAVE_UNISTD_H #include #endif static int zserial_proc_pty_open(struct zserial *zser){ int err; char *c; // dbg("zserial_open pid=%d master=%d\n", zser->pid, zser->master); if (zser->pid > 0) return 0; zser->pid = forkpty(&zser->master, NULL, NULL, NULL); //FIXME &sw->ws); if (zser->pid < 0) return -1; if (zser->pid == 0){ /* child */ int i; setenv("TERM", "dumb", 1); for (i = 3; i < FD_SETSIZE; i++) close(i); /*execlp("/bin/sh", "/bin/sh", "-c", cmd, NULL);*/ execlp(zser->cmd, zser->cmd, zser->arg, NULL); err = errno; c = z_strdup_strerror(err); fprintf(stderr, "*** failed exec '%s' errno=%d %s\n", zser->cmd, errno, c); g_free(c); exit(-1); } zser->opened = 1; //dbg("zserial_open: forkpty()=%d master=%d\n", zser->pid, zser->master); return 0; } static int zserial_proc_pty_read(struct zserial *zser, void *data, int len, int timeout_ms){ int ret; ret = read(zser->master, data, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't read from %s (PTY fd %d): ", zser->id, zser->master); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_proc_pty_write(struct zserial *zser, void *data, int len){ int ret; ret = write(zser->master, data, len); dbg("zserial_write PTY(%d) = %d\n", zser->master, len); if (ret < 0){ g_string_printf(zser->errorstr, "Can't write to %s: ", zser->id); z_strerror(zser->errorstr, errno); zserial_close(zser); } return ret; } static int zserial_proc_pty_close(struct zserial *zser){ int ret = 0; dbg("zserial_close() PTY pid=%d\n", zser->pid); if (zser->pid > 0){ //dbg("kill(%d, %d)\n", zser->pid, SIGTERM); kill(zser->pid, SIGTERM); zser->pid = 0; } // dbg("pid=%d\n", zser->pid); if (zser->master >= 0){ ret = close(zser->master); } return ret; } #endif struct zserial *zserial_init_proc_pty(const char *cmd, const char *arg){ #ifdef Z_HAVE_PTY_H char *c; struct zserial *zser = zserial_init(); zser->type = ZSERTYPE_PROC_PTY; zser->id = g_strdup(cmd); c = strchr(zser->id, ' '); if (c != NULL) *c = '\0'; zser->cmd = g_strdup(cmd); zser->arg = g_strdup(arg); dbg("zserial_init_process_pty ('%s','%s')\n", cmd, arg); zser->zs_open = zserial_proc_pty_open; zser->zs_read = zserial_proc_pty_read; zser->zs_write = zserial_proc_pty_write; zser->zs_close = zserial_proc_pty_close; return zser; #else return NULL; #endif } libzia-4.67/config.sub0000755000175000017500000007555514662101506011652 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2019 Free Software Foundation, Inc. timestamp='2019-06-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # 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 or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2019 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 ;; *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 # Split fields of configuration type # shellcheck disable=SC2162 IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 os=$maybe_os ;; android-linux) basic_machine=$field1-unknown os=linux-android ;; *) basic_machine=$field1-$field2 os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | 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* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 os= ;; *) basic_machine=$field1 os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc os=bsd ;; a29khif) basic_machine=a29k-amd os=udi ;; adobe68k) basic_machine=m68010-adobe os=scout ;; alliant) basic_machine=fx80-alliant os= ;; altos | altos3068) basic_machine=m68k-altos os= ;; am29k) basic_machine=a29k-none os=bsd ;; amdahl) basic_machine=580-amdahl os=sysv ;; amiga) basic_machine=m68k-unknown os= ;; 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 ;; 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) basic_machine=j90-cray os=unicos ;; crds | unos) basic_machine=m68k-crds os= ;; da30) basic_machine=m68k-da30 os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec os= ;; delta88) basic_machine=m88k-motorola os=sysv3 ;; dicos) basic_machine=i686-pc os=dicos ;; djgpp) basic_machine=i586-pc os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=ose ;; gmicro) basic_machine=tron-gmicro os=sysv ;; go32) basic_machine=i386-pc os=go32 ;; 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 | hp300hpux) basic_machine=m68k-hp os=hpux ;; hp300bsd) basic_machine=m68k-hp os=bsd ;; hppaosf) basic_machine=hppa1.1-hp os=osf ;; hppro) basic_machine=hppa1.1-hp os=proelf ;; i386mach) basic_machine=i386-mach os=mach ;; isi68 | isi) basic_machine=m68k-isi os=sysv ;; m68knommu) basic_machine=m68k-unknown os=linux ;; magnum | m3230) basic_machine=mips-mips os=sysv ;; merlin) basic_machine=ns32k-utek os=sysv ;; mingw64) basic_machine=x86_64-pc os=mingw64 ;; mingw32) basic_machine=i686-pc os=mingw32 ;; mingw32ce) basic_machine=arm-unknown os=mingw32ce ;; monitor) basic_machine=m68k-rom68k os=coff ;; morphos) basic_machine=powerpc-unknown os=morphos ;; moxiebox) basic_machine=moxie-unknown os=moxiebox ;; msdos) basic_machine=i386-pc os=msdos ;; msys) basic_machine=i686-pc os=msys ;; mvs) basic_machine=i370-ibm os=mvs ;; nacl) basic_machine=le32-unknown os=nacl ;; ncr3000) basic_machine=i486-ncr os=sysv4 ;; netbsd386) basic_machine=i386-pc 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 ;; necv70) basic_machine=v70-nec os=sysv ;; 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 ;; os400) basic_machine=powerpc-ibm os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=ose ;; os68k) basic_machine=m68k-none os=os68k ;; paragon) basic_machine=i860-intel os=osf ;; parisc) basic_machine=hppa-unknown os=linux ;; pw32) basic_machine=i586-unknown os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=rdos ;; rdos32) basic_machine=i386-pc os=rdos ;; rom68k) basic_machine=m68k-rom68k os=coff ;; sa29200) basic_machine=a29k-amd os=udi ;; sei) basic_machine=mips-sei os=seiux ;; sequent) basic_machine=i386-sequent os= ;; sps7) basic_machine=m68k-bull os=sysv2 ;; st2000) basic_machine=m68k-tandem os= ;; stratus) basic_machine=i860-stratus os=sysv4 ;; sun2) basic_machine=m68000-sun os= ;; sun2os3) basic_machine=m68000-sun os=sunos3 ;; sun2os4) basic_machine=m68000-sun os=sunos4 ;; sun3) basic_machine=m68k-sun os= ;; sun3os3) basic_machine=m68k-sun os=sunos3 ;; sun3os4) basic_machine=m68k-sun os=sunos4 ;; sun4) basic_machine=sparc-sun os= ;; sun4os3) basic_machine=sparc-sun os=sunos3 ;; sun4os4) basic_machine=sparc-sun os=sunos4 ;; sun4sol2) basic_machine=sparc-sun os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun os= ;; 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 ;; toad1) basic_machine=pdp10-xkl os=tops20 ;; 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 ;; vsta) basic_machine=i386-pc os=vsta ;; vxworks960) basic_machine=i960-wrs os=vxworks ;; vxworks68) basic_machine=m68k-wrs os=vxworks ;; vxworks29k) basic_machine=a29k-wrs os=vxworks ;; xbox) basic_machine=i686-pc os=mingw32 ;; ymp) basic_machine=ymp-cray os=unicos ;; *) basic_machine=$1 os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # 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) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi os=${os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray os=${os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $os in irix*) ;; *) os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony os=newsos ;; next | m*-next) cpu=m68k vendor=next case $os in openstep*) ;; nextstep*) ;; ns2*) os=nextstep2 ;; *) os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde os=${os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=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 ;; bluegene*) os=cnk ;; solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 ;; unixware*) os=sysv4.2uw ;; gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) os=ose ;; # Some version numbers need modification chorusos*) os=chorusos ;; isc) os=isc2.2 ;; sco6) os=sco5v6 ;; sco5) os=sco3.2v5 ;; sco4) os=sco3.2v4 ;; sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` ;; sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; scout) # Don't match below ;; sco*) os=sco3.2v2 ;; psos*) os=psos ;; # Now 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* | esix* | aix* | cnk* | sunos | sunos[34]*\ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | kopensolaris* | plan9* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | knetbsd* | mirbsd* | netbsd* \ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* \ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ | linux-newlib* | linux-musl* | linux-uclibc* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ | openstep* | oskit* | conix* | pw32* | nonstopux* \ | storm-chaos* | tops10* | tenex* | tops20* | its* \ | os2* | vos* | palmos* | uclinux* | nucleus* \ | morphos* | superux* | rtmk* | windiss* \ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix) # Remember, each alternative MUST END IN *, to match a version number. ;; qnx*) case $cpu in x86 | i*86) ;; *) os=nto-$os ;; esac ;; hiux*) os=hiuxwe2 ;; nto-qnx*) ;; nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; sim | xray | os68k* | v88r* \ | windows* | osx | abug | netware* | os9* \ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; linux-dietlibc) os=linux-dietlibc ;; linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; lynx*) os=lynxos ;; mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) os=openedition ;; os400*) os=os400 ;; sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; wince*) os=wince ;; 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 ;; # 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 ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) os=mint ;; zvmoe) os=zvmoe ;; dicos*) os=dicos ;; pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $cpu in arm*) os=eabi ;; *) os=elf ;; esac ;; nacl*) ;; ios) ;; none) ;; *-eabi) ;; *) 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 $cpu-$vendor in score-*) os=elf ;; spu-*) os=elf ;; *-acorn) os=riscix1.2 ;; arm*-rebel) os=linux ;; arm*-semi) os=aout ;; c4x-* | tic4x-*) os=coff ;; c8051-*) os=elf ;; clipper-intergraph) os=clix ;; hexagon-*) os=elf ;; tic54x-*) os=coff ;; tic55x-*) os=coff ;; tic6x-*) os=coff ;; # This must come before the *-dec entry. pdp10-*) os=tops20 ;; pdp11-*) os=none ;; *-dec | vax-*) os=ultrix4.2 ;; m68*-apollo) os=domain ;; i386-sun) os=sunos4.0.2 ;; m68000-sun) os=sunos3 ;; m68*-cisco) os=aout ;; mep-*) os=elf ;; mips*-cisco) os=elf ;; mips*-*) os=elf ;; or32-*) os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 ;; sparc-* | *-sun) os=sunos4.1.1 ;; pru-*) os=elf ;; *-be) os=beos ;; *-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 ;; *-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 ;; *-wrs) os=vxworks ;; *) 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. case $vendor 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 ;; clix*) vendor=intergraph ;; 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 ;; esac echo "$cpu-$vendor-$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libzia-4.67/bin/0000755000175000017500000000000014752603140010477 500000000000000libzia-4.67/bin/Makefile.am0000644000175000017500000000025414662101505012452 00000000000000bin_SCRIPTS = zia-config bin_PROGRAMS = svnversion EXTRA_DIST = $(bin_SCRIPTS) zia-config.in datarootdir = @datarootdir@ svnversion$(EXEEXT): (cd ..; /bin/sh svnver.sh) libzia-4.67/bin/zia-config0000755000175000017500000000531014752602550012376 00000000000000#!/bin/sh prefix=/usr/local usage="Usage: zia-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi cflags="" libs="" if test "1" = "1"; then libs="$libs -lutil" fi if test "1" = "2"; then cflags="$cflags `pkg-config --cflags sdl2`" libs="$libs `pkg-config --libs sdl2`" fi if test "1" = "1"; then cflags="$cflags `sdl-config --cflags`" libs="$libs `sdl-config --libs`" fi if test "1" = "2"; then cflags="$cflags `pkg-config --cflags SDL2_ttf`" libs="$libs `pkg-config --libs SDL2_ttf`" fi if test "1" = "1"; then cflags="$cflags `pkg-config --cflags SDL_ttf`" libs="$libs `pkg-config --libs SDL_ttf`" fi if test "1" = "1"; then cflags="$cflags `pkg-config --cflags 'libpng > 1.2.0'`" libs="$libs `pkg-config --libs 'libpng > 1.2.0'`" fi if test "1" = "1"; then cflags="$cflags `pkg-config --cflags 'glib-2.0 > 2.0.0'`" cflags="$cflags `pkg-config --cflags 'gthread-2.0 > 2.0.0'`" libs="$libs `pkg-config --libs 'glib-2.0 > 2.0.0'`" libs="$libs `pkg-config --libs 'gthread-2.0 > 2.0.0'`" fi if test "1" = "1"; then cflags="$cflags `pkg-config --cflags 'gtk+-3.0 > 3.0.0'`" libs="$libs `pkg-config --libs 'gtk+-3.0 > 3.0.0'`" fi if test "0" = "1"; then cflags="$cflags `pkg-config --cflags 'libftdi1 > 1.00'`" libs="$libs `pkg-config --libs 'libftdi1 > 1.00'`" else if test "1" = "1"; then cflags="$cflags `pkg-config --cflags 'libftdi > 0.11'`" libs="$libs `pkg-config --libs 'libftdi > 0.11'`" fi fi if test "1" = "1"; then libs="$libs -lbfd" fi if test "1" = "1"; then libs="$libs -lgnutls" fi if test "@HAVE_LIBIBERTY@" = "1"; then libs="$libs -liberty" fi if test "0" = "1"; then libs="$libs -lexecinfo" fi # prevent to use default (/usr/lib) when non-default library should be used (/usr/local/lib) libs=`echo $libs | sed 's/-L\/usr\/lib\ //g'` while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | LC_ALL="C" 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 "4.67" ;; --cflags) echo "$cflags -I$prefix/include/libzia" ;; --cflags2) echo "$cflags" ;; --libs) echo "$libs -L$prefix/lib -lzia-4.67 -lutil" ;; --libs2) echo "$libs" ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done libzia-4.67/bin/Makefile.in0000644000175000017500000005570714752576426012522 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = svnversion$(EXEEXT) subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = zia-config CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) svnversion_SOURCES = svnversion.c svnversion_OBJECTS = svnversion.$(OBJEXT) svnversion_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/svnversion.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = svnversion.c DIST_SOURCES = svnversion.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/zia-config.in \ $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = zia-config EXTRA_DIST = $(bin_SCRIPTS) zia-config.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/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__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): zia-config: $(top_builddir)/config.status $(srcdir)/zia-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ 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)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svnversion.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(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 $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/svnversion.Po -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-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS 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 ./$(DEPDIR)/svnversion.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-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 \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS .PRECIOUS: Makefile svnversion$(EXEEXT): (cd ..; /bin/sh svnver.sh) # 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: libzia-4.67/bin/zia-config.in0000644000175000017500000000556414662101505013005 00000000000000#!/bin/sh prefix=@prefix@ usage="Usage: zia-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi cflags="" libs="" if test "@HAVE_FORKPTY@" = "1"; then libs="$libs -lutil" fi if test "@HAVE_SDL@" = "2"; then cflags="$cflags `pkg-config --cflags sdl2`" libs="$libs `pkg-config --libs sdl2`" fi if test "@HAVE_SDL@" = "1"; then cflags="$cflags `sdl-config --cflags`" libs="$libs `sdl-config --libs`" fi if test "@HAVE_SDL_TTF@" = "2"; then cflags="$cflags `pkg-config --cflags SDL2_ttf`" libs="$libs `pkg-config --libs SDL2_ttf`" fi if test "@HAVE_SDL_TTF@" = "1"; then cflags="$cflags `pkg-config --cflags SDL_ttf`" libs="$libs `pkg-config --libs SDL_ttf`" fi if test "@HAVE_LIBPNG@" = "1"; then cflags="$cflags `pkg-config --cflags 'libpng > 1.2.0'`" libs="$libs `pkg-config --libs 'libpng > 1.2.0'`" fi if test "@HAVE_GLIB@" = "1"; then cflags="$cflags `pkg-config --cflags 'glib-2.0 > 2.0.0'`" cflags="$cflags `pkg-config --cflags 'gthread-2.0 > 2.0.0'`" libs="$libs `pkg-config --libs 'glib-2.0 > 2.0.0'`" libs="$libs `pkg-config --libs 'gthread-2.0 > 2.0.0'`" fi if test "@HAVE_GTK@" = "1"; then cflags="$cflags `pkg-config --cflags 'gtk+-3.0 > 3.0.0'`" libs="$libs `pkg-config --libs 'gtk+-3.0 > 3.0.0'`" fi if test "@HAVE_LIBFTDI1@" = "1"; then cflags="$cflags `pkg-config --cflags 'libftdi1 > 1.00'`" libs="$libs `pkg-config --libs 'libftdi1 > 1.00'`" else if test "@HAVE_LIBFTDI@" = "1"; then cflags="$cflags `pkg-config --cflags 'libftdi > 0.11'`" libs="$libs `pkg-config --libs 'libftdi > 0.11'`" fi fi if test "@HAVE_LIBBFD@" = "1"; then libs="$libs -lbfd" fi if test "@HAVE_GNUTLS@" = "1"; then libs="$libs -lgnutls" fi if test "@HAVE_LIBIBERTY@" = "1"; then libs="$libs -liberty" fi if test "@HAVE_LIBEXECINFO@" = "1"; then libs="$libs -lexecinfo" fi # prevent to use default (/usr/lib) when non-default library should be used (/usr/local/lib) libs=`echo $libs | sed 's/-L\/usr\/lib\ //g'` while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | LC_ALL="C" 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 "@PACKAGE_VERSION@" ;; --cflags) echo "$cflags -I$prefix/include/libzia" ;; --cflags2) echo "$cflags" ;; --libs) echo "$libs -L$prefix/lib -lzia-@VERSION@ -lutil" ;; --libs2) echo "$libs" ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done libzia-4.67/bin/svnversion.c0000644000175000017500000000000014662101505012763 00000000000000libzia-4.67/Makefile.in0000644000175000017500000007642714752576425011753 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = libzia.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(sharedir)" DATA = $(docs_DATA) $(pkgconfig_DATA) $(share_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libzia.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \ README TODO compile config.guess config.sub depcomp install-sh \ ltmain.sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_FORKPTY = @HAVE_FORKPTY@ HAVE_GLIB = @HAVE_GLIB@ HAVE_GNUTLS = @HAVE_GNUTLS@ HAVE_GTK = @HAVE_GTK@ HAVE_LIBBFD = @HAVE_LIBBFD@ HAVE_LIBEXECINFO = @HAVE_LIBEXECINFO@ HAVE_LIBFTDI = @HAVE_LIBFTDI@ HAVE_LIBFTDI1 = @HAVE_LIBFTDI1@ HAVE_LIBICERTY = @HAVE_LIBICERTY@ HAVE_LIBPNG = @HAVE_LIBPNG@ HAVE_MAKE = @HAVE_MAKE@ HAVE_PKGCONFIG = @HAVE_PKGCONFIG@ HAVE_SDL = @HAVE_SDL@ HAVE_SDL_TTF = @HAVE_SDL_TTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFTDI_CFLAGS = @LIBFTDI_CFLAGS@ LIBFTDI_LIBS = @LIBFTDI_LIBS@ LIBOBJS = @LIBOBJS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ REQPRIVATE = @REQPRIVATE@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SDL_TTF_CFLAGS = @SDL_TTF_CFLAGS@ SDL_TTF_LIBS = @SDL_TTF_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = android-old bin data include m4 src MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in stamp-h.in EXTRA_DIST = COPYING INSTALL libzia.pc.in rebuild svnver.sh docsdir = $(datadir)/@PACKAGE_NAME@/doc docs_DATA = AUTHORS ChangeLog TODO pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzia.pc sharedir = $(datadir)/@PACKAGE_NAME@/$(DEB_HOST_MULTIARCH)/ share_DATA = settings ACLOCAL_AMFLAGS = -I m4 CLEANFILES = libzia.so.map all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 libzia.pc: $(top_builddir)/config.status $(srcdir)/libzia.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-docsDATA: $(docs_DATA) @$(NORMAL_INSTALL) @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \ done uninstall-docsDATA: @$(NORMAL_UNINSTALL) @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docsdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-shareDATA: $(share_DATA) @$(NORMAL_INSTALL) @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \ done uninstall-shareDATA: @$(NORMAL_UNINSTALL) @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sharedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docsDATA install-pkgconfigDATA \ install-shareDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docsDATA uninstall-pkgconfigDATA \ uninstall-shareDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-docsDATA 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-pkgconfigDATA install-ps \ install-ps-am install-shareDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-docsDATA uninstall-pkgconfigDATA \ uninstall-shareDATA .PRECIOUS: Makefile nagup: rsync -atuvxz --partial --progress @PACKAGE_NAME@-*.tar.gz ChangeLog ok1zia@nagano.cz::ok1zia/public_html/@PACKAGE_NAME@/ ver: @echo $(VERSION) deb: dpkg-buildpackage -b -rfakeroot -us -uc -tc mv ../libzia_$(VERSION)* . mv ../libzia-dev_$(VERSION)* . lines: (a=`cat src/*.[ch] | wc -l`;\ b=`cat src/regex*.[ch] | wc -l`;\ echo $$(($$a - $$b)) ) cppcheck: cppcheck -f -q --enable=warning . # 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: