xf86-video-mach64-6.9.5/0000755000175000017500000000000012521747527011527 500000000000000xf86-video-mach64-6.9.5/Makefile.am0000644000175000017500000000241612270010352013462 00000000000000# Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, 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 (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL xf86-video-mach64-6.9.5/configure0000755000175000017500000227712712521746616013376 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for xf86-video-mach64 6.9.5. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || 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" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xf86-video-mach64' PACKAGE_TARNAME='xf86-video-mach64' PACKAGE_VERSION='6.9.5' PACKAGE_STRING='xf86-video-mach64 6.9.5' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DRIVER_NAME moduledir XSERVER_LIBPCIACCESS_FALSE XSERVER_LIBPCIACCESS_TRUE PCIACCESS_LIBS PCIACCESS_CFLAGS USE_EXA_FALSE USE_EXA_TRUE XAA_FALSE XAA_TRUE ATIMISC_TV_OUT_FALSE ATIMISC_TV_OUT_TRUE ATIMISC_DGA_FALSE ATIMISC_DGA_TRUE ATIMISC_CPIO_FALSE ATIMISC_CPIO_TRUE DRI_LIBS DRI_CFLAGS DRI_FALSE DRI_TRUE HAVE_XEXTPROTO_71_FALSE HAVE_XEXTPROTO_71_TRUE XEXT_LIBS XEXT_CFLAGS XORG_LIBS XORG_CFLAGS OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP LIBTOOL MAN_SUBSTS XORG_MAN_PAGE ADMIN_MAN_DIR DRIVER_MAN_DIR MISC_MAN_DIR FILE_MAN_DIR LIB_MAN_DIR APP_MAN_DIR ADMIN_MAN_SUFFIX DRIVER_MAN_SUFFIX MISC_MAN_SUFFIX FILE_MAN_SUFFIX LIB_MAN_SUFFIX APP_MAN_SUFFIX SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build INSTALL_CMD PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CHANGELOG_CMD STRICT_CFLAGS CWARNFLAGS BASE_CFLAGS EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_selective_werror enable_strict_compilation enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_xorg_module_dir enable_dri enable_exa enable_xaa ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR XORG_CFLAGS XORG_LIBS XEXT_CFLAGS XEXT_LIBS DRI_CFLAGS DRI_LIBS PCIACCESS_CFLAGS PCIACCESS_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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures xf86-video-mach64 6.9.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/xf86-video-mach64] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of xf86-video-mach64 6.9.5:";; 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-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-selective-werror Turn off selective compiler errors. (default: enabled) --enable-strict-compilation Enable all warnings from compiler and make them errors (default: disabled) --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-dri Disable DRI support [[default=auto]] --disable-exa Disable EXA support [[default=enabled]] --enable-xaa Enable legacy X Acceleration Architecture (XAA) [default=auto] 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-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-xorg-module-dir=DIR Default xorg module directory [[default=$libdir/xorg/modules]] 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 CPP C preprocessor 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 XORG_CFLAGS C compiler flags for XORG, overriding pkg-config XORG_LIBS linker flags for XORG, overriding pkg-config XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config XEXT_LIBS linker flags for XEXT, overriding pkg-config DRI_CFLAGS C compiler flags for DRI, overriding pkg-config DRI_LIBS linker flags for DRI, overriding pkg-config PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config PCIACCESS_LIBS linker flags for PCIACCESS, 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 . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xf86-video-mach64 configure 6.9.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------------------------------------------- ## ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## ## ---------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xf86-video-mach64 $as_me 6.9.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Initialize Automake am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='xf86-video-mach64' VERSION='6.9.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __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 your preprocessor is broken; #endif #if BIG_OK #else 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 void 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; float fnumber; 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); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. 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[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 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 test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" if test "x$ac_cv_have_decl___clang__" = xyes; then : CLANGCC="yes" else CLANGCC="no" fi ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then : INTELCC="yes" else INTELCC="no" fi ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then : SUNCC="yes" else SUNCC="no" fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Check whether --enable-selective-werror was given. if test "${enable_selective_werror+set}" = set; then : enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval else SELECTIVE_WERROR=yes fi # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then BASE_CFLAGS="-v" else BASE_CFLAGS="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wall" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 $as_echo_n "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wall" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-arith" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 $as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-declarations" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 $as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat=2" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 $as_echo_n "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 $as_echo_n "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wstrict-prototypes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 $as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-prototypes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 $as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnested-externs" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 $as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wbad-function-cast" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 $as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wold-style-definition" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 $as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -fd" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5 $as_echo_n "checking if $CC supports -fd... " >&6; } cacheid=xorg_cv_cc_flag__fd if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -fd" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wdeclaration-after-statement" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 $as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" found="yes" fi fi # This chunk adds additional warnings that could catch undesired effects. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wunused" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 $as_echo_n "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wunused" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wuninitialized" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 $as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wshadow" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 $as_echo_n "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wshadow" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-noreturn" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 $as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-format-attribute" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 $as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wredundant-decls" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5 $as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; } cacheid=xorg_cv_cc_flag__Wredundant_decls if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wlogical-op" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5 $as_echo_n "checking if $CC supports -Wlogical-op... " >&6; } cacheid=xorg_cv_cc_flag__Wlogical_op if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op" found="yes" fi fi # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidently get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=implicit" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 $as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 $as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=nonnull" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 $as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=init-self" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 $as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=main" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 $as_echo_n "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=main" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=missing-braces" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 $as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=sequence-point" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 $as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=return-type" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 $as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 $as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=trigraphs" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 $as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=array-bounds" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 $as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=write-strings" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 $as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=address" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 $as_echo_n "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=address" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 $as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 $as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 $as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast" found="yes" fi fi # Also -errwarn=E_BAD_PTR_INT_COMBINATION else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 $as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wimplicit" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 $as_echo_n "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wimplicit" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnonnull" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 $as_echo_n "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Winit-self" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 $as_echo_n "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Winit-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmain" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 $as_echo_n "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmain" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-braces" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 $as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wsequence-point" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 $as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wreturn-type" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 $as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wtrigraphs" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 $as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Warray-bounds" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 $as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wwrite-strings" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 $as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Waddress" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 $as_echo_n "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Waddress" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wint-to-pointer-cast" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 $as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-to-int-cast" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 $as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast" found="yes" fi fi fi CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi # Check whether --enable-strict-compilation was given. if test "${enable_strict_compilation+set}" = set; then : enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval else STRICT_COMPILE=no fi STRICT_CFLAGS="" xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -pedantic" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 $as_echo_n "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -pedantic" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 $as_echo_n "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 $as_echo_n "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -errwarn" found="yes" fi fi # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unknown_warning_option=yes else xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : xorg_cv_cc_flag_unused_command_line_argument=yes else xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=attributes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 $as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" found="yes" fi fi if test "x$STRICT_COMPILE" = "xyes"; then BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` _ACEOF PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MINOR $PVM _ACEOF PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_PATCHLEVEL $PVP _ACEOF CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ echo 'git directory not found: installing possibly empty changelog.' >&2)" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $host_os in solaris*) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $host_os in solaris*) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $host_os in solaris*) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $host_os in solaris*) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi XORG_MAN_PAGE="X Version 11" MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # Initialize libtool # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; 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"; 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 $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; 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 which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *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 "$host_cpu" != ia64; 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $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' ;; 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 "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | 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 "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $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 "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; 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 "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; 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` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # 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 "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # 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=no hardcode_into_libs=yes ;; 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # 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 "$lt_cv_prog_gnu_ld" = yes; 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 ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # 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 "$with_gnu_ld" = yes; 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=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $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 -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $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 -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Define a configure option for an alternate module directory # Check whether --with-xorg-module-dir was given. if test "${with_xorg_module_dir+set}" = set; then : withval=$with_xorg_module_dir; moduledir="$withval" else moduledir="$libdir/xorg/modules" fi # Check whether --enable-dri was given. if test "${enable_dri+set}" = set; then : enableval=$enable_dri; DRI="$enableval" else DRI=auto fi # Check whether --enable-exa was given. if test "${enable_exa+set}" = set; then : enableval=$enable_exa; EXA="$enableval" else EXA=yes fi # Store the list of server defined optional extensions in REQUIRED_MODULES SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined RANDR #error RANDR not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RANDR is defined" >&5 $as_echo_n "checking if RANDR is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES randrproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined RENDER #error RENDER not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RENDER is defined" >&5 $as_echo_n "checking if RENDER is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES renderproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined XV #error XV not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XV is defined" >&5 $as_echo_n "checking if XV is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES videoproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined DPMSExtension #error DPMSExtension not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DPMSExtension is defined" >&5 $as_echo_n "checking if DPMSExtension is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES xextproto" fi # Obtain compiler/linker options for the driver dependencies pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG" >&5 $as_echo_n "checking for XORG... " >&6; } if test -n "$XORG_CFLAGS"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.4 xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XORG_LIBS"; then pkg_cv_XORG_LIBS="$XORG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.4 xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES" 2>&1` else XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "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. Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else XORG_CFLAGS=$pkg_cv_XORG_CFLAGS XORG_LIBS=$pkg_cv_XORG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } if test -n "$XEXT_CFLAGS"; then pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xextproto >= 7.0.99.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XEXT_LIBS"; then pkg_cv_XEXT_LIBS="$XEXT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xextproto >= 7.0.99.1" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1` else XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 HAVE_XEXTPROTO_71="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_XEXTPROTO_71="no" else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XEXTPROTO_71="yes"; $as_echo "#define HAVE_XEXTPROTO_71 1" >>confdefs.h fi if test "$HAVE_XEXTPROTO_71" = "yes" ; then HAVE_XEXTPROTO_71_TRUE= HAVE_XEXTPROTO_71_FALSE='#' else HAVE_XEXTPROTO_71_TRUE='#' HAVE_XEXTPROTO_71_FALSE= fi sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. if test "$DRI" != no; then as_ac_File=`$as_echo "ac_cv_file_${sdkdir}/dri.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${sdkdir}/dri.h" >&5 $as_echo_n "checking for ${sdkdir}/dri.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "${sdkdir}/dri.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : have_dri_h="yes" else have_dri_h="no" fi as_ac_File=`$as_echo "ac_cv_file_${sdkdir}/sarea.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${sdkdir}/sarea.h" >&5 $as_echo_n "checking for ${sdkdir}/sarea.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "${sdkdir}/sarea.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : have_sarea_h="yes" else have_sarea_h="no" fi as_ac_File=`$as_echo "ac_cv_file_${sdkdir}/dristruct.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${sdkdir}/dristruct.h" >&5 $as_echo_n "checking for ${sdkdir}/dristruct.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "${sdkdir}/dristruct.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : have_dristruct_h="yes" else have_dristruct_h="no" fi as_ac_File=`$as_echo "ac_cv_file_${sdkdir}/damage.h" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${sdkdir}/damage.h" >&5 $as_echo_n "checking for ${sdkdir}/damage.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "${sdkdir}/damage.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : have_damage_h="yes" else have_damage_h="no" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include DRI support" >&5 $as_echo_n "checking whether to include DRI support... " >&6; } if test x$DRI = xauto; then if test "$have_dri_h" = yes -a \ "$have_sarea_h" = yes -a \ "$have_dristruct_h" = yes; then DRI="yes" else DRI="no" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DRI" >&5 $as_echo "$DRI" >&6; } if test x$DRI = xyes; then DRI_TRUE= DRI_FALSE='#' else DRI_TRUE='#' DRI_FALSE= fi if test "$DRI" = yes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI" >&5 $as_echo_n "checking for DRI... " >&6; } if test -n "$DRI_CFLAGS"; then pkg_cv_DRI_CFLAGS="$DRI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.2 xf86driproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DRI_LIBS"; then pkg_cv_DRI_LIBS="$DRI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.2 xf86driproto" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm >= 2.2 xf86driproto" 2>&1` else DRI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= 2.2 xf86driproto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libdrm >= 2.2 xf86driproto) were not met: $DRI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DRI_CFLAGS and DRI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "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. Alternatively, you may set the environment variables DRI_CFLAGS and DRI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else DRI_CFLAGS=$pkg_cv_DRI_CFLAGS DRI_LIBS=$pkg_cv_DRI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define XF86DRI 1" >>confdefs.h $as_echo "#define XF86DRI_DEVEL 1" >>confdefs.h fi # Note that this is sort of inverted from drivers/ati/Imakefile in # the monolith. We test for foo, not for !foo (i.e. ATMISC_CPIO, not # ATIMISC_AVOID_CPIO), but the defines are negative. So beware. Oh yeah, # TV_OUT is the special case where it's a positive define, not AVOID_TV_OUT. # AVOID_CPIO: Only x86, amd64, and alpha are cool with CPIO. It needs a # little-endian, undirected PIO space of at least 64kB. # AVOID_DGA: ??? # ATI_TV_OUT: This only works on x86. ATIMISC_CPIO=no ATIMISC_DGA=yes ATIMISC_TV_OUT=no case $host_cpu in i*86) ATIMISC_TV_OUT=yes ATIMISC_CPIO=yes ;; x86_64|amd64|alpha|ia64) ATIMISC_CPIO=yes ;; sparc) ATIMISC_DGA=no ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include PIO support" >&5 $as_echo_n "checking whether to include PIO support... " >&6; } if test "x$ATIMISC_CPIO" = xyes; then ATIMISC_CPIO_TRUE= ATIMISC_CPIO_FALSE='#' else ATIMISC_CPIO_TRUE='#' ATIMISC_CPIO_FALSE= fi if test "x$ATIMISC_CPIO" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, PIO" >&5 $as_echo "yes, PIO" >&6; } else $as_echo "#define AVOID_CPIO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, MMIO" >&5 $as_echo "no, MMIO" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include DGA support" >&5 $as_echo_n "checking whether to include DGA support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ATIMISC_DGA" >&5 $as_echo "$ATIMISC_DGA" >&6; } if test "x$ATIMISC_DGA" = xyes; then ATIMISC_DGA_TRUE= ATIMISC_DGA_FALSE='#' else ATIMISC_DGA_TRUE='#' ATIMISC_DGA_FALSE= fi if ! test "x$ATIMISC_DGA" = xyes; then $as_echo "#define AVOID_DGA 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include TV Out support" >&5 $as_echo_n "checking whether to include TV Out support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ATIMISC_TV_OUT" >&5 $as_echo "$ATIMISC_TV_OUT" >&6; } if test "x$ATIMISC_TV_OUT" = xyes; then ATIMISC_TV_OUT_TRUE= ATIMISC_TV_OUT_FALSE='#' else ATIMISC_TV_OUT_TRUE='#' ATIMISC_TV_OUT_FALSE= fi if test "x$ATIMISC_TV_OUT" = xyes; then $as_echo "#define TV_OUT 1" >>confdefs.h fi # Properly handle EXA. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable EXA support" >&5 $as_echo_n "checking whether to enable EXA support... " >&6; } if test "x$EXA" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "exa.h" "ac_cv_header_exa_h" "$ac_includes_default" if test "x$ac_cv_header_exa_h" = xyes; then : have_exa_h="yes" else have_exa_h="no" fi CPPFLAGS="$SAVE_CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" if test "x$have_exa_h" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether EXA version is at least 2.0.0" >&5 $as_echo_n "checking whether EXA version is at least 2.0.0... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "exa.h" #if EXA_VERSION_MAJOR < 2 #error OLD EXA! #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : USE_EXA=yes else USE_EXA=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_EXA" >&5 $as_echo "$USE_EXA" >&6; } if test "x$USE_EXA" = xyes; then $as_echo "#define USE_EXA 1" >>confdefs.h fi fi # Check whether --enable-xaa was given. if test "${enable_xaa+set}" = set; then : enableval=$enable_xaa; XAA="$enableval" else XAA=auto fi if test "x$XAA" != xno; then save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS CFLAGS=$XORG_CFLAGS CPPFLAGS="$XORG_CFLAGS" for ac_header in xaa.h do : ac_fn_c_check_header_mongrel "$LINENO" "xaa.h" "ac_cv_header_xaa_h" "$ac_includes_default" if test "x$ac_cv_header_xaa_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XAA_H 1 _ACEOF XAA=yes else XAA=no fi done CFLAGS=$save_CFLAGS CPPFLAGS=$save_CPPFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include XAA support" >&5 $as_echo_n "checking whether to include XAA support... " >&6; } if test "x$XAA" = xyes; then XAA_TRUE= XAA_FALSE='#' else XAA_TRUE='#' XAA_FALSE= fi if test "x$XAA" = xyes; then $as_echo "#define USE_XAA test \"x\$XAA\" = xyes" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XAA" >&5 $as_echo "$XAA" >&6; } ac_fn_c_check_decl "$LINENO" "XSERVER_LIBPCIACCESS" "ac_cv_have_decl_XSERVER_LIBPCIACCESS" "#include \"xorg-server.h\" " if test "x$ac_cv_have_decl_XSERVER_LIBPCIACCESS" = xyes; then : XSERVER_LIBPCIACCESS=yes else XSERVER_LIBPCIACCESS=no fi CPPFLAGS="$SAVE_CPPFLAGS" if test "x$USE_EXA" = xyes; then USE_EXA_TRUE= USE_EXA_FALSE='#' else USE_EXA_TRUE='#' USE_EXA_FALSE= fi if test "x$XSERVER_LIBPCIACCESS" = xyes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 $as_echo_n "checking for PCIACCESS... " >&6; } if test -n "$PCIACCESS_CFLAGS"; then pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.12.901\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.12.901") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.12.901" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCIACCESS_LIBS"; then pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.12.901\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.12.901") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.12.901" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pciaccess >= 0.12.901" 2>&1` else PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pciaccess >= 0.12.901" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCIACCESS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (pciaccess >= 0.12.901) were not met: $PCIACCESS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "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. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" fi if test "x$XSERVER_LIBPCIACCESS" = xyes; then XSERVER_LIBPCIACCESS_TRUE= XSERVER_LIBPCIACCESS_FALSE='#' else XSERVER_LIBPCIACCESS_TRUE='#' XSERVER_LIBPCIACCESS_FALSE= fi DRIVER_NAME=mach64 { $as_echo "$as_me:${as_lineno-$LINENO}: Please change the Driver line in xorg.conf from \"ati\" to \"mach64\" or install the ati wrapper as well: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati " >&5 $as_echo "$as_me: Please change the Driver line in xorg.conf from \"ati\" to \"mach64\" or install the ati wrapper as well: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati " >&6;} ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XEXTPROTO_71_TRUE}" && test -z "${HAVE_XEXTPROTO_71_FALSE}"; then as_fn_error $? "conditional \"HAVE_XEXTPROTO_71\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then as_fn_error $? "conditional \"DRI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ATIMISC_CPIO_TRUE}" && test -z "${ATIMISC_CPIO_FALSE}"; then as_fn_error $? "conditional \"ATIMISC_CPIO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ATIMISC_DGA_TRUE}" && test -z "${ATIMISC_DGA_FALSE}"; then as_fn_error $? "conditional \"ATIMISC_DGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ATIMISC_TV_OUT_TRUE}" && test -z "${ATIMISC_TV_OUT_FALSE}"; then as_fn_error $? "conditional \"ATIMISC_TV_OUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XAA_TRUE}" && test -z "${XAA_FALSE}"; then as_fn_error $? "conditional \"XAA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_EXA_TRUE}" && test -z "${USE_EXA_FALSE}"; then as_fn_error $? "conditional \"USE_EXA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XSERVER_LIBPCIACCESS_TRUE}" && test -z "${XSERVER_LIBPCIACCESS_FALSE}"; then as_fn_error $? "conditional \"XSERVER_LIBPCIACCESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xf86-video-mach64 $as_me 6.9.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ xf86-video-mach64 config.status 6.9.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_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"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_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"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $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"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ 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\\"\\\`\\\\\\"" ;; *) 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 \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm 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 # 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 in which our libraries should be installed. lt_sysroot=$lt_sysroot # 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 # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # 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 case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi xf86-video-mach64-6.9.5/configure.ac0000644000175000017500000001777412521746554013754 00000000000000# Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, 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 (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Process this file with autoconf to produce a configure script # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-mach64], [6.9.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-mach64]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL AH_TOP([#include "xorg-server.h"]) # Define a configure option for an alternate module directory AC_ARG_WITH(xorg-module-dir, AS_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], [Disable DRI support [[default=auto]]]), [DRI="$enableval"], [DRI=auto]) AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa], [Disable EXA support [[default=enabled]]]), [EXA="$enableval"], [EXA=yes]) # Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES]) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. if test "$DRI" != no; then AC_CHECK_FILE([${sdkdir}/dri.h], [have_dri_h="yes"], [have_dri_h="no"]) AC_CHECK_FILE([${sdkdir}/sarea.h], [have_sarea_h="yes"], [have_sarea_h="no"]) AC_CHECK_FILE([${sdkdir}/dristruct.h], [have_dristruct_h="yes"], [have_dristruct_h="no"]) AC_CHECK_FILE([${sdkdir}/damage.h], [have_damage_h="yes"], [have_damage_h="no"]) fi AC_MSG_CHECKING([whether to include DRI support]) if test x$DRI = xauto; then if test "$have_dri_h" = yes -a \ "$have_sarea_h" = yes -a \ "$have_dristruct_h" = yes; then DRI="yes" else DRI="no" fi fi AC_MSG_RESULT([$DRI]) AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto]) AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) fi # Note that this is sort of inverted from drivers/ati/Imakefile in # the monolith. We test for foo, not for !foo (i.e. ATMISC_CPIO, not # ATIMISC_AVOID_CPIO), but the defines are negative. So beware. Oh yeah, # TV_OUT is the special case where it's a positive define, not AVOID_TV_OUT. # AVOID_CPIO: Only x86, amd64, and alpha are cool with CPIO. It needs a # little-endian, undirected PIO space of at least 64kB. # AVOID_DGA: ??? # ATI_TV_OUT: This only works on x86. ATIMISC_CPIO=no ATIMISC_DGA=yes ATIMISC_TV_OUT=no case $host_cpu in i*86) ATIMISC_TV_OUT=yes ATIMISC_CPIO=yes ;; x86_64|amd64|alpha|ia64) ATIMISC_CPIO=yes ;; sparc) ATIMISC_DGA=no ;; *) ;; esac AC_MSG_CHECKING([whether to include PIO support]) AM_CONDITIONAL(ATIMISC_CPIO, test "x$ATIMISC_CPIO" = xyes) if test "x$ATIMISC_CPIO" = xyes; then AC_MSG_RESULT([yes, PIO]) else AC_DEFINE(AVOID_CPIO, 1, [Avoid PIO and use MMIO for atimisc.]) AC_MSG_RESULT([no, MMIO]) fi AC_MSG_CHECKING([whether to include DGA support]) AC_MSG_RESULT([$ATIMISC_DGA]) AM_CONDITIONAL(ATIMISC_DGA, test "x$ATIMISC_DGA" = xyes) if ! test "x$ATIMISC_DGA" = xyes; then AC_DEFINE(AVOID_DGA, 1, [Do not build DGA support.]) fi AC_MSG_CHECKING([whether to include TV Out support]) AC_MSG_RESULT([$ATIMISC_TV_OUT]) AM_CONDITIONAL(ATIMISC_TV_OUT, test "x$ATIMISC_TV_OUT" = xyes) if test "x$ATIMISC_TV_OUT" = xyes; then AC_DEFINE(TV_OUT, 1, [Build TV-Out support for atimisc.]) fi # Properly handle EXA. AC_MSG_CHECKING([whether to enable EXA support]) if test "x$EXA" = xyes; then AC_MSG_RESULT(yes) SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_CHECK_HEADER(exa.h, [have_exa_h="yes"], [have_exa_h="no"]) CPPFLAGS="$SAVE_CPPFLAGS" else AC_MSG_RESULT(no) fi SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" if test "x$have_exa_h" = xyes; then AC_MSG_CHECKING([whether EXA version is at least 2.0.0]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ #include "exa.h" #if EXA_VERSION_MAJOR < 2 #error OLD EXA! #endif ]])], [USE_EXA=yes], [USE_EXA=no]) AC_MSG_RESULT($USE_EXA) if test "x$USE_EXA" = xyes; then AC_DEFINE(USE_EXA, 1, [Build support for Exa]) fi fi AC_ARG_ENABLE(xaa, AS_HELP_STRING([--enable-xaa], [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), [XAA="$enableval"], [XAA=auto]) if test "x$XAA" != xno; then save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS CFLAGS=$XORG_CFLAGS CPPFLAGS="$XORG_CFLAGS" AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) CFLAGS=$save_CFLAGS CPPFLAGS=$save_CPPFLAGS fi AC_MSG_CHECKING([whether to include XAA support]) AM_CONDITIONAL(XAA, test "x$XAA" = xyes) if test "x$XAA" = xyes; then AC_DEFINE(USE_XAA, test "x$XAA" = xyes, [Build support for XAA]) fi AC_MSG_RESULT([$XAA]) AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) CPPFLAGS="$SAVE_CPPFLAGS" AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes) if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901]) XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) AC_SUBST([moduledir]) DRIVER_NAME=mach64 AC_SUBST([DRIVER_NAME]) AC_MSG_NOTICE( [Please change the Driver line in xorg.conf from "ati" to "mach64"] [ or install the ati wrapper as well:] [ git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati] ) AC_CONFIG_FILES([ Makefile src/Makefile man/Makefile ]) AC_OUTPUT xf86-video-mach64-6.9.5/aclocal.m40000644000175000017500000151514212521746612013312 00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_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_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # 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], [[!?.]$], [], [.]) )]) # _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\\"\\\`\\\\\\"" ;; *) 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\\"\\\`\\\\\\"" ;; *) 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 $lt_write_fail = 0 && 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 "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [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 $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; 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 "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([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 "${lt_cv_aix_libpath+set}" = 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 which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --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 "$GCC" = yes; 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 in which 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 "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; 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 x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; 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 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" # 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 x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_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 x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; 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"; 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 $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $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 -fvisbility=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 "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$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 "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac 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` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # 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 "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # 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=no hardcode_into_libs=yes ;; 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # 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 "$lt_cv_prog_gnu_ld" = yes; 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 ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # 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 "$with_gnu_ld" = yes; 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=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # 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 "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [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], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl 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 "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) 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 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 "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # 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 "$GCC" = yes; 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 "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_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 "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # 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_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_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 "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; 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 which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *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 "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; 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 ;; 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 "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $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' ;; 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 "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | 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 "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_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 if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_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 "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi 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 "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $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 "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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 "$GXX" = yes; then if test "$with_gnu_ld" = no; 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) 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 "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; 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 ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=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 "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC 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 "$_lt_caught_CXX_error" != yes 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 ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; 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 $p = "-L" || test $p = "-R"; 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 "$pre_test_object_deps_done" = no; 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 "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext 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)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_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 "X$F77" = "Xno"; 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 "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC 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 "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes 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 "X$FC" = "Xno"; 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 "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC 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 "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_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 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 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 "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which 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 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _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_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=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 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])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 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])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # 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]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- 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 ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 $1]) _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 ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # 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 # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --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 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # 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 ])# PKG_CHECK_VAR dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. # XORG_MACROS_VERSION(required-version) # ------------------------------------- # Minimum version: 1.1.0 # # If you're using a macro added in Version 1.1 or newer, include this in # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # # To ensure that this macro is defined, also add: # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ m4_define([vers_have], [1.19.0]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) m4_if(m4_version_compare(vers_have, [$1]), -1, [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) m4_undefine([vers_have]) m4_undefine([maj_have]) m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() # ------------------ # Minimum version: 1.0.0 # # Find cpp program and necessary flags for use in pre-processing text files # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. AC_MSG_CHECKING([if $RAWCPP requires -undef]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef AC_MSG_RESULT([yes]) # under Cygwin unix is still defined even with -undef elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS="-undef -ansi" AC_MSG_RESULT([yes, with -ansi]) else AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then TRADITIONALCPPFLAGS="-traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" AC_MSG_RESULT([yes]) else AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_SUBST(RAWCPPFLAGS) AC_SUBST(TRADITIONALCPPFLAGS) ]) # XORG_PROG_RAWCPP # XORG_MANPAGE_SECTIONS() # ----------------------- # Minimum version: 1.0.0 # # Determine which sections man pages go in for the different man page types # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. # Not sure if there's any better way than just hardcoding by OS name. # Override default settings by setting environment variables # Added MAN_SUBSTS in version 1.8 # Added AC_PROG_SED in version 1.8 AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $host_os in solaris*) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $host_os in solaris*) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $host_os in solaris*) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $host_os in solaris*) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi AC_SUBST([APP_MAN_SUFFIX]) AC_SUBST([LIB_MAN_SUFFIX]) AC_SUBST([FILE_MAN_SUFFIX]) AC_SUBST([MISC_MAN_SUFFIX]) AC_SUBST([DRIVER_MAN_SUFFIX]) AC_SUBST([ADMIN_MAN_SUFFIX]) AC_SUBST([APP_MAN_DIR]) AC_SUBST([LIB_MAN_DIR]) AC_SUBST([FILE_MAN_DIR]) AC_SUBST([MISC_MAN_DIR]) AC_SUBST([DRIVER_MAN_DIR]) AC_SUBST([ADMIN_MAN_DIR]) XORG_MAN_PAGE="X Version 11" AC_SUBST([XORG_MAN_PAGE]) MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" AC_SUBST([MAN_SUBSTS]) ]) # XORG_MANPAGE_SECTIONS # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) # ------------------------ # Minimum version: 1.7.0 # # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent # provided by xorg-sgml-doctools, if installed. AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) XORG_SGML_PATH= PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], [m4_ifval([$1],[:], [if test x"$cross_compiling" != x"yes" ; then AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], [XORG_SGML_PATH=$prefix/share/sgml]) fi]) ]) # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing # the path and the name of the doc stylesheet if test "x$XORG_SGML_PATH" != "x" ; then AC_MSG_RESULT([$XORG_SGML_PATH]) STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl else AC_MSG_RESULT([no]) fi AC_SUBST(XORG_SGML_PATH) AC_SUBST(STYLESHEET_SRCDIR) AC_SUBST(XSL_STYLESHEET) AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) ]) # XORG_CHECK_SGML_DOCTOOLS # XORG_CHECK_LINUXDOC # ------------------- # Minimum version: 1.0.0 # # Defines the variable MAKE_TEXT if the necessary tools and # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) AC_REQUIRE([XORG_WITH_PS2PDF]) AC_PATH_PROG(LINUXDOC, linuxdoc) AC_MSG_CHECKING([whether to build documentation]) if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no fi AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) AC_MSG_RESULT([$BUILDDOC]) AC_MSG_CHECKING([whether to build pdf documentation]) if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes else BUILDPDFDOC=no fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" MAKE_PDF="$PS2PDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_LINUXDOC # XORG_CHECK_DOCBOOK # ------------------- # Minimum version: 1.0.0 # # Checks for the ability to build output formats from SGML DocBook source. # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) BUILDTXTDOC=no BUILDPDFDOC=no BUILDPSDOC=no BUILDHTMLDOC=no AC_PATH_PROG(DOCBOOKPS, docbook2ps) AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) AC_PATH_PROG(DOCBOOKHTML, docbook2html) AC_PATH_PROG(DOCBOOKTXT, docbook2txt) AC_MSG_CHECKING([whether to build text documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && test x$BUILD_TXTDOC != xno; then BUILDTXTDOC=yes fi AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) AC_MSG_RESULT([$BUILDTXTDOC]) AC_MSG_CHECKING([whether to build PDF documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) AC_MSG_CHECKING([whether to build PostScript documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && test x$BUILD_PSDOC != xno; then BUILDPSDOC=yes fi AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) AC_MSG_RESULT([$BUILDPSDOC]) AC_MSG_CHECKING([whether to build HTML documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && test x$BUILD_HTMLDOC != xno; then BUILDHTMLDOC=yes fi AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) AC_MSG_RESULT([$BUILDHTMLDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-xmlto option, it allows maximum flexibilty in making decisions # as whether or not to use the xmlto package. When DEFAULT is not specified, # --with-xmlto assumes 'auto'. # # Interface to module: # HAVE_XMLTO: used in makefiles to conditionally generate documentation # XMLTO: returns the path of the xmlto program found # returns the path set by the user in the environment # --with-xmlto: 'yes' user instructs the module to use xmlto # 'no' user instructs the module not to use xmlto # # Added in version 1.10.0 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation # xmlto for text output requires either lynx, links, or w3m browsers # # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XMLTO],[ AC_ARG_VAR([XMLTO], [Path to xmlto command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xmlto, AS_HELP_STRING([--with-xmlto], [Use xmlto to regenerate documentation (default: ]_defopt[)]), [use_xmlto=$withval], [use_xmlto=]_defopt) m4_undefine([_defopt]) if test "x$use_xmlto" = x"auto"; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) have_xmlto=no else have_xmlto=yes fi elif test "x$use_xmlto" = x"yes" ; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) fi have_xmlto=yes elif test "x$use_xmlto" = x"no" ; then if test "x$XMLTO" != "x"; then AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) fi have_xmlto=no else AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) fi # Test for a minimum version of xmlto, if provided. m4_ifval([$1], [if test "$have_xmlto" = yes; then # scrape the xmlto version AC_MSG_CHECKING([the xmlto version]) xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$xmlto_version]) AS_VERSION_COMPARE([$xmlto_version], [$1], [if test "x$use_xmlto" = xauto; then AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) have_xmlto=no else AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) fi]) fi]) # Test for the ability of xmlto to generate a text target have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) ]) # XORG_WITH_XMLTO # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) # -------------------------------------------- # Minimum version: 1.12.0 # Minimum version for optional DEFAULT argument: 1.12.0 # # XSLT (Extensible Stylesheet Language Transformations) is a declarative, # XML-based language used for the transformation of XML documents. # The xsltproc command line tool is for applying XSLT stylesheets to XML documents. # It is used under the cover by xmlto to generate html files from DocBook/XML. # The XSLT processor is often used as a standalone tool for transformations. # It should not be assumed that this tool is used only to work with documnetation. # When DEFAULT is not specified, --with-xsltproc assumes 'auto'. # # Interface to module: # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation # XSLTPROC: returns the path of the xsltproc program found # returns the path set by the user in the environment # --with-xsltproc: 'yes' user instructs the module to use xsltproc # 'no' user instructs the module not to use xsltproc # have_xsltproc: returns yes if xsltproc found in PATH or no # # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XSLTPROC],[ AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xsltproc, AS_HELP_STRING([--with-xsltproc], [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), [use_xsltproc=$withval], [use_xsltproc=]_defopt) m4_undefine([_defopt]) if test "x$use_xsltproc" = x"auto"; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) have_xsltproc=no else have_xsltproc=yes fi elif test "x$use_xsltproc" = x"yes" ; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) fi have_xsltproc=yes elif test "x$use_xsltproc" = x"no" ; then if test "x$XSLTPROC" != "x"; then AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) fi have_xsltproc=no else AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) ]) # XORG_WITH_XSLTPROC # XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.15.0 # # PERL (Practical Extraction and Report Language) is a language optimized for # scanning arbitrary text files, extracting information from those text files, # and printing reports based on that information. # # When DEFAULT is not specified, --with-perl assumes 'auto'. # # Interface to module: # HAVE_PERL: used in makefiles to conditionally scan text files # PERL: returns the path of the perl program found # returns the path set by the user in the environment # --with-perl: 'yes' user instructs the module to use perl # 'no' user instructs the module not to use perl # have_perl: returns yes if perl found in PATH or no # # If the user sets the value of PERL, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PERL],[ AC_ARG_VAR([PERL], [Path to perl command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(perl, AS_HELP_STRING([--with-perl], [Use perl for extracting information from files (default: ]_defopt[)]), [use_perl=$withval], [use_perl=]_defopt) m4_undefine([_defopt]) if test "x$use_perl" = x"auto"; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_WARN([perl not found - cannot extract information and report]) have_perl=no else have_perl=yes fi elif test "x$use_perl" = x"yes" ; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) fi have_perl=yes elif test "x$use_perl" = x"no" ; then if test "x$PERL" != "x"; then AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) fi have_perl=no else AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) ]) # XORG_WITH_PERL # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-asciidoc option, it allows maximum flexibilty in making decisions # as whether or not to use the asciidoc package. When DEFAULT is not specified, # --with-asciidoc assumes 'auto'. # # Interface to module: # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation # ASCIIDOC: returns the path of the asciidoc program found # returns the path set by the user in the environment # --with-asciidoc: 'yes' user instructs the module to use asciidoc # 'no' user instructs the module not to use asciidoc # # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_ASCIIDOC],[ AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(asciidoc, AS_HELP_STRING([--with-asciidoc], [Use asciidoc to regenerate documentation (default: ]_defopt[)]), [use_asciidoc=$withval], [use_asciidoc=]_defopt) m4_undefine([_defopt]) if test "x$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) have_asciidoc=no else have_asciidoc=yes fi elif test "x$use_asciidoc" = x"yes" ; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) fi have_asciidoc=yes elif test "x$use_asciidoc" = x"no" ; then if test "x$ASCIIDOC" != "x"; then AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) fi have_asciidoc=no else AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_asciidoc" = yes; then # scrape the asciidoc version AC_MSG_CHECKING([the asciidoc version]) asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` AC_MSG_RESULT([$asciidoc_version]) AS_VERSION_COMPARE([$asciidoc_version], [$1], [if test "x$use_asciidoc" = xauto; then AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) have_asciidoc=no else AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) ]) # XORG_WITH_ASCIIDOC # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) # ------------------------------------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional DOT checking: 1.18.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-doxygen option, it allows maximum flexibilty in making decisions # as whether or not to use the doxygen package. When DEFAULT is not specified, # --with-doxygen assumes 'auto'. # # Interface to module: # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation # DOXYGEN: returns the path of the doxygen program found # returns the path set by the user in the environment # --with-doxygen: 'yes' user instructs the module to use doxygen # 'no' user instructs the module not to use doxygen # # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_DOXYGEN],[ AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) AC_ARG_VAR([DOT], [Path to the dot graphics utility]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(doxygen, AS_HELP_STRING([--with-doxygen], [Use doxygen to regenerate documentation (default: ]_defopt[)]), [use_doxygen=$withval], [use_doxygen=]_defopt) m4_undefine([_defopt]) if test "x$use_doxygen" = x"auto"; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) have_doxygen=no else have_doxygen=yes fi elif test "x$use_doxygen" = x"yes" ; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) fi have_doxygen=yes elif test "x$use_doxygen" = x"no" ; then if test "x$DOXYGEN" != "x"; then AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) fi have_doxygen=no else AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_doxygen" = yes; then # scrape the doxygen version AC_MSG_CHECKING([the doxygen version]) doxygen_version=`$DOXYGEN --version 2>/dev/null` AC_MSG_RESULT([$doxygen_version]) AS_VERSION_COMPARE([$doxygen_version], [$1], [if test "x$use_doxygen" = xauto; then AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) have_doxygen=no else AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) fi]) fi]) dnl Check for DOT if we have doxygen. The caller decides if it is mandatory dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: dnl HAVE_DOT = @HAVE_DOT@ HAVE_DOT=no if test "x$have_doxygen" = "xyes"; then AC_PATH_PROG([DOT], [dot]) if test "x$DOT" != "x"; then HAVE_DOT=yes fi fi AC_SUBST([HAVE_DOT]) AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) ]) # XORG_WITH_DOXYGEN # XORG_WITH_GROFF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-groff option, it allows maximum flexibilty in making decisions # as whether or not to use the groff package. When DEFAULT is not specified, # --with-groff assumes 'auto'. # # Interface to module: # HAVE_GROFF: used in makefiles to conditionally generate documentation # HAVE_GROFF_MM: the memorandum macros (-mm) package # HAVE_GROFF_MS: the -ms macros package # GROFF: returns the path of the groff program found # returns the path set by the user in the environment # --with-groff: 'yes' user instructs the module to use groff # 'no' user instructs the module not to use groff # # Added in version 1.9.0: # HAVE_GROFF_HTML: groff has dependencies to output HTML format: # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. # psselect from the psutils package. # the ghostcript package. Refer to the grohtml man pages # # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. # # OS and distros often splits groff in a basic and full package, the former # having the groff program and the later having devices, fonts and macros # Checking for the groff executable is not enough. # # If macros are missing, we cannot assume that groff is useless, so we don't # unset HAVE_GROFF or GROFF env variables. # HAVE_GROFF_?? can never be true while HAVE_GROFF is false. # AC_DEFUN([XORG_WITH_GROFF],[ AC_ARG_VAR([GROFF], [Path to groff command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(groff, AS_HELP_STRING([--with-groff], [Use groff to regenerate documentation (default: ]_defopt[)]), [use_groff=$withval], [use_groff=]_defopt) m4_undefine([_defopt]) if test "x$use_groff" = x"auto"; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_WARN([groff not found - documentation targets will be skipped]) have_groff=no else have_groff=yes fi elif test "x$use_groff" = x"yes" ; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) fi have_groff=yes elif test "x$use_groff" = x"no" ; then if test "x$GROFF" != "x"; then AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) fi have_groff=no else AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) fi # We have groff, test for the presence of the macro packages if test "x$have_groff" = x"yes"; then AC_MSG_CHECKING([for ${GROFF} -ms macros]) if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then groff_ms_works=yes else groff_ms_works=no fi AC_MSG_RESULT([$groff_ms_works]) AC_MSG_CHECKING([for ${GROFF} -mm macros]) if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then groff_mm_works=yes else groff_mm_works=no fi AC_MSG_RESULT([$groff_mm_works]) fi # We have groff, test for HTML dependencies, one command per package if test "x$have_groff" = x"yes"; then AC_PATH_PROGS(GS_PATH, [gs gswin32c]) AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) AC_PATH_PROG(PSSELECT_PATH, [psselect]) if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then have_groff_html=yes else have_groff_html=no AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) fi fi # Set Automake conditionals for Makefiles AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF # XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) # --------------------------------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional MIN-VERSION argument: 1.15.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-fop option, it allows maximum flexibilty in making decisions # as whether or not to use the fop package. When DEFAULT is not specified, # --with-fop assumes 'auto'. # # Interface to module: # HAVE_FOP: used in makefiles to conditionally generate documentation # FOP: returns the path of the fop program found # returns the path set by the user in the environment # --with-fop: 'yes' user instructs the module to use fop # 'no' user instructs the module not to use fop # # If the user sets the value of FOP, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], [Use fop to regenerate documentation (default: ]_defopt[)]), [use_fop=$withval], [use_fop=]_defopt) m4_undefine([_defopt]) if test "x$use_fop" = x"auto"; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_WARN([fop not found - documentation targets will be skipped]) have_fop=no else have_fop=yes fi elif test "x$use_fop" = x"yes" ; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) fi have_fop=yes elif test "x$use_fop" = x"no" ; then if test "x$FOP" != "x"; then AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) fi have_fop=no else AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) fi # Test for a minimum version of fop, if provided. m4_ifval([$1], [if test "$have_fop" = yes; then # scrape the fop version AC_MSG_CHECKING([for fop minimum version]) fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$fop_version]) AS_VERSION_COMPARE([$fop_version], [$1], [if test "x$use_fop" = xauto; then AC_MSG_WARN([fop version $fop_version found, but $1 needed]) have_fop=no else AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP # XORG_WITH_M4([MIN-VERSION]) # --------------------------- # Minimum version: 1.19.0 # # This macro attempts to locate an m4 macro processor which supports # -I option and is only useful for modules relying on M4 in order to # expand macros in source code files. # # Interface to module: # M4: returns the path of the m4 program found # returns the path set by the user in the environment # AC_DEFUN([XORG_WITH_M4], [ AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], [AC_MSG_ERROR([could not find m4 that supports -I option])], [$PATH:/usr/gnu/bin])]) AC_SUBST([M4], [$ac_cv_path_M4]) ]) # XORG_WITH_M4 # XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-ps2pdf option, it allows maximum flexibilty in making decisions # as whether or not to use the ps2pdf package. When DEFAULT is not specified, # --with-ps2pdf assumes 'auto'. # # Interface to module: # HAVE_PS2PDF: used in makefiles to conditionally generate documentation # PS2PDF: returns the path of the ps2pdf program found # returns the path set by the user in the environment # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf # 'no' user instructs the module not to use ps2pdf # # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PS2PDF],[ AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(ps2pdf, AS_HELP_STRING([--with-ps2pdf], [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) m4_undefine([_defopt]) if test "x$use_ps2pdf" = x"auto"; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) have_ps2pdf=no else have_ps2pdf=yes fi elif test "x$use_ps2pdf" = x"yes" ; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) fi have_ps2pdf=yes elif test "x$use_ps2pdf" = x"no" ; then if test "x$PS2PDF" != "x"; then AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) fi have_ps2pdf=no else AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) ]) # XORG_WITH_PS2PDF # XORG_ENABLE_DOCS (enable_docs=yes) # ---------------- # Minimum version: 1.6.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a builder to skip all # documentation targets except traditional man pages. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibilty in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DOCS: used in makefiles to conditionally generate documentation # --enable-docs: 'yes' user instructs the module to generate docs # 'no' user instructs the module not to generate docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ m4_define([docs_default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], [Enable building the documentation (default: ]docs_default[)]), [build_docs=$enableval], [build_docs=]docs_default) m4_undefine([docs_default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) ]) # XORG_ENABLE_DOCS # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all developer documentation. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibilty in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs # --enable-devel-docs: 'yes' user instructs the module to generate developer docs # 'no' user instructs the module not to generate developer docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ m4_define([devel_default], m4_default([$1], [yes])) AC_ARG_ENABLE(devel-docs, AS_HELP_STRING([--enable-devel-docs], [Enable building the developer documentation (default: ]devel_default[)]), [build_devel_docs=$enableval], [build_devel_docs=]devel_default) m4_undefine([devel_default]) AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) AC_MSG_CHECKING([whether to build developer documentation]) AC_MSG_RESULT([$build_devel_docs]) ]) # XORG_ENABLE_DEVEL_DOCS # XORG_ENABLE_SPECS (enable_specs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all functional specification targets. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibilty in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_SPECS: used in makefiles to conditionally generate specs # --enable-specs: 'yes' user instructs the module to generate specs # 'no' user instructs the module not to generate specs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_SPECS],[ m4_define([spec_default], m4_default([$1], [yes])) AC_ARG_ENABLE(specs, AS_HELP_STRING([--enable-specs], [Enable building the specs (default: ]spec_default[)]), [build_specs=$enableval], [build_specs=]spec_default) m4_undefine([spec_default]) AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) ]) # XORG_ENABLE_SPECS # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) # ---------------------------------------------- # Minimum version: 1.13.0 # # This macro enables a builder to enable/disable unit testing # It makes no assumption about the test cases implementation # Test cases may or may not use Automake "Support for test suites" # They may or may not use the software utility library GLib # # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. # The variable enable_unit_tests is used by other macros in this file. # # Interface to module: # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests # enable_unit_tests: used in configure.ac for additional configuration # --enable-unit-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ AC_BEFORE([$0], [XORG_WITH_GLIB]) AC_BEFORE([$0], [XORG_LD_WRAP]) AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [Enable building unit test cases (default: ]_defopt[)]), [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_unit_tests]) ]) # XORG_ENABLE_UNIT_TESTS # XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) # ------------------------------------------------------ # Minimum version: 1.17.0 # # This macro enables a builder to enable/disable integration testing # It makes no assumption about the test cases' implementation # Test cases may or may not use Automake "Support for test suites" # # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support # usually requires less dependencies and may be built and run under less # stringent environments than integration tests. # # Interface to module: # ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests # enable_integration_tests: used in configure.ac for additional configuration # --enable-integration-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], [Enable building integration test cases (default: ]_defopt[)]), [enable_integration_tests=$enableval], [enable_integration_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], [test "x$enable_integration_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_integration_tests]) ]) # XORG_ENABLE_INTEGRATION_TESTS # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.13.0 # # GLib is a library which provides advanced data structures and functions. # This macro enables a module to test for the presence of Glib. # # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit # test support usually requires less dependencies and may be built and run under # less stringent environments than integration tests. # # Interface to module: # HAVE_GLIB: used in makefiles to conditionally build targets # with_glib: used in configure.ac to know if GLib has been found # --with-glib: 'yes' user instructs the module to use glib # 'no' user instructs the module not to use glib # AC_DEFUN([XORG_WITH_GLIB],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], [Use GLib library for unit testing (default: ]_defopt[)]), [with_glib=$withval], [with_glib=]_defopt) m4_undefine([_defopt]) have_glib=no # Do not probe GLib if user explicitly disabled unit testing if test "x$enable_unit_tests" != x"no"; then # Do not probe GLib if user explicitly disabled it if test "x$with_glib" != x"no"; then m4_ifval( [$1], [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] ) fi fi # Not having GLib when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Having unit testing disabled when GLib has been explicitly requested is an error if test "x$enable_unit_tests" = x"no"; then if test "x$with_glib" = x"yes"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Not having GLib when it has been explicitly requested is an error if test "x$with_glib" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) fi fi AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) ]) # XORG_WITH_GLIB # XORG_LD_WRAP([required|optional]) # --------------------------------- # Minimum version: 1.13.0 # # Check if linker supports -wrap, passed via compiler flags # # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Argument added in 1.16.0 - default is "required", to match existing behavior # of returning an error if enable_unit_tests is yes, and ld -wrap is not # available, an argument of "optional" allows use when some unit tests require # ld -wrap and others do not. # AC_DEFUN([XORG_LD_WRAP],[ XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], [AC_LANG_PROGRAM([#include void __wrap_exit(int status) { return; }], [exit(0);])]) # Not having ld wrap when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then if test "x$have_ld_wrap" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) fi fi AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) # ]) # XORG_LD_WRAP # XORG_CHECK_LINKER_FLAGS # ----------------------- # SYNOPSIS # # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) # # DESCRIPTION # # Check whether the given linker FLAGS work with the current language's # linker, or whether they give an error. # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # PROGRAM-SOURCE is the program source to link with, if needed # # NOTE: Based on AX_CHECK_COMPILER_FLAGS. # # LICENSE # # Copyright (c) 2009 Mike Frysinger # Copyright (c) 2009 Steven G. Johnson # Copyright (c) 2009 Matteo Frigo # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well.# AC_DEFUN([XORG_CHECK_LINKER_FLAGS], [AC_MSG_CHECKING([whether the linker accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS]) eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) AC_MSG_RESULT($xorg_check_linker_flags) if test "x$xorg_check_linker_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ]) # XORG_CHECK_LINKER_FLAGS # XORG_MEMORY_CHECK_FLAGS # ----------------------- # Minimum version: 1.16.0 # # This macro attempts to find appropriate memory checking functionality # for various platforms which unit testing code may use to catch various # forms of memory allocation and access errors in testing. # # Interface to module: # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging # Usually added to TESTS_ENVIRONMENT in Makefile.am # # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. # AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], [Environment variables to enable memory checking in tests]) # Check for different types of support on different platforms case $host_os in solaris*) AC_CHECK_LIB([umem], [umem_alloc], [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) ;; *-gnu*) # GNU libc - Value is used as a single byte bit pattern, # both directly and inverted, so should not be 0 or 255. malloc_debug_env='MALLOC_PERTURB_=15' ;; darwin*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' ;; *bsd*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1' ;; esac # User supplied flags override default flags if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" fi AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) ]) # XORG_WITH_LINT # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 # # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if # malloc(0) returns NULL. Packages should add one of these cflags to # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) AC_MSG_CHECKING([whether malloc(0) returns NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then AC_CACHE_VAL([xorg_cv_malloc0_returns_null], [AC_RUN_IFELSE([AC_LANG_PROGRAM([ #include ],[ char *m0, *r0, *c0, *p; m0 = malloc(0); p = malloc(10); r0 = realloc(p,0); c0 = calloc(0,10); exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); ])], [xorg_cv_malloc0_returns_null=yes], [xorg_cv_malloc0_returns_null=no])]) MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null fi AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" else MALLOC_ZERO_CFLAGS="" XMALLOC_ZERO_CFLAGS="" XTMALLOC_ZERO_CFLAGS="" fi AC_SUBST([MALLOC_ZERO_CFLAGS]) AC_SUBST([XMALLOC_ZERO_CFLAGS]) AC_SUBST([XTMALLOC_ZERO_CFLAGS]) ]) # XORG_CHECK_MALLOC_ZERO # XORG_WITH_LINT() # ---------------- # Minimum version: 1.1.0 # # This macro enables the use of a tool that flags some suspicious and # non-portable constructs (likely to be bugs) in C language source code. # It will attempt to locate the tool and use appropriate options. # There are various lint type tools on different platforms. # # Interface to module: # LINT: returns the path to the tool found on the platform # or the value set to LINT on the configure cmd line # also an Automake conditional # LINT_FLAGS: an Automake variable with appropriate flags # # --with-lint: 'yes' user instructs the module to use lint # 'no' user instructs the module not to use lint (default) # # If the user sets the value of LINT, AC_PATH_PROG skips testing the path. # If the user sets the value of LINT_FLAGS, they are used verbatim. # AC_DEFUN([XORG_WITH_LINT],[ AC_ARG_VAR([LINT], [Path to a lint-style command]) AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) # Obtain platform specific info like program name and options # The lint program on FreeBSD and NetBSD is different from the one on Solaris case $host_os in *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) lint_name=splint lint_options="-badflag" ;; *freebsd* | *netbsd*) lint_name=lint lint_options="-u -b" ;; *solaris*) lint_name=lint lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" ;; esac # Test for the presence of the program (either guessed by the code or spelled out by the user) if test "x$use_lint" = x"yes" ; then AC_PATH_PROG([LINT], [$lint_name]) if test "x$LINT" = "x"; then AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) fi elif test "x$use_lint" = x"no" ; then if test "x$LINT" != "x"; then AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) fi else AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) fi # User supplied flags override default flags if test "x$LINT_FLAGS" != "x"; then lint_options=$LINT_FLAGS fi AC_SUBST([LINT_FLAGS],[$lint_options]) AM_CONDITIONAL(LINT, [test "x$LINT" != x]) ]) # XORG_WITH_LINT # XORG_LINT_LIBRARY(LIBNAME) # -------------------------- # Minimum version: 1.1.0 # # Sets up flags for building lint libraries for checking programs that call # functions in the library. # # Interface to module: # LINTLIB - Automake variable with the name of lint library file to make # MAKE_LINT_LIB - Automake conditional # # --enable-lint-library: - 'yes' user instructs the module to created a lint library # - 'no' user instructs the module not to create a lint library (default) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" = x"yes" ; then LINTLIB=llib-l$1.ln if test "x$LINT" = "x"; then AC_MSG_ERROR([Cannot make lint library without --with-lint]) fi elif test "x$make_lint_lib" != x"no" ; then AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) fi AC_SUBST(LINTLIB) AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY # XORG_COMPILER_BRAND # ------------------- # Minimum version: 1.14.0 # # Checks for various brands of compilers and sets flags as appropriate: # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" # clang compiler - sets CLANGCC to "yes" # Intel compiler - sets INTELCC to "yes" # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" # AC_DEFUN([XORG_COMPILER_BRAND], [ AC_LANG_CASE( [C], [ AC_REQUIRE([AC_PROG_CC_C99]) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) ] ) AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) ]) # XORG_COMPILER_BRAND # XORG_TESTSET_CFLAG(, , [, ...]) # --------------- # Minimum version: 1.16.0 # # Test if the compiler works when passed the given flag as a command line argument. # If it succeeds, the flag is appeneded to the given variable. If not, it tries the # next flag in the list until there are no more options. # # Note that this does not guarantee that the compiler supports the flag as some # compilers will simply ignore arguments that they do not understand, but we do # attempt to weed out false positives by using -Werror=unknown-warning-option and # -Werror=unused-command-line-argument # AC_DEFUN([XORG_TESTSET_CFLAG], [ m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) AC_LANG_COMPILER_REQUIRE AC_LANG_CASE( [C], [ AC_REQUIRE([AC_PROG_CC_C99]) define([PREFIX], [C]) define([CACHE_PREFIX], [cc]) define([COMPILER], [$CC]) ], [C++], [ define([PREFIX], [CXX]) define([CACHE_PREFIX], [cxx]) define([COMPILER], [$CXX]) ] ) [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], [eval $cacheid=yes], [eval $cacheid=no])]) PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" eval supported=\$$cacheid AC_MSG_RESULT([$supported]) if test "$supported" = "yes" ; then $1="$$1 ]flag[" found="yes" fi fi ]) ]) # XORG_TESTSET_CFLAG # XORG_COMPILER_FLAGS # --------------- # Minimum version: 1.16.0 # # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line # arguments supported by the selected compiler which do NOT alter the generated # code. These arguments will cause the compiler to print various warnings # during compilation AND turn a conservative set of warnings into errors. # # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in # future versions of util-macros as options are added to new compilers. # AC_DEFUN([XORG_COMPILER_FLAGS], [ AC_REQUIRE([XORG_COMPILER_BRAND]) AC_ARG_ENABLE(selective-werror, AS_HELP_STRING([--disable-selective-werror], [Turn off selective compiler errors. (default: enabled)]), [SELECTIVE_WERROR=$enableval], [SELECTIVE_WERROR=yes]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then [BASE_]PREFIX[FLAGS]="-v" else [BASE_]PREFIX[FLAGS]="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) AC_LANG_CASE( [C], [ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) ] ) # This chunk adds additional warnings that could catch undesired effects. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidently get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION else AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) fi AC_SUBST([BASE_]PREFIX[FLAGS]) ]) # XORG_COMPILER_FLAGS # XORG_CWARNFLAGS # --------------- # Minimum version: 1.2.0 # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) # # Defines CWARNFLAGS to enable C compiler warnings. # # This function is deprecated because it defines -fno-strict-aliasing # which alters the code generated by the compiler. If -fno-strict-aliasing # is needed, then it should be added explicitly in the module when # it is updated to use BASE_CFLAGS. # AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_REQUIRE([XORG_COMPILER_BRAND]) AC_LANG_CASE( [C], [ CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi AC_SUBST(CWARNFLAGS) ] ) ]) # XORG_CWARNFLAGS # XORG_STRICT_OPTION # ----------------------- # Minimum version: 1.3.0 # # Add configure option to enable strict compilation flags, such as treating # warnings as fatal errors. # If --enable-strict-compilation is passed to configure, adds strict flags to # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. # # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or # when strict compilation is unconditionally desired. AC_DEFUN([XORG_STRICT_OPTION], [ AC_REQUIRE([XORG_CWARNFLAGS]) AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_ARG_ENABLE(strict-compilation, AS_HELP_STRING([--enable-strict-compilation], [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) [STRICT_]PREFIX[FLAGS]="" XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) if test "x$STRICT_COMPILE" = "xyes"; then [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) fi AC_SUBST([STRICT_]PREFIX[FLAGS]) AC_SUBST([BASE_]PREFIX[FLAGS]) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) ]) # XORG_STRICT_OPTION # XORG_DEFAULT_OPTIONS # -------------------- # Minimum version: 1.3.0 # # Defines default options for X.Org modules. # AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_COMPILER_FLAGS XORG_CWARNFLAGS XORG_STRICT_OPTION XORG_RELEASE_VERSION XORG_CHANGELOG XORG_INSTALL XORG_MANPAGE_SECTIONS m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) ]) # XORG_DEFAULT_OPTIONS # XORG_INSTALL() # ---------------- # Minimum version: 1.4.0 # # Defines the variable INSTALL_CMD as the command to copy # INSTALL from $prefix/share/util-macros. # AC_DEFUN([XORG_INSTALL], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], [Major version of this package]) PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], [$PVM], [Minor version of this package]) PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], [$PVP], [Patch version of this package]) ]) # XORG_CHANGELOG() # ---------------- # Minimum version: 1.2.0 # # Defines the variable CHANGELOG_CMD as the command to generate # ChangeLog from git. # # AC_DEFUN([XORG_CHANGELOG], [ CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ echo 'git directory not found: installing possibly empty changelog.' >&2)" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_DRIVER_CHECK_EXT(MACRO, PROTO) # -------------------------- # Checks for the MACRO define in xorg-server.h (from the sdk). If it # is defined, then add the given PROTO to $REQUIRED_MODULES. AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "xorg-server.h" #if !defined $1 #error $1 not defined #endif ]])], [_EXT_CHECK=yes], [_EXT_CHECK=no]) CFLAGS="$SAVE_CFLAGS" AC_MSG_CHECKING([if $1 is defined]) AC_MSG_RESULT([$_EXT_CHECK]) if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES $2" fi ]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR xf86-video-mach64-6.9.5/Makefile.in0000644000175000017500000006573612521746617013534 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, 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 (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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 = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \ ChangeLog INSTALL README compile config.guess config.sub \ install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DRI_CFLAGS = @DRI_CFLAGS@ DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ 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@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ 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@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -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-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL # 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: xf86-video-mach64-6.9.5/config.h.in0000644000175000017500000000445212521746616013475 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #include "xorg-server.h" /* Avoid PIO and use MMIO for atimisc. */ #undef AVOID_CPIO /* Do not build DGA support. */ #undef AVOID_DGA /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_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_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_XAA_H /* xextproto 7.1 available */ #undef HAVE_XEXTPROTO_71 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Major version of this package */ #undef PACKAGE_VERSION_MAJOR /* Minor version of this package */ #undef PACKAGE_VERSION_MINOR /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Build TV-Out support for atimisc. */ #undef TV_OUT /* Build support for Exa */ #undef USE_EXA /* Build support for XAA */ #undef USE_XAA /* Version number of package */ #undef VERSION /* Enable DRI driver support */ #undef XF86DRI /* Enable developmental DRI driver support */ #undef XF86DRI_DEVEL xf86-video-mach64-6.9.5/COPYING0000644000175000017500000001213712270010352012462 00000000000000Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Marc Aurele La France not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Marc Aurele La France makes no representations about the suitability of this software for any purpose. It is provided "as-is" without express or implied warranty. MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, Precision Insight, Inc., Cedar Park, Texas, and VA Linux Systems Inc., Fremont, California. All Rights Reserved. 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 on 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 (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************* Copyright 2000 Gareth Hughes All Rights Reserved. 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 (including the next paragraph) 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 GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************* Copyright 2006, 2007 George Sapountzis All Rights Reserved. Based on the mach64 DRI and DRM drivers: Copyright 2000 Gareth Hughes Copyright 2002-2003 Leif Delgass All Rights Reserved. Based on the ati hw/kdrive driver: Copyright 2003 Eric Anholt, Anders Carlsson Based on the via hw/xfree86 driver: Copyright 2006 Thomas Hellstrom. All Rights Reserved. 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 (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. xf86-video-mach64-6.9.5/ChangeLog0000644000175000017500000133221512521747527013230 00000000000000commit 8f920350a736012ce2a7469d8252f5f5bf72cef3 Author: Adam Jackson Date: Mon May 4 15:50:09 2015 -0400 mach64 6.9.5 Signed-off-by: Adam Jackson commit 810572536e153ac9e4615a35e2ab99dc266806da Author: Dave Airlie Date: Sat Nov 15 11:29:54 2014 +1000 mach64: fix build probably not required with pci access anyways commit e538ff6b2108117a7ae6644a844c6ce10fc0f1ee Author: Connor Behan Date: Wed Nov 27 23:53:31 2013 -0800 Drop dependence on xf86PciInfo.h It is about time we stop using this deprecated file and include pciids locally. Signed-off-by: Connor Behan Reviewed-by: Alex Deucher commit 2c83b465b336a012f2d2716940bf483358388000 Author: Matthieu Herrb Date: Mon Jun 3 13:01:23 2013 -0400 Deal with pPict->pDrawable == NULL for source-only pictures. Falling back to software rendering for such source pictures (solid/gradient). Signed-off-by: Matthieu Herrb Reviewed-by: Alex Deucher commit ec6ee6a112dc38cab563779583944dba9393f385 Author: Adam Jackson Date: Wed Apr 3 09:14:54 2013 -0400 Bump minimum xserver to 1.4 Due to the previous change we no longer support servers where ddc is not a server builtin. Signed-off-by: Adam Jackson commit fa18180cc5f6d84168ffca6b7b8e467a5c72da14 Author: Adam Jackson Date: Tue Apr 2 11:15:47 2013 -0400 preinit: Don't bother explicitly loading int10, vbe will do it for us Signed-off-by: Adam Jackson commit 80e62cc1dfb80c3170e43c3941b56d0a84bddc3b Author: Alan Coopersmith Date: Wed Dec 19 22:37:07 2012 -0800 Remove unused atiaudio.c & ATIAudioNames declaration Defined a string array, which is not used anywhere. atiaudio.h remains for now, though for the enum it defines, only one reference to it remains, initializing the Audio to ATI_AUDIO_NONE, so it may be a candidate for further cleanup in the future. Reported by Solaris linker -z guidance option: ld: guidance: removal of unused file recommended: atiaudio.o Signed-off-by: Alan Coopersmith commit 233270a78d41d9df5614e17d73c8c4add391459b Author: Alan Coopersmith Date: Wed Dec 19 22:33:48 2012 -0800 Remove unused atidecoder.c & atidecoder.h Defined a enum & string array, neither of which were used anywhere. Reported by Solaris linker -z guidance option: ld: guidance: removal of unused file recommended: atidecoder.o Signed-off-by: Alan Coopersmith Reviewed-by: Alex Deucher commit 0d8639f3cd4128ae856ae27f3787c1da224bb564 Author: Alan Coopersmith Date: Wed Dec 19 22:14:08 2012 -0800 xf86-video-mach64 6.9.4 Signed-off-by: Alan Coopersmith commit f694490b3cec78d7b17eeb0a9c4daadd1028776a Author: Alan Coopersmith Date: Tue Dec 18 15:42:30 2012 -0800 Remove call to obsolete miInitializeBackingStore() Definition was deleted from Xorg during 1.14 merge window, but has been a no-op since 1.10 merge window. Signed-off-by: Alan Coopersmith Reviewed-by: Alex Deucher commit ece8d3557eb1ffb27104bffb7841503aae4dcd6f Author: Connor Behan Date: Fri Dec 7 13:53:38 2012 -0800 Remove dummy UTS / DFS hooks When EXA was added to mach64, it included UploadToScreen and DownloadFromScreen hooks that did the same thing that EXA would do in a software fallback. Now they are out of date and cause crashes. The slight benefit of reimplementing those hooks (if there is any) is not worth the maintenance burden of having to rewrite them every time there is a change to the way EXA handles pixmaps. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=51137 Signed-off-by: Connor Behan Tested-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit f0d44c18d71e7450b99189c1221a2f89c7817ab6 Author: Alan Coopersmith Date: Thu Dec 6 16:49:12 2012 -0800 Mach64PixelARGB should use exaGetPixmapFirstPixel Fixes crash attempting to read a pixel from a NULL pPixmap->devPrivate.ptr Signed-off-by: Alan Coopersmith Reviewed-by: Michel Dänzer commit 42c4e423eec789606eec9703be23a9fd4483a14a Author: Adam Jackson Date: Tue Oct 2 10:19:47 2012 -0400 Fix build with neither XAA nor EXA against xserver 1.13.0 Pull in picturestr.h to get GLYPH_HAS_GLYPH_PICTURE_ACCESSOR defined before compat-api.h is parsed, otherwise you fail with: In file included from /usr/include/xorg/picturestr.h:28:0, from /usr/include/xorg/exa.h:38, from atimach64accel.h:31, from atiscreen.c:46: /usr/include/xorg/glyphstr.h:138:2: error: expected ')' before '*' token /usr/include/xorg/glyphstr.h:138:2: error: expected ')' before '(' token /usr/include/xorg/glyphstr.h:140:2: error: expected ')' before '*' token /usr/include/xorg/glyphstr.h:140:2: error: expected ')' before '(' token Signed-off-by: Adam Jackson commit 104e3e067a7dcac143cb672fe42d56396ba6087b Author: Adam Jackson Date: Wed Sep 26 16:21:25 2012 -0400 Don't gratuitously disable Render when ShadowFBing There's no reason to do this, and I am at a loss to explain why that was ever done. The first instance of this logic comes from xfree86 (over 11 years ago!): http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c.diff?r1=1.15&r2=1.16 Now, cfb never had Render support, so that might make some sense if there was an intermediate uncommitted state where the driver used fb for direct but cfb for shadowed. But that's really the only plausible explanation I can think of. Signed-off-by: Adam Jackson commit 5eb7fec958bc6ba8a1a2b0be4916cac818866e1c Author: Dave Airlie Date: Wed Jul 18 18:46:49 2012 +1000 mach64: fix build on 32-bit. tvout code only builds on 32-bit, fix build. Signed-off-by: Dave Airlie commit 2776fc9cd69f18ba6f09f39ca747f3a9333bf9e4 Author: Dave Airlie Date: Tue Jul 17 16:05:09 2012 +1000 xf86-video-mach64: bump to version 6.9.3 Signed-off-by: Dave Airlie commit a2213da6d87baa8b5f49d3894513ced2c6974259 Author: Dave Airlie Date: Mon Jul 16 04:29:53 2012 +0100 mach64: fix build against server without XAA Signed-off-by: Dave Airlie commit 3fce61b475355820f735e50b7070ee6fc906083d Author: Dave Airlie Date: Mon Jul 2 12:23:03 2012 +0100 mach64: bump to 6.9.2 Signed-off-by: Dave Airlie commit 68572c1e41cf6de2f0ef2c9442111384ce863308 Author: Dave Airlie Date: Wed Jun 6 10:42:26 2012 +0100 ati: only include deprecated file in one place. reduces warnings. Signed-off-by: Dave Airlie commit a9f3a66e355b9f19c312d399771fb1d8eb2e046d Author: Dave Airlie Date: Wed Jun 6 10:41:11 2012 +0100 mach64: port to new compat API. Signed-off-by: Dave Airlie commit 84468ba28853fa57170025d9c25cb0029a386ff4 Author: Alan Coopersmith Date: Fri Mar 30 19:02:07 2012 -0700 Readme updates Stop saying Radeon & Rage128 are not "yet" supported by this driver, since no one is working on reuniting the ATI driver family. Update URL to check for latest X.Org code releases. Stop calling it an "XAA" driver now that it also supports EXA. Signed-off-by: Alan Coopersmith commit 5e09e744b27b5ada9dd064e250fa98eddf1a58c3 Author: Alan Coopersmith Date: Fri Mar 23 18:56:44 2012 -0700 xf86-video-mach64 6.9.1 Signed-off-by: Alan Coopersmith commit fa20f8f2408ac81ff04d81196a56c907fba01c45 Author: Adam Jackson Date: Mon Dec 19 16:45:25 2011 -0500 Fall back to shadowfb if XAA is unavailable Signed-off-by: Adam Jackson commit 0de234329fa1c3365954498819da93d64a978911 Author: Jeremy Huddleston Date: Sat Oct 29 18:53:48 2011 -0700 Use pci_device_map_legacy rather than xf86MapDomainMemory Signed-off-by: Jeremy Huddleston commit 75166a0fc92220b496eb67451ec1b11cb8b72091 Author: Jeremy Huddleston Date: Sat Oct 29 18:54:10 2011 -0700 Use unsigned long rather than deprecated IOADDRESS Signed-off-by: Jeremy Huddleston commit ef55d1f123972ccc001bf8b41db45d281be35a62 Author: Julien Cristau Date: Thu Apr 28 17:23:42 2011 +0200 Bump to 6.9.0 Signed-off-by: Julien Cristau commit 39c6d1da8af563afa665d5bb149c9693e24c6eab Author: Julien Cristau Date: Thu Apr 28 17:31:52 2011 +0200 Replace deprecated xalloc/xfree/xrealloc with malloc/free/realloc Signed-off-by: Julien Cristau commit d60087f0b6dd4d082230312580ae35e14acd0c6e Author: Dave Airlie Date: Thu Dec 2 19:11:05 2010 +1000 mach64: fix the pixmap private API change. commit e7bc106247d9ba10a922936e137a4f5ecc54ef9e Author: Alan Coopersmith Date: Sat Oct 30 09:37:17 2010 -0700 Sun's copyrights now belong to Oracle Signed-off-by: Alan Coopersmith commit 1732886624c7590a8084bb7d92e87ff341aa6d66 Author: Mark Kettenis Date: Sun Aug 29 18:07:01 2010 +0200 Don't play wrapping games The driver calls the wrapped CloseScreen function in the middle of messing with the hardware state. On multi-card setups this may cause the VGA arbiter to switch to a different card while we're in the middle of things, with obvious disastrous effects. This fixes things by making sure we only call the wrapped CloseScreen function at the very end of the driver's CloseScreen function. Signed-off-by: Mark Kettenis commit 7a1549678a19c6e94e1ecb3223c74effbd5009d2 Author: Mark Kettenis Date: Sun Aug 29 17:54:19 2010 +0200 Don't attempt to stop video on Mach64's without hardware overlay support Older Mach64 variants don't have hardware overlay support. This is handled properly when the XVideo adapter is initialized (we bail out early), but ATICloseXVideo() unconditionally tries to stop video during screen termination. This causes the server to hang on certain multi-card setups. Fix the issue by checking Block1Base before proceeding with stopping video. Signed-off-by: Mark Kettenis commit 88a176df8df09812719eb179b293ce4dc851f2e5 Author: Gaetan Nadon Date: Wed Jul 21 16:49:04 2010 -0400 config: add comments for main statements commit 18ee3aa1b7a4c9de9cc705cb10e05864d3ab6406 Author: Gaetan Nadon Date: Wed Jul 21 16:07:00 2010 -0400 config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES Signed-off-by: Gaetan Nadon commit d061e00d4d09e8fbecc8bad95354551d36197dd4 Author: Gaetan Nadon Date: Wed Jul 21 14:37:41 2010 -0400 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING Signed-off-by: Gaetan Nadon commit 69da993c9bdb8982c650533ca44a34fa2d7589fa Author: Gaetan Nadon Date: Wed Jul 21 14:05:22 2010 -0400 config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS Signed-off-by: Gaetan Nadon commit 37f35b579e9ea1a4b5b50f3ae570e3329664c38e Author: Gaetan Nadon Date: Wed Jul 21 09:27:42 2010 -0400 config: complete AC_INIT m4 quoting Signed-off-by: Gaetan Nadon commit 1cb6b6939e5d466797721a2e59afdd067e769fcc Author: Gaetan Nadon Date: Tue Jul 20 21:54:11 2010 -0400 config: remove unrequired AC_SUBST([DRI_CFLAGS]) This macro is called by PKG_CHECK_MODULES Signed-off-by: Gaetan Nadon commit 590d1989f22c38d8db01146b2207d440bc59f285 Author: Gaetan Nadon Date: Tue Jul 20 21:44:57 2010 -0400 config: remove unrequired AC_SUBST([XORG_CFLAGS]) This macro is called by PKG_CHECK_MODULES Signed-off-by: Gaetan Nadon commit 7bf12fb07625bd5503c5de3e5e07bd69c6de54b3 Author: Gaetan Nadon Date: Tue Jul 20 20:24:42 2010 -0400 config: remove unrequired AC_HEADER_STDC Autoconf says: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro". Signed-off-by: Gaetan Nadon commit 3518273c2117c0d8e51efecb2f9184d5f8274ae0 Author: Gaetan Nadon Date: Tue Jul 20 19:41:31 2010 -0400 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Gaetan Nadon commit 03dd23597e64f440e5530bd8bfbd222b8f825d5a Author: Gaetan Nadon Date: Tue Jul 20 18:45:19 2010 -0400 config: update AC_PREREQ statement to 2.60 Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon commit d5b5e2bb4139b723df35a422b945d514caf4db2d Author: Gaetan Nadon Date: Tue Jul 20 16:15:29 2010 -0400 config: upgrade to util-macros 1.8 for additional man page support Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. commit 6da9520fe6c482c1d4cb9dd6119c13789ed9715a Author: Gaetan Nadon Date: Mon Jun 21 10:37:11 2010 -0400 config: remove optional check for xf86miscproto This extension is obsolete and is not used by this driver. Signed-off-by: Gaetan Nadon commit 1f1e665f7dab55eceb314adb185636b8ee64fbc6 Author: Gaetan Nadon Date: Mon Jun 14 08:43:04 2010 -0400 README: keep the text version of README, discard the sgml version The linuxdoc doc tool is deprecated. README files are exclusively text files. Normalize to one plain text README file. Signed-off-by: Gaetan Nadon commit 2863c5617ccb4a09a699c43c72d9b496480db102 Author: Gaetan Nadon Date: Mon Jun 14 08:38:59 2010 -0400 README: fix linuxdoc content defs.ent are located under X11 directory ident tag is not a Linuxdoc tag replace docbook email tag with linuxdoc email tag Signed-off-by: Gaetan Nadon commit ebfb29a00384ae8070d9f10726c591c0ca92637c Author: Matt Turner Date: Mon Mar 8 10:52:54 2010 -0500 Don't check for Xinerama. It doesn't seem to be used anywhere, so don't require it. CC: Jerome Glisse CC: Alex Deucher CC: Dave Airlie Signed-off-by: Matt Turner commit 383903574b9660f9d7831b149f2a9b339a871586 Author: Alan Coopersmith Date: Fri Jan 15 15:54:36 2010 -0800 Update Sun license notices to current X.Org standard form Signed-off-by: Alan Coopersmith commit 0059e1e49b1e6861aad801b93ccf846a236a42a7 Author: Gaetan Nadon Date: Tue Dec 15 21:47:06 2009 -0500 configure.ac: use backticks rather than $() for cmd subs Use "$PKG_CONFIG" rather than hard coded "pkg-config" Acked-by: Dan Nicholson Acked-by: Daniel Stone Signed-off-by: Gaetan Nadon commit 8f84a92309e62655de69c09affa2e6922cc46aa1 Author: Gaetan Nadon Date: Mon Nov 23 09:25:05 2009 -0500 Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES Now that the INSTALL file is generated. Allows running make maintainer-clean. commit da3afdb69d426db6423c505f1c4ec10b9cd40304 Author: Gaetan Nadon Date: Wed Oct 28 14:41:41 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Automake 'foreign' option is specified in configure.ac. Remove from Makefile.am commit a0b11f322c440ccf13347c42d08ed5e0b208d79c Author: Gaetan Nadon Date: Wed Oct 28 14:09:09 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet. commit 963be32d684b32957d7e646eb19259d7710bf66a Author: Gaetan Nadon Date: Mon Oct 26 12:54:21 2009 -0400 Several driver modules do not have a ChangeLog target in Makefile.am #23814 The git generated ChangeLog replaces the hand written one. Update configure.ac to xorg-macros level 1.3. Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros Update Makefile.am to add ChangeLog target if missing Remove ChangeLog from EXTRA_DIST or *CLEAN variables This is a pre-req for the INSTALL_CMD commit 3e54585250d22541a31068b5b8f0c8743dbccce6 Author: Gaetan Nadon Date: Thu Oct 22 12:34:17 2009 -0400 .gitignore: use common defaults with custom section # 24239 Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. commit 2013b64cf19fce32edb052ee6d8529d3ce69d409 Author: Dave Airlie Date: Thu Jul 30 12:04:28 2009 +1000 mach64: bump for release 6.8.2 commit 4f08e83e50059df494f5f53cd05eb8809d18656e Author: Dave Airlie Date: Tue Jul 28 15:22:40 2009 +1000 mach64: change to using ABI version check commit 64960253ea5dcfb01d92b5b684790f16be5b73be Author: Dave Airlie Date: Tue Jul 28 13:32:31 2009 +1000 mach64: update for resources/RAC API removal commit 965614f27d42106e859000264a6eb89d9fcba67e Author: Peter Hutterer Date: Thu Jul 16 11:43:33 2009 +1000 Update to xextproto 7.1 support. DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers need to include dpmsconst.h if xextproto 7.1 is available. Signed-off-by: Peter Hutterer commit 9caef14defaf892d957875f6d774003a036bad45 Author: Alan Coopersmith Date: Mon May 11 22:06:40 2009 -0700 Fill in COPYING file, add SubmittingPatches URL to README commit d9d787167795862909738892195fcdc751c413ed Author: Alan Coopersmith Date: Sun May 10 16:56:02 2009 -0700 Doublecheck pictFormat is a supported format Fixes these warnings from parfait source checker: Error: Read buffer overflow at src/atimach64render.c:601 in function 'Mach64PrepareTexture' [Symbolic analysis] In array dereference of Mach64TexFormats[i] with index 'i' Array size is 6 elements (of 12 bytes each), index >= 0 and index <= 6 Error: Read buffer overflow at src/atimach64render.c:712 in function 'Mach64PrepareComposite' [Symbolic analysis] In array dereference of Mach64TexFormats[i] with index 'i' Array size is 6 elements (of 12 bytes each), index >= 0 and index <= 6 Signed-off-by: Alan Coopersmith commit 99db87ed49d7eca8de2ff1f7d53b580637ebb916 Author: Alan Coopersmith Date: Wed Apr 29 17:32:47 2009 -0700 Version 6.8.1 Signed-off-by: Alan Coopersmith commit 193744b015e8f2b8c25d90094b7f0b502bc1287b Author: Alan Coopersmith Date: Wed Apr 29 17:21:53 2009 -0700 Convert to XORG_CWARNFLAGS & XORG_CHANGELOG Signed-off-by: Alan Coopersmith commit d394e0b8269ea0a7d36ee8edb38947df170399c9 Author: Alan Coopersmith Date: Fri Jan 30 20:41:43 2009 -0800 Add README with pointers to mailing list, bugzilla & git repos commit cab7a47477e3878cb9f1fdc5b721fc8e3aaadd5b Author: Paulo Cesar Pereira de Andrade Date: Fri Nov 28 01:09:52 2008 -0200 Remove xf86{Disable,Enable}Interrupts They were already a noop in most "os-support"s, and are no longer available in the X Server. commit e993728f7ee618d34163c127231881aec1637ca2 Author: Adam Jackson Date: Fri Oct 3 14:31:13 2008 -0400 Don't print the resource list on failure. If this ever happens it should be printed from the server at any rate. commit 46a0254b5a0bffe8c57322b085bcd38f893e4b27 Author: Aaron Plattner Date: Tue Sep 9 10:32:48 2008 -0400 Make sure the screen is a mach64 screen before doing anything in ATIMach64XVInitialiseAdaptor. commit 89a9ad75f3e50e25275b803617d5e74709ead269 Author: Yi Zhan Date: Wed Mar 26 16:13:08 2008 +1000 mach64: on IA64 systems the pciaccess page size mapping was getting E2BIG As the ia64 pagesize was 16k, and aperture was only 4k, this was messing up on ia64 machines. Modified fix from RH BZ 438947 - airlied commit 6127349c9625ae3b50c40fd3641847be3ca18795 Author: Paulo Cesar Pereira de Andrade Date: Wed Mar 19 17:42:23 2008 -0400 [PATCH] Compile warning fixes. Add missing prototypes to atimach64accel.h. commit 56a1c9f07886d40c25baa31b6d02f5ee0efd749a Author: George Sapountzis Date: Wed Feb 27 18:49:50 2008 +0200 add warning message commit 10127a10841ec211a92b2a59d6db716343caf018 Author: George Sapountzis Date: Wed Feb 27 18:49:31 2008 +0200 change module name and version module gets package version, driver keeps its own version commit e8260479e8c9f0445d160e991104b3a749035a7b Author: George Sapountzis Date: Wed Feb 27 18:49:02 2008 +0200 drop r128 commit 4d3a3befcfcfff3825ad4de166de2090aa1c9976 Author: George Sapountzis Date: Wed Feb 27 18:48:44 2008 +0200 drop r128 (build system) commit df574b7b486be6b00520c6a87dc3f606b4c5395c Author: George Sapountzis Date: Wed Feb 27 18:48:26 2008 +0200 drop ati wrapper commit 4d5cc3678ac8d1e8ed18d72d26154494bf1e75e5 Author: George Sapountzis Date: Wed Feb 27 18:48:10 2008 +0200 drop AtomBios and pcidb commit 713a2241495b9a3818c06974838477d9f28fe52b Author: George Sapountzis Date: Wed Feb 27 18:47:45 2008 +0200 drop radeon, theatre commit 403cb9e89fc9c82d7f1b21997e7deba6bc0fbcea Author: George Sapountzis Date: Wed Feb 27 18:45:21 2008 +0200 drop radeon, theatre (build system). commit 68888189cf8d460ef6f8f2f1431a6ffe9fcd8134 Author: Alex Deucher Date: Wed Feb 27 03:09:28 2008 -0500 RADEON: fix textured video uploads commit 7cfad216a3f1486be194c972b9b6bcf070358586 Author: Alex Deucher Date: Wed Feb 27 02:13:10 2008 -0500 RADEON: fix clipping for textured video commit a2dca1d68d751def34ef3c6f836574173737bf76 Author: Alex Deucher Date: Tue Feb 26 16:38:29 2008 -0500 RADEON: Convert textured video to use pipelined uploads commit b4fa1ce9d2da04d94521a82d3c2e95f0fe985ccc Author: Alex Deucher Date: Tue Feb 26 14:45:25 2008 -0500 R300/R500: fix up clipping Based on patch from Peter Zubaj. commit 44e527a117ab0a363135ff066c7f7e0c12e3dc89 Author: Alex Deucher Date: Tue Feb 26 14:33:24 2008 -0500 R300: fix cordinate clamping in render code Based on Peter's fix for textured video commit 00ec17ad53d7ad43f19c9b723794ac1b8ef86826 Author: Peter Zubaj Date: Tue Feb 26 14:26:14 2008 -0500 R300: Fix clamping and pitch for textured video commit 4207793f9b6c891cb17ba715223d2002668885e3 Author: Alex Deucher Date: Tue Feb 26 13:16:22 2008 -0500 R300/R500: set the number graphics pipes properly This should fix the checkerboard issues on r300/r350 cards. commit 823d8bf49e4c0a8c839354179942c5a1944c178d Author: Alex Deucher Date: Tue Feb 26 12:25:14 2008 -0500 R300/R500: clean up magic numbers in textured video commit 8ea75b268f11794f4a7e7bac52cb256490ed3fd2 Author: Dave Airlie Date: Tue Feb 26 16:29:19 2008 +1000 regs: fix spelling properly commit f2816064a6c2c4c35ccba74b9aa80547e25c012e Author: Dave Airlie Date: Tue Feb 26 16:28:24 2008 +1000 regs: fix spelling mistake pointed out by plaes on irc commit 9d2ca30b90607085578dde1f314db663bd5f82ec Author: Alex Deucher Date: Mon Feb 25 17:34:00 2008 -0500 R300/R500: clean up magic numbers in render code commit 153ad6fcf704cbf9f811d9986cd4baf04e82c9d2 Author: Dave Airlie Date: Mon Feb 25 07:10:48 2008 +1000 fixup check for EXA composite pointed out by Alan Swanson commit 85e470e64f629de72e361c77770e2e29998d1bf4 Merge: 27ddb39 1b84c76 Author: Alex Deucher Date: Sun Feb 24 05:37:22 2008 -0500 Merge master and fix conflicts Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati Conflicts: src/radeon_commonfuncs.c commit 27ddb39b12a0b54e099fd5274c4c91f08e2d2822 Author: Alex Deucher Date: Sun Feb 24 05:30:11 2008 -0500 R300: clean up magic numbers in RADEONInit3DEngine commit d4c20f33ad6a1f88615cd7e09ad3638896873f9e Author: Alex Deucher Date: Sun Feb 24 04:46:10 2008 -0500 R300: replace magic numbers in cache flush commit e52f1c8d2647b81d891ec0728dd582941a76c83f Author: Alex Deucher Date: Sun Feb 24 04:43:18 2008 -0500 R300: fill in some more 3D bitfields commit 1b84c76f27c8d24cb42beae26abf000721901c1c Author: Dave Airlie Date: Sun Feb 24 19:20:36 2008 +1100 rs690: initial textured video support commit 68158124366db883a901e960fe5f05f8df5efa42 Author: Dave Airlie Date: Tue Feb 19 19:51:18 2008 +1100 rs690: initial rs690 rotate suffers same problem as r500 with clipping commit e614bb6965588bf09dcb87f5e08e67120ec9847f Author: Dave Airlie Date: Sun Feb 24 01:46:05 2008 -0500 r500: convert fragprog to use register values commit 6ce9ee47c75620b2e5d211c5d59d17271a6a7b19 Author: Dave Airlie Date: Sat Feb 23 22:49:34 2008 -0500 r500: add textured video Xv adapter support commit 9aaf8b33b22b6ba112869558ae54e021b9487ad2 Author: Dave Airlie Date: Sat Feb 23 22:16:25 2008 -0500 r500: initial rotate support - not fully working yet. Just an example of how to setup and run the r500 3D engine for rotation. this rotates for me but I get some strange clipping on the bottom of my screen commit 05dc3e4fc19d056ce99a7b110665adab2ca1ea21 Author: Adam Jackson Date: Sat Feb 23 20:29:51 2008 -0500 Clarify R500 US setup. commit 080606ad528972623e1ed1124d8efe7705a73446 Author: Adam Jackson Date: Sat Feb 23 20:21:17 2008 -0500 Add the R500 US index/data pair. commit edfb3b6bbf0ee17ace8e6ba704a6f54e249fec63 Author: Alex Deucher Date: Sat Feb 23 19:59:33 2008 -0500 RADEON: no textured video yet on XPRESS chips Still need to sort out the VAP and PVS stuff commit 4146bfe5d00e40a86d17826fac50d04b2469621d Author: Alex Deucher Date: Sat Feb 23 19:21:52 2008 -0500 R500: fix typo in new r5xx regs commit d9be9f34b0d3313e7b22b2a8bb0a8924ad3116bf Author: Alex Deucher Date: Sat Feb 23 19:06:30 2008 -0500 RADEON: add textured video support for r1xx-r4xx radeons Based on the kdrive ati video code by Eric Anholt. R3xx/R4xx still have some clipping issues in certain situations commit 9dc4acad79196e9d5d94dd710773bfa83456d47f Author: Alex Deucher Date: Sat Feb 23 18:29:00 2008 -0500 RS6xx: gpio entry for DDIA varies depending on the number of DFP ports commit ed0a93edf28155308e7ab9d8705581bb38455ea0 Author: Adam Jackson Date: Sat Feb 23 15:02:17 2008 -0500 Fix R500_US_CONFIG. commit bc2bd6f841b51aeed3b6b4a47dbe758c200bc5a6 Author: Adam Jackson Date: Sat Feb 23 14:34:18 2008 -0500 Add R500 unified shader register block. commit a7b5c3bb74fc4de5e38a75ac31656445ce823464 Author: Alex Deucher Date: Fri Feb 22 19:35:11 2008 -0500 RS6xx: fix DDC on DDIA output (usually HDMI port) commit 3327a681e21101cc6f6e162f4e29f9937b69ccc3 Author: Alex Deucher Date: Fri Feb 22 17:05:56 2008 -0500 ATOM: properly set up DDIA output on RS6xx boards commit 1d0e9ab8b9451101b1b91943546f6c5833c21b3f Author: Michel Dänzer Date: Wed Feb 20 10:21:49 2008 +0100 radeon: Fix typo flagged by gcc -Wall. commit b5bd442b60dbc72fe4c1e928ab864aeb0fd7a3cb Author: Alex Deucher Date: Tue Feb 19 20:47:40 2008 -0500 R100: fix render accel for transforms Not sure why we had a separate broken path for r100 vertex submission. commit a0a73208a21546ac120fb9a463261836c9ea7b55 Author: Alex Deucher Date: Tue Feb 19 20:11:19 2008 -0500 RADEON: restore clock gating and CP clock errata on VT switch This may help people with hangs on resume commit b77e2aff7453a9f370beba37ca3c25b92b3f97ff Author: Alex Deucher Date: Tue Feb 19 19:55:41 2008 -0500 RADEON: fix DDC types 5 and 6 commit af82172a82f2bdf96e571def659a1c70f92dfdbf Author: Alex Deucher Date: Tue Feb 19 19:39:35 2008 -0500 RADEON: update man page with supported chips commit 1302d1b019c8091986aaf9c86b25c1f36a037788 Author: Alex Deucher Date: Tue Feb 19 00:34:31 2008 -0500 Bump for 6.8 release commit 830d29e8b280c11e798fb5bf5278bf24ecbac7bf Author: Alex Deucher Date: Mon Feb 18 21:17:12 2008 -0500 ATOM: fix RS6xx connector table parsing and fix some warnings commit 03aa4cc6d6e8c715a1c1d677cc1845223505b358 Author: Roland Scheidegger Date: Mon Feb 18 20:19:58 2008 -0500 bring back to life planar-to-packed conversion for rs4xx Here's a patch to bring back the code for converting planar yuv to packed yuv, if a RS400 family chip is used (though I've no idea if they really all fail with planar yuv). fixes bug 12744 commit 66b0b3f43bb714bc007169d5ba6dabe34cfc008b Author: George Sapountzis Date: Mon Feb 18 10:33:59 2008 +0200 r128/radeon: probably correct fix for non pci access code commit d055b9e800ae50d08cca9db75fc666ce1da9ab52 Author: Dave Airlie Date: Sat Feb 16 09:13:43 2008 +1000 r128/radeon: hopeful fix for non pci access code commit c773bc6a314327da29e21e4ebac6fa7f3e98a0a7 Author: Dave Airlie Date: Sat Feb 16 09:05:07 2008 +1000 r128/radeon: fix build without pciaccess commit 690a52da5248f47a587a878d05fce9784957970b Author: Dave Airlie Date: Sat Feb 16 08:33:36 2008 +1000 mach64: fix non pciaccess build commit fc85188fd95bf78b7f965cdde3e22b644c74ff81 Author: George Sapountzis Date: Fri Feb 15 18:36:10 2008 +0200 ati: convert to pci probe add pciids for each subdriver, make no use of the match_data functionality. thanks to Alex Deucher for reviewing and testing. commit 665bd7e2f61cac3e029bbad5024034e5136deec1 Author: George Sapountzis Date: Fri Feb 15 18:34:56 2008 +0200 ati wrapper: translate Device lines commit a596c1618f72179a45289a50a1f9e89462ce9667 Author: George Sapountzis Date: Fri Feb 15 18:34:31 2008 +0200 r128: do not compile in PciChipsets twice commit 99cd8ff9a7e15fc2b4e55f8bc020f584173a8c2d Author: George Sapountzis Date: Fri Feb 15 18:33:51 2008 +0200 ati: drop duplicate pci-id defines commit 146b01b51069dc227d0b125babb3f6957c9b9de2 Author: George Sapountzis Date: Fri Feb 15 18:33:29 2008 +0200 mach64: clean probe a little do not report I/O ports now, they are reported later. commit f47d461331a032f9bdcf6f63336e848778cec6cc Author: George Sapountzis Date: Fri Feb 15 18:32:56 2008 +0200 mach64: minor cosmetic, I2C type commit 2c66f2e812195167df9ca113044d46deece776ac Author: Dave Airlie Date: Fri Feb 15 10:59:30 2008 +1000 make distcheck pass commit ed87f367ddab7366f84917b43b31d76df4ce1110 Author: Alex Deucher Date: Wed Feb 13 12:53:46 2008 -0500 RADEON: disable LVDS if panel size is 0x0 if we can't get the panel size from the bios or edid or a user specified option, assume it's not connected. commit 422d7f441fdbb318d22d44db661ac9bd61387bd2 Author: Alex Deucher Date: Tue Feb 12 15:35:46 2008 -0500 R6xx: when both crtcs are in use make sure they are both enabled sometimes setting a mode on one crtc can cuase a blank screen on the other. make sure they are both enabled if they should be. commit 860f5af75274cb236f536e1da09da6bd9a579530 Author: Alex Deucher Date: Tue Feb 12 14:46:49 2008 -0500 R6xx: fix up use of bios scratch regs to reflect the new offsets commit 32f2119b43a0faf6069d8cc0816f0d9f7914c07f Author: Alex Deucher Date: Tue Feb 12 14:20:02 2008 -0500 R6xx: bios scratch regs moved. commit 8d64be6ebd7f50d4bcb587afeee8252c1367dc77 Author: Alex Deucher Date: Tue Feb 12 12:53:09 2008 -0500 RADEON: make sure we always set up the FP crtc shadow registers for crtc0 The behavior changed when I added rmx center mode support. In cases where crtc0 drives a DAC this can lead to a blank screen. commit 810d192ee046077a894e0fb5f2dfd6a7c0130766 Author: Alex Deucher Date: Mon Feb 11 19:23:01 2008 -0500 R6xx: add missing objects commit 85043439426e534e561259ce98bebdd8508b36a9 Author: Alex Deucher Date: Mon Feb 11 16:36:58 2008 -0500 R6xx: make sure we set up the HDP base properly commit 9ab5d2ec7c583c74f364d7cfbb54bcd2cd8ae2f5 Author: Alex Deucher Date: Mon Feb 11 15:26:51 2008 -0500 RADEON: always restore crtc1 before crtc0 when using both crtcs In some rare cases restoring crtc0 first will result in a blank screen on crtc1. If you are having issues with a blank screen on crtc1 that used to work on 6.6.3 or before, this should help. commit e33edca75bd9df0aa19a33e74c38a6d02610befd Author: Alex Deucher Date: Mon Feb 11 00:33:12 2008 -0500 RADEON: Implement proper (hopefully) BIOS/DRIVER interaction for ATOM bios Tested on atom-based Desktop cards. It'd nice to get some testing on atom-based laptops. commit 6524e33435a786f7de0064cdd1b04c1120d21593 Author: Alex Deucher Date: Sun Feb 10 18:52:52 2008 -0500 RADEON: Implement proper (hopefully) BIOS/DRIVER interaction for COM bios Tested on my M10-based laptop. commit 8606c1bd175893c77e8c758246a1aed166c8be51 Author: George Sapountzis Date: Fri Feb 8 19:07:03 2008 +0200 mach64: factor out BIOS panel info parsing commit 9f33218c80f5a6d6d9464aa3db8ae25a4759f351 Author: George Sapountzis Date: Fri Feb 8 19:06:41 2008 +0200 mach64: minor cosmetic, LCD panel id commit 8cd5a465a03834b4b2f3a19f8d36fc9d2e18c6d4 Author: George Sapountzis Date: Fri Feb 8 19:06:27 2008 +0200 mach64: minor cosmetic, DAC type commit 7f4db96123fdcba9874226352802d702c2a498bd Author: Dave Airlie Date: Fri Feb 8 10:47:10 2008 +1000 add rv670 pciids commit e8899b9978291c62a65f468c92f340f65ad5479d Author: Alex Deucher Date: Thu Feb 7 19:27:38 2008 -0500 R6xx: fix ddc after my i2c rework Seems r6xx does something different for its i2c table, revert to the old behavior for now. commit 435de6c4e46ff2bebd4cee58888a66b936cd3fdf Author: Alex Deucher Date: Thu Feb 7 19:14:13 2008 -0500 RADEON: sync up with latest upstream versions atombios.h ObjectID.h commit 692789a293970f70b88ccb6adcf0676d8b495ae2 Author: George Sapountzis Date: Thu Feb 7 18:03:37 2008 +0200 mach64: factor out BIOS multimedia parsing commit 933328ffd6d1d872a18d3de8624c4df845a64588 Author: George Sapountzis Date: Thu Feb 7 18:03:03 2008 +0200 mach64: complement hint for sparc commit 956c8c81f3ff434930a0cb17b027b2f8e4eeabb2 Author: George Sapountzis Date: Thu Feb 7 18:02:31 2008 +0200 mach64: consolidate refclk #2 commit dce4cc26a8e2bf53805ec63763243f3ff6b4a6d3 Author: George Sapountzis Date: Thu Feb 7 18:02:17 2008 +0200 mach64: consolidate refclk #1 commit f7ed807f0d82a7446ebc4acdd4e94df44a675f19 Author: George Sapountzis Date: Thu Feb 7 18:01:59 2008 +0200 mach64: cosmetic commit cda1cd198f33c26ef1b51532a2126468369743b8 Author: George Sapountzis Date: Thu Feb 7 18:01:33 2008 +0200 mach64: factor out BIOS clock parsing commit 73ff279469be9c7cbf9f533b85fcb553694ff413 Author: George Sapountzis Date: Thu Feb 7 18:00:55 2008 +0200 mach64: BIOSBase is no longer used commit caea326cc6f1932bb299f451be013651a5749ea7 Author: Dave Airlie Date: Wed Feb 6 06:36:13 2008 +1000 r300: move fragprog setup code to prepare composite for now commit 470cd6a401c6a3e8fea981a8fe97c28be3cfb81d Author: Dave Airlie Date: Wed Feb 6 06:04:13 2008 +1000 r300: remove r300 specific vertex emission Set the vertex and fragment engine to expect the mask coords. commit f65e8dfac23adfa199026765fe3a1ea08cf4da67 Author: Alex Deucher Date: Sun Feb 3 00:09:59 2008 -0500 RADEON: rework i2c handling Split out clk, data, and lock regs and masks. some cards use different regs and masks for each. For cards with ATOMBIOS, use the i2c bios table to grab the i2c data. commit a38a903debc0a50dbc73f59dc2741bbea76d2bd9 Author: Alex Deucher Date: Fri Feb 1 02:59:07 2008 -0500 RADEON: don't restore LVDS_PLL_CNTL for now seems to cause problems with resume for some users. this needs further investigation. see bug 12596 commit 5d7bea2b62c86868baf1960665a40249a43bafc5 Author: Alex Deucher Date: Fri Feb 1 02:53:22 2008 -0500 RADEON: remove redundant RADEONDisableDisplays() use RADEONBlank() instead commit 73b437ce232c94c0067a0d2f70538b6e1e8c07a7 Author: Alex Deucher Date: Fri Feb 1 02:47:06 2008 -0500 RADEON: remove unused "aspect" scaler option commit f1fb9e4daa29bc379f653f847254db1496b625fd Author: Alex Deucher Date: Fri Feb 1 02:39:18 2008 -0500 RADEON: Implement "center" mode for RMX on legacy radeons commit bcd590103e04bfdb4f12413beacebf344f07e88e Author: Alex Deucher Date: Tue Jan 29 12:12:54 2008 -0500 RADEON: update man page to reflect AGP 1x default revert commit 09348a83d06ba9d3129499c4daedd44a68771530 Author: Alex Deucher Date: Tue Jan 29 12:09:24 2008 -0500 Seems the default is more reliable... we can't win. Revert "radeon: Default to 1x again with non-v3 AGP cards." This reverts commit b653e5a628bfa4dfb168e96f93f41eb910f409fb. commit 0c26806245381b925b73ff9f3b747e3dcf0ebd6f Author: Alex Deucher Date: Tue Jan 29 10:26:48 2008 -0500 RADEON: Add new RV380 pci id bug 14289 commit ce77ed78a877023da72dbe51609aef9a07e250b1 Author: Maciej Cencora Date: Mon Jan 28 19:02:56 2008 -0500 RS690: Implement MC idle check commit b7de4ff52cfbdd85ee65000613632e21b92af24e Author: George Sapountzis Date: Sat Jan 26 19:28:05 2008 +0200 mach64: add hint for sparc and minor cosmetic. commit 09d713aa0ed6367b4457420b3c2832fe8eca9b00 Author: Alex Deucher Date: Wed Jan 23 18:05:41 2008 -0500 Revert "RADEON: adjust PAL mode hstart" This reverts commit 719a9a376e34d99032af75e3f7b002670ccb816b. This breaks TV out on some cards. commit 719a9a376e34d99032af75e3f7b002670ccb816b Author: Alex Deucher Date: Sun Jan 20 18:40:53 2008 -0500 RADEON: adjust PAL mode hstart Most people seem to get a more aligned picture with this setting commit b2db8657fb888cff6d64c6dcb182caac389776ce Author: Alex Deucher Date: Sun Jan 20 18:33:22 2008 -0500 RADEON: re-work i2c for DDC Unify the radeon/avivo paths and grab the data/clk masks from bios if available commit a43003b24022a833e604f41b2873c0350b34181c Author: Alex Deucher Date: Sat Jan 19 18:49:53 2008 -0500 RADEON: get dac2 adj values from the bios tables commit d4596c52ac9994be26e9ec2d7d57b3892c34abdb Author: Alex Deucher Date: Sat Jan 19 17:17:26 2008 -0500 RADEON: grab pll_in_min/pll_in_max from bios tables if available commit 9a0947c812d0d38d1bca6a91140ac210831a6cb4 Author: Alex Deucher Date: Sat Jan 19 13:57:50 2008 -0500 ATOM: Use LVDS edid from bios if available commit 7238258c12def8ef273e5362f716d165f720c5a5 Author: Kusanagi Kouichi Date: Sat Jan 19 15:04:21 2008 +0100 radeon: Partial fix for XVideo RGB image distortions. commit 32be3cf9d6c34e60ff8c3d6cfe9f73f1869c50e4 Author: Brice Goglin Date: Fri Jan 18 14:42:14 2008 -0500 RADEON: print the name of the output when printing the EDID commit 4ba9430ee97dbce8f77db8de6ce9b753a75e453d Author: George Sapountzis Date: Fri Jan 18 18:18:18 2008 +0200 mach64: workaround for corruption at upper-left commit possible workaround, it's reported multiple times ... commit 12c00111b68c9cf4872a424258c6f8b7247aac47 Author: George Sapountzis Date: Fri Jan 18 18:17:40 2008 +0200 use stand-alone drivers for each chip family. Do not load the ati wrapper when the user specifies the sub-driver name in the Driver line of xorg.conf. Also, for -configure cause the wrapper to fail and let each sub-driver speak for themselves. commit 24c7d134cd450f9e2cca85e4a2fc3253d250be04 Author: Alex Deucher Date: Fri Jan 18 09:50:38 2008 -0500 RADEON: make sure EXA Composite is actually disabled on XPRESS chips. commit eaf425436008092abe81208321a2b3b6698a5d79 Author: Dave Airlie Date: Fri Jan 18 20:11:57 2008 +1000 fixup register 6594 save/restore commit 2a89a31481d71a56a9930073cf99d3ae7b4290e1 Author: Alex Deucher Date: Thu Jan 17 15:08:17 2008 -0500 RADEON: use radeon_output->Flags for tracking RMX rather than mode->Flags commit 495e3119250ffb48489debbaabe560d23753cc43 Author: Alex Deucher Date: Thu Jan 17 14:56:19 2008 -0500 AVIVO: Add support for RMX Both centered and expansion modes are supported. Select using output attributes. commit 6bd510a211f25d52e74791e4a429cd2218ced541 Author: Alex Deucher Date: Wed Jan 16 18:09:49 2008 -0500 RADEON: add a message about render accel on newer cards commit 85bf3439fe2579aec48f5cd8d65a9d51b1ae8535 Author: Alex Deucher Date: Wed Jan 16 17:52:06 2008 -0500 R300: only init3d on r3xx commit dbb2ca471dfbff245b30c5055871dee0dc0e3d15 Author: Alex Deucher Date: Wed Jan 16 17:10:02 2008 -0500 R300: only enable render accel on non-IGP r3xx/r4xx chips for now commit 3c72b100bcfacee600644669b586e86cfd32754e Author: Alex Deucher Date: Wed Jan 16 16:55:42 2008 -0500 R300: First pass at render accel This first pass is pretty limited. All it currently supports is transforms for rotation. No blending yet. Based on inital implementation from Wolke Liu with additional lock-up fixes by Dave Airlie. commit 2ba3562d2af911fdd90881049599e239d27260bc Author: George Sapountzis Date: Sat Jan 12 17:11:59 2008 +0200 ati wrapper: xf86PciInfo.h is enough commit c2caeb11a97dad5379d70881c5c0fd834a8c3d54 Author: George Sapountzis Date: Sat Jan 12 16:18:34 2008 +0200 ati wrapper: add DriverRec's and use them commit 19e1b180fec6f83a474e125465bc60111c0f43e0 Author: George Sapountzis Date: Sat Jan 12 16:18:07 2008 +0200 mach64: load for both "ati" and "mach64" as driver names similar to r128/radeon commit 92f54400d5450b29b3a76d5ecc927cf0d73e156e Author: George Sapountzis Date: Sat Jan 12 16:17:47 2008 +0200 mach64: add version (need not match with ati) similar to r128/radeon commit 311ec7b6c54a50a4b8a5a445f7283da2b0b2e0f5 Author: George Sapountzis Date: Sat Jan 12 16:17:21 2008 +0200 atimisc: rename to mach64 commit 5244e235262290eab8a3546f449295c12ed8f6c7 Author: Alex Deucher Date: Mon Jan 14 16:11:09 2008 -0500 ATOMBIOS: disable the scaler by default on avivo cards Fixes bug 14001 commit 729da30c80d6545b75c8faea44754634f477cc09 Merge: 000741e 625a885 Author: Alex Deucher Date: Mon Jan 14 10:05:01 2008 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 625a885a964488da2a35065eb597a17ee57b22a9 Author: George Sapountzis Date: Wed Jan 9 17:39:56 2008 +0200 ati wrapper: use pci ids commit 48865200ca9f1daf87e52620b9f8175f88dd886f Author: George Sapountzis Date: Wed Jan 9 19:01:04 2008 +0200 radeon: remove stray include commit a5a6b873353611cb7e46e5e375f039957c7051a7 Author: George Sapountzis Date: Wed Jan 9 13:03:32 2008 +0200 radeon: remove stray _X_EXPORT commit 80c9974b6cdc0147d777df6990b3f3aacd87969d Author: George Sapountzis Date: Tue Jan 8 18:15:47 2008 +0200 r128: pci-rework conversion compile-tested only commit cd4b39403d74f314e1c2cfa4cf0e4fe542891dc3 Author: George Sapountzis Date: Sat Mar 10 23:12:15 2007 +0200 Drop symbol lists from r128, radeon, theatre. compile-tested only commit 63b4b8213fabc5a57f897b60b6eaa9f78d86e6ff Author: George Sapountzis Date: Wed Mar 21 20:24:22 2007 +0200 [mach64] Drop symbol lists. egrep LOADER\|SymLists\|Symbols src/*.[hc] not needed after server commit bca9364f3f4a2376edbcf57a34f704ce28be21ba, i.e. xserver 1.2 compile-tested only commit 000741e250e54122b0adc91694eb4bfa320a70fb Author: Alex Deucher Date: Thu Jan 10 14:49:48 2008 -0500 RADEON: clean up output handling commit 10e7636c02478b8ffe183bb0c46229ca0d6584e1 Author: Kristian Høgsberg Date: Wed Jan 9 12:47:39 2008 -0500 RADEON: fix crtc routing on r4xx cards when using atom to init DVO chip commit 3af671f5963810dbfd63abc9889b1d46b68f404c Author: Alex Deucher Date: Wed Jan 9 11:30:25 2008 -0500 RADEON: restore FP2 regs before external encoders This may fix krh's dvi problem commit 2a54c6bb09ade2ec8f998dfc1624017029d47fa3 Author: Alex Deucher Date: Tue Jan 8 18:43:54 2008 -0500 RADEON: Make default output actually work... commit fa3e2055225c27e25465fc46786da1b7574fd3cc Author: Alex Deucher Date: Mon Jan 7 01:13:09 2008 -0500 RADEON: add default outputs if no connected devices If no connected devices found at server startup, default to something so the server comes up. LVDS on mobility chips, DAC or TMDS on others. commit d972cc9237eb90b49b11f8d2bdc5b61f628911dc Author: Alex Deucher Date: Sat Jan 5 17:19:06 2008 -0500 RADEON: Fix TVStandard option commit 45656b9d5a426053da2a094de39c2690c0c6f799 Author: Alex Deucher Date: Sat Jan 5 12:00:55 2008 -0500 R128: Like powerpc, don't use VGA by default on sparc commit b8e8db4675d07e45782de0d7c67ee0fd85eaedb3 Author: Alex Deucher Date: Fri Jan 4 20:16:19 2008 -0500 RADEON: fix tvdac load detection at server start up commit 3ba7f393d0669df36848715799de8affc10a5534 Author: Alex Deucher Date: Fri Jan 4 20:00:48 2008 -0500 RADEON: further fixup for pScrn->pScreen issue the previous fix seems to cause the driver to hang on some cards. commit a0de9c0844f9e066e0f02e8cd8045bdd278e6494 Author: Alex Deucher Date: Fri Jan 4 19:48:30 2008 -0500 RADEON: improve ntsc image centering commit 03d2f25801c8a8ec15030f06008df112d07c1a2d Author: Alex Deucher Date: Fri Jan 4 18:19:54 2008 -0500 RADEON: fix compile commit 308848783ed9ae27aed7c7de6ee813d375ef495e Author: Dave Airlie Date: Sat Jan 5 09:11:55 2008 +1000 i2c: a line mux of 0 is valid commit 94d5a432f72801f821d1c4ce952baba17552659d Author: Dave Airlie Date: Fri Jan 4 17:16:54 2008 +1000 atombios: i2c lines are all done with sw so we can accept any of them. hch reported this working on his laptop with 0x7e60 as EDID for LVDS commit 2e4473b63d65801ae8ac5a8391de232b2201d958 Author: Alex Deucher Date: Thu Jan 3 15:47:50 2008 -0500 RADEON: fix crash when setting rotation in the config file xf86CrtcRotate() accesses pScrn->pScreen which is not set during ScreenInit(). This should also be fixed in the server. See bug 12129 commit c652208861bffca94f06b7f67688ce220e050bfb Author: Michel Dänzer Date: Thu Jan 3 17:54:58 2008 +0100 radeon: Adapt manpage to reality wrt AGP options. commit ab451e4b7a5423d61b57cf0646599267d8504af4 Author: Michel Dänzer Date: Thu Jan 3 17:52:39 2008 +0100 radeon: Miscellaneous warning fixes. commit 394c52273328e90518568b694ee79dc1a8dab651 Author: Dave Airlie Date: Thu Jan 3 18:56:16 2008 +1000 r500: tvout avoid doing dpms here it makes my tv mode go all crappy need to investigate further commit 1c647279f021d01e110980727b7c7dd7efae1642 Author: Dave Airlie Date: Thu Jan 3 11:55:28 2008 +1000 r600: change devices list depending on connector commit f36db6e10d32a68b32d20ae4ad02cfc0bfd1c9c3 Author: Dave Airlie Date: Thu Jan 3 11:27:47 2008 +1000 r600: fixup crash on unknown output type not sure this is 100% the correct approach commit 1accfdd590828e95e0d68a576c8ee05a06a86e43 Author: Alex Deucher Date: Wed Jan 2 19:48:28 2008 -0500 RADEON: various avivo tv-out related clean-ups commit ce34090c758ac91171cb6adb9b8a36e4adbf99cf Merge: 2180f04 30cab1d Author: Alex Deucher Date: Wed Jan 2 16:41:36 2008 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 2180f04b6fb94a638f6274cb4455d5688b324dbc Author: Alex Deucher Date: Wed Jan 2 16:41:06 2008 -0500 RADEON: preliminary support for ATOM RMX not functional yet. commit dab4dc285154d40303aadaa849b85f8e251e578e Author: Alex Deucher Date: Wed Jan 2 16:27:19 2008 -0500 RADEON: add support for ATOM component video table Component output is still not working. commit 30cab1dbebb7bdb925f2fe9f91b84183312bbbfd Author: Alex Deucher Date: Wed Jan 2 15:41:01 2008 -0500 RADEON: Make sure all old IGP chips have HasSingleDac set fix the csv file and re-gen the headers. commit e8e585651215b011e3ad07c59d0eab9107ccd8c6 Author: Dave Airlie Date: Wed Jan 2 10:14:46 2008 +1000 PLL/r600: tweak pll to pick first one found instead of keeping going commit 14aa4060ad27ecb3d40b2b17ee4cf7cc55a121dd Author: Dave Airlie Date: Wed Jan 2 09:49:44 2008 +1000 r600: fix tv-out output naming commit f65374f5e15bfd391a1838a686cd87d3bab8043d Author: Maciej Cencora Date: Mon Dec 31 09:44:34 2007 +1000 atombios: initial rs690 patches commit a674f683e6699c30664d9cd468a64de991c3fd7e Author: Dave Airlie Date: Sun Dec 30 17:43:17 2007 +1000 atombios: enable TV-out detection code - tv out works for me with this commit aa7c28cbd943bb525698515d444cb5097880e364 Author: Dave Airlie Date: Sun Dec 30 17:40:37 2007 +1000 atombios: enable support for using tv timings enable support for the atombios tv timings selection by programming the crtc with the tv timings if a tv is detected on the output commit 0bc3fd595a73e12a424571697d164a09a6a4c072 Author: Dave Airlie Date: Sun Dec 30 16:39:58 2007 +1000 atombios: add support for reading tv standard from atombios fix typo in atombios header file commit bfa22d676a6f333503104041f62222f4de9bb7d8 Author: Alex Deucher Date: Wed Dec 26 12:29:47 2007 -0500 RADEON: fix typo that broke tv load detection commit 0c99554c6fab1192f5e8595469c21b5f33e1eb4f Author: David Miller Date: Wed Dec 26 02:19:12 2007 -0500 [RADEON]: Add missing break in SCLK calculation. commit 6e0d5cc1c62fbfc1962fa0d6333f0c0a8c6327bd Author: David Miller Date: Wed Dec 26 02:17:34 2007 -0500 [RADEON]: Like powerpc, don't use VGA by default on sparc. commit 2b1fae668ddabbc72e5fc31365302ea722174df1 Author: Alex Deucher Date: Wed Dec 26 02:04:06 2007 -0500 RADEON: fix PAL tv-out Many thanks to Andrew Randrianasulu for providing me with pll reg dumps commit d736eb5732da573162c70712dc4e8b0114986702 Author: Alex Deucher Date: Mon Dec 24 12:34:15 2007 -0500 RADEON: default "IgnoreLidStatus" to TRUE Seems there are lots of busted ACPI lid status and people starting X with the lid closed. commit 653da558148cc601bc1f80253e92ef98c75ef37a Author: Alex Deucher Date: Mon Dec 24 01:11:56 2007 -0500 RADEON: restore crtc regs before VGA regs. It seems some radeons don't restore text console properly if the crtc regs are restored after the VGA regs. Thanks to Sverre Froyen for helping me track this down commit ad3325f672a241449ca239c8ee3a24b6d7703d76 Author: Alex Deucher Date: Sun Dec 23 17:18:42 2007 -0500 RADEON: Add "IgnoreLidStatus" option Generally, users that start X with the laptop lid closed want to use one or more external monitors rather than the internal panel and do not want the internal panel to be on by default. Others, it seems, want to always have the internal panel on, regardless of the lid. I can't win. Enable this option to force the latter. commit 20eedf348a527e1e0a5450bc22d7564895034a66 Author: Alex Deucher Date: Sun Dec 23 11:27:55 2007 -0500 RADEON: fix pll input setup on mac cards the function was exiting before the complete setup was finished. commit 4f2e833e8ebaba3ad85ec5314fff8fa05395b679 Author: Arkadiusz Miskiewicz Date: Fri Dec 21 18:56:34 2007 -0500 configure.ac fixes commit 2b6e8e2b8f74e94560de89693ecbc7260536591e Author: Arkadiusz Miskiewicz Date: Fri Dec 21 18:10:17 2007 -0500 RADEON: various cleanups commit 4c6f60e3b19ac55ab1255c79df03b1df5950864e Author: Alex Deucher Date: Fri Dec 21 17:33:04 2007 -0500 RADEON: clean up prototypes commit 8c761afdcb9baf1649b93449692fb9ab67bc2c80 Author: Alex Deucher Date: Fri Dec 21 16:24:49 2007 -0500 RADEON: more re-org move save/restore routines into legacy_crtc/output commit 910773d3a6c717f9d4762ea7b9ee6c3ae061781e Author: Alex Deucher Date: Fri Dec 21 15:53:15 2007 -0500 RADEON: more re-org. move XAA Mem init to radeon_accel.c commit 0631a23bd103f9b74e525da2c41304eab60c6f17 Author: Alex Deucher Date: Fri Dec 21 15:40:18 2007 -0500 RADEON: fix rn50 reversion from last merge commit 5b917797a13c6caa80028d1842a284598e874288 Author: Alex Deucher Date: Fri Dec 21 15:30:20 2007 -0500 RADEON: remove no longer used radeon_display.c commit bf14aa5f88fc3b4e69d71db5b23248b8bb2018d0 Author: Alex Deucher Date: Fri Dec 21 15:29:47 2007 -0500 RADEON: re-org legacy crtc/output code into separate files commit be7f8fd338f5af8b632f16a83db41e15d00af469 Author: Dave Airlie Date: Fri Dec 21 10:03:49 2007 +1000 fix mode bandwidth configure check commit 3f9b597dedc45379b0bc0b631f3f924c403bca48 Author: Dave Airlie Date: Fri Dec 21 09:55:42 2007 +1000 fixup clip test include handling commit 9a5b501332c0a1f10af20845af48c9ddd2ce26a0 Author: Dave Airlie Date: Fri Dec 21 09:45:55 2007 +1000 set ddc line correctly post-merge commit 3c31b96afa20913ad947e68fe0c3a662e5eafbdd Merge: eb99c3c f5e8c18 Author: Dave Airlie Date: Fri Dec 21 09:36:22 2007 +1000 Merge remote branch 'origin/atombios-support' Conflicts: src/radeon_display.c src/radeon_driver.c commit eb99c3c5c9a2249cb84920f0f225e525fc3a4144 Author: Alex Deucher Date: Thu Dec 20 18:14:38 2007 -0500 Bump for RC release commit 8d49ff1da917b7f8240267953ef6ce4ff04daecb Author: Alex Deucher Date: Thu Dec 20 01:09:57 2007 -0500 RADEON: check for xf86_crtc_clip_video_helper() in configure.ac use xf86_crtc_clip_video_helper() from the server if available. commit fb7a4e24f2da3561ef81371ca4013a4f13806e91 Author: Adam Jackson Date: Wed Dec 19 19:15:19 2007 -0500 Fix RN50 mode filtering. The old code would attempt to limit the maximum pixel size of the screen by limiting the maximum PLL frequency. This ends up confusing the PLL computation code since sometimes your maximum freq can be lower than your minimum freq. More to the point it's just wrong, maximum PLL frequency isn't the same thing as maximum pixel clock, and even that isn't the same thing as maximum scanout pixels per second. The correct thing to do is filter by the mode's effective memory bandwidth. commit c1b0b69cc50516c3b7e881b0eb46cb3cd2e9dce6 Merge: 0e66348 ce4fa1c Author: Alex Deucher Date: Wed Dec 19 11:54:50 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 0e6634870d1ab38ee8c83f6bda1ba60364997853 Author: Alex Deucher Date: Wed Dec 19 11:54:27 2007 -0500 RADEON: skip empty connectors when creating outputs commit 6afbf718c151dc3c5c59bd3136b58a93a114d798 Author: Alex Deucher Date: Wed Dec 19 11:48:38 2007 -0500 RADEON: add support for legacy radeons with DVI and no connector table commit f5e8c185001e62e744310667c2d1bd3fe6542a62 Author: Dave Airlie Date: Wed Dec 19 10:38:58 2007 +1000 more endian related fixage commit 98b247066d00db66abe91f518cd93b5c4da4cfb4 Author: Dave Airlie Date: Wed Dec 19 10:25:41 2007 +1000 fix big endian build since zaphod fixups commit ce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4 Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:34:14 2007 -0500 RADEON: fix fd leak in lid detect code commit 20568f66f9a9a60a33bd9a69ccc14a891c656836 Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:32:10 2007 -0500 RADEON: more cleanups and warning fixes commit 1496194200adbcb044ec3977367a0908262e389c Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:29:53 2007 -0500 RADEON: driver cleanups, warning fixes commit bd7206fa120495037e3fea0c920d0031d7715bf6 Author: Alex Deucher Date: Tue Dec 18 03:03:11 2007 -0500 RADEON: fix another merge error this broken legacy radeons commit 65a3ac7530e11bb7d818a988fd0cf1dde7688fa4 Author: Alex Deucher Date: Tue Dec 18 00:15:38 2007 -0500 RADEON: more PLL tweaks commit d93a0e10b8bc6e3797a3cf6c1e28ca413a7c38e4 Author: Alex Deucher Date: Mon Dec 17 20:32:45 2007 -0500 RADEON: post div tweaks for legacy radeon commit 03b8b49f6f502c45552b018fd8c44d366b2d576f Author: Alex Deucher Date: Mon Dec 17 20:20:04 2007 -0500 RADEON: fix typo from merge commit 19b9d3708852b7efe2b05249c8359dadb924dd94 Merge: cf685f3 29706ca Author: Alex Deucher Date: Mon Dec 17 20:07:32 2007 -0500 Merge branch 'atombios-support' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit cf685f37ec874f0aacd09e7c4eb0402c6daec1b0 Merge: 2a134af 44d07c4 Author: Alex Deucher Date: Mon Dec 17 20:07:07 2007 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge master and fix conflicts commit 29706ca585ebd9b7b3521521a17016322e9ecccb Author: Dave Airlie Date: Tue Dec 18 10:55:38 2007 +1000 fixup shadow setup on !r600 commit 44d07c4ccce9acb5bd21a17acb082e91f7225764 Author: Alex Deucher Date: Mon Dec 17 18:56:12 2007 -0500 RADEON: typo from last commit commit 4da3782239921eb377216d4de4a9cc5bb55e0e8a Author: Alex Deucher Date: Mon Dec 17 18:51:31 2007 -0500 RADEON: add output enable masks add output enable masks for outputs that drive more than one connector. Make sure we don't turn off an output that's driving another connector. commit 5c5d2d19b2b032a06dd333b4ecc029aac342fb93 Author: Alex Deucher Date: Mon Dec 17 18:15:55 2007 -0500 RADEON: whitespace clean-ups commit 9f1d8220315c8894a17f2cc328025dc682b0c6e0 Author: Alex Deucher Date: Mon Dec 17 18:04:05 2007 -0500 RADEON: more PLL fixes - reduce the calculation accuracy - certain LVDS panels seem to only like certain ref_divs - add pll flags to handle special cases - adjust the pll limits on legacy cards commit 2a134af01bc85de758ad83a85b23d1bba4a1a0f5 Author: Dave Airlie Date: Mon Dec 17 15:00:36 2007 +1000 r600: add shadow support to r600 driver to at least make 2d useable commit 614414611a9f246cbc74f579a79987fff97cf571 Author: Dave Airlie Date: Mon Dec 17 11:10:14 2007 +1000 radeon: cleanup pitch calculation and make r600 work again commit 79a375dbc7f323e2f551490a35f44ec36bed877c Author: George Wu Date: Mon Dec 17 10:55:36 2007 +1000 r600: might as well fix VT for R600 commit bc213ee723a45f2c396b4ed211a50f7642349973 Author: Alex Deucher Date: Sun Dec 16 14:54:00 2007 -0500 RADEON: fix sclock printout commit 4747c1f3cd4167b6a51d4864a297719ea48b9346 Author: Alex Deucher Date: Sun Dec 16 14:07:29 2007 -0500 RADEON: Make sure LVDS_EN bit is set when enabling LVDS commit a9817b2cf436a536dbc43ad77abc3bdcc53d346d Author: Alex Deucher Date: Sat Dec 15 20:51:53 2007 -0500 RADEON: clean up units in PLL calculation commit b653e5a628bfa4dfb168e96f93f41eb910f409fb Author: Michel Dänzer Date: Sat Dec 15 00:50:10 2007 +0100 radeon: Default to 1x again with non-v3 AGP cards. Seems more reliable in general than what was set up by firmware - fingers crossed... commit 6229825fa5d6715569098afbb21a40f7a2e7e6be Author: Michel Dänzer Date: Sat Dec 15 00:48:26 2007 +0100 radeon: Warning fixes. The lid detection code probably wouldn't work on other non-x86 platforms though... commit 818ccf0fd4b5879171c5f20526d5a58638f8fde5 Author: Fredrik Höglund Date: Fri Dec 14 23:56:12 2007 +0100 RADEON: Fix the vertex coordinates for transformed pictures This partially fixes transformed pictures on R100/R200 based cards. The texture still doesn't appear to be clamped correctly, but since that doesn't matter for rotations at perpendicular angles, I'm committing this now so randr rotation and reflection will work properly. commit 3cfbcf4cafbdfdb33411d16e51fb1f77cd0f93dd Author: Alex Deucher Date: Fri Dec 14 17:11:00 2007 -0500 RADEON: Fix PLL set up on certain notebooks Some LVDS panels require specific PLL dividers as specified in the bios tables. Make sure to use them if the output is LVDS. commit a84d446fd301d456bcea8f7abdc52e5a30776412 Author: Alex Deucher Date: Fri Dec 14 02:17:14 2007 -0500 RADEON: select fb_div0 for LVDS on RV410 (x700) mobility Fixes bug 8038 I wonder if desktop RV410 need a similar fix. If your x700 laptop panel has problems after this let me know. commit b3eed3d87f76779b5a62a3115f99a31484dc38e0 Author: Alex Deucher Date: Fri Dec 14 00:20:10 2007 -0500 RADEON: fix typo in previous cursor fix commit 814c6c48aebba2e45ce257289b922cd7e92caf2a Author: Alex Deucher Date: Thu Dec 13 18:45:09 2007 -0500 RADEON: rework PLL calculation - Take into account the limits from the bios tables - Unify the PLL calculation between legacy and avivo chips commit f5ac34983411e4c4f41ab1817dce582830f398fd Merge: f2b2e08 6ccf5b3 Author: Alex Deucher Date: Wed Dec 12 22:37:44 2007 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge and fix conflicts commit f2b2e0804183b52d9d3f56ad85b3552ece76c544 Author: Alex Deucher Date: Wed Dec 12 22:18:37 2007 -0500 RADEON: fix rotation on avivo chips There are still some issues, but this is better than before. commit 6ccf5b33d27218ae1c45ab93c122438ed536d8ba Author: Alex Deucher Date: Wed Dec 12 20:12:06 2007 -0500 RADEON: only enable vblanks if we want them should fix bug 13610 commit 1668f2056f56370f1b5681c13f1e14904e301216 Author: Alex Deucher Date: Wed Dec 12 19:39:08 2007 -0500 RADEON: use /proc/acpi to determine lid status Linux only commit 33a39947f7f79533cd90007a17d57b20126642c6 Author: Alex Deucher Date: Wed Dec 12 18:50:18 2007 -0500 RADEON: fix cursors when using rotation allocate separate cursor buffers for each crtc commit 9e5efdecd12092031a4aebce58747cb4a6f48f28 Author: Arkadiusz Miskiewicz Date: Tue Dec 11 23:53:03 2007 -0500 sparse fixes and cleanups from arekm commit 372bf41818fdafc6a9d2914aee3a8e359f668f02 Author: Alex Deucher Date: Tue Dec 11 14:04:58 2007 -0500 RADEON: handle HMDI properly (untested) and fix some merge leftovers commit 3c22ad977c25d5ca2811821fcac6bb8ecd79994a Merge: c9a0cee f3d2ec3 Author: Alex Deucher Date: Tue Dec 11 13:11:15 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support fix conflicts commit f3d2ec3a5ae61215c792018320158750e7aa937c Author: Alex Deucher Date: Tue Dec 11 11:57:27 2007 -0500 RADEON: rewrite PLL computation Algorithm adapted from BeOS radeon driver with some tweaks by me. Actually calulate and use the reference divider rather than using the bios default. Also, always calculate the PLL, rather than falling back to bios dividers. This should fix bugs 12913, 13590, 13533, possibly others. commit c9a0cee97ca69e8fe1e1937c7670fa903214cded Author: Dave Airlie Date: Tue Dec 11 06:03:46 2007 +1000 more zaphod fixes - some other work maybe needed commit 9b125312ab6edc585e4f5931a6a6de81e13b6acc Author: Alex Deucher Date: Mon Dec 10 13:53:15 2007 -0500 RADEON: only update crtc values when RMX is active commit 3a161e1b5d80361e318ced8da5c19e797749d693 Author: Alex Deucher Date: Mon Dec 10 00:57:26 2007 -0500 RADEON: bios PLL cleanup commit 731830297f2fc4a416882aacfb0d9b5f8ed32520 Author: Dave Airlie Date: Mon Dec 10 15:50:38 2007 +1000 fixup some warnings commit 2818e2b02ca90c9dfa50905b5311b2ae83ac3b0c Author: Dave Airlie Date: Mon Dec 10 15:43:52 2007 +1000 add more to configure.ac for using out-of-tree mode src commit cc3c36100986f9d8060bc2d433373d4806f8e730 Author: Dave Airlie Date: Mon Dec 10 15:25:56 2007 +1000 add support for building against legacy servers similiar to Intel codepaths commit 9c278cb7fa7f18d13bde053fd75221cfba9da377 Merge: 6451ea2 cc167b9 Author: Dave Airlie Date: Mon Dec 10 15:18:03 2007 +1000 Merge branch 'zaphod-lolz' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support Conflicts: src/radeon.h src/radeon_crtc.c src/radeon_driver.c src/radeon_output.c commit 6451ea2dcc4fac762442f699935864f4a8d445f7 Merge: 0d89556 5896ca4 Author: Dave Airlie Date: Mon Dec 10 15:08:42 2007 +1000 Merge branch 'master' into atombios-support commit 5896ca4097d439f59f90f397939132c061c3c364 Author: LisaWu Date: Fri Dec 7 09:45:05 2007 +0100 radeon: Use %u instead of %d for unsigned value. commit df44f8380268c27d3978c4e91d736f093322b8b8 Author: Michel Dänzer Date: Fri Dec 7 09:41:47 2007 +0100 radeon: Use gettimeofday instead of xf86getsecs. commit cc167b9bb7f1c3b8579e51e7bc2fca2f8eba6bd1 Author: Dave Airlie Date: Fri Dec 7 15:41:36 2007 +1000 disable tiling for zaphod heads commit 2ce8d192533a8c795714c5a9fb308ec74db40287 Author: Dave Airlie Date: Fri Dec 7 15:35:21 2007 +1000 don't add fboffset to info->FB it already is mapped at the offset commit 0dcd926d3092100854b3e362d6659d4950508aeb Author: Dave Airlie Date: Fri Dec 7 14:45:04 2007 +1000 radeon: bring back zaphod all is forgiven. You've whined, you've cried, you've nagged, and you're guilt trippin has made me do it... It actually wasn't as hard as I thought it would be. Still not perfect, couple of things to fix yet commit bb5ede557bf32a42eef158ff0fbcfe1c6ede098a Author: Dave Airlie Date: Fri Dec 7 14:30:32 2007 +1000 radeon: move savedreg/modereg into entity instead of info commit 64ab1cdf343a9a69e7e9e64f0bba77c54a94e9d0 Author: James Cloos Date: Thu Dec 6 15:51:12 2007 -0500 Add missing PHONY line for automatic ChangeLog generation commit 0d89556bfa41a3acbd6afe85b062e3a21f2ca057 Author: Dave Airlie Date: Thu Dec 6 19:23:06 2007 +1100 powerpc: build fixes from last merge commit dbe3d2608ecc9896db9c23b3a347b50748c51e13 Merge: 48e31cd 21ed435 Author: Dave Airlie Date: Thu Dec 6 14:22:03 2007 +1000 Merge branch 'master' into atombios-support Conflicts: src/radeon_output.c commit 21ed435398e4a398dd8a0a5d7c1d4cc45e916332 Author: Alex Deucher Date: Tue Dec 4 17:08:58 2007 -0500 RADEON: add MacModel imac-g5-isight for iMac G5 iSight Thanks to Étienne Bersac for helping to figure this out. commit 54bfd522405d9fdfb69d3a59e111ac3d63483dbb Author: Étienne Bersac Date: Tue Dec 4 14:22:42 2007 -0500 RADEON: fix typo commit 5022d006cfc06ca0395981526b2c2c94c6878567 Author: Michel Dänzer Date: Sun Dec 2 17:27:33 2007 +0100 radeon: Further XVideo fixes. * Make sure pitch constraints are always met for DMA upload blits. * RGB24 is not affected by endianness. commit 6ed55b70b23dfdc7b41103ea59c1df2bda5e41e6 Author: Kusanagi Kouichi Date: Sun Dec 2 17:18:46 2007 +0100 radeon: Fix crash with XVideo 24bit RGB images. See https://bugs.freedesktop.org/show_bug.cgi?id=13274 . commit a697b590899bb7704ec4d7ae9a9c3cbbfcaef382 Author: Michel Dänzer Date: Sun Dec 2 17:11:20 2007 +0100 Fix build against xserver master. (DE)ALLOCATE_LOCAL are gone. commit 48e31cdaa0caa21573879af5b9267773fe89176a Author: George Wu Date: Sun Dec 2 15:25:09 2007 +1000 RADEON/R600: small code cleanup commit 00b4480aa2c5d7f751e34fc964f431b90b14c8d2 Author: Alex Deucher Date: Sat Dec 1 14:18:40 2007 -0500 RADEON: add options for force TV out as detected and to set TV standard Also fix a typo in internal tv-out parsing commit 1e029fef5fe264f2ced445b80bf6070abcb84b82 Author: Alex Deucher Date: Sat Dec 1 00:58:51 2007 -0500 RADEON: move GPIO lookup to a separate function commit dcbef1ba9dfcf35c28e058832a55adf00afb472e Author: Alex Deucher Date: Sat Dec 1 00:35:25 2007 -0500 RADEON: fix typo in previous commit check gpio table revision before connector table revision commit fdce0598a2228c48c84deae1d7bebb2d7b3e979b Author: Alex Deucher Date: Sat Dec 1 00:15:34 2007 -0500 RADEON: convert atombios connector table parsing to use ATOM structs convert and add hpd info commit e3d7de9cc956aec5f940ad6db09e826b3a69523a Author: Alex Deucher Date: Fri Nov 30 20:14:42 2007 -0500 RADEON: remove unused cruft from last atom import commit d5d83411e8a884154d671aad440524507cce313e Author: Alex Deucher Date: Fri Nov 30 20:11:42 2007 -0500 RADEON: save/restore avivo crtc cursor control this should prevent the cursor from showing up on in text mode or vesafb etc. after running the driver. commit af0196f7bf0d1d5d211391149c18935d64ed2b06 Merge: d9858a2 0175b79 Author: Alex Deucher Date: Fri Nov 30 16:40:28 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge master and fix conflicts commit d9858a2b3744b99003cfb9f31b743a2d31b322e9 Author: Dave Airlie Date: Sat Dec 1 06:49:59 2007 +1000 radeon: add in pll spread spectrum workaround commit 0175b79987ef4d7b0ce8238c3bdde989e504516a Author: Alex Deucher Date: Fri Nov 30 15:37:42 2007 -0500 RADEON: rework MacModel option this brings in some previous research from Michel Dänzer, Sjoerd Simons, and myself. Hopefully, the driver will pick the correct MacModel in more cases. This also changes the default connector table for desktop Macs to dual DVI rather than DVI+VGA as that seems to be the case more often than not. External TMDS chips are handled separately now as well. Eventually we should add an option to allow the user to specify what external TMDS chip they need, but we don't have enough info yet, so we'll rely on OF to init the external chip in most cases for now. commit e1945f1f25a34310bd58ce128c8ff27ecc985618 Merge: b368b0f df7777b Author: Alex Deucher Date: Fri Nov 30 14:30:55 2007 -0500 Merge branch 'atombios-support' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit b368b0f22cd1d7ef9b4c65d82929c76f3b82d573 Author: Alex Deucher Date: Fri Nov 30 14:29:27 2007 -0500 RADEON: disable atom pll set for r4xx cards the clocks do not get set correctly in all cases. this needs further investigation. commit 5af15739571c09260750bcfd3620e16fd7fec862 Author: Alex Deucher Date: Fri Nov 30 14:24:30 2007 -0500 RADEON: small cleanup of pll code commit df7777bff40c1feabcc12d2148ad6ac5213efbb3 Author: George Wu Date: Fri Nov 30 17:49:33 2007 +1000 Add LVTMA PWRSEQ registers to fix VT switching for LVDS commit 9840a0fd4fc8c980533fcd4a02c55cd0d5634b6d Author: Alex Deucher Date: Thu Nov 29 13:27:37 2007 -0500 RADEON: add MacModel "mini-internal" for minis with internal TMDS Some macs (minis and powerbooks) use internal tmds, others use external tmds and not just for dual-link TMDS, it shows up with single-link as well. Unforunately, there doesn't seem to be any good way to figure it out. commit 017c939cf0a2b12fbdc1681cc70c28b23ae3b397 Author: Alex Deucher Date: Thu Nov 29 02:52:14 2007 -0500 RADEON: implement CLUT adjust support commit 9963b0fe01feb6dd0cb555b874a48f6fa3b255cb Author: Alex Deucher Date: Thu Nov 29 00:46:23 2007 -0500 RADEON: fix cursor offset on avivo chips commit 6c56e3d7655b17e93e8823aefe34b05291104695 Author: Alex Deucher Date: Tue Nov 27 15:27:36 2007 -0500 RADEON: switch r4xx to atombios load detection works great commit 7561242e5b79bc2798ca3aace2b79e1a36949488 Author: Alex Deucher Date: Tue Nov 27 14:50:36 2007 -0500 RADEON: re-org load detection for legacy chips commit febdcc2dccd42acbcd68ae630b7811cae5c58e8a Author: Dave Airlie Date: Wed Nov 28 05:10:57 2007 +1000 legacy: fix fb/agp read/writes commit bb8545146959b748994be055d5b3de66ec66c8b2 Author: Alex Deucher Date: Mon Nov 26 17:34:51 2007 -0500 RADEON: first pass at TV/Component video Untested and not likely to work just yet. commit e2bde646b864dca9056d9ecfe23a0d905647ea9a Author: Alex Deucher Date: Mon Nov 26 14:35:57 2007 -0500 RADEON: move crtc output source selection into atombios_output.c The function fits better as an output function and should now work with clones as well. commit 16c9be4107678a2a58d3418b7f1cc94d695ca8d6 Author: Alex Deucher Date: Mon Nov 26 14:20:54 2007 -0500 RADEON: add default connector table for avivo chips commit 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81 Author: Arkadiusz Miskiewicz Date: Mon Nov 26 12:43:30 2007 -0500 RADEON: fix backlight control on some laptops It seems the bios scratch regs are involved in backlight control on some laptops. This patch fixes the problematic laptops and doesn't seem to break the previous bios lid and output control fixes. commit dcf22aed87366f4625fb5042cb84fecccd9ceece Author: Alex Deucher Date: Mon Nov 26 11:10:03 2007 -0500 RADEON: only return status unknown for XPRESS chips this seems to cause more issues than it attempted to fix so limit it to XPRESS chips for now. commit 206e280f02324641b4fe5a1986e26adf0e021fd4 Author: Alex Deucher Date: Mon Nov 26 09:39:27 2007 -0500 RADEON: fix typo in man page commit 4e792db655dc92d2864db36b4d8f6714908de8e8 Author: Dave Airlie Date: Fri Nov 23 15:44:44 2007 +1000 r500: set default minimum pll freq commit a13b4c69c105c096dd05e6de2c5c154c9a8bcc71 Author: Dave Airlie Date: Fri Nov 23 15:25:06 2007 +1000 r5xx: cleanup pll code.. Clean the PLL code to use the radeon pll structs. commit 5d792b5673bbf4784eb0ec059221e9b57232a122 Author: Dave Airlie Date: Fri Nov 23 15:03:13 2007 +1000 radeon: fix up memory mapping issues for vt switch commit 558a2ef266c1ca517c7fb464b0ccfef83238c913 Author: Dave Airlie Date: Fri Nov 23 14:39:32 2007 +1000 fix silly spaces commit 1bda4424a7031de437acfca9c41d4b3668e36051 Author: Dave Airlie Date: Fri Nov 23 14:39:19 2007 +1000 r600: add hi agp address for mc commit 133234c31a294f24a3968a576aad2bb8b89d0f6a Author: Dave Airlie Date: Fri Nov 23 14:15:18 2007 +1000 atombios: use values from object header commit dbf6eae7e7a4bd1bc60fefdc7ab6276ed3f097c4 Author: Dave Airlie Date: Fri Nov 23 11:55:05 2007 +1000 atombios: add initial object header parsing for r600 cards commit 6b103915c11fc79d2efc43c44fc2a00c3bc64ede Author: Dave Airlie Date: Fri Nov 23 09:24:20 2007 +1000 r500: make vt switch work again for me commit d24208276aad7669feeed527dced60c76d39eae6 Author: Dave Airlie Date: Fri Nov 23 08:50:25 2007 +1000 avivo: fix typo in register saving commit 197a62704742a4a19736c2637ac92d1dc5ab34ed Author: Adam Jackson Date: Thu Nov 22 20:26:23 2007 +1000 radeon: fix openoffice/render bug on r100 chips commit 64010fc4eae8359c01e430f64252931242c91435 Author: Dave Airlie Date: Thu Nov 22 20:25:31 2007 +1000 Revert "Disable RENDER acceleration by default on some RV200 chips." This reverts commit 145da701bf4fb9c0ad9f95620b20914ae0126852. pull in fix from ajax next commit commit 145da701bf4fb9c0ad9f95620b20914ae0126852 Author: Stefan Dirsch Date: Thu Nov 22 08:38:09 2007 +0100 Disable RENDER acceleration by default on some RV200 chips. Novell Bug #341699: Render acceleration is known to be broken on at least "Radeon 7500 QW" and "Radeon Mobility M7 LW". commit e810c3ae9908cd57e95b1b091cded87cbfc12fdc Author: Roland Scheidegger Date: Thu Nov 22 02:37:55 2007 +0100 really do not set up surface regs for depth buf on r100-class igps (bug #13080) fix the if condition testing for these chips... commit 0cc7e94849c1525750fabd04cf58f2dee88372e0 Author: Alex Deucher Date: Wed Nov 21 17:06:17 2007 -0500 RADEON: reorder crtc/pll setup commit d56bde98efceaa8344e62f8e98db90c4bb642331 Author: Alex Deucher Date: Wed Nov 21 17:03:39 2007 -0500 RADEON: fix crtc to output routing Thanks to AMD for the information commit a12390c832abe423def60e39cd5a9118e5910339 Merge: d531792 e74dca1 Author: Alex Deucher Date: Wed Nov 21 02:24:48 2007 -0500 Merge branch 'atombios-support' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit d5317922f29a57b6c4127826a2fc126c5fd7c117 Author: Alex Deucher Date: Wed Nov 21 02:23:37 2007 -0500 RADEON: attempt to fix crtc to output routing The output routing seems to be based on the output ids from the bios connector tables and the connected status in the bios scratch regs. I don't fully understand this yet, but this seems to work for the most part, however changing modes can sometimes lead to a blanked head. This can be remedied by forcing a dpms off cycle. commit 81ce299bffd75540925b4c8234adf11226147165 Author: Alex Deucher Date: Wed Nov 21 01:35:44 2007 -0500 RADEON: provide clearer debugging info commit e74dca19416b13f97db9d1fc06299b988057d6a4 Author: Dave Airlie Date: Wed Nov 21 16:24:25 2007 +1000 re-enable mobility chips commit 9c5b813dd6b3492cbc9833bc59792a5cec457e51 Author: Alex Deucher Date: Wed Nov 21 01:22:42 2007 -0500 RADEON: major re-org and clean up of atom output control - use radeon_output->devices to determine output - clean up and simplify dpms and mode set commit 7634cb6b96f938bc6615eb2c49ae75aaefd04cce Author: Alex Deucher Date: Wed Nov 21 00:10:14 2007 -0500 RADEON: make naming consistent and remove some cruft commit 908748343fc9a6cdc38af0fc028c63a82766da3f Author: Alex Deucher Date: Wed Nov 21 00:05:42 2007 -0500 RADEON: store devices ids from bios for each driver output commit 3975da2ea8cb628f7f66c3f26c5dfa181cd1c532 Merge: e283aa3 295ce27 Author: Alex Deucher Date: Tue Nov 20 23:52:29 2007 -0500 Merge branch 'atombios-support' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit e283aa332adf0134243a4fa3d14263719cd8a3fd Author: Alex Deucher Date: Tue Nov 20 23:35:46 2007 -0500 RADEON: add LVDS atom support commit e4bc3e1e7bb45571367d41b5328ff2590810b0f9 Author: Alex Deucher Date: Tue Nov 20 18:09:29 2007 -0500 RADEON: enable/disable the right TMDS controller commit 3e47683ffaa44a89cda9bcddf530643befb27efa Author: Alex Deucher Date: Tue Nov 20 18:01:15 2007 -0500 RADEON: fixup for bios tables with wrong connector types commit 7412952eb1d1e9857cdab8417f7305f676900827 Author: Alex Deucher Date: Tue Nov 20 18:00:12 2007 -0500 RADEON: switch to using ATOM defines for bios device table commit 295ce277bb0a44b9539b3dba575e7aff279dc2d0 Author: Dave Airlie Date: Wed Nov 21 08:56:40 2007 +1000 add missing files for make dist noted by ndim on #radeonhd commit 20083b0695987b25e442ecbdec24f3cb6f1ac2ae Author: Dave Airlie Date: Wed Nov 21 08:53:44 2007 +1000 LVDS on r500/r600 needs some work disable mobile chips for now commit e4b8a4479ddea9b083b3a763dc0b9302e7b9a82a Author: Dave Airlie Date: Wed Nov 21 08:06:12 2007 +1000 r600: add memory controller regs from AMD commit aa88da974b97ea1e9bbb47b3494543575c09d912 Author: Dave Airlie Date: Wed Nov 21 08:01:35 2007 +1000 rs690 is !> r600 commit c8872603454e6a4ffed9fc7d9adc2c364a429608 Author: Dave Airlie Date: Tue Nov 20 22:33:39 2007 +1000 radeon: restructure pci ids to avoid effort later This uses a single file with all the pciids and parameters for radeon family and setup in it. I don't run the perl script at build time to avoid a perl dependency on build but adding pci ids should be done via the csv file with openoffice or gnumeric if possible. commit a5b34c2f1f7d5346c4489cb30e07291d1217026c Author: Dave Airlie Date: Tue Nov 20 16:37:29 2007 +1000 r600: use standard memory controller setup paths commit 4a523da5221d53f2efa49da2326500e9b0b9f14d Author: Dave Airlie Date: Tue Nov 20 15:31:11 2007 +1000 r600: get r600 to work non-accelerated. DDC still not working yet commit 80023441ba46882bc810ff3790c7148059f155f5 Author: Dave Airlie Date: Tue Nov 20 14:10:23 2007 +1000 r600: block r600 startup due to lack of memory controller info commit f6fbbacc17bf9b1073d3e993b225987fd9173182 Author: Dave Airlie Date: Tue Nov 20 13:41:55 2007 +1000 atombios: add warnings for r500 and r600 commit 45a8b083c123b820c008f04ab857a64a8facec14 Author: Dave Airlie Date: Tue Nov 20 13:37:00 2007 +1000 atombios: add all r5xx and r6xx pci ids commit 5d023e2c3c2ab44ea57ffadc9607025d602c376c Merge: 0d1e0c7 c887260 Author: Dave Airlie Date: Tue Nov 20 13:02:43 2007 +1000 Merge branch 'master' into atombios-support Conflicts: src/radeon_chipset.h src/radeon_driver.c src/radeon_probe.c commit 0d1e0c7805b3d8e56ccb49465e6b144afb7bdc51 Author: Dave Airlie Date: Tue Nov 20 09:08:04 2007 +1000 r5xx: add 71c5 for macbook pro commit d5909b30595c103bb5f42cd1704330f944bba49c Author: Dave Airlie Date: Tue Nov 20 08:15:58 2007 +1000 r5xx: cleanups after last merge commit fe2f7a09050fb7a345a1f52239f8f3c4f1053891 Merge: 744c8cb 49055d8 Author: Dave Airlie Date: Tue Nov 20 08:04:32 2007 +1000 Merge branch 'master' into agd-atom-merge Conflicts: src/radeon_cursor.c src/radeon_output.c commit 744c8cb6c293fcaa687566f52901644e699baace Merge: e258fbe e530af7 Author: Dave Airlie Date: Tue Nov 20 07:56:33 2007 +1000 Merge branch 'agd-atom' of ssh://people.freedesktop.org/~agd5f/xf86-video-ati-atom into agd-atom commit e258fbe411d255a1044b61d7ff738aee3fb5b7f4 Author: Dave Airlie Date: Mon Nov 19 16:35:05 2007 +1000 makes 2-headed cursor work commit e530af79adf51b3e95a0eca676c915a34dcbf4a7 Merge: 69e197f 52aba8d Author: Alex Deucher Date: Mon Nov 19 00:59:30 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit 69e197f2c8002aacf2587754c8d3bd63c88f85b1 Merge: 5e8940f 862dcab Author: Alex Deucher Date: Mon Nov 19 00:57:34 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit fca47ad083449f4cf9063dd970cdcebea6a7f110 Author: Dave Airlie Date: Mon Nov 19 15:53:40 2007 +1000 add z3ro's pciids commit 5e8940fa6e33d09091aa4bcf04b0f9e79596e1b8 Author: Alex Deucher Date: Mon Nov 19 00:52:38 2007 -0500 fix logic in connector table check for TVs and switch counter to symbolic names commit c19123fd9483758eb6b286c3dffcb6d79d5b1ee5 Author: Dave Airlie Date: Mon Nov 19 15:46:58 2007 +1000 add firegl card on ajaxs machine commit f02f340e466a415b4e01648ca1e323f4ce125885 Author: Alex Deucher Date: Mon Nov 19 00:39:19 2007 -0500 Don't assign a gpio for TV commit 52aba8d73189ba959f19c0437499d5e7a8829827 Merge: 862dcab 5e8940f Author: Dave Airlie Date: Mon Nov 19 15:30:46 2007 +1000 Merge branch 'agd-atom' of ssh://people.freedesktop.org/~agd5f/xf86-video-ati-atom into agd-atom commit 862dcabfe0c10751d815e5cdd7436c10c2c2db10 Author: Dave Airlie Date: Mon Nov 19 15:30:08 2007 +1000 r520: nail i2c enable/disable issue commit f3dd7f413b670eeb6b8639f6677d72050ad5fe04 Author: Alex Deucher Date: Mon Nov 19 00:19:39 2007 -0500 Don't detect TV out for now commit 94de0e22d7229ca71e18e1e849d8545d9ca7bafe Author: Dave Airlie Date: Mon Nov 19 14:47:33 2007 +1000 i2c: fix bus enable stuff commit 3f1fc7eef13ea02fa5119e9b51d499841b801f2d Author: Alex Deucher Date: Mon Nov 19 00:02:14 2007 -0500 CRTs/DFPs may share a DVI port, but TV and CV don't commit 8f84c5ad4c4af14612ea68fe6f24d0d527f00acc Author: Alex Deucher Date: Sun Nov 18 23:43:06 2007 -0500 fix typo in loop commit 384cd8f52c89d089c6559e2eedbae45641fcd14e Merge: f3f0e4e 234b607 Author: Dave Airlie Date: Mon Nov 19 14:02:55 2007 +1000 Merge branch 'agd-atom' of ../xf86-video-ati into agd-atom commit f3f0e4ec92c935c89ddb2f4241fe4335a521b439 Author: Alex Deucher Date: Sun Nov 18 23:14:01 2007 -0500 RADEON: unify connectortype handling commit 234b6073054ac7630e82781683e666b94b2f12de Author: Dave Airlie Date: Mon Nov 19 14:02:09 2007 +1000 restore avivo memory map registers at correct places commit 459a30ba511fe2fa8051380a9741fcfd9bb401ef Author: Dave Airlie Date: Mon Nov 19 13:44:38 2007 +1000 fix type for r520 agp code commit 760af92412ef0d5cc44e52e7cec11fd80c4aaaeb Author: Alex Deucher Date: Sun Nov 18 22:34:59 2007 -0500 RADEON: unify DDC line handling commit e73bf6290da20dd61798ace775999ce1cb550934 Author: Dave Airlie Date: Mon Nov 19 13:32:16 2007 +1000 add x1900xt support commit 2e37937bacd624d616b91c41006c113791ebe98d Author: Alex Deucher Date: Sun Nov 18 20:18:50 2007 -0500 RADEON: step one in output rework re-organize the output type commit 679e7a2e0d1b213524b8109193483bc9840fb116 Author: Alex Deucher Date: Sun Nov 18 17:56:51 2007 -0500 Few fixes from the last commit. Update parser works fine on r4xx. commit 1cd7cc3e6758ab1012f3ced6e958a1517f45557f Author: Alex Deucher Date: Sun Nov 18 17:44:36 2007 -0500 WIP: new atom code comples. I commented out the object parsing for the time being as using it will require some thought as to new output related data structures. commit b155fa872ee4ca5d801e942aee6e619cef104f35 Author: Alex Deucher Date: Sat Nov 17 00:34:56 2007 -0500 WIP: more new ATOM integration work commit 67db114d97abed7a607467e5d67c7b4ffa2c347e Merge: 7d06a87 ea15346 Author: Alex Deucher Date: Fri Nov 16 14:29:53 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit ea1534659de87d3d75eb20d808d039cff22cb537 Author: Dave Airlie Date: Fri Nov 16 18:46:02 2007 +1000 avivo: fixup some i2c stuff commit 7d06a8791839ce6b22e2449646832b79cebf1b21 Author: Alex Deucher Date: Fri Nov 16 02:43:00 2007 -0500 WIP: sync up with the latest ATOM bios code in rhd doesn't compile ATM commit 3614d80ceb9a7b3615b0baab3cf2dd34ed4ab464 Author: Dave Airlie Date: Fri Nov 16 17:22:39 2007 +1000 add missing hpd register commit 9a2715fda97ac0ebcb45650a416e0652aab575b8 Author: Dave Airlie Date: Fri Nov 16 17:22:25 2007 +1000 make i2c unlock/lock registers for gpios commit 20dc549fff9a4137c93ebed449d05e0c437b6bc1 Author: Dave Airlie Date: Fri Nov 16 17:01:33 2007 +1000 avivo i2c: consolidate the avivo i2c code commit 3e62730f79a13883a65a568bc821bc56055a4ab7 Author: Dave Airlie Date: Fri Nov 16 15:19:00 2007 +1000 atombios: fixup warnings in atombios files commit cca7af3c4910983f7f090792986fcbfa0dc97cfb Author: Dave Airlie Date: Fri Nov 16 15:04:01 2007 +1000 remove avivo_reg.h commit d39eb2077c6b2fc094ccd952772528eb9428c587 Author: Dave Airlie Date: Fri Nov 16 15:00:50 2007 +1000 radeon: rename a large section of avivo regs to documented names commit b7774c28dde72a205a40be78003df72eabfb9b1f Author: Dave Airlie Date: Fri Nov 16 14:48:36 2007 +1000 Add copyright headers commit 3cfcd2164b400bd0d1cb4ede8eeb01abba9d75c8 Merge: efac14e 718bfd3 Author: Alex Deucher Date: Thu Nov 15 23:25:39 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit efac14e669a0c6184f8848191eb49ffb21934ee1 Author: Dave Airlie Date: Thu Nov 15 23:17:25 2007 -0500 r5xx: fix typo for crtc offset commit e6db621c37ff615be286462f000d67a662c5c331 Author: Alex Deucher Date: Thu Nov 15 23:15:56 2007 -0500 fix INMC() and OUTMC() on !AVIVO chips WR_EN is bit 8 so don't use OUTREG8. commit 52ba3fdd1ce05983fabedff234cfaf4c60fba38d Author: Alex Deucher Date: Thu Nov 15 23:12:30 2007 -0500 atombios_dac_detect() takes care of primary vs tv dac itself commit 49055d8aff91ff12186feaf5343c8fd2f96bcba0 Author: Alex Deucher Date: Thu Nov 15 22:56:09 2007 -0500 RADEON: set proper defaults for tv dac BGADJ/DACADJ we should get these values from the bios tables, but for now use some reasonable defaults. This should fix the washed out color problems on bugs 1082 and 12844. commit 821acf38b716ab87c3d07263d6e4a139fe54803f Author: Alex Deucher Date: Thu Nov 15 22:28:42 2007 -0500 RADEON: Make sure we set the MT properly for connected status unknown commit a94123f33ec6584fbdfc4b9ecd543d1357de8814 Author: Alex Deucher Date: Thu Nov 15 22:19:54 2007 -0500 Revert "Portability fix from netbsd" This reverts commit c9264aa53bf1470ad9104d1e7c4a8ce13c49c270. This breaks damage support. See bug 13244 commit 718bfd3b61879172eee819fdab7080d5d4c0a756 Author: Dave Airlie Date: Fri Nov 16 10:37:04 2007 +1000 r5xx: fix typo for crtc offset commit e9d721c31372db045550f9562534b28f16121bb9 Author: Roland Scheidegger Date: Tue Nov 13 23:42:42 2007 +0100 ignore sometime bogus agp_mode bit from chip (bug #13190) bit is wrong on at least X700 cards with rialto pcie-agp bridge chip, should be safe to use just the bit from the bridge hopefully to make agp setup work on these cards and not adversely affect others. commit b865886d00907899297ae864358eb26d9980975d Author: Alex Deucher Date: Sun Nov 11 20:38:41 2007 -0500 bump for RC release commit 7aeb35e5ad1aed6e78a3d8565fbfbfe66232ab45 Author: Alex Deucher Date: Sun Nov 11 19:29:30 2007 -0500 fix from last commit commit 2ea95900547165e86ad3f8a41ce3331a05bad60e Author: Alex Deucher Date: Sun Nov 11 18:43:03 2007 -0500 Add full parsing support for atom bios connector table commit 7ce730828c293f0810dfdc554df48dfd76e35c49 Author: Alex Deucher Date: Sun Nov 11 12:37:01 2007 -0500 rework crtc output source setup commit d61b6c78aa7810a2f9b9e2d9d95aab4295de80ce Author: Alex Deucher Date: Sun Nov 11 11:58:17 2007 -0500 make sure i2c bus exists before using it commit 342e3e207efda42ba679731c30dfb9d5e9d5643f Author: Alex Deucher Date: Fri Nov 9 17:11:43 2007 -0500 combine outputs based on id commit 8078c299d5941460243944d55051547c1a4d3791 Author: Alex Deucher Date: Fri Nov 9 16:35:08 2007 -0500 use atom to program plls on r4xx commit 5febe2c96642f61d006abe6e8081e69d5b95adc0 Author: Alex Deucher Date: Fri Nov 9 16:24:56 2007 -0500 turn off vga control when using ext modes commit 83f170c32c08c74a9e3466ffa0e0a0606c74427b Author: Alex Deucher Date: Thu Nov 8 19:33:13 2007 -0500 add pci ids for X1550PRO commit 5cdcaba0f6e9de2d15cfcc109ab97d9fd423e3bf Author: Alex Deucher Date: Thu Nov 8 19:28:03 2007 -0500 make sure to assign gpio commit 2dcb852778301b9284a2b4906dcf64f95ed638b7 Author: Alex Deucher Date: Thu Nov 8 18:39:23 2007 -0500 pull in another of Dave's fixes commit 96273016a0bbdfa4d3a4e6275a3b09eeeadaa534 Author: Alex Deucher Date: Wed Nov 7 01:22:30 2007 -0500 fix and move crtc source set up atombios_output.c it's really more output related. commit 5c495c81cc3bcd4a38d06954243ed3bdc85bdc07 Author: Alex Deucher Date: Wed Nov 7 01:04:11 2007 -0500 add support for initing external tmds via ATOM commit 5c13d9355280e6de44ebbf8de7ea89a6b91c7388 Author: Alex Deucher Date: Wed Nov 7 00:17:28 2007 -0500 add avivo output stuff commit 68e7f5c67e2e9d2162b469ce31f452f3f89756b5 Author: Alex Deucher Date: Tue Nov 6 23:43:29 2007 -0500 more avivo updates commit 303562dfb57e13c027b2aa9289d54e547c829ff1 Author: Alex Deucher Date: Tue Nov 6 23:06:46 2007 -0500 add additional connector types commit 0d3e0735f710cb7b9505e4330997aa332f73c102 Author: Alex Deucher Date: Tue Nov 6 22:59:25 2007 -0500 First round of avivo support commit 0abfe3150ce3eed4db93ccc2975bd4622dfa54a7 Author: Alex Deucher Date: Tue Nov 6 18:47:00 2007 -0500 Add atombios files commit 20f01950e42babc308b4470df6a3c6628c932003 Author: Alex Deucher Date: Tue Nov 6 18:04:43 2007 -0500 for r4xx ATOM cards, just use ATOM for PLL while crtc timing and pll seem to work fine, output setup and routing don't seem to work too reliably with atom. AMD claims ATOM was still pretty new with r4xx so it's probably better to stick with direct programming for some things. commit 37af2f6b52c8f217b205486742a6b46a864da8ed Author: Michel Dänzer Date: Mon Nov 5 10:58:25 2007 +0100 radeon: Use indirect register access for (un)hiding the cursor. This avoids hangs that occur when touching these registers while the card is busy with some cards. commit 5659e2f1b08e44d0c4f21a403e91b4801ef78f62 Author: Michel Dänzer Date: Mon Nov 5 10:32:04 2007 +0100 radeon: Fix build warning on powerpc. commit d41d73f5f9d8baee7137e94da2c7852ea0412180 Author: Michel Dänzer Date: Mon Nov 5 10:30:23 2007 +0100 Revert "radeon: Reinstate sync in radeon_crtc_show/hide_cursor." This reverts commit 0241cac643fa1c08a45ea44f5c670b290e760ad8. Taking the DRI lock in paths called from the SIGIO handler isn't safe. For example, the SIGIO handler may be called while the lock is held by an AIGLX context, resulting in deadlock. See e.g. https://bugs.freedesktop.org/show_bug.cgi?id=13005 . commit 78a3eabff382e8ebe33df2039076fb083bcc361b Author: Alex Deucher Date: Sun Nov 4 14:11:26 2007 -0500 WIP: get ATOM crtc stuff working on r4xx commit 5e9ebd8e496b72b051053d637c63b2956b7861d3 Author: Alex Deucher Date: Sat Nov 3 20:46:17 2007 -0400 Initial support for r4xx - add r3xx/r4xx MC access macros and functions commit c106075ccb81ca2ee4894743e676fd37653c8dce Author: Alex Deucher Date: Sat Nov 3 18:29:20 2007 -0400 More of Dave's ATOM init code. commit e18f5d61806b445ad77d93e258fbce9422b52bb6 Author: Alex Deucher Date: Sat Nov 3 18:20:55 2007 -0400 Initial integration of Atom code and some of Dave's code. ATOM builds, but it's not hooked up yet. commit aaafc6a8f33d4736c37c43d3fd5e43085a2590fb Author: Brice Goglin Date: Sun Oct 28 21:10:32 2007 +0100 Fix typo in 'disposing cursor' Bug #12984. commit a5c55c418319c1315ad73c305ef48b44fe1d9580 Author: Alex Deucher Date: Sat Oct 27 19:46:11 2007 -0400 RADEON: disable FP DETECT for DVI. These bits don't seem to be reliable or routed right in all cases. commit 49cf7cb3db36ce7734f7e314a040a240191d6477 Author: Alex Deucher Date: Thu Oct 25 21:23:09 2007 -0400 RADEON: Fix IgnoreEDID option commit 70bbc0cfe699588f8ae4123efca0e1baffc91000 Author: Alex Deucher Date: Thu Oct 25 20:56:11 2007 -0400 RADEON: clean up mode handling and improve reliability of DDC - Reduce the number of times we do DDC and don't skip the magical GPIO dance when doing DDC. - If no DDC modes are found, add the screen modes commit 1a4f590c2ac071f0c348f38e9f26fa6093722453 Author: Alex Deucher Date: Thu Oct 25 19:25:36 2007 -0400 RADEON: document DefaultTMDSPLL option commit 2d26e0d0bcf25e210dc7771e76638dcfafcc2356 Author: Alex Deucher Date: Thu Oct 25 19:18:18 2007 -0400 RADEON: Add driver option to force TV DAC load detection on commit a9306b7986467c0794c91625ad2ece597b718462 Author: Alex Deucher Date: Thu Oct 18 20:06:58 2007 -0400 RADEON: fix possible crash in radeon_crtc_mode_set() when radeon_crtc_mode_set() is called during ScreenInit(), we don't have pScrn->pScreen yet. commit 115b4b65ef679a46d90b7fc8ac22ace37038b3fc Author: Alex Deucher Date: Wed Oct 17 20:25:47 2007 -0400 RADEON: Remove LVDSBiosNativeMode Option Shouldn't be needed any longer as I've finally sorted out the LVDS issues due to the crtc setup. commit f2eb5c1cc69a4f7b0754ec6b2efde4fa1650ab6d Author: Alex Deucher Date: Tue Oct 16 18:54:28 2007 -0400 RADEON: finish fixing LVDS/RMX For panels, both the mode and crtc values need to be updated based on the native mode timing. This shoudl fix any remaining problems with RMX. commit 93561688087493fccb7ac387d728feec61212180 Author: Michel Dänzer Date: Tue Oct 16 10:57:06 2007 +0200 radeon: Handle 64 bit PCI resource bases better. commit 08945fc8a14ba57e32350e85daa3354619e9e72e Author: Alex Deucher Date: Mon Oct 15 21:12:46 2007 -0400 RADEON: allow the user to set any tv standard allow the user to set any tv standard rather than limiting it to what the bios says is supported. commit 571548b2b95ce289f26a77c11deb6266f0b18516 Author: Alex Deucher Date: Mon Oct 15 20:33:56 2007 -0400 RADEON: use native timing for RMX RMX should work again with native timings after the previous patch. commit 2f87bff293a343b40c1be096933a5ae126632468 Author: Alex Deucher Date: Mon Oct 15 20:06:28 2007 -0400 RADEON: Fix subtle change in crtc reg init At some point we changed how hsync_wid and vsync_wid were clipped. Previously we used the field size as a mask when building the register. This got changed to setting the value to the field size if it was greater. this probably explains number stange mode bugs. commit fd5bb7bb5e968127b87102320eccc1222f205e5a Author: Michel Dänzer Date: Sat Oct 13 18:56:43 2007 +0200 radeon: Improve detection of default value for Option "MacModel" on Linux. * Detect all PowerBooks with dual link DVI (according to developer.apple.com) and both Mac Mini G4 models. Other PowerBooks and iBooks should be covered by the 'detected as' line in /proc/cpuinfo. * Give specific instructions for overriding and reporting incorrect detection. * Only perform detection when Option "MacModel" isn't present with a valid value. * Close /proc/cpuinfo file handle when done with it. * Coding style cleanups. commit fbf121add5584049627f07345fc502b2aefc88ce Author: Eugen Dedu Date: Sat Oct 13 16:51:58 2007 +0200 radeon: Derive default value of Option "MacModel" from /proc/cpuinfo on Linux. commit 5db3afaa1fdb69d382ac769ef40191a4b964d28e Author: Alex Deucher Date: Thu Oct 11 20:25:20 2007 -0400 RADEON: return status unknown for flaky chip/connector combinations This should at least get something on the screen. XPRESS chips, I'm looking in your general direction... commit 1148d332f52f3780897aae3fcd5d6a67687c42cd Author: Alex Deucher Date: Thu Oct 11 19:09:45 2007 -0400 RADEON: fix potential crash in mode handling commit 905b19df33d6f912336b65895e97775ffec07728 Author: Alex Deucher Date: Thu Oct 11 18:55:08 2007 -0400 RADEON: small cleanup from last commit commit 7afd04c1e4ffa6e4e5ba08ae90ba002237dc282b Author: Alex Deucher Date: Thu Oct 11 00:16:45 2007 -0400 RADEON: tell the bios not to muck with the hardware while the driver is active by toggling the appropriate bios scratch regs you can tell the bios not the touch the hw while the driver is active. This should prevent the bios from scrambling the hardware when users open the lid or toggle bios hotkeys. fixes bug 12567 commit 1b231d28fdda5cdc44bb9d2075d4edfd8f17e21f Author: Alex Deucher Date: Wed Oct 10 21:54:46 2007 -0400 RADEON: attempt to detect lid status on legacy bios I'm not sure how reliable this is. The lid closed bit only seems to be set if the lid is closed at boot so LVDS will default to on if you restart X with the lid closed after boot. commit 47ef583b993607bc3a372dd125c6e5228c4ec7bf Author: Alex Deucher Date: Wed Oct 10 19:35:31 2007 -0400 RADEON: more XPRESS connector table hacks Seems XPRESS desktop chips with DVI-D list a proprietary connector type rather than DVI-D. try and do the right thing. Also, XPRESS chips seem to include connector type 8 and ddc type 8 which are unknown at this time. commit c9264aa53bf1470ad9104d1e7c4a8ce13c49c270 Author: Joerg Sonnenberger Date: Tue Oct 9 23:18:29 2007 -0400 Portability fix from netbsd commit 80eee856938756e1222526b6c39cee8b5252b409 Author: Matthieu Herb <> Date: Tue Oct 9 16:17:50 2007 -0400 RADEON: fix console restore on netbsd Include the mode restore bugfix from monolithic Xorg, that is derived from the version in xsrc which in turn was provided by Matthieu Herb over 3 years ago on the XFree86 lists. Suggested by various developers, hold-back due to the working state in xorg-server 1.1.1. Tracing down the exact change showed that the changed default color depth made this issue a lot more prominent again. Discussed with Eric Anholt. commit 547fef4c6382f8a4951c086ee531b804cba31075 Author: Lars Weiler Date: Tue Oct 9 16:10:34 2007 -0400 include stdint.h to fix the build on some platforms fixes bug 12733 commit ddec5783103045084a66a34d71326cc6e4a3f598 Author: George Sapountzis Date: Tue Oct 9 13:27:27 2007 +0300 theatre compiles with pci-rework. commit 051435610a66735fd455bbb526fa294fcfe8c0b6 Author: Alex Deucher Date: Sun Oct 7 19:39:47 2007 -0400 RADEON: still more LVDS fixes Seems some laptops need the native mode from the bios for LVDS while others seem to prefer a CVT mode. Add an option to pick the preferred mode. The default it to use the bios table timing. commit 0b03a73b7dcb4aa192c42f2a4c842d324c358122 Author: Dave Airlie Date: Sat Oct 6 20:11:19 2007 +1000 radeon: add support for DDC type 6 thanks to arekm on xorg-devel for testing/feedback commit 83d7506a603889b6c18736cff9b2cd3296c95c84 Author: Alex Deucher Date: Fri Oct 5 20:25:04 2007 -0400 Bump for RC release commit fe66cc4e02a52e1d014ae5de192c65e8abd7f58a Author: Tormod Volden Date: Fri Oct 5 20:10:55 2007 -0400 RADEON: rename to PCI_CHIP_RS485_5975 everywhere RS482_5975 is actually RS485. see bug 12048 commit 314e8fdbe5369e4c1786d176d03d0d2a046f25d5 Author: Tormod Volden Date: Fri Oct 5 20:05:54 2007 -0400 RADEON: Disable DRI by default for RS482 cards fixes bug 12048 commit abbafe6db7c0d24efc61a05950d4214c00d3f043 Author: Michel Dänzer Date: Thu Oct 4 11:33:09 2007 +0200 radeon: Fix compile warnings. commit 1110957ba703475847b8e72023c6edcbd1068aef Author: Michel Dänzer Date: Thu Oct 4 11:32:48 2007 +0200 radeon: Fix for pci-rework. Surprisingly easy, thanks to George's pci-rework changes. commit 7addf41885ec5658f531624a9c24ea5bd7d22d19 Merge: 3a958ba 78c6bd3 Author: Michel Dänzer Date: Thu Oct 4 11:06:08 2007 +0200 Merge remote branch 'origin/pci-rework' commit 3a958ba136c3fae5a4ddd56373ac7cd47046f10e Author: Alex Deucher Date: Wed Oct 3 22:59:14 2007 -0400 RADEON: remove some cruft commit b6bda79f72df5e5bf9c6b71fa3298e765da506bd Author: Alex Deucher Date: Wed Oct 3 22:56:27 2007 -0400 RADEON: more fixes for single crtc chips commit 5f5c4e6ad61c45c24f1443b91b4bc5375efdebc0 Author: Alex Deucher Date: Wed Oct 3 22:46:21 2007 -0400 RADEON: remove RADEONSaveMode() It's only called by RADEONSave(), so just move its contents into RADEONSave(). this mirrors RADEONRestore(). commit bfede412b3a3cd11769a580b167c528734146096 Author: Alex Deucher Date: Wed Oct 3 22:19:16 2007 -0400 RADEON: minor fixes for external TMDS commit 597dffce9bdc200003d0be880235258386a0bdd7 Author: Alex Deucher Date: Wed Oct 3 21:43:08 2007 -0400 RADEON: final fix for RMX/LVDS It seems that on quite a few laptops the LVDS H/V timing from the bios tables are way off or just doesn't work period. Either we are using it wrong or we need some additional checks when we parse it. Only the dot clock seems to really matter, so use cvt modes and update the dotclock. This seems to work correctly in all cases. commit cc0c2d8e61600652b1f9cb3dc49db2ef62b1e40d Author: Alex Deucher Date: Wed Oct 3 00:59:37 2007 -0400 RADEON: Finally sort out LVDS modes - The panel timing from the bios tables is for the crtc, not the native panel mode, so add cvt modes for the panel and fix up the crtc values in mode_fixup(). - rename and reconfigure RADEONValidateFPModes() to what it really does: add screen modes. I suppose for backwards compatibility we ought to add the screen modes to every reasonable output, but everyone should really use xrandr or an output monitor section to add custom modes. Hopefully this will go away at some point. commit 0ca184c3c35032df39ea7ce5d2d4aba1a97b6426 Author: Alex Deucher Date: Tue Oct 2 19:38:18 2007 -0400 RADEON: fix RADEONInitDispBandwidth() on single crtc cards Should fix bug 12490 commit a5fb2a5d54cdd562a97881cdea1a4af35b483aab Author: Dave Airlie Date: Mon Oct 1 08:48:27 2007 +1000 radeon: fix powerpc build commit 22519fde1e002f28d6036d448fcd18452d00f1bb Author: Alex Deucher Date: Sun Sep 30 13:11:20 2007 -0400 RADEON: add support for ext tmds table and ext tmds chip init This probably won't work on all chips as the various gpio lines seem to need special magic to to actually talk to the i2c slave chips. commit dcc376e2d2a13329dd03f1bc4b471329757a6f5f Author: Alex Deucher Date: Wed Sep 26 23:27:38 2007 -0400 RADEON: remove cruft commit 99ceaefa18c6e07b55106cca0ea8996fa73667be Author: Alex Deucher Date: Sun Sep 30 12:02:54 2007 -0400 RADEON: more work on LVDS mode validation and fixups Hopefully this will fix up the weird mode issues with LVDS and native and RMX modes, but I can't seem to get quite the right combo to fix everyone. commit d808781d48adf01e80b5bb476bae2d2f599030f1 Author: Dave Airlie Date: Fri Sep 28 14:50:42 2007 +1000 rc410: disable DRI by default due to it not working commit 4d9f944e40c6b9ac7e80428dff49c6e83fda1d8f Author: Michel Dänzer Date: Thu Sep 27 17:50:15 2007 +0200 radeon: Fix build on little endian platforms. This was accidentally broken when moving away from using pixmap data pointers directly. commit 5902e913010a2fb0c17efe01f9aade73f9646f16 Author: Michel Dänzer Date: Thu Sep 27 12:53:34 2007 +0200 radeon: EXA pitch fixes. The combined pitch/offset registers only support pitches up to 16320 bytes. With EXA >= 2.3, set the maxPitchBytes field accordingly. With older versions, limit maxX such that the pitch of 32bpp pixmaps doesn't exceed the limit. Also check the limit in RADEONGetOffsetPitch just in case. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12551 . commit ca728973bce504e03bf6228d18287906c35eaa3f Author: Michel Dänzer Date: Thu Sep 27 11:14:21 2007 +0200 radeon: Don't use pixmap data pointer directly with EXA. Fixes segfault with current xserver master without AccelDFS. commit 21593d04d222b05dbba9abd31eaa3bfb91d999b6 Author: Alex Deucher Date: Mon Sep 24 23:01:20 2007 -0400 RADEON: more clean up of mode code also print out LVDS mode info from bios for both legacy and atom bioses commit 22cccb99d762567757d3fd38795f71e943f1faf9 Author: Alex Deucher Date: Mon Sep 24 00:10:01 2007 -0400 bump for RC release commit fad9e7b00de051f632000eb2304ac23a524f7c8e Author: Alex Deucher Date: Sun Sep 23 23:43:26 2007 -0400 RADEON: Rework LVDS mode validation The old validation code wasn't really well suited to randr. This fixes several issues: - missing display size for panels with edid - broken duplicate modes commit bf9674b9df351108e069d037ec10869a4154a881 Author: Alex Deucher Date: Sun Sep 23 15:01:34 2007 -0400 RADEON: properly set default RMX types commit b27135bce8b41d69290613b440a338b0a7fe0200 Author: Alex Deucher Date: Sun Sep 23 14:44:38 2007 -0400 RADEON: fix up LVDS handling for r3xx and newer commit d5cf268be2c9b3e320d7101f5213f7d5609b6308 Author: Alex Deucher Date: Sat Sep 22 18:31:51 2007 -0400 RADEON: Fix crash when Xv window is outside of either crtc commit 8aca0ca6be7122e0ece20985a1862553a1b225c0 Author: Alex Deucher Date: Sat Sep 22 17:56:50 2007 -0400 Revert "RADEON: fix crash when Xv window is outside of either crtc" This reverts commit 9109e62e3be7f96b41b534ab517fdf1baf458806. This breaks ABI. better fix to come. commit d6e1d9be1cd5786a24ed4bb8e45fa7e04df56622 Author: Alex Deucher Date: Sat Sep 22 16:14:06 2007 -0400 RADEON: Don't make the entity as shareable This should prevent people from mistakenly trying to run zaphod mode commit 81114af1cdddc0b10d076f2e38c7a00c1223cc48 Author: Alex Deucher Date: Sat Sep 22 15:51:23 2007 -0400 RADEON: preliminary support for mac mini Option "MacModel" "mini" may not be 100% correct yet commit 6c482e453bc8156886294d0c1b8f3f1b3dcf4b36 Author: Alex Deucher Date: Sat Sep 22 15:11:20 2007 -0400 RADEON: Fix RMX on LVDS LVDS + RMX doesn't seem to like having the crtc values tweaked. commit 9109e62e3be7f96b41b534ab517fdf1baf458806 Author: Michel Dänzer Date: Sat Sep 22 14:19:10 2007 -0400 RADEON: fix crash when Xv window is outside of either crtc Should fix bug 12175 commit d2ce4a5003ce1291ea2327b2c00a0b24408fe26c Author: Alex Deucher Date: Sat Sep 22 10:41:55 2007 -0400 RADEON: RMX updates - add option to turn off RMX - turn off RMX by default on DVI - add infrastructure to support more RMX modes commit f95b9ab729376083bf0d12987ee260ec2aba721e Author: Alex Deucher Date: Fri Sep 21 00:12:37 2007 -0400 RADEON: remove more old cruft commit 5a6f74103f0ec0d451d0e2573442efe5922848af Author: Maciej Cencora Date: Thu Sep 20 23:56:08 2007 -0400 RADEON: fix video in on RV380 (tested on X600 VIVO) commit c72a365386e19f9257db041d44b09ad499cc9f6a Author: Alex Deucher Date: Thu Sep 20 23:49:57 2007 -0400 RADEON: fix up dvo support (still no external chip init) commit 5e4d98470b6412a686883c554e7eb7badbe78c4d Author: Alex Deucher Date: Thu Sep 20 23:22:48 2007 -0400 RADEON: round 3 on the PLLs. should fix the LVDS issues commit c5e2a2f09af807006c7ea493a8e90ff77abe207c Author: Alex Deucher Date: Wed Sep 19 19:58:28 2007 -0400 bump for RC release commit 46ff78b9f010ca24178d4363761be00eb3ecb632 Author: Alex Deucher Date: Wed Sep 19 19:49:58 2007 -0400 RADEON: add default connector setup for single crtc chips commit 509ca0cb0e1cde905b47db2bbac6f2a58523b279 Author: Alex Deucher Date: Wed Sep 19 19:41:17 2007 -0400 RADEON: fix external TMDS parsing in legacy bios connector table commit 5a59547ef7e986c9613023d941c3354cd476faf1 Author: Alex Deucher Date: Wed Sep 19 19:28:09 2007 -0400 Revert "RADEON: initial pass at external TMDS support" This reverts commit 4000a710c93dd2d82891e4082bc7fa922ba9c5f4. This needs to be reworked and needs more soak time. so revert for now. commit dc333884c540d536bffe51a5ebfaf1822af6a91c Author: Alex Deucher Date: Tue Sep 18 22:23:12 2007 -0400 RADEON: fix plls again previous fix seemed to break other chips. Lets see how this goes. commit 271e541088f455d1cfedff87e88c9a4fdbdbe424 Author: Alex Deucher Date: Tue Sep 18 22:12:31 2007 -0400 RADEON: Remove more mergedfb cruft commit 8ae69c496eba701e744cca0605f73242673f7b3f Author: Alex Deucher Date: Tue Sep 18 20:12:21 2007 -0400 RADEON: adjust pll restore some chips seem to be pickier than others. fixes bug 12467 commit 8a84dc8ee260716026fa661a6dced2000621efa2 Author: Michel Dänzer Date: Tue Sep 18 11:53:39 2007 +0200 radeon: Remove declaration of unused variable. commit 2fbbd9c5f0ec27e72780e8b054bc59502f1e5651 Author: Alex Deucher Date: Tue Sep 18 00:45:56 2007 -0400 RADEON: note that MergedFB support has been replaced with randr 1.2 commit 81b708dbd35c29bf2d67e8c655af97b60e61498b Author: Alex Deucher Date: Mon Sep 17 23:54:03 2007 -0400 RADEON: turn off load detection on tv dac by default it's just too unreliable and even when it is most people don't want it. enable it via output attribute or force the outputs on with xrandr commit c3ab53159d42157985a25e9125eaa5362273b73d Author: Alex Deucher Date: Mon Sep 17 23:28:51 2007 -0400 RADEON: XPRESS connector tables are crap besides specifying the pimary DAC (which they don't have), most seem to specify DDC_CRT2 for DDC, which does not seem to ever work. Some have reported success with DDC_MONID so lets give that a try. commit 1fafa970fa78ddea29a8804b6cd0aea52e4fa2e1 Author: Alex Deucher Date: Mon Sep 17 23:10:13 2007 -0400 RADEON: ignore edid digital bit on analog ports Some monitors have this bit set even on analog ports commit 4000a710c93dd2d82891e4082bc7fa922ba9c5f4 Author: Alex Deucher Date: Mon Sep 17 23:04:17 2007 -0400 RADEON: initial pass at external TMDS support - Based on Dave Airlie's initial work and the dvo support in the intel driver. - Only sil164 is supported at the moment. - Once we get some testing and such, we ought to move the dvo drivers out of the drivers so they can be shared among all drivers - Doesn't seem to work on my card (r4xx ATOM) card ATM - Legacy bios table programming sequence not implemented yet commit 38515d402555eaa61c686d42973e59f659b07466 Author: Alex Deucher Date: Sat Sep 15 11:39:47 2007 -0400 RADEON: don't restore bios scratch regs Leave them as programmed by the bios fixes bug 12424 commit 78c6bd305f2ea70629d1dda3c0c48c067451f5fb Author: George Sapountzis Date: Mon Sep 10 19:00:16 2007 +0300 [mach64] Revert to multiple mappings per BAR. libpciaccess added subrange mappings and mtrr handling. compile-tested only. commit 0241cac643fa1c08a45ea44f5c670b290e760ad8 Author: Michel Dänzer Date: Sat Sep 8 00:22:40 2007 +0200 radeon: Reinstate sync in radeon_crtc_show/hide_cursor. Make sure the DRI lock is held though, as these can be called asynchronously. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12245 . commit 49933e2f7d590811f2bc8c0d51a09f3b7f14845e Author: Alex Deucher Date: Sat Sep 1 12:23:07 2007 -0400 RADEON: automatically disable tiling if requested virtual desktop exceeds surface limits Also, tweak default desktop sizes and add some informational messages commit d49a60bc939c9f3e9d57c23e44263f5bb52f09fb Author: Sjoerd Simons Date: Thu Aug 30 11:40:13 2007 +0200 radeon: Fix Option "MacModel". commit 2b860726fff058623e0e8e1b0aca092c246875ce Author: Michel Dänzer Date: Thu Aug 30 11:38:28 2007 +0200 radeon: Don't build currently unused RADEONSavePalette. commit 12187a6aa93049c002a4171344d03c713f7f3c5d Author: Alex Deucher Date: Wed Aug 29 23:11:30 2007 -0400 RADEON: Add quirk and connector tables for apple laptops As far as I can tell there are three apple laptop variants: ibook - LVDS, TVDAC drives TV or VGA via dongle powerbook-duallink - LVDS, TV, External TMDS/Primary DAC powerbook - LVDS, TV, Internal TMDS/Primary DAC use Option "MacModel" "" to enable the appropriate quirks where string is one of the above We can't yet init the external TMDS directly, but if OF inits it, it should work. This should also fix bug 9955. Please test! commit 61c1fdaa8553581944f78a11e6f9aa76163a468a Author: Alex Deucher Date: Tue Aug 28 23:47:19 2007 -0400 RADEON: add option to force tmds pll to default table Also rework the tmds pll output attribute handling a bit commit 0d9087bc60bb95c770b899cfed29699c02bdac49 Author: Alex Deucher Date: Tue Aug 28 23:08:20 2007 -0400 RADEON: remove some cruft forgotten in a previous commit commit 6ff0645ecfe65727e8ef5d5e6215b4e03078e1a5 Author: George Sapountzis Date: Tue Aug 28 15:37:11 2007 +0300 [mach64] Convert to pci-rework, keeping source-code compatibility. It still uses the old probe method though, this is due to the ati wrapper. commit 7b38d9a1209f87255e5bb0aefe46a363ce4fb6ef Merge: 2e3d43a 673f799 Author: George Sapountzis Date: Tue Aug 28 16:01:12 2007 +0300 Merge branch 'master' into pci-rework Conflicts: src/ati.c commit 673f799729824f4439dd5f681f75dd5aab50947f Author: Alex Deucher Date: Tue Aug 28 00:42:30 2007 -0400 RADEON: Update tv attributes immediately commit ad6f7ad1b2ccae0bc0a416b9b0ca22709c9d5199 Author: Alex Deucher Date: Tue Aug 28 00:08:41 2007 -0400 RADEON: remove the "default" tv_standard option commit 17e0f9e6cbfdb115034d327bd34d46339fd632b7 Author: Alex Deucher Date: Mon Aug 27 23:59:03 2007 -0400 RADEON: enable load detection for tvdac if output count for tvdac < 2 commit 42839fb5a8584196e7b18375bff6c426ed0347d9 Author: Alex Deucher Date: Mon Aug 27 23:44:13 2007 -0400 RADEON: make load detection an output attribute for analog outputs Since TV/VGA/DVI-I can share the TV DAC, we often get false detection of all inputs that share that DAC. Make load detection an output attribute. Enabled by default on primary dac and on cards where tv dac is (usually) dedicated to tv (non-IGP mobilities). commit a5a1055d64ab4fa16bfb03a412ae6c4fe69ff65d Author: Alex Deucher Date: Mon Aug 27 22:42:22 2007 -0400 RADEON: make tmds pll an output attribute sometimes the bios tmds plls are busted for certain monitors. sometimes the dirver tables are. Let the user pick at run time. commit a12e4aa01bf1c5723c3c791ff9bdc26eef21d5ea Author: Alex Deucher Date: Sun Aug 26 18:51:29 2007 -0400 Bump for new release commit d43596e5f5d7c60f96b57bc3e743a9b40eb7109d Author: Alex Deucher Date: Sun Aug 26 18:07:50 2007 -0400 RADEON: Fix rotation. works now commit 47eb3327c258bb0cfd9a1d5677624b9988a39057 Author: Alex Deucher Date: Sun Aug 26 15:43:22 2007 -0400 RADEON: minor tweak to tv out commit f36720377737210c985b196d9a988efdd767f1c7 Author: Alex Deucher Date: Sun Aug 26 14:13:06 2007 -0400 RADEON: fix depth 16 palette for real this time commit f2b13f1457bf860b075310d3962254be0ed7bea3 Author: Alex Deucher Date: Sun Aug 26 13:27:19 2007 -0400 RADEON: Only update pixclks_cntl when updating tv routing No need to re-set all of the pll2 stuff commit 5d044b9f74c7aa7e12f2822896fed881e2ca9d19 Author: Alex Deucher Date: Sat Aug 25 21:03:08 2007 -0400 RADEON: fix crtc clipping for Xv commit 3fd2d22a02812d5f86cdc1c9503f48362b0c362b Author: Alex Deucher Date: Sat Aug 25 17:37:35 2007 -0400 RADEON: remove fbdev option FBDev support is currently broken, and it not really compatible with randr commit 3469e1aa08792890fa6a5c72da52a1992a0b382c Author: Alex Deucher Date: Fri Aug 24 20:42:13 2007 -0400 RADEON: add extra green data in depth 16 Apparently some radeons need this? commit 71f650d1bc432514516f7ac64a5e8a54c5227881 Author: Michel Dänzer Date: Fri Aug 24 09:21:39 2007 +0200 Require xorg-server >= 1.3 for RandR 1.2. commit d7230939f523610c57f92bdfc72966bdbc6f1070 Author: Michel Dänzer Date: Fri Aug 24 09:21:14 2007 +0200 64 bit warning fixes. For printf vs. CARD32, use %u or %x and and a cast to unsigned. commit 91c45fedfd155a153dcd2c3f3e30986bfbd44e6f Author: Dave Airlie Date: Fri Aug 24 15:05:01 2007 +1000 radeon: don't disable dac if either tv or vga is using it On my rs480 I had to vt switch to get hotplug VGA working due to the tv-out code turning off the dac when the vga code was actually using it. commit 056ca6bb5adf974290693b55de6cd6880d2132d1 Author: Alex Deucher Date: Thu Aug 23 20:19:47 2007 -0400 RADEON: NONE to None to match other port info commit 13fd53286bdda2c55683bdb5f63e7d345f6c63ef Author: Alex Deucher Date: Thu Aug 23 20:17:51 2007 -0400 RADEON: set (hopefully) reasonable default max desktop sizes Based on the amount of vram. We really need ttm... commit 53bad86ca48a9b6529c1f0989ee568d9d48841c6 Author: Alex Deucher Date: Thu Aug 23 19:24:59 2007 -0400 RADEON: clean up the logic in crtc_mode_set() commit 4712dedea225e9e07177aebda2ffc6290d1f53c7 Author: Alex Deucher Date: Thu Aug 23 18:51:34 2007 -0400 RADEON: Always assume LVDS is connected Not all bioses seem to set the right scratch bits. If we have LVDS (via bios table or otherwise) assume it's connected. commit b0f170c5f736ecba1a5899d602c4173fe9b9b1fa Author: Michel Dänzer Date: Thu Aug 23 12:55:40 2007 +0200 radeon: Remove unnecessary #include . commit ac54c0e4360099697755d14b1030def73d8235b0 Author: Michel Dänzer Date: Wed Aug 22 14:33:59 2007 +0200 radeon: Warning fixes. commit de26e406f52b3b13f03eee2b8023924ec6406f0a Author: Alon Ziv Date: Mon Jul 30 22:47:59 2007 +0300 radeon: Sane handling of timeouts in WaitForVerticalSync(2). RADEONWaitForVerticalSync() and RADEONWaitForVerticalSync2() need to wait for a timeout specified in milliseconds; looping around usleep() causes the timeout to be unnecessarily long, as the OS may sleep longer than requested (on Linux the minimum actual sleep value may be several ms). The new logic uses gettimeofday() in the loop to see when the (absolute) timeout has arrived. Signed-off-by: Alon Ziv commit c66e5de26ae93caa368213f3cce139aacec955d2 Author: Sascha Sommer Date: Thu Aug 23 12:11:51 2007 +0200 radeon: Round down RMX stretch ratios. Fixes issues with RMX scaling, see https://bugs.freedesktop.org/show_bug.cgi?id=8983 . commit 633c1fff10a3be4c9f48c1995e330d60bf6abbb2 Author: Michel Dänzer Date: Thu Aug 23 12:11:41 2007 +0200 radeon: Sync pages when enabling page flipping with EXA as well. Exclude the DRI window(s) though to avoid scribbling over 3D rendering. commit 4f8010ce22043c0f8d60c0f49d270ce98c9d2466 Author: Michel Dänzer Date: Thu Aug 23 12:11:12 2007 +0200 radeon: Don't synchronize DRI windows between pages when possible. commit 7b527054a7c81d1d1dbc79d41b9e53064dab68cb Author: Michel Dänzer Date: Thu Aug 23 12:10:33 2007 +0200 radeon: Restore memmap registers even if only AGP location changed. commit d7ba9f001c0ab645984526afd0e64d1c6a6d654a Author: Michel Dänzer Date: Thu Aug 23 11:39:54 2007 +0200 radeon: Change a test to info->IsIGP from several IGP families. commit 8c7c22e22b6076abc80e4e1aaa8d1f4cf2f3ed14 Author: Michel Dänzer Date: Thu Aug 23 11:38:17 2007 +0200 radeon: Wait for pending overlay flip to finish before emitting new one. commit 92fa7cc00688d7bfc1fb72e645ac30c6d92669c6 Author: Michel Dänzer Date: Thu Aug 23 11:38:16 2007 +0200 radeon: Don't call RADEONDRIRefreshArea when the damaged region is empty. commit 5cb20c2dc5eca9d7d7d78e9924ea1b90076e7253 Author: Dave Airlie Date: Thu Aug 23 18:46:41 2007 +1000 radeon: bug 11899 + debian 435040 - test for usefbdev before calling int10 (cherry picked from commit 3334c247540b113f9c4a5ce1879d8648a45a959a) commit 9d6261c024c697a211da4b6300420153eb72a264 Author: Roland Bär Date: Thu Aug 23 18:33:34 2007 +1000 radeon: bug 11860 fix some mem leaks commit 7bc1f862bc5f992f213143fbafef52459ba7db4a Author: Roland Bär Date: Thu Aug 23 18:37:35 2007 +1000 radeon: bug 11861 - dead code removal in radeon_video.c (cherry picked from commit 8e3a6f83016cd8c4cfd43ceee4cbf0a8dc018b2a) commit 9d38c8aa1a7d6fb1af41ee8abdb4a95f94843538 Author: Dave Airlie Date: Thu Aug 23 20:10:24 2007 +1000 radeon: cleanup some warnings commit e4c8969b48a6c8dcc4e7f9852479d24a0204fc0d Author: Dave Airlie Date: Thu Aug 23 19:56:21 2007 +1000 updated release numbering for randr 1.2 commit 81a8093f2ffdce59d4e8a44f65f3d5c771fd6425 Merge: c08e6ec 53a67e3 Author: Dave Airlie Date: Thu Aug 23 19:51:47 2007 +1000 Merge remote branch 'origin/randr-1.2' commit c08e6ec9e7ac06caee53689b0ec50ef6a7a0ba37 Merge: 5793e87 a0d0fcd Author: Dave Airlie Date: Thu Aug 23 19:42:19 2007 +1000 Merge branch 'master' into randr-merge Conflicts: src/radeon.h src/radeon_bios.c src/radeon_display.c src/radeon_dri.c src/radeon_driver.c src/radeon_modes.c src/radeon_probe.h src/radeon_video.c commit 53a67e31904bec9a3aa1bd24de8034dcafea1d2a Author: Alex Deucher Date: Tue Aug 21 21:20:41 2007 -0400 RADEON: Fix color problem on pre-R3xx chips tv-out commit e9719e8e02eef46717ae9b4d8c7998466dac30cb Author: Alex Deucher Date: Tue Aug 21 21:17:20 2007 -0400 RADEON: more tv out fixes and clean up commit 36c22a49580d86a6518b67f31a78bd53d39491af Author: Alex Deucher Date: Tue Aug 21 20:28:39 2007 -0400 RADEON: fix tv-out on R3xx R3xx apparently needs the tv clock forced on. commit 9470bd67731059f26859ed5f0bea3ade09e2c80c Author: Alex Deucher Date: Mon Aug 20 20:54:06 2007 -0400 RADEON: Add DefaultConnectorTable option This option skips the parsing the BIOS connector table and falls back to chip specific defaults. Also remove man page section for the now gone bioshotkeys option. commit a0d0fcd3bab765b4db25e04884fd8a342abb9c66 Author: iLisa Wu Date: Mon Aug 20 15:44:07 2007 +0200 Fix crash with no valid mode in xorg.conf's modelist and empty Virtual If the resolution defined in xorg.conf failed to find a matching mode in the supported modelist, and no virtual desktop dimensions are defined the xorg.conf either, virtual X and Y dimension will be set to 0 which will cause Xserver crash. (Novell bugzilla #296856, closed) commit b275febdb0918e8cebdffbb433b0eeb3ff4d3746 Author: Alex Deucher Date: Sun Aug 19 20:55:32 2007 -0400 RADEON: turn off TVCLK when blanking tv encoder commit a90d675832ddb02c81ace010ccbf02619b70edac Author: Alex Deucher Date: Thu Aug 16 21:55:14 2007 -0400 RADEON: fix Xv clipping and overlay sourcing - Basically just copied from the intel driver. I'm planning to push this to the server soon, but add it now to get things working and to provide compat for older servers. - Overlay crtc source control attribute now called XV_CRTC The old attribute XV_SWITCHCRT has been removed. If anyone cares, we can add it back as an alias to XV_CRTC XV_CRTC: -1 auto, 0 crtc0, 1 crtc1 commit 5793e8753d11432bf95c7c6dd80c811e16aba058 Author: Alex Deucher Date: Wed Aug 15 19:26:36 2007 -0400 RADEON: Remove RADEONRestoreMode() Since we no longer use it to write modes all it did was restore some of the regs for a console restore. Just move the relevant bits into RADEONRestore() and remove it. commit 6f011aaabaf18d66ffc255ad76aaf938b2396302 Author: Lisa Wu Date: Wed Aug 15 19:17:51 2007 -0400 RADEON: fix console restore on r3xx and r4xx When restoring the console we need to: 1) we need to restore DAC registers after all other registers are restored and CRTCs are enabled. 2) we need to enable CRTC2 registers before CRTC1 registers commit c8dad98abb042c6abbbee18f9ae4db72084bc513 Author: Alex Deucher Date: Wed Aug 15 00:55:24 2007 -0400 RADEON: make sure crtc routing is correct in r300_detect_tv() Also remove some unused variable commit f8cd74435f0072dbf5f6e83d67d2d5e1f4e82c91 Author: Alex Deucher Date: Tue Aug 14 23:50:57 2007 -0400 RADEON: minor cleanup commit 6f398cd07ea734dd66a8eac71b629e59123d75b8 Author: Alex Deucher Date: Tue Aug 14 23:42:32 2007 -0400 RADEON: Implement improved tv load detection for r300 The previous implementation resulted in false positives on occasion. This method works much more reliably. Based on beos code by Thomas Kurschel commit 366a1d4c240ac93622caff97b652696db99bf2e6 Author: Alex Deucher Date: Tue Aug 14 23:25:37 2007 -0400 RADEON: Turn off tv encoder in disableoutputs() commit 5b4a04c23e3f1ec2490418b111f417c16463c709 Author: Alex Deucher Date: Tue Aug 14 23:11:52 2007 -0400 RADEON: Make sure RMX is always programmed for crtc1 If the RMX registers are left as programmed by the bios this can lead to a blank screen when crtc1 is feeding a DAC. Fix found and reported by Lisa Wu Fixes bug 11985 commit db2a828b2f21b92cd654b309d137204334975b89 Author: Alex Deucher Date: Tue Aug 14 22:47:29 2007 -0400 RADEON: Add load detection Based on the beos driver by Thomas Kurschel and the existing load detection code in this driver. commit 6fc3ddbbb6fbbee1f6076c776e5b46c0c772b6d4 Author: Alex Deucher Date: Sun Aug 12 12:00:20 2007 -0400 RADEON: order the VGA and DVI ports correctly commit b7738d2ef82e1759adf78e5db1291f8739b4166f Author: Alex Deucher Date: Sat Aug 11 17:50:42 2007 -0400 RADEON: fix connector setup when there's no bios tables commit d0895f67e327bb268fd59fcfd8fc22678d804f57 Author: Luc Verhaegen Date: Thu Aug 9 12:11:40 2007 +0200 AGPFastWrite risk reduction. Actively warn the user in the log about the effects of AGPFastWrite and sanitise AGPFastWrite handling while we're here. commit c01000bc684f6a23a38a52f0808182cefaa686bb Author: Alex Deucher Date: Wed Aug 8 00:07:16 2007 -0400 RADEON: fix typo in comment commit 5c3f49e651c36f3bd14fa29359e24825d8f7f77f Author: Lisa Wu Date: Wed Aug 8 00:05:47 2007 -0400 RADEON: make sure RADEON_CRTC2_CRT2_ON bit state is properly accounted for - when the TV DAC is used for crtc1 make sure to keep this bit set when initializing crtc2. - fixes bug 11894 commit 08fe7ad00fba523775e95b5e6295fe23a5119d60 Author: Alex Deucher Date: Tue Aug 7 23:16:05 2007 -0400 RADEON: fix ConnectorTable option after connector table re-work We may want to add the possiblity of more connectors to this option commit f56b90a60393ed187c0e39e149b2a3a32331ea52 Author: Alex Deucher Date: Tue Aug 7 23:08:02 2007 -0400 RADEON: Make sure the default TV standard is supported commit a88a0e77eec514325b4d07bf7be9fb04e6f8e244 Author: Alex Deucher Date: Tue Aug 7 00:43:20 2007 -0400 RADEON: minor fix to legacy bios connector table commit 3752808d6c08a9727370ef8d79088e787791e131 Author: Alex Deucher Date: Sun Aug 5 16:13:39 2007 -0400 RADEON: Always set MonType in radeon_detect() - Always set the the MonType in radeon detect even if no monitor is detected so users can still force disconnected outputs on. For DVI-I users will have to set the dvi_monitor_type attribute to force digital or analog, everything else should just work. commit b4ec3e436afb5bc99ec755cbd96eee9a1ec492a5 Author: Alex Deucher Date: Sun Aug 5 15:37:04 2007 -0400 RADEON: add tv out properties commit 1fc2a1120e7c05938e2bd72d3c7837ecff8bc9da Author: Alex Deucher Date: Sun Aug 5 14:41:57 2007 -0400 RADEON: switch DVI-I monitor type attribute to string commit 7d8eb3751d74bd8a1fb9fa2d2fcb9c4c895f6ba4 Author: Alex Deucher Date: Sun Aug 5 14:31:18 2007 -0400 RADEON: make backlight attribute lower case commit e71bb88bc9052af8866fb6945dbc06dbb0e6d1c0 Author: Alex Deucher Date: Sun Aug 5 14:26:15 2007 -0400 RADEON: switch RMX attribute to string type Still not actually hooked up. commit 284323135ec04635dfa9cabd5790a35b953abca2 Author: Alex Deucher Date: Sun Aug 5 04:35:24 2007 -0400 RADEON: typo commit d1abdad167aa24ac970c69422435df443c82ebd6 Author: Alex Deucher Date: Sun Aug 5 03:45:02 2007 -0400 RADEON: fixes - fix output ordering - set tv-out to return un-connected for now in radeon_detect() commit 0cca25d8d6a0cb0d29b68e6cd9c699d1390aede1 Author: Alex Deucher Date: Sun Aug 5 03:19:24 2007 -0400 RADEON: Fix DVI-I support in ATOM bios connector table parsing commit ba5496ae7973786802962bf649dd91c219531749 Author: Alex Deucher Date: Sun Aug 5 02:27:32 2007 -0400 RADEON: refactor output init to handle multiple DVI or VGA - refactor output init to handle multiple DVI or VGA with the new bios table parsing commit 2ec22783ddf4c522df9e5fd1b2003854486d7a2b Author: Alex Deucher Date: Sun Aug 5 01:39:35 2007 -0400 RADEON: attempt to do the right thing for standards other than PAL or NTSC commit cc8e1d95f1b90a259beea4e8cc4d7e29af660919 Author: Alex Deucher Date: Sun Aug 5 01:14:36 2007 -0400 RADEON: Major rework of BIOS table parsing - greatly simplify ATOM and legacy connector table parsing - use bios tables to detect LVDS and TV outputs - add support for TV table parsing (legacy only) commit 1de52d91ff3a04b9b587b858e1e5be40d3a7fd0a Author: Dave Airlie Date: Sat Aug 4 17:58:58 2007 +1000 update configure.ac for 6.6.193 release commit 371001c0433db1d17e468f3ea99ea57f922145a3 Author: Dave Airlie Date: Sat Aug 4 17:51:19 2007 +1000 radeon: remove unused variables commit 90946c53d7a4b23d03270ad6da0450759a11de3d Author: Dave Airlie Date: Sat Aug 4 17:51:06 2007 +1000 ati: add -Wall for gcc As per luc's "suggestion" in Novell bug. This may generate warnings on 64-bit until we get rid of CARD32 commit e30a145934df8f6a7f71290d6c75e4239f9d52f7 Author: Dave Airlie Date: Sat Aug 4 17:44:46 2007 +1000 radeon: cleanup some pieces of the dpms/blank register programming commit a156db5e8b037ed12a448f70045453baf9d0c504 Author: Luc Verhaegen Date: Sat Aug 4 17:37:18 2007 +1000 Clean up PortInfo to CRTC mapping Also sanitise blanking and DPMS functions Fixes from Novell Bug 264720, and fd.o 10772 commit b61a49f2a5401560f85e11bcdd005287433cad12 Author: Alex Deucher Date: Fri Aug 3 19:27:59 2007 -0400 RADEON: Change indexing of TV constants table in preparation for standard re-work commit 288fa627274cb399059262d4f8bd844fc220a042 Author: Alex Deucher Date: Thu Aug 2 02:37:16 2007 -0400 RADEON: avoid a divide by 0 and only save tv out regs if the chip has them commit b66a1bc7994b33d349c1519761e431959311c85f Author: Alex Deucher Date: Thu Aug 2 02:11:20 2007 -0400 RADEON: fix tv-out enable/disable commit d86592c8d5ce45d81d8a726c263e870e94fbcf11 Author: Alex Deucher Date: Thu Aug 2 00:50:51 2007 -0400 RADEON: add missing break commit 971feb34843225030fff05b3f9d3801534fbf2d4 Author: Alex Deucher Date: Thu Aug 2 00:50:04 2007 -0400 RADEON: move tv dac enable to enabledisplay() commit 98d7e00437bea78e03180eb30ff30de3455d9d1a Author: Alex Deucher Date: Thu Aug 2 00:20:50 2007 -0400 RADEON: limit tv modes to the only one we can program at the moment commit 5c549c1d42f7bbc556942af13aff2661fae856f2 Author: Alex Deucher Date: Wed Aug 1 23:45:07 2007 -0400 RADEON: remove unused elements commit b03978028fd975eb6946503d3a56a49c5a67f339 Author: Alex Deucher Date: Wed Aug 1 22:39:16 2007 -0400 RADEON: convert hard coded tv out values to calculations commit cf54222f1fa37366b2c2b39c82f8afc02f32e63c Author: Alex Deucher Date: Tue Jul 31 02:01:49 2007 -0400 RADEON: more fixes... commit 22d460d3ad991223aa1fbd7e5edeb45e36c65dc0 Author: Alex Deucher Date: Tue Jul 31 01:28:05 2007 -0400 RADEON: fix name of tv output commit 4822a2b837334f408f962646ab5ea4f8b0335ac9 Author: Alex Deucher Date: Tue Jul 31 01:18:40 2007 -0400 RADEON: tv-out fixes. works now. tested on rv350. VT siwtch is busted, and xrandr doesn't play nice yet. uncomment code in radeon_output.c to test. commit fe494c9db2995bb8ce7a028ecf9626e0cb0cf506 Author: Alex Deucher Date: Sun Jul 29 15:26:34 2007 -0400 RADEON: add info about tv out code and authorship commit 6b9b7a7bdc290d07de9b226691ec8025af8db896 Author: Alex Deucher Date: Sun Jul 29 15:23:14 2007 -0400 RADEON: Initial pass at integrated tv out support Based on the GATOS tv-out support by Federico Ulivi and information from ati with substantial rework by myself. Code is not actually hooked up yet. commit 8d043db1817d94edeb72ab208dfea60026715d48 Author: Alex Deucher Date: Wed Jul 25 20:37:58 2007 -0400 RADEON: Compute PLL VCO gain commit 62f06d89da3f7160d5e4df8d7ce6fe1a94e9d07c Author: Alex Deucher Date: Wed Jul 25 20:22:25 2007 -0400 RADEON: write out saved vclk and pixclk values commit 165a07cbbfcd94e3d1fac434b8fada8d29428a09 Author: Brice Goglin Date: Wed Jul 25 19:01:02 2007 +0200 Minor fixes in the manpages - ati.man . add references to radeon and r128 manpages in SEE ALSO (Xavier Bestel in Debian bug #386001). . remove the manpage suffix from atimisc reference in the text since there is no such manpage for now. - radeon.man . typo in "specifying" (reported by A. Costa in Debian bug #432059). . replace a non-ascii character with the corresponding groff escape sequence so that it works whatever the locale (Julien Cristau). commit 9cc3ab8320162f371bba15dc131f23c5de2013fc Author: Alex Deucher Date: Wed Jul 25 02:24:14 2007 -0400 RADEON: hack around console restore hang on r4xx r4xx seems to hang when unblanking the crtc(s) when restoring the console. This needs to be investigated further. commit 193d58b0ea9de3e326017e50b88e2f3726854506 Author: Alex Deucher Date: Wed Jul 25 01:27:58 2007 -0400 RADEON: fix randr on r4xx Seems the way we parse the ATOM connector table results in reversed connectors. commit 262e32bd9ea4123b116362b33b5798753b2568fe Author: Alex Deucher Date: Thu Jul 19 23:48:57 2007 -0400 RADEON: fix palette when depth != 24 commit 18b00b47a483e7854727e99126808ddf361e7a4a Author: Alex Deucher Date: Thu Jul 19 19:01:42 2007 -0400 R128: don't clip modes to panel on laptops when only using the CRT port fixes bug 5832 commit 882fe7631586b0a7919f808588a2ea4fb555f7e8 Author: Brice Goglin Date: Thu Jul 19 18:44:27 2007 -0400 MACH64: avoid crash in Xv code fixes bug 11054 commit 7b3e22e96cfc98621bd20fa76317e6d8f7242165 Author: Alex Deucher Date: Thu Jul 5 20:37:10 2007 -0400 RADEON: set default values for crtc_offset_cntls commit 2a35ccfb8ffee9f0ef6f8d4f0eeb80a471543caa Author: Alex Deucher Date: Thu Jul 5 20:04:04 2007 -0400 RADEON: Fix tiling on r1xx and r2xx spotted by Andrew Randrianasulu fixes bug 11357 commit ac9cbaf32176cf144bc694ac879e7c9e2920f762 Author: Michel Dänzer Date: Mon Jul 2 10:06:02 2007 +0200 radeon: Fully zero-initialize info->CRT2pScrn->monitor. This prevents modes from getting rejected due to the uninitialized maxPixClock value. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=9816 . commit bdcae622100c81a4d9a53938542b64908bacd195 Author: Alex Deucher Date: Fri Jun 29 01:15:57 2007 -0400 RADEON: save crtc on/off state for console restore - prevents a possible hang if console is only using 1 crtc commit 21be0d3a1f4700572c6425800596785d6850626f Author: Alex Deucher Date: Fri Jun 29 00:38:50 2007 -0400 RADEON: simplify console restore - still need to track crtcs for blank/unblank when restoring text console commit d9bf28b55d98fea2d285c9c46362aaf2175d0a46 Author: Alex Deucher Date: Thu Jun 28 23:52:28 2007 -0400 RADEON: factor out surface_cntl init into one function commit 9f193985627be8e6ea1418a424e825ddbc4957b2 Author: Alex Deucher Date: Thu Jun 28 23:43:13 2007 -0400 RADEON: move crtc base setups to new functions commit 0f361e9e80a29d287fa42436c32c657e3c102539 Author: Alex Deucher Date: Thu Jun 28 23:08:07 2007 -0400 RADEON: fix corruption after 3D apps run commit 1d4630067d293d26284d5fe230debef3913ec6cf Author: Alex Deucher Date: Thu Jun 28 22:24:04 2007 -0400 RADEON: set info->CurrentLayout.displayWidth in RADEONSetPitch() commit 2754d1ba01fc3367019487e0c0f59d74c950aaa7 Author: Alex Deucher Date: Thu Jun 28 22:15:22 2007 -0400 RADEON: Switch cursor back to memcpy() commit 7901bcafa92dccd319ddb5de4627d806a39f15f9 Author: Alex Deucher Date: Mon Jun 25 18:39:14 2007 -0400 RADEON: make sure we unblank in RADEONRestore() reported by Andrew Randrianasulu (bugs 11357, 11146) commit 6a3599d6155d073a3116c4b13bdf04b44bb9e087 Author: Alex Deucher Date: Mon Jun 25 18:20:54 2007 -0400 RADEON: make sure we set the stride properly commit 771c37fcac8104b894120cc3fc0154b31b0318d1 Author: Alex Deucher Date: Mon Jun 25 17:53:26 2007 -0400 RADEON: attempt to fix cursor on big endian (only tested on x86) commit 5b5b90c2cea7e36895354f5872acd3fc769653f9 Author: Alex Deucher Date: Mon Jun 25 16:27:54 2007 -0400 RADEON: fix possible segfault on mobility chips with MM tables spotted by Stefan Buehler commit 01bd5eb713500d3e3d4351865d460c8d1e476454 Author: Alex Deucher Date: Mon Jun 25 16:16:18 2007 -0400 RADEON: fix possible segfault on mobility chips with MM tables reported by Stefan Buehler commit 52cc1dc1491559a9055f3ba6dd54064bb382ad86 Author: Alex Deucher Date: Mon Jun 25 15:49:19 2007 -0400 RADEON: tiling and FB size fixes - fix tiling on older radeons - allow the user to specify FB size using Virtual line in config Current default is 1600x1200 - reset ecp_div for Xv in randr crtc mode set commit 3bb46c03fddd3bd79bdab887366aeeced0290a3a Author: Alex Deucher Date: Fri Jun 22 01:12:38 2007 -0400 RADEON: bump crtc max to 1200 so 1600x1200 will work out of the box - a better fix will be forthcoming... commit b9fac5695bf8f123b391e3b162c4865258a685dd Author: Andrew Randrianasulu Date: Fri Jun 22 01:01:14 2007 -0400 RADEON: Fix VT switch hangs - re-order DRI resume functions in EnterVT() - fixes bug 11287 commit 92e65d5e0d6817ff4c9a08020a0a9b3a8c3c98b0 Author: Andrew Randrianasulu Date: Fri Jun 22 00:55:00 2007 -0400 RADEON: Fix VT switch hangs - reorder RADEONDRISetVBlankInterrupt() and RADEONDRIResume() - see bug 11287 commit ec1fd2c388ec2c4033644776ee8588405a3d25f1 Author: Alex Deucher Date: Tue Jun 19 00:39:59 2007 -0400 RADEON: Split FP reg restore to only touch regs relevant to the output - only restore output specific regs - restore fp2_gen_cntl on R200 DAC restore as R200 DAC2 is connected via DVO commit 0f5a92667281ca3f80218bc67d4031125a5e4793 Author: Alex Deucher Date: Mon Jun 18 23:35:21 2007 -0400 RADEON: only touch LVDS on mobility chips commit b72ff160f908bf3aa9f64705377e92d80360a4f7 Author: Alex Deucher Date: Mon Jun 18 21:51:45 2007 -0400 RADEON: only touch LVDS on mobility chips commit 80313621ffa8c409ae63fc1b28c15fc4abdc3a7b Author: Henry Zhao Date: Fri Jun 15 17:00:05 2007 -0700 Update CRT2pScrn->monitor->Last to reflect the last mode of CRT2pScrn. See bug 11278. commit 5868af53204e8fc210735e68e891e15085285629 Author: Alex Deucher Date: Tue Jun 12 23:53:48 2007 -0400 RADEON: yet another LVDS... commit f19a6f7ee5bf4ec632e7813359f167599c08e823 Author: Alex Deucher Date: Tue Jun 12 23:44:41 2007 -0400 RADEON: additional LVDS off fix (missed in previous commit) commit 4f2a1ba9c2fc20042d67132f986a86a9783a245e Author: Alex Deucher Date: Tue Jun 12 23:41:24 2007 -0400 RADEON: additional LVDS off fix (missed in previous commit) commit 9fc416ce08cc5d74faa7b184e80ce43ed2f4fbee Author: Michel Dänzer Date: Tue Jun 12 23:35:09 2007 -0400 radeon: Fix panel size detection from registers with stretched mode programmed. commit c4045cbc5e6975520efef422ce9df2a7d99a7ff4 Author: Alex Deucher Date: Tue Jun 12 23:32:18 2007 -0400 RADEON: make sure to clear RADEON_LVDS_ON when turning LVDS off - fixes bug 3483 commit 090888d3baf61a70640d28e99afdce20952cdea0 Author: Tormod Volden Date: Tue Jun 12 23:30:18 2007 -0400 RADEON: limit PanelPwrDly to 2000 ms on ATOM bios as per legacy bios - fixes bug 11238 commit 44748a826b52924a6e050215d8d62755e0ac7fb2 Author: Tormod Volden Date: Tue Jun 12 23:23:49 2007 -0400 RADEON: limit PanelPwrDly to 2000 ms on ATOM bios as per legacy bios - fixes bug 11238 commit c292fc64499ff4cc135c07deda99cf4169f8fef4 Author: Alex Deucher Date: Tue Jun 12 23:20:18 2007 -0400 RADEON: make sure RADEON_LVDS_ON is cleared when turning LVDS off - fixes bug 3483 commit c6a3286d6f6ddda89115d98d45665dadd78bf41d Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Fix panel size detection from registers with stretched mode programmed. commit 7a6b3c0f77c69019268f585c51c3dcbcc99014d4 Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Don't loop indefinitely if no mode matches detected panel size. commit f31fd9ce598841c505a0b5ed32bf124f49fea332 Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Fix some more ErrorFs when setting mode. commit 9dd9f09a9021653e5590d27bd7aa0e7af85416ad Author: Alex Deucher Date: Thu Jun 7 15:32:31 2007 -0400 RADEON: fix some issues with bios table init code - fix some issues with bios table init code - re-org preinit to better handle bios table init of cards commit 9ad311eeb0ac2b70a862dbb9de278154ba9142ec Author: Tilman Sauerbeck Date: Thu Jun 7 11:03:02 2007 +0200 Fixed 'make dist'. commit 2527f2b69aa7dffa3ba4359c45955e3185bdf0e6 Author: Alex Deucher Date: Wed Jun 6 00:08:45 2007 -0400 RADEON: implement support for posting cards based on x86 bios tables (untested) This is based on the netbsd radeonfb driver by Garrett D'Amore. The code is not hooked up yet, but should allow you to post cards without needing to execute bios code. This should be useful on non-x86 platforms, for posting secndary cards, and for suspend/resume. Works on legacy bioses only (no ATOM support). commit e67d1420bf65055ecb6fdfe6b1b1f53aae83854a Author: Alex Deucher Date: Tue Jun 5 22:31:50 2007 -0400 RADEON: fixup RADEONDisplayVideo() to better handle the crtc being used commit 7886405308e3288d5c86b6f2c7dbfa8ff865139c Author: Alex Deucher Date: Mon Jun 4 21:16:56 2007 -0400 RADEON: fix indenting commit f54ad565a69deb52547fd04e123f56fc1294cd0a Author: Alex Deucher Date: Mon Jun 4 21:13:16 2007 -0400 RADEON: no need to go through all the crtcs, we've got what we need commit 687879bff716ad01f9f158860deb8ba770faab99 Author: Alex Deucher Date: Mon Jun 4 21:08:40 2007 -0400 RADEON: add support for RMX on DVI, make sure RMX is only enabled on crtc1 commit e6161e472ff266f69547704a61040228a8704b06 Author: Alex Deucher Date: Mon Jun 4 20:32:55 2007 -0400 RADEON: remove some cruft commit be0ce38232ea4f5679c5829ab663939144c6e617 Author: Alex Deucher Date: Mon Jun 4 20:22:15 2007 -0400 RADEON: number the outputs if there are more than one of the same commit 8ec617f6493dd0aea5d11f92e3d58c3feef8c8fd Author: Dave Airlie Date: Sun Jun 3 17:32:43 2007 +1000 radeon: disable irqs at server start until 3D app starts commit 2d40fa55e8d7a1cfb204d66ca4a4d95a3b13d5b5 Author: Dave Airlie Date: Sun Jun 3 17:32:43 2007 +1000 radeon: disable irqs at server start until 3D app starts commit dcb64a4d3947e5a9fbda4b72e29a5b6102370f07 Author: Dave Airlie Date: Sun Jun 3 17:10:49 2007 +1000 radeon: disable vbl interrupts when no 3d is running on a new enough drm commit 73d8e3ec8536b4777490b7ba457566f02233811f Author: Dave Airlie Date: Sun Jun 3 17:07:59 2007 +1000 randr-1.2 increase dri minor version for mesa to know we can do vbl on both commit 63f0d4ed0a98830ecbe18c6e4174689111a59b68 Author: Dave Airlie Date: Sun Jun 3 16:49:14 2007 +1000 randr-1.2: add support for vblank on both heads Also disable vbl when 3D isn't running commit d7775c1b38b5bdc439a27ec2c3c3a03a5b24cf57 Author: Dave Airlie Date: Sun Jun 3 12:46:31 2007 +1000 randr-1.2: make native mode preferred If we have a native mode from the BIOS make it preferred mode commit 5a9516fe4f17854acd4fbf3a8eadf5139081dbd4 Author: Paul TBBle Hampson Date: Sat Jun 2 14:28:18 2007 -0400 RADEONProbePLLParameters sets pll->reference_div, and RADEONGetPanelInfoFromReg uses it. This ensures that the former is called before the latter. (this should fix randr on ppc) commit 802804461ebdca9a951e7e562ec68fd08d8eae01 Author: Matthieu Herrb Date: Thu May 31 22:23:57 2007 -0600 Fix build whithout XF86DRI commit 0e0946e0aa2527794e07473199e851bbfbc47cb1 Author: Michel Dänzer Date: Wed May 30 18:56:53 2007 +0200 radeon: Lots of warning fixes. Move code where it's used, remove unused variables, etc. commit 31c1be420d5277dd15505bd73e6144827a0580cd Author: Dave Airlie Date: Wed May 30 17:49:01 2007 +1000 remove these syncs, at least on rs480 it doesn't break probably requires testing on other r300 based cards, with the syncs in we hang when moving the cursor into the second CRTC. commit 7fc02657c4d740941fbda5a8823cf45de3eca3f8 Merge: 800bf53 4c61c0e Author: Dave Airlie Date: Wed May 30 17:27:22 2007 +1000 Merge branch 'origin' into randr-1.2-test Conflicts: src/radeon_cursor.c src/radeon_display.c src/radeon_driver.c commit 800bf53279e2c2bf854682bbfd6fa16d03afed00 Author: Matthieu Herrb Date: Tue May 29 23:31:13 2007 -0600 Fix build without XF86DRI commit 4c61c0ee91a2ffeefce30972a584486f1df1d1ae Author: Matthieu Herrb Date: Tue May 29 21:35:35 2007 -0600 Fix build without XF86DRI commit 5337e7bd0069a3f2c4ab22b21a19471427ad3d81 Author: Dave Airlie Date: Wed May 30 08:10:44 2007 +1000 radeon: add bios quirk for nx6125 monid commit bff809dc8ed07ac39e9b576a87916486a5e37156 Author: Dave Airlie Date: Wed May 30 08:02:26 2007 +1000 rs480: more unknown regs Hardcode the values from a working fglrx run, this works for me now I've no idea what it might do for anyone else commit 104105fee5c3945d3f210e6a4cb73ab492c61543 Author: Dave Airlie Date: Tue May 29 19:09:33 2007 +1000 rs480: make second crtc work with magic number in magic register. I've no idea why or what this does. commit 5aa603bcabbb077dec169c48438c2e2ebe1195d7 Author: Dave Airlie Date: Tue May 29 07:23:24 2007 +1000 rs480: only has single dac commit c52322354fe64725733842b3356798c50e7735d5 Merge: dd6a966 975da59 Author: Dave Airlie Date: Tue May 29 07:21:48 2007 +1000 Merge branch 'origin' commit c2637a01f9aca4032262c66ade305f5fe2c54294 Author: Alex Deucher Date: Sat May 26 18:26:35 2007 -0400 RADEON: remove some dead code from the last commit commit bbb769c4107bfcae682e46d026e54cbfb67d62cd Author: Alex Deucher Date: Sat May 26 18:25:06 2007 -0400 RADEON: more rotation work (still not there) - once again borrowed heavily from intel commit a69f90be9384244744fabfa76469ede9cd26ac98 Author: Alex Deucher Date: Sat May 26 17:54:48 2007 -0400 RADEON: first pass at rotation (not working yet) - based heavily on intel commit 3b619d88a65a5801c85d120f2d39704194433f10 Author: Alex Deucher Date: Sat May 26 17:06:18 2007 -0400 RADEON: clean up and add comment regarding clones commit 089ae4afd23322bf602d340c531c36a4c8b461ed Author: Alex Deucher Date: Sat May 26 15:49:11 2007 -0400 RADEON: Switch SetOutputType() to use names rather than numbers commit c4cef0c9481257a744ac99dfc7beb988ce51a8ee Author: Alex Deucher Date: Sat May 26 13:12:37 2007 -0400 RADEON: make sure we have the lock when SYNCing commit 899c62e987d5c7524817ba85675e39a8a28e0232 Author: Alex Deucher Date: Sat May 26 12:54:01 2007 -0400 RADEON: Make sure LVDS and FP2 routing info gets written commit 18857184ffa6847815d349c020b003f8401e36ee Author: Alex Deucher Date: Sat May 26 12:27:00 2007 -0400 RADEON: fix handling of DRI lock commit 3a61453efb4f04492cef823b6dd1273b55c6a785 Author: Alex Deucher Date: Sat May 26 01:38:09 2007 -0400 RADEON: implement backlight control for LVDS This code is currently disabled as I'm not sure which laptops actually use this method for backlight control. My laptop seems to use another method as adjusting the backlight level doesn't seem to touch LVDS_GEN_CNTL. Maybe just macs? commit ceec3f62257bafe4771e75d3c4f1d2a517d7acf8 Author: Alex Deucher Date: Fri May 25 23:29:51 2007 -0400 RADEON: implement auto/analog/digital output property for DVI-I (untested) commit e3e9c608651e7cbb9851489274815f47d2a8dbbb Author: Alex Deucher Date: Fri May 25 19:26:24 2007 -0400 RADEON: more clean of last commits commit a7d2c9c0f6155c4e65a2e73f3832c0d8ca7af5fc Author: Alex Deucher Date: Fri May 25 19:09:11 2007 -0400 RADEON: fixup last commit and add support for ext TMDS detect commit e50ca35ce2ea79dadb38ce14e459eed836452ff7 Author: Alex Deucher Date: Fri May 25 18:56:32 2007 -0400 RADEON: clean up non-DDC probe, add detect for DVI commit abb9b57e7b4162ab6c21fd1e809d24f13f7e1ea1 Author: Alex Deucher Date: Wed May 23 21:37:58 2007 -0400 RADEON: clean up some logic commit 679236defd28bea8874004377436347950ff7bec Author: Alex Deucher Date: Wed May 23 21:18:40 2007 -0400 RADEON: add output properties (not functional yet) commit 975da595f032c145ad74079ff8edeaead779dc7b Author: Michel Dänzer Date: Tue May 22 10:56:47 2007 +0200 radeon: Provide new DRI texOffsetStart hook when available with EXA. commit e38cad5633c974467f6417051eda8d487ac3686e Author: Alex Deucher Date: Tue May 22 00:09:46 2007 -0400 RADEON: Only add valid connectors commit 8275151baac22c34149cef0b7d922771d24abc3e Author: Michel Dänzer Date: Mon May 21 10:25:48 2007 +0200 radeon: HW cursor cleanup. Don't needlessly turn the HW cursor on/off in RADEONLoadCursor*(). Besides cleaning up the code, this semms to avoid some HW cursor related 3D lockups, see https://bugs.freedesktop.org/show_bug.cgi?id=10815 . My best guess is that this is because the engine is now always idled before touching the CRTC registers. commit 137e3fc1899078af0f72303ab0a4e6cf35804a7b Author: Michel Dänzer Date: Mon May 21 10:25:48 2007 +0200 radeon: Suppress debugging output by default. It can be enabled at runtime by increasing the log verbosity level. Also change the prefix from (**) to (II) to make grepping the log file for defaults overridden by xorg.conf more useful again. Turn some MC related debugging output into normal informational output as it's useful for recognizing corner cases that can cause stability issues. commit aed193a47a939451d9a6d05b02653b1d73e1d523 Author: Alex Deucher Date: Sun May 20 21:13:59 2007 -0400 RADEON: fix crtc1 (un)blanking code after last commit - crtc1 MC control is on CRTC_GEN_CNTL - fix indenting commit 870c8043068a0f44b53d1148371b2cc1e3970a7b Author: Alex Deucher Date: Sun May 20 21:03:10 2007 -0400 RADEON: several updates - move output init from InitCrtc() functions to the output mode_set() - take the crtc off the MC when blanking - move EnableDisplay() to output commit() - clean up some dead code - don't enable dacs in initcrtc() functions, this is taken care of in EnableDisplay() commit 09bfc8ed000f95ede5b73f2bad69edc1a4d9bac6 Author: Alex Deucher Date: Sun May 20 18:06:22 2007 -0400 update to 6.6.192 for rc release commit 764cb73e8dec4040cdd418d249fc504399fca3ee Author: Alex Deucher Date: Sun May 20 17:26:26 2007 -0400 Fix regular/"xinerama"/zaphod dualhead mode - logic in RADEONUnblank() was wrong - Calling RADEONSetupConnectors() on second instance screwed up the port info - still seem to be HW cursor issues with zaphod mode commit 9a147fef8e0e2ede2a0008c4ecfbd9b00c8dc5f6 Author: Alex Deucher Date: Fri May 18 23:45:11 2007 -0400 RADEON: if connector is VGA set TMDS to none commit bbd6faff4c6acb48970d774375c8a61861405f96 Author: Alex Deucher Date: Fri May 18 23:30:19 2007 -0400 RADEON: Change default LVDS i2c line for powerpc commit 7940ec364f3cbf02ba64b92c74cbaad4555baf38 Author: Alex Deucher Date: Fri May 18 00:23:08 2007 -0400 RADEON: cleanup commit f71bfde7352ef858c1041037d7dc77c237e315a4 Author: Alex Deucher Date: Fri May 18 00:12:03 2007 -0400 RADEON: more cleanup commit f711e266d6927dec648f6ff26f15c6f48643f78c Author: Alex Deucher Date: Thu May 17 23:59:07 2007 -0400 RADEON: turn off all outputs in screeninit(). We'll turn on the ones we want later commit bfc1c372d7475b7fa6bffb8a79dec1dc2f11ec59 Author: Alex Deucher Date: Thu May 17 23:45:29 2007 -0400 RADEON: More cleanup commit c60b3bc9e3e7463bdb42e2478be8cc3f22c63c68 Author: Paul TBBle Hampson Date: Thu May 17 23:26:54 2007 -0400 Fix for infinite loop in RADEONGetLVDSInfo commit 11289f8206cab1a94bd64a3938cf9af50f19497e Author: Alex Deucher Date: Tue May 15 00:48:31 2007 -0400 RADEON: remove some debugging code commit fba1a11e287ebf04cf311645d31299896bad7283 Author: Alex Deucher Date: Tue May 15 00:44:29 2007 -0400 RADEON: Move DAC regs to their own Save() function commit 9ed00e959fcdab2739a7e64ca1e303a6faf28f15 Author: Alex Deucher Date: Tue May 15 00:36:05 2007 -0400 RADEON: Lots of small fixes - remove extra crtc2_base set - remove some debugging code - clean up RestoreMode() - make sure a DDC reg gets assigned for LCD_DDC - make sure we adjust the right frame in AdjustFrame() - rename RADEONMapControllers() to RADEONPrintPortMap() to reflect what it actually does now - make i2c bus name match the DDC port - remove or comment out un-needed code commit 5106c8fe5f74865cac8b00937739a4efde9fc254 Author: Alex Deucher Date: Sun May 13 21:48:26 2007 -0400 RADEON: Further cleanup commit 224a73e41e9be344d5644203e7ebd5a3a8272604 Author: Alex Deucher Date: Sun May 13 21:41:59 2007 -0400 RADEON: remove remnants of "old" multi-head support The old screen based multi-head code is broken at this point and I have no intention of fixing it, so to clean things up I've removed it. commit 9c2f20a83a5fed14225f4c3ebcd8ca41e9d4bd48 Author: Alex Deucher Date: Sun May 13 21:13:23 2007 -0400 RADEON: additional cleanups commit e187321ab8dd58d2b2fe92c062d070ba4820a2bf Author: Alex Deucher Date: Sun May 13 19:49:10 2007 -0400 RADEON: add new ConnectorTable option and re-add PanelSize option commit e60a7bcaf5611ad4706b1d1442ce4cae49145f42 Author: Alex Deucher Date: Sun May 13 18:14:29 2007 -0400 RADEON: remove mergedfb, etc. cruft from man page commit 51caa5dccc4a2e14d1b41bb7868ad20468dd4cfe Author: Alex Deucher Date: Sun May 13 18:10:02 2007 -0400 RADEON: remove old mergedfb and dualhead options that are no longer used commit c5da9d4040cb08598d171d20f84d3f6c20a033e0 Author: Alex Deucher Date: Sun May 13 18:05:38 2007 -0400 RADEON: remove more dead code commit e776fa9ecc53d63f916a5447a76fb2bb3b824167 Author: Alex Deucher Date: Sun May 13 15:43:39 2007 -0400 RADEON: re-org randr code - move crtc stuff to radeon_crtc.c - move output stuff to radeon_output.c commit 58ce388452b7bc790c438d75c9cf4a0f69f0d7b2 Author: Alex Deucher Date: Sun May 13 15:05:01 2007 -0400 RADEON: Remove dead code commit 66e8e6c8348d007930730e90295588efe8108844 Author: Alex Deucher Date: Sun May 13 14:25:03 2007 -0400 RADEON: several fixes - give better DDC names - disable DAC if connector is DVI-D - fix indentation in ProbeDDCModes() commit 1c16c2ce9c5b02b03d23da965127d82eea4c4039 Author: Alex Deucher Date: Sun May 13 13:54:04 2007 -0400 RADEON: fix VT switch commit 7c66e903368f77ecc4d3bd1c9f08d2adbd85e83c Author: Alex Deucher Date: Sun May 13 13:37:59 2007 -0400 RADEON: move crtc offset handling into init/save/restore functions commit aec078eb0740651fba8ec602e8239bd679efc8ad Author: Alex Deucher Date: Sun May 13 11:57:57 2007 -0400 RADEON: fix up DDCConnected() commit 0550c37ecc434b8075fb3c367d100ff27625bb64 Author: Alex Deucher Date: Sun May 13 11:44:50 2007 -0400 RADEON: don't need to pass pScrn to EnableDisplay() commit 117220527de9fd3158f600645bcfcaf46847f45f Author: Alex Deucher Date: Sun May 13 11:37:35 2007 -0400 RADEON: remove hardcoded output limit and PortInfo stuff commit 7e5c29961ac2a9e9dbe5d6d2d73d11cd018d62b5 Author: Alex Deucher Date: Fri May 11 18:00:40 2007 +0200 RADEON: Fix RMX after the last commit commit ab5603edd8fc3ef0560bdfb6a6d9c6af2a49d1e5 Author: Alex Deucher Date: Fri May 11 17:34:35 2007 +0200 RADEON: Move LVDS, TMDS, DAC properties to the output rec commit 94eb0681de0641e490f06486468617a727fefe86 Author: Alex Deucher Date: Fri May 11 14:39:48 2007 +0200 RADEON: switch output dpms to use RADEONEnableDisplay() commit 673ede5578d5d9caf2adf0445fe1e684b034eea5 Author: Alex Deucher Date: Fri May 11 14:28:17 2007 +0200 RADEON: re-arrange output mode setting commit 0070a7d787adaae99f7bc2659be4b0f49f439db5 Author: Alex Deucher Date: Fri May 11 13:06:15 2007 +0200 RADEON: more re-org - move crtc mode setting around - add dri lock/unlock to crtc lock/unlock calls commit bba456232ac9a6218aa7fbd504d6093fa72860cf Author: Alex Deucher Date: Thu May 10 15:33:51 2007 +0200 RADEON: fix VT switch commit 1779a12a947401e5c6bcf784b47e9b3c80d37204 Author: Jesse Barnes Date: Thu May 10 06:22:35 2007 -0700 Add cscope files to .gitignore commit 0cb23277666db3b30438c6f88840d861e04df414 Author: Alex Deucher Date: Thu May 10 15:20:56 2007 +0200 RADEON: randr driver re-org checkpoint - split the mode setting per-crtc - reduce start up flicker commit 33c370b1d8350945f80ac12097d3e91243a400f2 Author: Jesse Barnes Date: Wed May 9 16:16:39 2007 -0700 RADEON: - fix an ugly modesetting bug: if we happened to set the mode on CRTC1 before CRTC2, CRTC2's RestoreMode function would clobber CRTC1's CRTC_OFFSET register since we never updated ModeReg.crtc_offset... so make AdjustFrame use ModeReg and pull the call to it up before RestoreMode, seems to work ok here. commit 6263248a0044777a352e4ee7380b4b8f9afd091b Author: Jesse Barnes Date: Wed May 9 14:52:00 2007 -0700 RADEON: - use fixup_mode hook to set RADEON_USE_RMX flag so panel scaling works - use valid_mode hook to prune invalid default modes from list - use adjusted_mode in crtc_mode_set (using adjusted_mode from fixup hook) commit d2497009e395800fbde5777465f3087a54b94418 Author: Alex Deucher Date: Wed May 9 22:23:45 2007 +0200 randr checkpoint - server still hangs if you start with external monitor connected - RMX not working - more than 2 outputs now possible (untested) commit 4488f0737d5268168eab41440b7a3b5732efb15e Author: Alex Deucher Date: Wed May 9 16:41:13 2007 +0200 more randr re-work - remove RADEONQueryConnectedDisplays(); randr takes care of this now - print edid after randr detection commit 4d992386e2ab9d8c50f0484445564325dfb42930 Author: Alex Deucher Date: Wed May 9 16:12:21 2007 +0200 enable all outputs on each crtc on mode restore commit 2618cf2aa8ed76411b943eb90c95869814c2f151 Author: Alex Deucher Date: Wed May 9 15:48:40 2007 +0200 More re-org to allow more than 2 outputs - Move radeon output crtc map into crtc_set_mode - in modeinit, set up all outputs attached to crtc commit 61b9e79cbeee6f735a4c82ec8a802aee85d8b890 Author: Alex Deucher Date: Wed May 9 15:11:23 2007 +0200 start to clean up MapControllers commit 6a724dd798c1a7b461672993c02be83a7bccded6 Author: Alex Deucher Date: Wed May 9 14:48:17 2007 +0200 minor cleanup commit 03860fed24b4f76cc7f1f4210ec8f8040fa04777 Author: Alex Deucher Date: Tue May 8 19:27:48 2007 +0200 remove some old mergedfb cruft commit 76670f665ebec7cdf40a04bf9379cb3ad4417507 Merge: 83f81ed a3ee422 Author: Alex Deucher Date: Tue May 8 18:41:25 2007 +0200 Merge branch 'master' into randr-1.2 and fix conflicts commit 83f81ed5e3c33c94c80500316c37a7cbfc51f41f Author: Alex Deucher Date: Mon May 7 22:54:16 2007 +0200 RADEON: Fix cursor handling for randr commit 5fc21cd34436919300018d8d4850fc67db284eb3 Author: Jesse Barnes Date: Mon May 7 13:31:20 2007 -0700 - fix randr 1.2 on pre-RV350 chips by enabling DAC_MACRO_CNTL writes - set dac_cntl on non-primary crtcs - set XCRT_CNT_EN in CRTC_EXT_CNTL just because - fix warnings in calls to xf86PrintModeline (wants screen index not pScrnInfo) commit 99b3df154317f0209618e532282a3e7ad091c00f Author: Alex Deucher Date: Mon May 7 19:02:35 2007 +0200 RADEON - update randr cursor handling, LVDS setup fix - quick fix for the cursor handling to update to the latest server bits - make sure connector type is CONNECTOR_PROPRIETARY for LVDS. commit a3ee42207aab77d93655a82fdcb32be38268b85f Author: Dave Airlie Date: Wed Apr 25 09:52:22 2007 +1000 radeon: another attempt at fixing the mergedfb refresh rate This attempts to keep it inside the 32-bit limit when multiplying things out later in the randr tree. Let me know if I screwed this up.. commit 3828237200fc16d4d32664fb8358950c213d4897 Author: Dave Airlie Date: Sun Apr 22 11:36:00 2007 +1000 radeon: add support for DDC on some laptop chipsets I noticed fglrx has DDC for the panel in the rs480 laptop, however radeon didn't pick it up, so I valgrinded fglrx and spotted 0x1a0/0x1a4 accesses I actually noticed this before from the BIOS but never figured it out. So now I get DDC from the LCD on this laptop. commit dd6a966e862b774a8e8b9e1a085309219673efad Author: Dave Airlie Date: Sun Apr 22 11:36:00 2007 +1000 radeon: add support for DDC on some laptop chipsets I noticed fglrx has DDC for the panel in the rs480 laptop, however radeon didn't pick it up, so I valgrinded fglrx and spotted 0x1a0/0x1a4 accesses I actually noticed this before from the BIOS but never figured it out. So now I get DDC from the LCD on this laptop. commit c81ed9bd7b37c9d02141d10f6c7bad3d0c57032f Author: Dave Airlie Date: Sat Apr 21 18:58:40 2007 +1000 radeon: fix build on older server commit 406eec71116a58d42288a7f1c809a92d5bda7350 Author: Dave Airlie Date: Sat Apr 21 18:56:28 2007 +1000 radeon: fix build since patches for IBM don't actually build commit ad119960095b4b64f4c6793f65950c9967ce4989 Author: Matthias Hopf Date: Thu Apr 19 11:54:46 2007 +0200 Disable RMX for IBM Lewis server. Due to the hardware layout RMX ddc_mode has to be set. If ddc_mode is set, RADEONValdiateFPModes() shouldn't be called. Bugzilla #10620 (3). commit 16ef77df4ebaf5ea13baa82972aaf98e71ac32ee Author: Matthias Hopf Date: Wed Apr 18 17:36:15 2007 +0200 Set sync polarity restriction flags even for non-"digital separate" monitors. According to Lisa Wu, this is correct regarding the VESA EEDID standard. Bugzilla #10620 (2), original patch by Lisa Wu @ATI commit 0abce69f0d826a7ca1a41d963cd4730b6e01c145 Author: Matthias Hopf Date: Wed Apr 18 17:32:52 2007 +0200 Fix inconsistent use of Mode lists. Some scans used to only check every second entry, some stopped at the entry before the last entry. Bugzilla #10620 (1), original patch by Lisa Wu @ATI commit aea801cf9a5ce519a53d6fffd9a3a2e526ec79ea Author: Matthias Hopf Date: Fri Apr 13 16:16:05 2007 +0200 Fix crash if MergedFB and secondary head not found If the secondary head isn't found (Monitor unplugged etc.) but MergedFB is configured, the driver segfaults because it tries to access the mode list private structures, which are not filled in. commit 07ddffb32e6293c77b32c94b87ec468caef3d6f5 Author: Matthias Hopf Date: Wed Apr 11 14:36:51 2007 +0200 Fixed typo in mode list generation. commit 4effa67ea75736a31b9e78a7b35acf74b067c43e Author: Dave Airlie Date: Mon Apr 9 22:08:31 2007 +1000 radeon: add support for enabling direct rendering on RS480 Thanks to Matthew Garrett and Ubuntu for the hw loan to get this working. Still no 3D driver support but at least you should get CP acceleration for 2D now. commit 6b25a4c48796e022a093f3072574ffe9709ecaf4 Author: Michel Dänzer Date: Wed Apr 4 10:47:29 2007 +0200 radeon: Link nearest modes by default for clone mode. This makes sure all modes of both CRTCs will be available by default with MergedFB. commit 3c892f163ec1fa9be6e733aab091c9b718f41efc Author: Michel Dänzer Date: Wed Apr 4 09:52:37 2007 +0200 radeon: Always sort modes when adding to list. This makes sure mode lists will always be sorted from larger to smaller. commit 3a8190ccc79969925257e7b980b78d79053d208d Author: Michel Dänzer Date: Wed Apr 4 09:47:07 2007 +0200 radeon: Don't shrink virtual size based on secondary modes. commit 9b1e97284ce185d358ca756a235d2cee346fa53f Author: Henry Zhao Date: Sat Mar 31 23:01:52 2007 -0800 10205: Radeon driver's own mode validation code does not work properly commit 9c2dcd19be8fc2cc29e637d1e9748e66196e3900 Author: Henry Zhao Date: Sat Mar 31 20:10:03 2007 -0800 9337: EDID modes do not participate in validation for CRT monitor commit 1acd6d6fa42acec07fb11aeb189f492ddb021cb4 Author: Michel Dänzer Date: Fri Mar 30 11:06:10 2007 +0200 radeon: Guard some MergedFB specific code with info->MergedFB tests. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10442 . commit 1a71106c0e4fe5f650239dc694163fdf52d33663 Author: Michel Dänzer Date: Tue Mar 27 10:13:21 2007 +0200 radeon: Fix typo. commit f87e57d4d773a019d1cc8a10425c57480430f6a4 Author: Dave Airlie Date: Tue Mar 27 18:08:54 2007 +1000 radeon: fix up crtc debug dereference problem commit 66b4a571a4e7960da6807d3f30955aa08e89ccc6 Author: Dave Airlie Date: Tue Mar 27 17:00:37 2007 +1000 update number to 6.6.191 for rc release commit fca30a6b581cb6c1466ab1bc316df8fed5d82b60 Author: Alex Deucher Date: Mon Mar 26 23:26:51 2007 -0400 fix NULL dereference when IsSecondary is true, crtc1 is NULL Noticed by Sverre Froyen. commit 97d8d1ed10d069343f2b3172ba64ca421821a602 Author: George Sapountzis Date: Sat Mar 24 20:02:12 2007 +0200 Move atichip.c from ati to atimisc. commit aa8f5b02ebc9be60df48722588261627d6a457e8 Author: George Sapountzis Date: Sat Mar 24 19:53:02 2007 +0200 [mach64] Use Mach64Chipsets[] instead of ATIChipNames[]. atimisc is PCI-only now, we can get the chip name with xf86TokenToString(). commit 39e896a1e688ea2d2d21f88c1c5d34c5810aac1c Author: George Sapountzis Date: Sat Mar 24 19:47:18 2007 +0200 [mach64] Set pATI->ChipRevision correctly, instead of overriding. There is no need to override pATI->ChipRevision for GX/CX, as it is only reported with a printf. commit f046a910ca117279fbabc6281b2e23439ec9ea4e Author: George Sapountzis Date: Fri Mar 23 22:19:17 2007 +0200 Drop probing by driver name from "Device" section. atimisc is PCI-only now, so we only need to scan the PCI space. commit 9cd175d9cd4ed710fccb303664c77519ecaf1e21 Author: George Sapountzis Date: Fri Mar 23 22:12:48 2007 +0200 Fold FillIn() back to Probe(). commit d7a8cd0e476034796fc38e25a28cd28d05ea4a13 Author: George Sapountzis Date: Fri Mar 23 22:10:03 2007 +0200 Drop now unneeded _X_EXPORT's. commit 58626d8b78f26f0d9c480033d3c3a12e541342b1 Author: George Sapountzis Date: Fri Mar 23 21:30:19 2007 +0200 Move {atimach64,r128,radeon}_probe.c from ati to subdrivers. Subdrivers are now loaded from the wrapper Probe function rather than at screen creation time. The wrapper Identify callback only prints chip families now, chip lists are printed when a subdriver is loaded. This also avoids duplication of subdriver Identify callbacks. Unknown radeons should still get a list of known radeon and then probe fails... Probe for atimisc last to avoid needless loading in most cases (r128, radeon). commit 2e3d43af1e5077cc61dd8668551a6291368d9ed2 Author: George Sapountzis Date: Mon Mar 19 19:05:04 2007 +0200 [mach64] Compute MMIO address once for each case (PIO, MMIO). For an MMIO-only driver, the extra MMIO address probing is not needed since we already compute the MMIO address during probe and do not make any BIOS calls. For a PIO driver, this extra probing could even result in a wrong MMIO address since the checking is done by reading through PIO, not MMIO. The MMIO address is later corrected but having the extra probe there is useless. commit e7defc0e930f1b2d83623a769b2bfdb05c66a5fe Author: George Sapountzis Date: Mon Mar 19 19:04:10 2007 +0200 [mach64] Move setting of PIO and MMIO addresses up, after BIOS init. Partially revert "Minor refactoring of pATI->Block0Base computation." This parially reverts commit 2c8b33b761e4411451aea1eea3a89d629aeea40d. commit 3dfdba195f1ff794ab00585ab80e7ea6ac92fcf4 Author: George Sapountzis Date: Sun Mar 18 16:40:07 2007 +0200 [mach64] Make mapping code friendlier to pci-rework source-code compatibility. commit 321db6d87c9110654ab386e5ec270116eca1e04f Author: George Sapountzis Date: Sun Mar 18 16:15:20 2007 +0200 [mach64] Add macros for pci-rework source-code compatibilty. commit dfd07b6e99020d1db43d7ce0cae4423d8c6b1f05 Author: George Sapountzis Date: Sun Mar 18 16:38:26 2007 +0200 [mach64] Drop checking that BAR base + size fits in 32 bit. I can't see how these tests could fail on 32-bit. OTOH they are potentially problematic with 64-bit PCI addresses. commit e674338a98c50800637b8ebc01adf3aec2a3eb38 Author: George Sapountzis Date: Sun Mar 18 15:50:41 2007 +0200 [mach64] Single mapping per BAR. - We reset write-combining of the FB when MMIO registers fall in the linear aperture. - We set MMIOInLinear in all three aperture mappings since the mapping code depends on it. - We map the linear aperture in its entirety for MMIOInLinear also. This simplifies mapping of HW cursor and the LE aperture on BE archs, as they always fall in the linear aperture. - I assumed that BAR[2] is page-aligned (we know it's 4K-aligned for sure). commit e7969de8ec572d8801806f9525a9a081a58a03f1 Author: George Sapountzis Date: Sun Mar 18 15:35:25 2007 +0200 [mach64] Drop poking the VGA MMIO aperture. We will not be able to handle this when we do mappings for PCI BARs only and it should be handled with a CPIO driver anyway. commit 166c760a86165330175023e07c4b2bd6891633c5 Author: Michel Dänzer Date: Tue Mar 20 09:16:02 2007 +0100 Fix advertised minimum minor version of the DRI module. We don't automatically require bumped minor versions. commit 1bdd376dbd57de8925244f0808f974d6d8cff39d Author: Michel Dänzer Date: Tue Mar 20 09:14:39 2007 +0100 radeon: Only sync to hardware when really necessary with EXA. In particular, don't sync again after accelerated DownloadFromScreen, which syncs implicitly. This avoids calling into the kernel when it's not necessary, which can be relevant in some situations. commit 3cfa3a5c8daf03aaad6fc30d275709f6eb717d29 Author: Michel Dänzer Date: Tue Mar 20 09:13:24 2007 +0100 radeon: Unify code to release the CP. commit e174d8df8c801fad95e5f79cff69187c200bee6e Author: Michel Dänzer Date: Tue Mar 20 09:12:51 2007 +0100 radeon: Minor BlockHandler cleanups. Don't flush indirect buffer in BlockHandler; it's done in LeaveServer. Also set the EXA engine mode to unknown only at the end. commit 113fb4b61e709a9b54fc2ef73efce06011e771c1 Author: Michel Dänzer Date: Tue Mar 20 09:12:09 2007 +0100 radeon: Disable CP line acceleration on RV280s. There have been several reports of stability issues with things like the xscreensaver hack hypercube. commit 4651d00b183cb498879d605c4b93cd3a0c63cb33 Author: Michel Dänzer Date: Tue Mar 20 09:10:19 2007 +0100 radeon: Make sure 3D clients will re-upload textures to video RAM after LeaveVT. Walk the SAREA texList and bump the age of every active object, so their owners will consider them kicked out when they grab the HW lock next time. commit 2d2fb54ba370c1df9ef5102e83c17a7ff5c55403 Author: Michel Dänzer Date: Thu Mar 15 17:26:56 2007 +0100 atimisc: Fix strict aliasing violation flagged by -Wall. commit cfb82631fb683a0dc9bbc8f2d214646a8f1bca0b Author: Michel Dänzer Date: Thu Mar 15 17:12:43 2007 +0100 radeon: Fix build warnings. commit 50a524445ed1ea3c4fab56de772921ba86a21d35 Author: George Sapountzis Date: Thu Mar 8 17:43:48 2007 +0200 Move atioption.c from ati to atimisc. commit 52684241ba1ffb393cb655ecc09cbd0cef5b1717 Author: George Sapountzis Date: Thu Mar 8 07:07:02 2007 +0200 Move atiprobe.c from ati to atimisc. commit 2a1cd107a593630001799d6cd9e72c64222553b2 Author: Jesse Barnes Date: Tue Mar 6 14:35:50 2007 -0800 Add prepare/commit hooks to output and crtc func table commit 703c6fc0142ffc600285c13fe6dafecf988c0a1d Author: Jesse Barnes Date: Tue Mar 6 10:12:42 2007 -0800 Update for new CRTC resize hooks. commit 1e270b411cf691c69194932b864ee2c9db292263 Author: George Sapountzis Date: Sun Mar 4 18:21:49 2007 +0200 [mach64] Bug 5586: overlay scaler limited to 720 pixels on ATI Rage Pro. commit 54f9b8c1d01ecb97e2d4d247918f0efc86ed6037 Author: George Sapountzis Date: Sun Mar 4 18:16:40 2007 +0200 [mach64] Xv: use single surface and encoding structs. commit e1e55b533d3ae528c8da37dcb77ed906d05697fb Author: Dave Airlie Date: Sun Mar 4 19:11:34 2007 +1100 radeon: add option to set pci aperture size from config file This requires a drm > 1.26 to work commit 58ee31d015cf8bec0edca62a46faec0b3505be8c Author: Dave Airlie Date: Sun Feb 25 23:29:09 2007 +1100 fix typo commit 3cfe94d5438961b869766dacbcd13fde8b770ca2 Merge: 31c018c 3b43788 Author: Dave Airlie Date: Sun Feb 25 23:27:19 2007 +1100 Merge branch 'radeon-randrv12-v4' Conflicts: src/radeon_display.c src/radeon_driver.c commit 3b43788c45f51ad2d3e8e64383c412f4ddd97207 Author: Dave Airlie Date: Sun Feb 25 23:17:31 2007 +1100 cleanup radeon code against master server commit 24c6fa7cfac5602ba9e6e2f331bcac52fab258e5 Author: Dave Airlie Date: Sun Feb 25 21:43:54 2007 +1100 make radeon randr build against master server commit 4374895d393bf170134ccffc188521fe515d5a77 Author: George Sapountzis Date: Sat Feb 24 21:25:13 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 3. Cosmetic. commit 8b9a4ec8af90b2f9f0d0a3a7f6627061df7e01b3 Author: George Sapountzis Date: Sat Feb 24 21:22:49 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 2. Factor out to seperate function. commit bb226c9e7218d2a65c056fe74cb7eece0550670f Author: George Sapountzis Date: Sat Feb 24 21:20:53 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 1. Move LCD block from atimode.c to atimach64.c . commit 31c018ca4a18ce426b29006f103f56eee7f985fa Author: Roland Scheidegger Date: Wed Feb 21 13:47:37 2007 +0100 add missing part of last commit... commit df07fa14da73e92d1a6ee0173468ab5c075d1cbb Author: Roland Scheidegger Date: Wed Feb 21 13:05:42 2007 +0100 fix alignment issues with planar yuv and a bug with packed uyvy respect that all source planar yuv planes are already dword aligned. Some attempts to fix up odd widths and odd heights (which are a bit strange for 4:2:0 formats). They still don't quite work 100% correctly (at the borders) but neither do they with packed yuv formats. While here, fix totally broken packed UYVY format by inserting missing break... Both bugs reported by Felipe Contreras. commit dfcb431adfbbaaee0d262d32735585555a0cbde4 Author: Dave Airlie Date: Tue Feb 20 21:20:28 2007 +1100 radeon: move some i2c registers out into common register file These regs are more useful than just multimedia commit 7a25512415bb40b772491bb4a773dfe02ac8b71a Author: Alex Deucher Date: Fri Feb 16 00:44:11 2007 -0500 Add "DRI" option This option allows you to disable the DRI per card. It also removes the "RN50Force3D" option as it is now covered by this option. RN50 users should set this to TRUE if they want to force the DRI on. commit fa30ec6d5cd9bf4eb1a960592ca7311175219e4b Author: George Sapountzis Date: Tue Feb 13 15:35:32 2007 +0200 [mach64] PreInit: maxPitch, minor cosmetic. commit 1777dcc1956d910073e13322767d9a3de41a949b Author: George Sapountzis Date: Tue Feb 13 15:03:40 2007 +0200 [mach64] PreInit: pitchInc is local. commit 9cdf4fcc3a93a4e20244286392dc31a0b8e6a10a Author: George Sapountzis Date: Tue Feb 13 11:53:42 2007 +0200 [mach64] PreInit: Use goto bail. Match ATILock - ATIUnlock. commit 482b85144fee42b6543dcc97a75899e363e05e9e Author: George Sapountzis Date: Mon Feb 12 14:27:37 2007 +0200 [mach64] Enable RENDER acceleration on the Pro variants. commit 63248f0b4308a4487cda3aa22daa36e3e0d38d14 Author: Dave Airlie Date: Mon Feb 12 19:37:36 2007 +1100 fix LVDS by moving bios reading around commit 6a25f620d40cbb063de94aa6b5267296cd5a0670 Author: David Airlie Date: Mon Feb 12 15:59:43 2007 +1100 remove assignments to pOutput before it is created commit 9234d8045c5fefbd1a781209409e55a13e3e5370 Author: David Airlie Date: Mon Feb 5 11:53:18 2007 +1100 remove all the locking glxgears runs fine over screen changes without it commit eda9fb15e8bc042661a91a3d8c921006dfb3ddd9 Author: George Sapountzis Date: Tue Nov 21 04:02:41 2006 +0200 Consolidate atixv.c w/ atimach64xv.c, part 2. Move {Initialize,Close}XVideo from atixv.c to atimach64xv.c . commit 67b240ddd4a6549a23885afc723b6efa7c52db4c Author: George Sapountzis Date: Tue Oct 31 16:44:10 2006 +0200 Consolidate atixv.c w/ atimach64xv.c, part 1. Merge ATIXVInitializeAdaptor() in ATIMach64XVInitialiseAdaptor(). commit 4dac7896549392f7378cad9620618cec28f41a16 Author: George Sapountzis Date: Sun Oct 29 03:55:39 2006 +0200 Consolidate aticursor.c w/ atimach64cursor.c commit 23b12b9ff55224e8c3c45eb58ea5fbf2f747d82e Author: George Sapountzis Date: Tue Oct 31 16:10:07 2006 +0200 Consolidate atiaccel.c w/ atimach64accel.c, part 2. Merge ATIInitializeAcceleration() in ATIMach64AccelInit(). commit bc3b222b57d7edf7bdce00a53e8abd9047c314a4 Author: George Sapountzis Date: Sat Oct 28 19:29:12 2006 +0300 Consolidate atiaccel.c w/ atimach64accel.c, part 1. Move ATIResizeOffscreenLinear() from atiaccel.c to atimach64xv.c and make it static. It is only used by XV memory management functions. commit d876889add41c8052d4f3feaa21ddf384f5a7054 Author: George Sapountzis Date: Tue Nov 21 04:47:06 2006 +0200 Drop non-PCI support from atividmem.c - we require a PCI device (pVideo != NULL) - map the VGA framebuffer with xf86MapDomainMemory() commit 2c8b33b761e4411451aea1eea3a89d629aeea40d Author: George Sapountzis Date: Tue Nov 21 04:51:02 2006 +0200 Minor refactoring of pATI->Block0Base computation. commit a659b7235332e19659c56cc9d7af362bd8885a29 Author: George Sapountzis Date: Sun Feb 4 11:28:54 2007 +0200 Cleanup checks for pATI->PCIInfo. Fixes a bug where shadowfb would not be enabled by default in the non-accel case because pATI->PCIInfo is now set after ATIProcessOptions() is called. commit 9d77aabdff919360f0c9333105436c31f1f5749a Merge: ff8ea19 57822be Author: George Sapountzis Date: Mon Feb 5 19:16:51 2007 +0200 Merge branch 'mach64-pci-1' commit d7317604c843e21c1df048a9253ed55a1957cccd Author: David Airlie Date: Fri Feb 2 14:54:00 2007 +1100 get rid of mergetype and displaytype from radeon.h commit 15c68ac19ff9971ae02cf52036ba36ddea1a6759 Author: David Airlie Date: Fri Feb 2 14:30:16 2007 +1100 rename some variables to output from connector commit 72ef23ef7dd159d827e8e122482a58928d532268 Author: David Airlie Date: Fri Feb 2 14:26:29 2007 +1100 fixup mode probing a bit neater commit 96acf6b2b242454345cc4b9cfc7ca07e0b597b43 Author: David Airlie Date: Fri Feb 2 14:26:19 2007 +1100 bring over setproperty from intel code commit 76bc53f9b153880730ab61dcd2b6e4e7717e4058 Author: David Airlie Date: Fri Feb 2 14:15:03 2007 +1100 move i2c buses into outputs commit 47fb9ce657f018177a35b449a4d716dc03be9327 Author: David Airlie Date: Fri Feb 2 11:45:40 2007 +1100 fixup callers to crtcsetmode fixes my cursors commit 720730b1b0de632488d3b9818210ec5e9c7f07ae Author: David Airlie Date: Thu Feb 1 16:43:38 2007 +1100 add locks for crtcs and some missing lines from intel update commit 6748732658850ea506f623a3622aa7135513ffd0 Author: David Airlie Date: Thu Feb 1 16:26:31 2007 +1100 update to latest intel codebase modulo using their mode set and it breaks my cursor commit a77f08298dc7e097025e3f7f92e3665c0ef30095 Author: David Airlie Date: Mon Jan 29 16:12:24 2007 +1100 radeon: always reset cursor regs commit ff8ea19fcdce099732f9359e53cd62b9a04bfa6d Author: Alex Deucher Date: Tue Jan 30 21:11:09 2007 -0500 add option to force the DRI on for RN50 chips Allow user to force the DRI on for RN50 chips. 3D is not guaranteed to work on these chips, however in some cases it does. fixes bug 9802. commit 57822be75740f339445f2375d44632560f4bbe57 Author: George Sapountzis Date: Tue Nov 21 03:08:26 2006 +0200 Drop pATI->Chipset, no longer used. commit 8b7c88e9ed549777413136c0f2ccc61747b010d8 Author: George Sapountzis Date: Thu Dec 28 14:46:10 2006 +0200 Add option "probe_sparse" to force probing sparse I/O bases. commit 3654b786f1ad1f4e6bfb2fff5ff057254958f7c0 Author: George Sapountzis Date: Wed Dec 27 17:59:14 2006 +0200 Sane probe, based on work by Luc Verhaegen . commit 0117c9bde0d0bbb487bc259cf55e8066ebd63f6a Author: George Sapountzis Date: Wed Dec 27 17:49:45 2006 +0200 Drop checking of sparse I/O bases conflicts This will be handled with an option somehow. commit 87cf2f1874ca8a7cc492d2e2b6918ba69a8aa713 Author: George Sapountzis Date: Mon Aug 14 17:55:14 2006 +0300 Minor refactoring of module (un)loading for TV_OUT. commit 0b31333c9147af21c50493872779da12a3668e5d Author: George Sapountzis Date: Mon Nov 20 22:08:49 2006 +0200 Drop support for non-programmable clocks. From README.ati: Clocks for supported programmable clock generators: The driver currently supports all programmable clock generators known to exist on Mach64 adapters. Clocks for unsupported programmable clock generators: This case is unlikely to occur, but is documented for the sake of completeness. Thus: - check for (pATI->ProgrammableClock > ATI_CLOCK_FIXED) && (pATI->ProgrammableClock < ATI_CLOCK_MAX) - drop "probe_clocks" option - pATIHW->ClockUnmap is no longer used - pATIHW->ClockMap is only used with NewHW.crtc which is always ATI_CRTC_MACH64 and has the identity map, so drop it - (pATI->ProgrammableClock != ATI_CLOCK_INTERNAL) => (pATI->depth <= 8) commit c9a9ea5ebd1c27881c1fac19842cfa3af55c126e Author: George Sapountzis Date: Mon Nov 20 15:09:41 2006 +0200 Banked memory is no longer needed. - (pATI->BankInfo.BankSize = 0) in all cases, cull pATI->BankInfo - only keep the minimal pATIHW.SetBank interface for save/restore - clean ATISwap() a little, (NewHW.crtc != ATI_CRTC_VGA) - (UseSmallApertures == TRUE) <=> pATI->VGAAdapter commit 383e963e275d351ea3631c352f5795340162d69f Author: George Sapountzis Date: Sun Jan 28 00:44:31 2007 +0200 Always use the linear aperture. - drop (pATI->OptionLinear == FALSE) - AcceleratorVideoRAM is always set, i.e. VGAVideoRAM is not used - pATI->LinearBase is always set - xf86LinearVidMem() is now checked in atipreinit() for both CPIO and MMIO commit 9b126f45db27496c1ad16db65a61fe641a018983 Author: George Sapountzis Date: Mon Nov 20 20:38:59 2006 +0200 We always use the accelerator CRTC within the xserver. - cull (pATI->NewHW.crtc != ATI_CRTC_MACH64). commit 0abcb2b2c84a50e64bb6aa9e94760659ecf33add Author: George Sapountzis Date: Sun Jan 28 00:19:15 2007 +0200 Clean pATI->Adapter and pATI->VGAAdapter. - cull (pATI->Adapter != ATI_ADAPTER_MACH64) - treat pATI->VGAAdapter as Bool commit 817b4b5338dba4d8eb862f1f79ef0edb75aad7f4 Author: George Sapountzis Date: Wed Dec 27 21:16:18 2006 +0200 Keep PCI mach64 only, drop: - Chip < ATI_CHIP_88800GXC - Chipset != ATI_CHIPSET_ATI - Adapter != ATI_ADAPTER_MACH64 - depth < 8 commit d350860e29f043e98bfb1da74b26280f1755ab6f Author: George Sapountzis Date: Wed Dec 27 20:56:45 2006 +0200 Keep PCI mach64 only (atipreinit.c, atimode.c), drop: - Chip < ATI_CHIP_88800GXC - Chipset != ATI_CHIPSET_ATI - Adapter != ATI_ADAPTER_MACH64 - depth < 8 atimode.c only: - NewHW.crtc != ATI_CRTC_MACH64 This allows to drop VGACalculate(), VGAWonderCalculate() cruft early. commit 5fa77f2d122e7267911a15235338d8d3f9eece2e Author: George Sapountzis Date: Wed Dec 27 14:50:48 2006 +0200 Drop probing for VGA, VGAWonder, 8514, Mach32. - ChipHasSUBSYS_CNTL - Coprocessor - SharedAccelerator - SharedVGA <=> (VGAAdapter != ATI_ADAPTER_NONE) commit 1b2a9e1735da63bbb8cb41939668f789cee22579 Author: George Sapountzis Date: Mon Nov 20 02:35:56 2006 +0200 Drop AVOID_NON_PCI. This was not set anyway, because configure.ac would compute ATIMISC_NON_PCI and then test ATI_AVOID_NON_PCI to set AVOID_NON_PCI... commit 2fb84dd2fc1a663c7b9d77e706189439ffe08381 Author: Alex Deucher Date: Thu Jan 25 02:01:42 2007 -0500 I think we can say r300 support is not experimental commit e155659f4b006edff31f1fda88b32bf608dbeece Author: Alex Deucher Date: Thu Jan 25 01:59:27 2007 -0500 update man page. fixes bug 6457 Most cards support 2D and 3D now commit fa12fe1cc90dd745f3eea35a07d4f3efd652e7b4 Author: Dave Airlie Date: Tue Jan 23 19:37:51 2007 +1100 remove unused restore palette function commit 4d3649b84a3325043c38cece4499de0095cebd71 Author: Dave Airlie Date: Tue Jan 23 19:37:21 2007 +1100 remove isused and isactive commit 9149e763865598c307cbefc753ff6ebdeeaf32ae Author: David Airlie Date: Tue Jan 23 15:20:11 2007 +1100 radeon: fixup problem with cursor not going off Also fixup secondary dac detect to return unknown for now commit 2a13a3b641d9acf4f50472e1c8ba07633c3b78d6 Author: David Airlie Date: Tue Jan 23 10:36:06 2007 +1100 fixup init disp bandwidth This probably break old-style dualhead badly commit cbd84bed13582e82f8b2e84aa152602474c09cd4 Author: Dave Airlie Date: Mon Jan 22 22:19:46 2007 +1100 removed even more mergedfb remains commit 6296882135b183425a219efb75374d3b172de370 Author: Dave Airlie Date: Mon Jan 22 22:14:48 2007 +1100 remove more mergedfb relics commit 26e1bab2c7a4ad52710746265b3da495b54dab36 Author: Dave Airlie Date: Mon Jan 22 22:11:55 2007 +1100 radeon: fixup some of the video code after randr This may not be complete, I need to test on dual-head system later commit 9008e1caa45e4a18e6f3289c7b17036730fe578a Author: Dave Airlie Date: Mon Jan 22 21:16:47 2007 +1100 remove unused merged code commit e29a32d711553fcb4ca9928122ac285fe0b0c1a7 Author: Dave Airlie Date: Mon Jan 22 21:09:53 2007 +1100 add back overlay CRTC chooser this may not work yet commit aa9d04ba94a3cd60b248231da517e2817591fc69 Author: Dave Airlie Date: Sun Jan 21 20:29:56 2007 +1100 remove alot more mergedfb support commit e8be0056e8ff666f63a294691661f5dab289203e Author: Dave Airlie Date: Thu Jan 18 16:41:25 2007 +1100 remove mergedfb commit a648050a3cc60f92b1ca0b3d707aadf93d076d91 Author: Dave Airlie Date: Wed Jan 17 17:28:07 2007 +1100 move some cursor code around for show/hide commit d2ecfb507282726122bb8b0d17fd3637d0ae7d46 Author: Dave Airlie Date: Wed Jan 17 17:16:27 2007 +1100 make dri work again commit 369f7c85ceff983defb7657b80ec9cd3e5440b07 Author: Dave Airlie Date: Wed Jan 17 11:14:09 2007 +1100 comment out unblanking on VT switch commit bdb66a2042f02c4b57bd3c0181a00b39fcbdb232 Author: Dave Airlie Date: Sun Jan 14 21:07:05 2007 +1100 radeon: get randr-1.2 mode switching mostly working on my laptop The main change is to fix the dac macro + cntl register writes for rv350 and above, this still has a problem with resetting the same mode after connect disconnect cycle, need to talk to keithp commit aa0e7337815d4daca4df0671768621330b759011 Author: Dave Airlie Date: Sun Jan 14 19:17:32 2007 +1100 use more randr-ish names for variables commit 9d37f23aea43b74a7ec640e6b03617c8392e2572 Author: Dave Airlie Date: Sun Jan 14 19:10:11 2007 +1100 radeon: move blank/unblank to use randr commit 6bd4fe42789c38e7e804826715214ce6badcca6a Author: Dave Airlie Date: Sun Jan 14 18:38:59 2007 +1100 disable dpms on/off as it was writing regs before we wanted to commit 3949288ed26a91e180b178f4796f2f7e1bdc8ed6 Author: Dave Airlie Date: Sun Jan 14 16:26:39 2007 +1100 radeon: destroy and fixup LVDS crtc commit f5ffb9fb3bdd7cec020240c5831ae92ee744972c Author: Timo Jyrinki Date: Fri Jan 12 23:08:50 2007 +1100 ati: fix detection of some newer radeons using ati wrapper This is mainly due to the cards having a different resource 1. Fixes 6796 commit 1e690c57ad1dfaeb760ef6e799faa6398e9a0551 Author: Dave Airlie Date: Fri Jan 12 23:03:10 2007 +1100 always create a second CRTC I think this should solve any problems commit 25b36a4c56422ad8e25a4a1c55055c2f062213ca Author: Dave Airlie Date: Fri Jan 5 16:13:16 2007 +1100 minor randr1.2 fixups commit abe8791e4f9fa3e88273897b351387cd33822734 Author: Dave Airlie Date: Fri Jan 5 15:09:43 2007 +1100 hook up DPMS through xf86 commit 8a9c68c2234b91ed38555f892afdad30b9e4b455 Author: Dave Airlie Date: Fri Jan 5 15:09:15 2007 +1100 set binding for new heads commit d6a2b8aeb5a97ee907fd45b574bc6e4ab4b3aede Author: Dave Airlie Date: Fri Jan 5 09:33:54 2007 +1100 fix LUT commit ef1d36e56dec1fec37cee2dfd9cb5bf8ce2c485c Author: Roland Scheidegger Date: Wed Jan 3 15:56:23 2007 +0100 fix uninitialized mode regs (bug 9495) Since the reorganization of the mode setting code, the mode registers relying on state already set (by bios) were not read, thus clearing out all bits the driver does not touch. At the very least, this could lead to completely nonfunctional to misbehaving dvi output (see bug 9495). Fix this by using the SavedReg values, which also makes it more obvious that those are bits which were not set by the driver previously, but come from register readback. (cherry picked from 9506f7015a1e442f4ca0bd3bfae555ec7e8a5f37 commit) commit 55aa832157bdebcba2d58896777942d108c352b0 Author: Dave Airlie Date: Thu Jan 4 17:57:31 2007 +1100 fix cursor handling commit 4f8a7cafdc77e98dc44f9eced876560b1ee01117 Author: Dave Airlie Date: Thu Jan 4 16:23:39 2007 +1100 hook up crtc modesetting commit 52f749c8a613ee316044abe82156ee270412ced8 Author: Dave Airlie Date: Thu Jan 4 16:23:26 2007 +1100 fix typo commit d7ff61c6822cbede7f5b59b411048d33dbae9ee4 Author: Dave Airlie Date: Thu Jan 4 13:38:26 2007 +1100 hook up detection of output commit 50439d7e9f4f6f9933bacd59f8bb3e655a35dbc2 Author: Dave Airlie Date: Thu Jan 4 13:21:57 2007 +1100 fixup some function calls commit e067bfee92f2b0877108355619b2fb9188a9d15a Author: Dave Airlie Date: Thu Jan 4 13:21:45 2007 +1100 add more files for back compat commit f1f34627ffbe2136ac3e023c01c0430412919ded Author: Dave Airlie Date: Thu Jan 4 12:50:03 2007 +1100 make restore mode non-static commit 249ec67c296b34d0c7c1d78602628d2f7ce6a045 Author: Dave Airlie Date: Thu Jan 4 12:43:03 2007 +1100 more minor fixes to get radeon up to speed commit a43c1d55f5f855d9e6ae939dd4eec1c607b6d514 Author: Dave Airlie Date: Thu Jan 4 12:29:51 2007 +1100 bring radeon randr code inline with intel randr code commit c54a31565e3ea50f1af7b81b1bf0c0e437099f47 Author: Dave Airlie Date: Thu Jan 4 10:39:01 2007 +1100 radeon: fixup fastwrites to be always off My 8500 in i845 doesn't work with fastwrites even setup by the firmware. commit dda2bbfdc2e0da6e8b9cb8d1bf78b91f1bb8131f Author: Dave Airlie Date: Thu Jan 4 10:29:54 2007 +1100 radeon: don't touch Controller[1] on single CRTC cards. This might fix bug 9371 commit 9506f7015a1e442f4ca0bd3bfae555ec7e8a5f37 Author: Roland Scheidegger Date: Wed Jan 3 15:56:23 2007 +0100 fix uninitialized mode regs (bug 9495) Since the reorganization of the mode setting code, the mode registers relying on state already set (by bios) were not read, thus clearing out all bits the driver does not touch. At the very least, this could lead to completely nonfunctional to misbehaving dvi output (see bug 9495). Fix this by using the SavedReg values, which also makes it more obvious that those are bits which were not set by the driver previously, but come from register readback. commit d5c6306385cbc7b13a132ae72ed04e04e24d9886 Author: George Sapountzis Date: Tue Dec 19 09:45:24 2006 +0200 Use portable XORG_RELEASE_VERSION macro. commit 97df0a32b14e34f22dce9cd3b375c1ac5fb1c5eb Author: Michel Dänzer Date: Tue Dec 19 11:28:21 2006 +0100 radeon: Advertise 2D engine limits to EXA when we're not using the 3D engine. Also round up to the maximum width and height, as that's what EXA compares. commit 295823d0879a5b574bb79843a6acd43adb9259e5 Author: Michel Dänzer Date: Tue Dec 19 11:19:20 2006 +0100 radeon: Default to leaving AGP transfer mode and fast writes unchanged. Based on the assumption that firmware should have set up the card and host bridge appropriately for these settings, this may actually be safer, at least for the transfer rate; leaving fast writes enabled is hopefully safe as well, it certainly is on my sytem. See https://bugs.freedesktop.org/show_bug.cgi?id=9284 . commit 81f3b4070b70483d6da4f7587e52a64ac69c8ca0 Author: Eamon Walsh Date: Mon Dec 18 14:06:15 2006 -0500 Revert "Convert callers of LookupWindow() to dixLookupWindow()." This reverts commit 48ff33a1770f3684cd50184db8f1944a456d9974. commit 87592ffb717da1f0a1767a38918d16d60953599c Author: Dave Airlie Date: Sun Dec 17 20:10:58 2006 +1100 add setdpi call commit 41cd50487bc85708a3f791dfa70bf85223d91a65 Author: Dave Airlie Date: Sun Dec 17 20:08:07 2006 +1100 add displayWidth set commit 555e0f988c571aa47bc62ec6d9612a71f1a1f59b Author: Dave Airlie Date: Sun Dec 17 19:59:19 2006 +1100 add randr pre init commit 3e2c72d7ac80ed874bcf2887a5253dac1c9bb02c Author: Dave Airlie Date: Sun Dec 17 19:49:08 2006 +1100 fixup even more remnants of old code commit 4356b031886e00b3ed5ac1dbceeadebd7fc29fc2 Author: Dave Airlie Date: Sun Dec 17 19:47:45 2006 +1100 fix remnant of old code commit 17d39502a8dbea395051007aebffdf23644e9ee1 Author: Dave Airlie Date: Sun Dec 17 19:44:39 2006 +1100 use getddcmodes properly commit bf0b364cbd8682f297e2d110ece1f72e7151340d Author: Dave Airlie Date: Sun Dec 17 17:31:08 2006 +1100 fix up output namings commit 4962a5430844114de864418d803f3182b90792ff Author: Dave Airlie Date: Sun Dec 17 16:58:07 2006 +1100 remove some code that moved into server commit b47013f41249516ae82e22bd75caf573da2cc13c Author: Dave Airlie Date: Sat Dec 16 12:02:37 2006 +1100 hook up mode detect to new randr code commit 48ff33a1770f3684cd50184db8f1944a456d9974 Author: Eamon Walsh Date: Fri Dec 15 17:43:39 2006 -0500 Convert callers of LookupWindow() to dixLookupWindow(). commit 62a5e7565b66d7b7d65609c034f34b55bd266617 Author: Dave Airlie Date: Fri Dec 15 19:48:42 2006 +1100 bring over latest code from Intel git repo. this code doesn't work yet just realigns with intel work commit 29124400c7f193317d41d8cfd748371a239cfea1 Author: Dave Airlie Date: Sun Dec 10 18:00:17 2006 +1100 hook up randr crtc setting commit 120c854f185c1e7711cf0dee19303fdb8894d49d Author: Roland Scheidegger Date: Fri Dec 8 02:51:52 2006 +0100 radeon: avoid unnecessary OUTPLL/INPLL calls when displaying video It is not necessary to always emit a OUTPLL/INPLL pair when we display a video frame. On some chips there are erratas for which the workarounds cause a 10ms delay by those calls. This is related to #5876 though those affected may suffer from other slowness issues too. commit ccd37b3e88cdcfe03b7c707b6082339eb8f11e6b Author: Michel Dänzer Date: Thu Dec 7 18:41:48 2006 +0100 radeon: Move Xv option handling code into RADEONPreInitXv(). This unclutters RADEONPreInit() somewhat, but more importantly moves comparison against info->ChipFamily after that's initialized. commit 02be8c04a268eaa71bdfe891331758715fef4e71 Author: Michel Dänzer Date: Thu Dec 7 18:31:58 2006 +0100 radeon: Make cache flushing for R300 series less invasive. Instead of calling the DRM CP idle ioctl, just emit the cache flush commands into the CP stream. commit be46f7b6f7a729695a0affe2328077666283af12 Author: Michel Dänzer Date: Thu Dec 7 16:27:10 2006 +0100 Fix radeon compile warnings. commit 59c5b4f69c97fb233144677ab18095f88aed006b Author: Daniel Stone Date: Wed Dec 6 18:48:55 2006 +0200 Makefile.am: re-add ChangeLog to CLEANFILES commit 7611f14dc697b75cd7bb6493bb65b3a7ead379b8 Author: Daniel Stone Date: Wed Dec 6 18:47:33 2006 +0200 Makefile.am: fix changelog hook Make changelog hook safe for all situations. commit f2a9d2d61addc4e3d5e128d8078a04c9a136be6a Author: Roland Scheidegger Date: Wed Dec 6 00:16:41 2006 +0100 radeon: fix up packed yuv broken by planar yuv patch fix the forgotten leftuv value for packed yuv which is needed to get correct uv starting pixel (fixes broken clipping / non-null src start pixel as tvtime uses) commit d2aa57a4bdd4a0deb2c659bb07f3f57d1116f0d1 Author: Roland Scheidegger Date: Tue Dec 5 01:30:13 2006 +0100 radeon: use overlay scaler native planar yuv capability. Radeons can do planar yuv just fine, there is no need to convert all data to packed yuv manually. This saves some cpu cycles as well as some (graphic card) ram. commit 5d5fa1b86e5179b061f0db47fe0227d1b84c37f8 Author: Dave Airlie Date: Mon Dec 4 18:53:33 2006 +1100 update radeon driver to Intel driver xf86Crtc interfaces commit 51d1cf19e71dd5de47f2c6467f4a1685eefd9e1e Author: Dave Airlie Date: Sun Dec 3 16:30:01 2006 +1100 Add radeon randr 1.2 initial attempt at support This doesn't do a huge amount yet commit eb17c9aed2144701ad7bd1042b2905446e4d708a Author: airlied Date: Sat Nov 18 15:48:02 2006 +1100 move radeon over to not using X's mode management like the intel driver. this builds and at least seems to pick a mode.. might be near to hooking up randr1.2 soon commit 941b5120916ebff69ec0ee4ca7a46105d5306e5d Author: airlied Date: Sat Nov 18 10:41:12 2006 +1100 make radeon modes use generic code commit 608427283ea59cdfe3d85e1cf32719bc3809dc16 Author: airlied Date: Sat Nov 18 10:35:31 2006 +1100 add more functions from i830 driver This adds more generic functions from the i830 driver to the radeon commit d5b8cafc185b7d9fb909cb18a08615f81d89eaf8 Author: airlied Date: Sat Nov 18 10:22:38 2006 +1100 add generic mode handling code from Intel driver commit 9cfa82e1670ad85746926995972a535ddf03ee07 Author: Dave Airlie Date: Sun Dec 3 15:56:38 2006 +1100 move monitor detection into single function commit 032a00d155ecdcdcab3ca0d047f552fe6b338a97 Author: airlied Date: Sat Nov 18 10:23:12 2006 +1100 make DDC function more generic commit 2632ae24b3b50c69567e92611ce7c2cd2ee98baa Author: Dave Airlie Date: Sun Dec 3 15:22:38 2006 +1100 re-program bios 4 scratch so we know if the LCD panel is there post startup commit ddec94e8f2f5746bad0e998d15303e771803d22b Author: Dave Airlie Date: Sun Dec 3 11:07:23 2006 +1100 move crtc to connector mapping to a connector to crtc mapping. Still not allowing any clone modes, but heading in the correct direction I hope... there is a chance this will regress something from superpatch.. commit 218cb7f8db35d0ce8f9fc4ece72bd5ec3f52106f Author: Dave Airlie Date: Sun Dec 3 09:53:35 2006 +1100 radeon: dynamically allocate connectors commit f22fd02bc7f7ef67e33c9bd93eae2d7488669b5e Author: Dave Airlie Date: Sat Dec 2 19:48:00 2006 +1100 make CRTCs malloc'ed rather than part of Ent This is leading towards randr-1.2 believe me :-) commit 13efd1f75fbd29a4d1f69d7d5a5bb2b8d90ad820 Author: Dave Airlie Date: Sat Dec 2 19:16:41 2006 +1100 move HasCRTC2 to pRADEONEnt from info commit 3933b86390eb2f4198d490acd4914fb470c40f47 Author: Michel Dänzer Date: Fri Dec 1 18:00:17 2006 +0100 Make log file output clear about origin of used overlay scaler buffer width. commit 563dfb52f5b24d2f765fae0394e599c11dcf0b5b Author: Michel Dänzer Date: Fri Dec 1 17:56:19 2006 +0100 Increase default overlay scaler buffer width for RV350. Works with 1920x1080 video on my M10. commit 984ea3d9b7c27d8183ca94ad9d7905f03613fe10 Author: Michel Dänzer Date: Fri Dec 1 17:42:23 2006 +0100 Fix build warning. commit 9f5ea3981449f29ff204eb154166e8fc813205fa Author: Roland Scheidegger Date: Wed Nov 29 16:46:57 2006 +0100 radeon: bug #1462, predownscale to make HD video work. Use the overlay scaler's predownscale capability to make videos with large horizontal resolution work if it exceeds the scaler buffer width. Make the scaler buffer width user-configurable since we don't know it for all chips, and using predownscaling may otherwise reduce quality even if it wouldn't be needed. This should fix bug #1462. commit 35a5eaf5adf103ef57f8d4590dae25b0c50bd780 Author: airlied Date: Tue Nov 28 17:31:05 2006 +1100 fixup EXA after previous commit commit ba047ae863aac869595a31ea94f102084636fd29 Author: airlied Date: Tue Nov 28 17:26:10 2006 +1100 radeon: initial move framebuffer away from zero prep. In theory the driver should be able to handle the front buffer not at VRAM 0 In practice it didn't.. this is cleanup for at least XAA parts of the driver to allow for the frontbuffer to move. It has to re-organise a large part of ScreenInit so things happen in the correct order otherwise some things get setup in-correctly. (not sure EXA with fb not at 0 works yet...) commit 0d42cab2d889070ab6de05990e2b19724595f7af Author: Alex Deucher Date: Wed Nov 22 13:44:49 2006 -0500 clean up previous VIP commit. commit 8e0f57571228729cc40ed59266484ecc43819f44 Author: Alex Deucher Date: Wed Nov 22 13:38:01 2006 -0500 Don't mess with the VIP bus on mobility chips. Seems to cause fan problems on asus laptops (see bug 7463). We don't support video-in on any laptops at the moment anyway. commit e4850610596a08082a528c38186268b72012e78c Author: Alain Péteut Date: Wed Nov 22 12:54:55 2006 -0500 enable i2c for PCI_CHIP_RV250_If. allows AIW fuctionality to work. patch and testing from Alain Péteut commit ff38c2c9cf0c6acbdaf53b681ec721487cf411f8 Author: Michel Dänzer Date: Sun Nov 19 17:11:46 2006 +0100 radeon: Bug #8989: Fix page flipping artifacts with XAA. We still have to force-sync the pages on enabling page flipping with XAA as the second page may have been clobbered by the offscreen pixmap cache since they were last synced. commit 2dd0892817090709b2fb7ffba920595ada00fcad Author: Michel Dänzer Date: Sun Nov 19 17:09:11 2006 +0100 Fix compile warnings. commit 8c1b9269aaac746989bdb9be02915722bcf6fec0 Author: airlied Date: Fri Nov 17 18:47:50 2006 +1100 forgot SetPitch function is called commit 3a0338bb487739a1740ddfb4d36d53cfa7f798c6 Author: airlied Date: Fri Nov 17 18:37:00 2006 +1100 split mode handling code into separate modes source file commit 13e0a95564220d42ad8060b43b0aaaba3002157a Author: David Airlie Date: Mon Nov 13 09:35:18 2006 +1100 fix up issue with bindings and mergedfb commit 63444770ff30afeb134befed5bb3a5c28b7bc4e9 Author: George Sapountzis Date: Thu Nov 9 22:01:28 2006 +0200 [mach64] Prefer double-buffered visuals for GLX. So that 3D apps apropriately fail in DRI... commit 0411f68d71c75cda38ad46ad5c0f5cc3cda64464 Author: George Sapountzis Date: Thu Nov 9 22:00:56 2006 +0200 [mach64] Use asynchronous DMA mode by default. commit 8dd668db05e8f1282fa0e29a91e38c7cbdc97aa1 Author: Dave Airlie Date: Sun Nov 12 16:33:21 2006 +1100 radeon: abstract init display bandwidth from mergedfb commit 45a9f434b77ad892efcdba267a935135b972dd42 Author: Dave Airlie Date: Sun Nov 12 16:12:56 2006 +1100 add radeon Init2 function, to abstract some mergedfb mode setting commit d0828804aec0852afaca44ee41c4792edc40dbb4 Author: Dave Airlie Date: Sun Nov 12 15:59:02 2006 +1100 add initial controller binding, remove uses of mergedfb test commit 78061ca460c9d6fd338ccf273bbfa152f471622e Author: Dave Airlie Date: Mon Oct 23 16:49:59 2006 +1000 radeon: separate static controller setup from non-static commit f917f65e8d2b13d8b9bfc4320f4a935f5a5c4bff Author: George Sapountzis Date: Thu Nov 2 21:16:53 2006 +0200 Officially require libdrm 2.2.0 Note that this is only for the headers at compile-time. The driver still uses libdrm 1.2.0 from Xserver at run-time. commit ca8c148942371c9445f32985625ce38eabc016e1 Author: George Sapountzis Date: Thu Oct 26 15:40:46 2006 +0300 Handle .99 in version patch level. commit 23cec754158c94b43225b2070fc0a0b003e7bd25 Author: George Sapountzis Date: Thu Oct 26 15:39:49 2006 +0300 [mach64] EXA: reserve DRI buffers only when DRI is active. commit 9cd78af1d06f753e7bd7e1acaff25398bde45f6e Author: Dave Airlie Date: Mon Oct 23 16:52:07 2006 +1000 radeon: set preferred modes commit 914a5f0117ccb76292bdd81ea4a2a79d33319550 Author: Michel Dänzer Date: Mon Oct 23 10:13:24 2006 +0200 radeon: Pitch doesn't matter when height == 1. commit 2bcb51d66edaa944379cf8c8ca1ba91fffdc20a8 Author: Michel Daenzer Date: Sun Oct 22 17:26:28 2006 +0200 Bug #6756: Attempt to fix repeat picture acceleration. Always use normalized texture coordinates on R200 and fall back if a POT texture pitch doesn't match the HW's implicit pitch. commit dabffb8335027b60ca1fc554423e196dfb9acd6d Author: Henry Zhao Date: Tue Oct 17 21:17:47 2006 -0400 improved results for mergedfb xrandr refresh rates - bug 6966 commit 831fc4a009841f68fe161b6e0db5b212d7d8079b Author: Henry Zhao Date: Sun Oct 15 17:12:06 2006 -0400 fix bug 6966 (Henry Zhao, Shem Multinymous) commit 5425be996692425e57884e5a4c159fc79510e89f Author: Alex Deucher Date: Sun Oct 15 16:49:24 2006 -0400 clean up magic number commit 457178f418983041ea59df703a17513a47d17044 Author: Alex Deucher Date: Sun Oct 15 16:40:08 2006 -0400 Disable all ouputs on initial mode set. The ones we want will get enabled by RADEONEnableDisplay(). commit 3fb3f410931a13542fdd4c51c4c9ecada7b37d76 Author: Alex Deucher Date: Sun Oct 15 13:29:48 2006 -0400 Rework the output init code. Divide into separate functions for each output. commit 45e13f3c8786e75276cce85de4af653713d9b4d8 Author: Alex Deucher Date: Sun Oct 15 13:18:01 2006 -0400 Remove paneloff option. This is already covered by monitorlayout and shouldn't be needed with xrandr++. Also remove commented out Bioshotkey code. commit 4abb5b7afea8d37e95461335e52b16168e555dab Author: Alex Deucher Date: Sun Oct 15 13:10:22 2006 -0400 Remove Bioshotkeys option. Leave the bios as configured at boot. Most distros enable this option by defalt anyway, and with xrandr++ it won't be an issue anyway. commit 2933140b5f1f8a6e270460d8918a14943bd0f174 Author: Michel Dänzer Date: Sun Oct 15 17:05:02 2006 +0200 radeon: Use xf86XVFillKeyHelperDrawable() when available. commit 4edbfb9eb952f9b3f5f597749192c17baf15cdce Author: Michel Dänzer Date: Sun Oct 15 17:03:13 2006 +0200 radeon: Track screen damage all the time for page flipping. This way we don't ever have to forcedly synchronize the pages so we hopefully never clobber one page's contents when we shouldn't. commit c9c2ac2b42398f5bfad909f3289e2545bb7b3888 Author: Michel Dänzer Date: Sat Oct 14 15:49:22 2006 +0200 radeon: Don't try to synchronize pages when the CP isn't running. Also move the DamageEmpty() call into RADEONDRIRefreshArea(). commit c19915a401ccf69046bed03c8d5067f2e72a094e Author: Dave Airlie Date: Fri Oct 6 09:55:40 2006 +1000 always turn on DAC for scanning the CRT connect. Ubuntu 63994 - myself and BenH discussed this as a good idea on irc commit b8547aa89f93a7fefbefb1c0d2743999930ac785 Author: Dave Airlie Date: Wed Oct 4 01:44:24 2006 +1000 update version number to 6.6.99 in preparation for a 6.7 branch at some stage commit 23a6f97e08fd49e1cae03cd97cae67a5f06b7634 Author: Alex Deucher Date: Tue Oct 3 13:48:09 2006 -0400 FP timing regs required for both internal and external TMDS commit 829be884702043fe4c9e349488d2585bf0561ae9 Author: Alex Deucher Date: Tue Oct 3 13:41:21 2006 -0400 remove bogus registers commit cd900580dbc8928ebc28514162b4c1dbfe9fd5ae Author: George Sapountzis Date: Tue Oct 3 00:32:22 2006 +0300 [mach64] Fix build for !defined(USE_EXA). commit 22860a3c0685a25f982983654303ad02aedc02ec Author: George Sapountzis Date: Sun Jul 16 19:23:56 2006 +0300 Bug 6242: [mach64] Use private DMA buffers. Map the DMA buffers read-only. This eliminates a security problem where a client can alter the contents of the DMA buffer after submission to the DRM. commit cb53fe7c1e45937746e43437ae6adb0355306ae9 Author: Alex Deucher Date: Sun Oct 1 18:46:05 2006 -0400 fix LVDS plus internal TMDS commit 145c716de6d42778e447581578f3e4db13c9a653 Author: David Woodhouse Date: Sun Oct 1 18:22:14 2006 +0200 Fix radeon vs fbdev pitch calculation. Fetch the correct displayWidth from fbdevhw after setting the mode. commit d43ad88fa3913437f6987ab5ab46a38f0cb555a8 Author: Michel Dänzer Date: Sat Sep 30 19:25:20 2006 +0200 radeon: Add support for page flipping with EXA. Also use the damage layer directly instead of via shadowfb and blit dirty rectangles to the second page in LeaveServer in order to try and improve the tradeoff between performance and correctness. commit 146ea328b7962f56c6ab47fbe2adc7561b36189c Author: Michel Dänzer Date: Sat Sep 30 19:22:26 2006 +0200 radeon: Fix function name typo which could probably lead to an unresolved symbol. Also remove declaration of an unused variable. commit 6671c1b01bf29d8f1cacf9306ef658b967d8a3cf Author: Michel Dänzer Date: Sat Sep 30 18:29:45 2006 +0200 radeon: Always call RADEONGetAccessibleVRAM(). This fixes issues with Option "UseFBDev" and the new memmap code. OTOH, there is potential for this to break IGPs, but that's what Bugzilla and git-bisect are for... commit c979c7f87fc449cc9631820101edff82c3013e66 Author: Roland Scheidegger Date: Sat Sep 30 15:14:42 2006 +0200 radeon: Check ROM more thoroughly before treating it as an x86 BIOS. This prevents the ROMs on some Mac cards getting treated as x86 BIOSen, resulting in garbage values. commit 37c114acbabe35881c39642e293519e2635907aa Author: Michel Dänzer Date: Sat Sep 30 15:11:42 2006 +0200 Remove some dead code. Fix two compile warnings. commit 6d7b0763173f56050411d7bdf9a583b9bfc050c4 Author: Adam Jackson Date: Fri Sep 29 18:50:44 2006 -0400 Undo unintended configure.ac change. Dammit, git, grow a sensible UI already. commit f96ddd32d3a9e64dc0adec5c50386d6db5b182ee Author: Ronald Wahl Date: Fri Sep 29 17:51:42 2006 -0400 Hook up DFP power to DPMS events. commit f6b42149c5a3fee663575fe6bbe78b62695bdbc8 Author: Alex Deucher Date: Fri Sep 29 00:44:36 2006 -0400 tvdac handling was reversed between r200 and other chips commit c0660495080719c052d6393ede707755929102cd Author: Dave Airlie Date: Wed Sep 27 18:12:52 2006 +1000 radeon: check DDC info for both connectors not just the pScrn one. Otherwise we disable DDC before we've checked the CRT if LVDS is in use commit 5b98545618141e86164f3ce66469f9e16b1cf6d4 Author: Dave Airlie Date: Wed Sep 27 18:10:30 2006 +1000 radeon: don't move connectors around if LVDS connector is connector 1 On my laptop this allow me to plug or not plug a monitor without affecting my lvds commit 74c725bd86348b5bf9bba0c50e8a6a7885d7ff7b Author: Dave Airlie Date: Mon Sep 25 11:35:32 2006 +1000 radeon: cleanup some bits from superpatch commit 9827afaa40720a58e2fc029c0bf92ad2fe223d11 Merge: 10b4b46 ad8259c Author: Dave Airlie Date: Mon Sep 25 11:25:17 2006 +1000 Merge branch 'radeon-sp' commit ad8259c814629e741ed5567923f40879cc0c7051 Author: Dave Airlie Date: Mon Sep 25 11:25:03 2006 +1000 radeon : add back tv-dac register write commit 10b4b46c16ff3748856b732f9a39de40ba197112 Author: Dave Airlie Date: Mon Sep 25 09:08:47 2006 +1000 remove all CVS annotations from the ATI driver files commit 976dec04786e9b050945c290840b4cdc978c0b23 Author: Dave Airlie Date: Mon Sep 25 09:00:21 2006 +1000 radeon: put back in reverseddc code BenH claims it is needed, agd5f can fix it up later if it isn't. commit 980fb2f6bd7641c8c57769b0c67e3561903e89a9 Author: Dave Airlie Date: Sat Sep 23 08:31:56 2006 +1000 radeon: add some missing bits of superpatch for crtc registers commit 1ba4f36821e60289cad937abbb0edb273c88436c Author: Dave Airlie Date: Sat Sep 23 08:25:42 2006 +1000 radeon: finish radeon_driver.c import for register changes commit 547543bbefe605a453bfa5ae6d063ae02c5f040e Author: Alex Deucher Date: Sat Sep 23 08:21:59 2006 +1000 radeon: re-organise FP and CRTC register setting routines commit fd978140bcb7670f28c684c06c2b6c611c26bef4 Author: Dave Airlie Date: Sat Sep 23 08:09:57 2006 +1000 radeon: initial CRTC register setting alignment commit 406f4911e7ce821002c111d6bcdec35f5b56c943 Author: Dave Airlie Date: Sat Sep 23 07:59:24 2006 +1000 radeon: setup the radeon init function to use secondary commit 452f0f8079d65679905ed5178a256534ef0db0e4 Author: Dave Airlie Date: Sat Sep 23 07:41:57 2006 +1000 radeon: bring over final set of changes for radeon_display.c from susperpatch This brings over Alex's final set of changes... i'm unsure about the disappearance of reverseddc - alex to review commit a8b9aa69259a0706d0688d2656ece5a292799242 Author: Dave Airlie Date: Sat Sep 23 07:38:25 2006 +1000 radeon: align tabs and make display detection like superpatch commit 8d4ae98c528a2309dc3c545893dbba2e7f76916c Author: Dave Airlie Date: Sat Sep 23 07:26:44 2006 +1000 radeon: align some output with superpatch commit 65b54847c5e79b2ec3cb1a08b265229443c9deb9 Author: Dave Airlie Date: Sat Sep 23 07:22:31 2006 +1000 radeon: change function name to Displays rather than Monitors commit 7e16d9fff96dcdff8c25dbbe2a51be0023b7985a Author: Dave Airlie Date: Sat Sep 23 07:21:15 2006 +1000 radeon: make GetConnectedMonitors a static void commit 6f63b3dc8b3e2299f5f02abc1c565176d2d46cee Author: Dave Airlie Date: Sat Sep 23 07:19:43 2006 +1000 radeon: some minor alignments and cleanups for info-> commit c9f3ced3b1c194cacf1ab9436ee6c2d4efd3a8e9 Author: Alex Deucher Date: Sat Sep 23 07:16:10 2006 +1000 radeon: add reverse display option to switch displays on non-mobility cards commit e752443c540d9a94522050c61ef7c33d912fece5 Author: Dave Airlie Date: Fri Sep 22 07:10:10 2006 +1000 radeon: flesh out mapcontrollers commit 7a0e4eb47655c4701fc3a4b33b6c8e9f378ccc9e Author: Dave Airlie Date: Fri Sep 22 07:05:56 2006 +1000 radeon: add some info to the map controllers commit 75bf69c868be6164d0041a32f52244f1ef83e050 Author: Dave Airlie Date: Fri Sep 22 07:03:52 2006 +1000 radeon: add simple map controllers call commit 8ba5abd1329347c7fbf4b4d09c95da0d23b4884a Author: Dave Airlie Date: Fri Sep 22 06:58:41 2006 +1000 radeon: move comment commit e8d77b7c36fa791a2350a6f4b15728b15d8f3de0 Author: Dave Airlie Date: Fri Sep 22 06:55:51 2006 +1000 radeon: refactor blank/unblank commit 8534723f5710e2916b4a22efe22a6b7365cc8db6 Author: Alex Deucher Date: Fri Sep 22 06:36:03 2006 +1000 radeon: make DVI_I default connector commit d7fc79fd9f094ac462de0883af7e6030cb6195a6 Author: Dave Airlie Date: Fri Sep 22 06:35:34 2006 +1000 radeon: add enable display function commit 4a54886d510f26b29d27e5c9a73647554291b1a6 Merge: 70264d6 9fa176c Author: Dave Airlie Date: Fri Sep 22 06:00:04 2006 +1000 Merge branch 'master' into radeon-spm1 Conflicts: src/radeon_driver.c commit 9fa176c7989030e7340cc9b85d0b6a7b34303091 Author: Alex Deucher Date: Tue Sep 19 13:58:17 2006 -0400 Provide all resolutions (instead only the largest one) in MergedFB clone mode without config file (Henry Zhao) commit e742aeb28c7d9d6e75932c408bcc7c44af52e303 Author: Alex Deucher Date: Tue Sep 19 13:45:33 2006 -0400 fix large negative refresh rates with mergedfb (Henry Zhao) fixes bug 6966 commit 9c0c805704f1df1b66adc2a6b9313597ae5b86cc Author: Dave Airlie Date: Mon Sep 18 19:41:21 2006 +1000 radeon: fix rn50 memmap This should fixup the rn50/m6/m7 memory map problem that has been reported since BenH's memory mapping changes commit 70264d645724718a48ca229fedc04e33681b7d31 Author: Dave Airlie Date: Mon Sep 18 09:56:25 2006 +1000 radeon; put back old TV DAC code for now commit 53eb843ad8ec5a292dff0844330ecfa9b7b2a0cb Author: Dave Airlie Date: Mon Sep 18 07:55:21 2006 +1000 radeon: move code around in InitCrtcRegisters commit bcae4352079109a9dd16117bf9ec19dd215180bf Author: Dave Airlie Date: Mon Sep 18 07:33:48 2006 +1000 radeon: cleanup DPMS set on/off code to use new controller structure commit 87622f56b3dd7e2d2f00ad71e5b569eac31fb2b1 Author: Dave Airlie Date: Mon Sep 18 07:15:54 2006 +1000 radeon: cleanup DacPowerSet commit a417fa081926b2f84e2cbdc355cc7462d1ebdfad Author: Dave Airlie Date: Mon Sep 18 07:15:41 2006 +1000 radeon: fixup InitFPRegisters function call to not pass info commit 8bff57a938e92dfc8729e40f7aa9ad9a96262131 Author: Dave Airlie Date: Mon Sep 18 07:02:35 2006 +1000 radeon: copy of overupdated bios hotkeys code from Alex commit 76352c684d5e840c9f7ac0781e3ecb32951b32db Author: Dave Airlie Date: Mon Sep 18 06:54:28 2006 +1000 radeon: minor cleanup of masking for crtc registers commit a7b97697ed13ac25844890439ffba31524e03a16 Author: Dave Airlie Date: Mon Sep 18 06:53:23 2006 +1000 radeon: initialise controller structures commit 362ee3778764633cb4c9388aa329c5b715885038 Author: Dave Airlie Date: Mon Sep 18 06:41:14 2006 +1000 radeon: move InitFPRegisters up to align with superpatch commit 11fb9a14741746c752b0001c1b1d39a54e69657a Author: Dave Airlie Date: Mon Sep 18 06:35:50 2006 +1000 radeon: add tv dac adj lookup commit a15ac59c4d1a15380910be2a7438111b09161c81 Author: Dave Airlie Date: Mon Sep 18 06:35:28 2006 +1000 radeon: re-add ATI patch for rn50 modes commit d80ea2d67b63ea2f2ce0277952af186b69b19e7d Author: Dave Airlie Date: Mon Sep 18 06:30:30 2006 +1000 radeon: re-add DAC power on/off code around detect commit 0a93936f9f048b8837f1c765fea7ccb61f072697 Author: Dave Airlie Date: Mon Sep 18 06:25:15 2006 +1000 radeon: restore secondary head behaviour commit 6da5a0bfdedb2062ec835f45514c22917abdcf4c Author: Alex Deucher Date: Mon Sep 18 06:16:58 2006 +1000 radeon: move to using Alex's controller structure commit cd1bc1d1febf0a79d835c7dc8b353123278dec51 Author: Alex Deucher Date: Mon Sep 18 02:44:09 2006 +1000 radeon: add save/restore of some new registers move some registers about commit 9b5c4cf8a98b0c20bb821f5003495481fbd0c10c Author: Alex Deucher Date: Mon Sep 18 02:28:32 2006 +1000 radeon: add pre init controller function commit 311e776c4429485d29aaf11d350cab8e6fe7564b Author: Alex Deucher Date: Mon Sep 18 02:21:49 2006 +1000 radeon: add missing tv-out registers to register list commit 65cb77c79c2c5cb536494200d4fba6815d7e771c Author: Alex Deucher Date: Mon Sep 18 02:21:29 2006 +1000 radeon: restructure files along lines of Alex's superpatch commit 25fa71ca0a24190cc8be2e80769443e0e09303b3 Author: Henry Zhao Date: Mon Sep 18 03:15:54 2006 +1000 Power up DAC around check for CRT connectedness commit 39fcac431eba60adf2d4e357cfc811dbae36a4e1 Author: Henry Zhao Date: Mon Sep 18 03:09:43 2006 +1000 Bump up clock rate for ES1000 to allow higher resolutions commit 7d9e2b450f0fa42553156f57572a6dab70a0ea13 Author: Dave Airlie Date: Tue Sep 12 07:04:23 2006 +1000 radeon: this stops mergedfb working on my ATI M7 development board I've no idea what this is for, it came from an ATI codedrop and it may fix some laptop or production system, but it looks to me more like a dirty hack than a true fix, as I have an M7 which I need to specify CRT for the second head and it breaks mergedfb for me. commit ad1778eb1eb59de14ec309b99131931cbccf64e9 Author: Michel Dänzer Date: Sun Sep 10 23:32:44 2006 +0200 Revert "* [ Bug 6966 ] large negative refresh rates reported" This reverts caaed927a07ffbac68b08246185ef93c1e7bb98c commit. See https://bugs.freedesktop.org/show_bug.cgi?id=8137 . commit 6e92981b024b59c2237f949321f6b2591dada519 Author: Tilman Sauerbeck Date: Sun Sep 3 21:11:10 2006 +0200 Removed the warning re. the r300 DRI driver status. commit caaed927a07ffbac68b08246185ef93c1e7bb98c Author: Henry Zhao Date: Thu Aug 31 13:27:45 2006 -0700 * [ Bug 6966 ] large negative refresh rates reported * [ Bug 6309 ] radeon/r128 fails to read hsync/vsync rates when rang * descriptor is missing * [ Bug 5473 ] Blank screen with Radeon Mobility X700 (Acer Ferrari 4005) * Reboot should not be needed for external CRT to function when connected later on Ferrari 4000 * Modes need to be sorted, and sorted correctly * Provide all resolutions (instead only the largest one) in MergedFB clone mode without config file * Bump up clock rate for ES1000 to allow higher resolution commit 6d2028b84ff2b82c849b74776258f8e52c952e36 Author: Dave Airlie Date: Fri Aug 25 10:05:44 2006 +1000 and of course it takes two commits to do a simple commit commit e90c6feddbcd719fda3bbc3d48fd55045e9d5adc Author: Dave Airlie Date: Fri Aug 25 09:59:58 2006 +1000 add changelog hook from nv driver commit 1e06212f792d1ed1f7545e16824b86fbd34fa284 Author: Adam Jackson Date: Thu Aug 24 19:52:30 2006 -0400 Enable CPIO in the atimisc driver on ia64 platforms. This fixes many mach64s, but potentially breaks mach32. Mach64 is widespread on ia64 machines but PCI mach32's are quite rare on any platform. commit dfa47b09b5b8d7eeaa3f8ae629ebb3c7efb51511 Author: Adam Jackson Date: Thu Aug 24 19:50:46 2006 -0400 Disable DRI on xpress 200{,m} since we know it's broken. commit 1dcd9b1f75ba2307beb42556aa7f2f945171d5fb Author: Adam Jackson Date: Thu Aug 24 19:42:26 2006 -0400 Disable DRI on RN50 in a more pleasant way. Rather than publish a non-existant driver name for RN50, just don't bother initializing it in the first place. commit 64b18e246586b1043a12f381a9d4c834464ed9b5 Author: Dave Airlie Date: Fri Aug 25 09:40:04 2006 +1000 update version numbers for release commit be229d97e1f0282f2099c7ace7cb257a2738a58f Author: Dave Airlie Date: Fri Aug 25 09:39:46 2006 +1000 make colortiling default to on all cards commit 750ed51bc3d5119e2d2a91a05ae5a971dcd3b88a Author: George Sapountzis Date: Mon Aug 7 17:09:02 2006 +0300 [mach64] RENDER support: drop caching DP_WRITE_MASK. Caching DP_WRITE_MASK causes artifacts, e.g. with evas_xrender_x11_test. commit b2beea2fa8949874d3d57fb9b43fe85cc08a8bff Author: George Sapountzis Date: Sat Aug 5 18:36:24 2006 +0300 [mach64] RENDER support: save/restore, cache texture registers. commit 43aaed99950640c3695b3c2b91faabf00c6338a7 Author: George Sapountzis Date: Sat Aug 12 22:12:07 2006 +0300 [mach64] RENDER support (bug #6877). RENDER accleration is disabled by default. It is strongly recommended that the patch from bug #6772 and the 'exa-damagetrack branch' are merged in the xserver before enabling RENDER acceleration. To enable RENDER acceleration, add the following in xorg.conf: Section "Device" [...] Option "AccelMethod" "exa" Option "RenderAccel" "true" EndSection commit d113f40fd97408661193895ff3aa82262f100143 Author: Dave Airlie Date: Sat Aug 12 17:16:33 2006 +1000 radeon: make some local data static This is inspired by a patch in XFree86 from David Dawes, it isn't the same as we have different gamma curves. commit a1da2b5e0a38feae01107676a76bdc5c185ad34b Author: George Sapountzis Date: Sat Aug 5 03:18:34 2006 +0300 [mach64] Halve max w/h for hardware-accelerated operations. EXA hits these limits for some operations on offscreen pixmaps and GTPRO seems to support the reduced limits. commit a66c8d2f9855caa10142b39f155dd8232b1f2389 Author: George Sapountzis Date: Sat Aug 5 03:16:56 2006 +0300 [mach64] EXA: add memcpy-based UTS/DFS. EXA hits more optimized paths when it does not have to fallback because of missing UTS/DFS. commit 0fb8503d60cf646c91a806f9ed322f9ceff18baa Author: George Sapountzis Date: Sat Aug 5 03:16:15 2006 +0300 [mach64] XAA: minor refactoring of memory manager setup. - DRI: factor out to separate function and add comments on layout - no DRI: factor out to separate function, maxScanlines is always equal to ATIMach64MaxY commit e203d86643d5d70bf18248712d05b72b79aee705 Author: George Sapountzis Date: Sat Aug 5 03:15:42 2006 +0300 [mach64] EXA support. commit dc1e289a611a17090e6dc7ae8a8d3f26d20df4eb Author: Samuel Thibault Date: Sat Jul 29 01:05:35 2006 +0300 Bug #6623: Fix I2C bus Mach64 initialisation failure. commit b377f403e0cd5253402ef3945e5944d1a2763a94 Author: Marc Aurele La France Date: Sat Jul 29 01:03:34 2006 +0300 Fix warnings for Option:1 bit fields. commit 91b8b0ca41ad0b9659f0982a05148cab8558e9d5 Author: Marc Aurele La France Date: Sat Jul 29 01:02:48 2006 +0300 Bug #807: copy throttling. Fix corruption associated with the engine randomly not waiting for a copy operation to commit its results. commit 7800407a2db4b7307192bf3b43fffb9c4748b9c0 Author: Marc Aurele La France Date: Sat Jul 29 01:00:56 2006 +0300 Bug #807: invalidate read-back cache. Fix corruption when scaling 1-pixel wide pixmaps, in which case the first CPU read of the framebuffer will return stale data. This bug always manifests itself in mach64 EXA (to be committed soon), with this patch mach64 EXA passes rendercheck. commit 49b11c540d37152eee4907ab30353ede01e4fb56 Author: George Sapountzis Date: Sat Jul 29 00:52:28 2006 +0300 Bug #807: split out TestRegisterCaching block for DP regs. commit 290c5aaa580428bc4748a47e4b9bcc22b90fc8d4 Author: George Sapountzis Date: Sat Jul 29 00:51:53 2006 +0300 Bug #807: split out TestRegisterCaching block for DP regs. commit fba8c839b47e2c8d6a6d65950c3431ff5b870aa0 Author: Michel Dänzer Date: Sun Jul 23 18:51:47 2006 +0200 Bug #6819: Fix broken rendering with *8b8g8r8 source formats. Use the corresponding texture formats with R200 family. Unfortunately, it looks like the R100 family can't accelerate these source formats, so we have to fall back for them. commit 60ebe97e2d5d27c2bf4213e201cef74503809cb6 Author: Tilman Sauerbeck Date: Mon Jul 3 19:37:28 2006 +0200 Move variable declarations before statements to be C89 compatible commit 6900ff3c5e574881b1470e2363b200e99ab8bf3e Author: Alex Williamson Date: Mon Jul 3 13:09:47 2006 +0200 Bug #6872: Disable digital output while reading ROM with Radeon 7000. This is a workaround for ATI Radeon 7000 erratum F1. commit 920ac1f56fad6f48a30e65836ce054815f270738 Author: Michel Dänzer Date: Mon Jul 3 01:21:18 2006 +0200 Do even less cache flushing when the previous engine mode is known. OTOH, flush everything when the previous engine mode is unknown, and mark the engine mode as unknown in a couple more cases. commit dd0dd4bab76907b4b1b6d814f24e73e57d71f587 Author: Eric Anholt Date: Mon Jul 3 01:10:10 2006 +0200 Bug #6762: Remove gratuitous cache flushing. commit 22f165f290f57e638d198f24a37f62fc16b72bae Author: Michel Dänzer Date: Mon Jul 3 00:39:45 2006 +0200 Build and warning fixes for !defined(USE_XAA). commit ea5105230c7c3519730b8d3c250e9ba9a4e4374a Author: Michel Dänzer Date: Mon Jul 3 00:03:22 2006 +0200 Reserve HW cursor memory statically instead of from EXA offscreen. As a result, quite a bit of code can be removed that attempted to deal with the EXA offscreen memory disappearing, with varying success. Because the HW cursor memory is now always immediately after the front buffer and before the back buffer, this also fixes bug #6808. As the HW cursor memory is now reserved statically with EXA and XAA, change RADEONUseHWCursor() to check info->cursor instead of info->cursor_offset, for which 0 might become valid with HW cursor enabled in the future. Change info->cursor_offset from unsigned long to CARD32 as the corresponding register is 32 bits wide, and to avoid issues with printf. commit 66586f905857ea5bf37cb5d34949cd450a9ed067 Author: Michel Dänzer Date: Sun Jul 2 23:38:20 2006 +0200 Clean up some redundant code. commit 1159c85861dc507ebf323aca82e32fcc67726420 Author: Michel Dänzer Date: Sun Jul 2 18:24:28 2006 +0200 Bug #6548: Fix playback of interlaced video with more than 1023 lines. This will still break with 2048 lines... commit 11bedb7c845fc6074383890d5525315aebe05f2c Author: Michel Dänzer Date: Sun Jul 2 17:03:23 2006 +0200 Bug #6939: Disable RENDER acceleration by default on RN50. Based on patch from Weixing Zhang, but still allows enabling it with Option "RenderAccel". commit 4a0c22e32901a510c7aad070be25c31519c284e3 Author: Weixing Zhang Date: Sun Jul 2 16:55:25 2006 +0200 Bug #6939: Disable 3D acceleration on RN50 by setting invalid ClientDriverName. commit 9c4a1e3300d30b23806988aa9328fc6ef92e2663 Author: Frank Gevaerts Date: Thu Jun 29 18:21:22 2006 +0200 Fix build for !defined(USE_EXA). commit ee0544b670567491b7770f469a64a6cd85519ba1 Author: Michel Dänzer Date: Thu Jun 29 18:19:58 2006 +0200 Remove unused variables. commit 15c556f5a8c9069d3dd00ce139d46c39b7298951 Author: Michel Dänzer Date: Thu Jun 29 18:18:21 2006 +0200 Don't declare unused variables on __powerpc__ and __alpha__. commit 055ac2836ec0afd51cf554d043a59068c36a07d3 Author: Michel Dänzer Date: Thu Jun 29 18:14:45 2006 +0200 Fix strict aliasing violation flagged by gcc -Wall. commit 4b1904017caa976c138594a86e75feaf470e72b5 Author: Dave Airlie Date: Mon Jun 26 20:34:34 2006 +1000 radeon: force CP and VIP clocks on some r300 and rv100 chips. fglrx appears to do this on r300 and Jerome Glisse has spent most of his life tracking down what caused the 9800 to lockup. This is my attempt to fix this. Please report if it works for you. Signed-off-by: Dave Airlie commit c5d8c8db3e75976687bfb364f0a7b235c7ae8793 Author: Michel Dänzer Date: Sat Jun 24 16:01:19 2006 +0200 Bug #7274: Fix corruption with 'small' accelerated DownloadFromScreen transfers. commit f25ba3dc0e7850f0b1b78f54c0e7211bf2e81b3a Author: Tilman Sauerbeck Date: Fri Jun 16 11:38:18 2006 +0200 Remove obsolete FIXME. commit 764013ec61b9043f1487513658e374569f7154a9 Author: Tilman Sauerbeck Date: Fri Jun 16 10:56:02 2006 +0200 Use AC_CHECK_HEADER() to check for exa.h commit 3c701d49b3eb7adb82267cec53163e475913aca3 Author: Tilman Sauerbeck Date: Fri Jun 16 09:59:29 2006 +0200 Use AC_MSG_RESULT() instead of echo for check results. commit dbef62615f38aebf4cdc579e3b26a7e7c719abc4 Author: Tilman Sauerbeck Date: Fri Jun 16 08:50:49 2006 +0200 conditionally declare pPCI and PciReg, too commit a01c01787cfbe3706ae7747cde1657abd79ecdaa Author: Michel Dänzer Date: Wed Jun 21 09:38:47 2006 +0200 Bug #7283: Build fixes for !defined(XF86DRI). Thanks to Matthieu Herrb for pointing out some of these. commit 79d1c573133e64ddf4446b6bb0eaab4a5a6c73ab Author: Michel Dänzer Date: Sun Jun 18 17:39:09 2006 +0200 Implement accelerated EXA DownloadFromScreen hook. x11perf -getimage numbers only increase by about 20-30% on my PowerBook with an M9, but by about 100 times(!) with a PCIe X550. I suspect the former could perform better with PCI as opposed to AGP transfers, which would also remove the need to disable this by default with AGP. commit 2bcdc7cfd013bd457d35f927390e5cc3544f30f1 Author: Michel Dänzer Date: Sun Jun 18 16:01:00 2006 +0200 Remove #include , not used here. commit 25a5ccb63a9e3074b4c8eaf48844877d84ff76bb Author: Michel Dänzer Date: Sun Jun 18 15:26:55 2006 +0200 Prefer visuals with stencil when it's hardware acclerated. Also make the formatting of the if statements consistent. commit 8fcc436f19f9c1371295af2d0c45608fb43c584b Author: Michel Dänzer Date: Sun Jun 18 15:16:08 2006 +0200 Take part of the blame for the radeon driver. commit c8366d7b457565a06acdf6b40c5448c7f13f1641 Author: Michel Dänzer Date: Sun Jun 18 14:24:14 2006 +0200 Add Option "DepthBits". This allows getting higher depth buffer precision and stencil hardware acceleration in depth 16 or saving some video RAM at the cost of these features in depth 24. commit 23a21d00db6f3b88b54c44648f968018a03677d3 Author: Tilman Sauerbeck Date: Fri Jun 16 16:37:07 2006 +1000 [PATCH] move the declaration of pMach64 into the correct ifndef statement Signed-off-by: Tilman Sauerbeck Signed-off-by: Dave Airlie commit c6b33db9d2c751e34c2152b0bb7e0e84a812589f Author: Dave Airlie Date: Fri Jun 16 16:22:03 2006 +1000 ati: prepare for release Update some versions for release commit 9c534b5330534fc6cf392936a9b200a5128c787c Author: Michel Dänzer Date: Thu Jun 15 16:09:55 2006 +0200 Some more ignores. commit 3d68698647fb17a6f5ae9a225f552cb0130fa946 Author: Michel Dänzer Date: Thu Jun 15 16:07:15 2006 +0200 Fix semantic glitches pointed out by gcc -Wall. The radeon driver builds warning-free with gcc -Wall here now. commit ab2b48e0df328fd08a2412911126b3184a601aea Author: Michel Dänzer Date: Thu Jun 15 16:06:13 2006 +0200 Remove another unused variable. commit 56bd5a370472663af5607cd327f757367b238db0 Author: Michel Dänzer Date: Thu Jun 15 15:35:05 2006 +0200 Fix some more cosmetic warnings. commit ec93e08b24f7c0e583970d08bfe18ad142e6b047 Merge: 051c49d 6ca9862 Author: Michel Dänzer Date: Thu Jun 15 15:03:27 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 6ca986242c80bcfe7ca2d435a772bbdf034892c4 Author: Dave Airlie Date: Thu Jun 15 21:24:46 2006 +1000 remove unused variable commit 9a5f5bc0d3f5e62b79355993ca6246382394daee Author: Dave Airlie Date: Thu Jun 15 21:24:16 2006 +1000 remove all printf specifier warnings on Linux commit 051c49d0f002c72d1d8f15f6df264d8b093d4e95 Merge: a840afc dfac819 Author: Michel Dänzer Date: Thu Jun 15 13:10:44 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit dfac8191dbda29ef7f6ce33d7356fee89c17d59b Author: Dave Airlie Date: Thu Jun 15 21:05:16 2006 +1000 fix last ati*.[ch] format specifiers commit 33525540f3a9d6760c6edcfe765d2a004a6b894f Author: Dave Airlie Date: Thu Jun 15 21:03:01 2006 +1000 fix more printf formats commit 6bcf6f29af24b6725e097dd72af8e8b9f6d0676c Author: Dave Airlie Date: Thu Jun 15 20:59:33 2006 +1000 some more unused variable cleanups commit a840afc75a0453b4694e3f987ebdbddc6844a169 Merge: c90c49d d511ef4 Author: Michel Dänzer Date: Thu Jun 15 12:46:58 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit d511ef486a15b582e5d1708a17a00701f5cf1ccd Author: Dave Airlie Date: Thu Jun 15 20:39:22 2006 +1000 ati/r128: add includes to get C function decls Also fix a void pointer cast commit f46c3bebe821ee0031770d98d04bd406d1abb9ed Author: Dave Airlie Date: Thu Jun 15 20:34:56 2006 +1000 fix some more unused variables and bad parameter passing commit 6c3f81683abab8ff6b8f2fcaf01a2a1a63af5ef6 Author: Dave Airlie Date: Thu Jun 15 20:25:00 2006 +1000 ati: fix -Wall in atidri.c atidri.c has some parameter passing bugs, fixed those and cleaned other warnings. commit 58c6aac0669101481ef6b8217e5cede4573ece42 Author: Dave Airlie Date: Thu Jun 15 19:58:11 2006 +1000 theatre: fix all -Wall warnings in theatre* This fixes all the warnings, it doesn't clean up the horrible mess that is theatre*.[ch]. commit c90c49da3844f93d2d29070b15bb7def72b98b0f Author: Michel Dänzer Date: Thu Jun 15 10:29:46 2006 +0200 Collapse .gitignore files into single toplevel file, sorted with LC_ALL=C. Suggested by Keith Packard. commit b7a3e4c9b33f72ae447f99c0c765f24fce988142 Author: Michel Dänzer Date: Thu Jun 15 09:45:12 2006 +0200 Fix some implicit function declarations. commit 556ddc9c41020271e92389a3900d097ec443c625 Author: Michel Dänzer Date: Thu Jun 15 09:30:43 2006 +0200 .cvsignore -> .gitignore commit 4708327969a21fc171dcd80a1b506028cc8e4f90 Author: Dave Airlie Date: Thu Jun 15 07:37:03 2006 +1000 ati: remove Changelog from ATI driver. commit ecbec8379c24bd6c16ced674d5e6affcd3985e46 Author: Michel Daenzer Date: Thu Jun 8 17:29:12 2006 +0000 Bug #5678: Fix setting of transfer mode for AGPv3 devices (Tilman Sauerbeck). commit 874ff105bc63c4fc242fbabaec04fde2cb81fdd4 Author: Daniel Stone Date: Sat Jun 3 10:50:33 2006 +0000 Bug #1889: Stop the CCE before an engine reset. (Conn) commit f9db5595fe4d62c54b3a501b2af64b4e2b7035cd Author: Michel Daenzer Date: Sun May 21 14:33:34 2006 +0000 Derive ATI_VERSION_{MAJOR,MINOR,PATCH} from package version in order to hopefully confuse bug triagers a little less. commit 25ba85cab8b3d831da646fef19f01769410fc958 Author: Alex Deucher Date: Wed May 10 02:46:37 2006 +0000 - remove obsolete option "OverlayOnCRT2" (bug 6488) commit ede75fe2b1850a4d9f03c724b7c1d1ed65e60f2f Author: Michel Daenzer Date: Tue May 9 14:40:23 2006 +0000 Drop support for radeon DRM <= 1.7. The 2.4 kernel has version 1.7, and various problems up to system hangs on X server startup have been reported with that and DRI enabled. commit bc93a46c4fe499f23b9c0ff52e2e36b4c587f7d6 Author: Michel Daenzer Date: Mon May 8 09:29:34 2006 +0000 Bugzilla #4640 Patch #5273 : Add cases for FOURCC_RGBA32 and FOURCC_RGB24. This prevents clients from receiving incorrect data sizes with these formats. (Jan Schmidt) commit 2b0cdd9448a24ea067b0d78f319b99c1041df2e0 Author: Benjamin Herrenschmidt Date: Wed May 3 04:25:27 2006 +0000 Enable decoding of version 4 TMDS PLL config tables, they actually work, the problem in the comment only concerned pre-production cards that Hui tested apparently. Also set back the default value to what it was initially, fixes some more cards that don't have a proper table (Mac Mini for example) commit 36c04b88416905b9ae305583e8e34fefdbfafc50 Author: Michel Daenzer Date: Mon May 1 17:49:41 2006 +0000 Bugzilla #6755 Patch #5536 : Change HostDataBlit interface to take dst_offset_pitch and coordinates instead of just a destination pointer, as the latter is not sufficient with tiling. Also, use HW clipping to avoid overwriting destination data outside of the specified width. Adapt to new HostDataBlit interface. This fixes corruption with UploadToScreen to the front buffer (from exaPutImage). commit b90d3710e67caad0686efab491c2b76ae877920c Author: Michel Daenzer Date: Sat Apr 29 21:30:23 2006 +0000 Bugzilla #1992 Patch #4988 : Fix Option "DisplayPriority" "HIGH" for R300 family. commit 30f3ce5c5ba205a23748def11de019ee727897f3 Author: Michel Daenzer Date: Sat Apr 29 20:34:57 2006 +0000 Properly de-initialize EXA driver data, so EXA can be initialized again in the next generation. commit d705429c230c9cc1645ae540a51dba62cae9f23e Author: Michel Daenzer Date: Sat Apr 29 20:18:48 2006 +0000 Fix tests for (un)forcing HW cursor. The broken tests caused problems when switching to console with 3D clients running. commit 6142cb079d4a5844e4863c800baf4ae19c636af5 Author: Michel Daenzer Date: Sat Apr 29 20:12:38 2006 +0000 Prefer double-buffered visuals. As a consequence, the root window's visual is double-buffered by default, which is desirable in a number of situations, in particular when running a GLX compositing manager with AIGLX. commit eb841974d041b19461b7fb726687df8938b2e39b Author: Eric Anholt Date: Fri Apr 28 02:55:08 2006 +0000 Bug #6761: Fix font rendering in non-DRI mode by replacing RB2D_DSTCACHE_* with RB3D_DSTCACHE_*. The RB2D versions are read-only mirrors of the RB3D. This is masked when DRI is enabled because the DRM uses the right registers in its flushing. commit 85e2ee6de6fd347aad66785ec7119f92013cd994 Author: Dave Airlie Date: Wed Apr 26 08:38:47 2006 +0000 Make the ATI driver use the PCI BAR size to determine the MMIO register aperture size. Otherwise it tries to overmap things if they are up near the end of memory. commit 13b19edf5accb7427436d3f0b1c9a9efb4fe98fa Author: Eric Anholt Date: Wed Apr 26 07:26:15 2006 +0000 Add support for some component-alpha operations (InReverse, OutReverse) necessary for testing upcoming general component alpha acceleration assistance in EXA. Tested with rendercheck on an r100. commit 44a45bcb82d49349f4fdfae3e4b8f24f98d99b46 Author: Eric Anholt Date: Tue Apr 25 23:31:56 2006 +0000 Use a CPPFLAGS with XORG_CFLAGS so that the exa test can actually find its headers and not fail. Also correct some nearby spelling. commit cc1825b503ce7e785cbb4611fd177477a1081b6e Author: Benjamin Herrenschmidt Date: Mon Apr 24 07:44:52 2006 +0000 Fix enabling of external VGA output on some cards with dual entity setup instead of MergedFB. This was broken due to bogus manipulations of a register between the 2 entities. This fix is a big "violent" in that it always enables the analog output regardless of what is plugged. It should work though (at the expense of some additional power consumption). A proper fix should be easy to do once Alex gets his output mapping rework in. commit a66145bc9d487f7e19237cf292f12750cb959f61 Author: Dave Airlie Date: Fri Apr 21 00:38:44 2006 +0000 Bugzilla 6672: fix interrupts on radeon since memmap changes commit f1f057df9aaba42986d9e20afe6f609a90318333 Author: Dave Airlie Date: Fri Apr 21 00:34:43 2006 +0000 Add support for backing up the PCIE GART table on VT switch. This makes suspend/resume work a lot better on PCIE cards. commit 31396df3b0101571bb85a4a66b67f5a8b0c992a9 Author: Adam Jackson Date: Sat Apr 8 01:19:17 2006 +0000 Bump to 6.6.0 and release. This module's versioning is completely screwed, so until we split out mach64/r128/radeon please just increment the package number whenever you make significant changes. commit d706f494ed22afd369991e8c75a2d4f5aed15305 Author: Aaron Plattner Date: Fri Apr 7 23:06:02 2006 +0000 Add a DrawablePtr argument to the XV functions to pave the way for redirected video. commit f94685aec26b65f60c00a4b1bcd8f26bd80eb6e4 Author: Eric Anholt Date: Tue Apr 4 07:42:36 2006 +0000 Bug #5632: Fix up ati.4 to explain that it is a wrapper driver for the other three. While here, touch up radeon.4, and add an authors list gleaned from checking copyright headers. commit 58c9b1d84f514755945e7a0d25fd5530af34ce95 Author: Eric Anholt Date: Sun Apr 2 21:45:12 2006 +0000 Add missing .cvsignore lines. commit f1ce6170ef21e1f9769337c3138cd8d65c33e40a Author: Alex Deucher Date: Sat Apr 1 23:02:40 2006 +0000 - Fix dpi when switching from clone to dualhead with MergedFB. - Add ConstantDPI option to force a particlar dpi across mode changes Both based on Thomas Winischhofer's sis code. commit 607f18cfbfc2a7b5509f8b567bf510fce31b361e Author: Benjamin Herrenschmidt Date: Mon Mar 27 06:12:57 2006 +0000 Fix a regression of my latest fix that broke color tiling on some setups. RADEONRestoreMemMapRegisters() must not clear CRTC_OFFSET_CNTL and friends unconditionally but only when there is a map change or it will clear them after the DRI updates the AGP location, thus turning tiling back off on the CRTC. Also remove a duplicate call to RADEONInitCommonRegisters(). commit bf1c4471137f10b7de9d79519ca2240058997e18 Author: Roland Scheidegger Date: Thu Mar 23 18:04:17 2006 +0000 commit the actual changes instead of just the Changelog... commit aa5fff9bae4818bbf99e8d9caa8f2ce9905294ca Author: Roland Scheidegger Date: Thu Mar 23 17:59:25 2006 +0000 Use programmable tap coefficients for (hopefully) better video image quality when downscaling. Remove unnecessary code programming the tap coefficients twice. Disable some code which is supposed to improve filtering quality but causes very visible image quality problems at least with rv250 when upscaling. Fix potentially broken FOURCC_RGB16T format (untested if it was broken, untested if it works now...). Change some magic numbers to (new) macro defines. commit 17c52ff15ebe2cf220d5988ee13b599c41799886 Author: Benjamin Herrenschmidt Date: Thu Mar 23 01:37:15 2006 +0000 Call RADEONRestoreCommonRegisters() before RADEONRestoreCrtc2Registers() instead of after. I can't find any good reason why we did it backward until now and it definitely causes problems as the workaround for VT switch in RADEONRestoreCommonRegisters() will break output to the secondary head in various situations. Also does an unrelated minor update to a comment. commit 673e4d7501861066fdd0874919a4524b820b944b Author: Kristian Høgsberg Date: Thu Mar 23 00:06:56 2006 +0000 Add atipciids.h. commit 5dcb4152dca6ac1fe9342f44eb48c0198b15772e Author: Kristian Høgsberg Date: Wed Mar 22 22:30:14 2006 +0000 Convert use of xf86fopen() and other xf86 wrapped libc symbols to use libc symbols directly. The xf86* versions aren't supposed to be used directly. Drop libc wrapper; don't include xf86_ansic.h and add includes now missing. commit 21acdf371e3cf913c5affbd3e86641cfb115311c Author: Benjamin Herrenschmidt Date: Sat Mar 18 00:08:24 2006 +0000 Clear the offsets when updating the memory map instead of when enabling the CRTCs and try to make that code more reliable. Doesn't disable the CRTCs beforehand. commit 323ecb92e40d71c5ef994b41b6d8dedba6dd6203 Author: Roland Scheidegger Date: Fri Mar 17 03:00:53 2006 +0000 Fix various small cosmetic issues. Change a driver message, get the order right for requesting drm versions, replace the use of some numbers with the respective macro defines in radeon_video.c, and add some more macro defines. None of that really matters. commit dc552edf191e14249421f8b27146874f16b80c1a Author: Benjamin Herrenschmidt Date: Thu Mar 16 21:53:58 2006 +0000 Add missing return statement (the driver would not start randomly), add RV410 to the list of new generation cards for the memory map setup and fix a bogus message. commit 901409f47cc990721c1648b1c08e23450e6a4452 Author: Benjamin Herrenschmidt Date: Thu Mar 16 04:32:22 2006 +0000 Fix incorrect CRTC2_OFFSET values when using old-style dual head (not MergedFB). Fixes Xinerama for me. commit 4d6656062129da0489eb4bc898871379ba891d8f Author: Benjamin Herrenschmidt Date: Thu Mar 16 03:09:34 2006 +0000 Add various workarounds that seem to fix some remaning lockup scenarios I'm experiencing with the driver when setting the memory map. Some of the magic delays are a bit dodgy but they seem to work, I suppose I can't do better now without help from ATI. Also removed some really too noisy debug messages. commit 36799e3ea7ddde5fce528e8bc17ea942933a9111 Author: Benjamin Herrenschmidt Date: Wed Mar 15 04:03:37 2006 +0000 Fix various issues with DRI & server recycle by putting DRICloseSreen in the normal CloseScreen callback chain at a spot that matches the call to DRIFinishScreenInit in order to unwrap at the right time. commit 50923b6a9325592edc8b02b17646f96b9b8c4a01 Author: Luc Verhaegen Date: Wed Mar 15 00:46:33 2006 +0000 Add some autoconf to keep this driver from building EXA when a slightly older server with older exa is installed. The way in which this problem was treated by the actually related developers explains a lot about this driver. commit 74f4ed4275866475b3c182fae962df2fc0946b85 Author: Benjamin Herrenschmidt Date: Mon Mar 13 02:57:17 2006 +0000 Fix typo in the function setting the color space transformation factors for old radeon commit 65625c6c2053792cd14b54c904bf46f360ef1565 Author: Benjamin Herrenschmidt Date: Mon Mar 13 00:09:44 2006 +0000 Earliest fix introduced a bug due to another chicken & egg problem in card detection. Now split PreInitConfig into PreInitChipType and PreInitVRAM so that PreInitDRI can be done just in between. Restores proper AGPx4 functionality (when enabled) commit 3a290115af41b0ecb94eb201d7e7abb42ebbfec6 Author: Benjamin Herrenschmidt Date: Sun Mar 12 06:53:27 2006 +0000 Stop using xf86PciInfo.h, instead use a local copy of the PCI IDs we need in atipciids.h so we can update the ATI driver independently of the server when new chips are added commit d6b8f0a5eeb332563ec3ec7082f03be1797d26d8 Author: Alan Coopersmith Date: Sat Mar 11 04:19:47 2006 +0000 Add #ifdef XF86DRI guards around references to info->allowPageFlip and info->depthMoves, since they are only defined if building with DRI. commit 69fe90bc501df9bd9e74b894bfca79a4025725bd Author: Roland Scheidegger Date: Fri Mar 10 13:00:49 2006 +0000 Use "FBTexPercent" option for XAA too (only for increasing memory reserved for textures). commit 8033d7423267fc1b3725df6a077dd910b586daaf Author: Benjamin Herrenschmidt Date: Thu Mar 9 23:26:27 2006 +0000 More memory map fixes !!! This time, we add a way to get the DRM kernel module version early, in order to properly limit the framebuffer size when a module that doesn't support the new map is loaded. That will improve backward compatibility. I also made the minimum required kernel module version 1.3 which hopefully shouldn't be a problem for anybody, and cleaned up the ordering in which we test for DRM version to enable features commit c637939d3c4ce5cdddbc5200d5ffbca4c3927050 Author: Michel Daenzer Date: Thu Mar 9 15:41:16 2006 +0000 RN50: Skip modes that exceed memory bandwidth. Bugzilla #5766 Patch #4636 - Acknowledge that RN50 only has one CRTC, and use this to distinguish it from RV100. - Fix detection of RN50 memory type and bus width. - Model RN50 memory bandwidth limits by capping the pixel clock range based on memory clock, bpp and memory bus width. (ATI Technologies Inc.) commit 890b95a3ddad7634f3aea635cb236b221e902acc Author: Eric Anholt Date: Thu Mar 9 06:06:25 2006 +0000 Update drivers that support EXA for the new EXA ABI. This consists of moving all the accel and card members into the driver ptr, filling in the exa_major/ exa_minor fields, and always using LoadSubModule so we can check the module version up front. Only tested on ATI. commit e19ccfa18fee046c54d7a9401e4e0098b2300598 Author: Michel Daenzer Date: Fri Mar 3 16:41:41 2006 +0000 Add Option "FBTexPercent" to override the amount of video RAM reserved for OpenGL textures with EXA. commit ca00035eccb6e3495b27f8e64f2d016d8d2a9ce2 Author: Benjamin Herrenschmidt Date: Thu Mar 2 02:05:17 2006 +0000 Fix the fix ... I didn't interpret PciInfo->size properly and forgot that the function works in Kb not bytes... Ooops. commit b2145aea36bb035bff048366c607b967d70fff49 Author: Benjamin Herrenschmidt Date: Wed Mar 1 21:35:14 2006 +0000 Extend the alignement workaround to post-rv280 chips as well (thanks Hui) and also limit the CPU accessible memory to the size of the PCI BAR size (yeah, it was passed to the driver, I just got blind for a while it seems) commit 163581a82fe9395672c31b41cd67aa44158f5201 Author: Benjamin Herrenschmidt Date: Tue Feb 28 23:34:03 2006 +0000 Workaround for rv280 bug which needs the framebuffer memory mapping to be aligned to its own size. Also add back limit of 128Mb of mapped fb space for now until I fully sort out what's up with dual function cards. I would really need to access the PCI BAR sizes here but that information seem to be missing from the PCI info passed to the driver. commit 5ff8fb2bea1fe7d14db53c19ff3a3a56668ec417 Author: Roland Scheidegger Date: Tue Feb 28 00:52:53 2006 +0000 Add the newly added (and tons of previously forgotten ones) pci ids to the ati wrapper too (probably not required for it to work as everything should default to radeon anyway there). commit 1574b41a0f894f9b6e30d3ee94e596695a4c64f0 Author: Benjamin Herrenschmidt Date: Sun Feb 26 10:01:32 2006 +0000 Fix page flipping with XAA. The new code ended up calling ShadowFBInit() before XAAInit(), which breaks ShadowFB. commit 1f43a584a684af8078631425886cce236500e0e6 Author: Roland Scheidegger Date: Sat Feb 25 01:57:05 2006 +0000 Add pci ids known to exist (see #4284 for instance). There are still entries which probably don't really exist (cancelled cards and such), leave them as-is. Fix the name of some entries, mostly based on the .inf file of the newest catalyst driver. Use own family id for rv410 and rs400, though there is no different code (yet?). commit 5c141bb15d1163e04c012a0cdf0699d534f0be37 Author: Benjamin Herrenschmidt Date: Thu Feb 16 23:27:44 2006 +0000 Memory map and misc fixes. This completely reworks the way the driver detects available & accessible video memory and initializes the card internal memory map. Along the way, I re-ordered some of the stuffs in pre-init in order to remove some dodgy codepath, fixed various init, exit and vt switch issues, and overall made the driver more robust. The full memory map fix requires an updated DRM. The X driver no longer tries to position the AGP aperture, this becomes entirely DRM responsibility. commit 8c6e5a6eb50d371fd4ec700c26aa628cb5f45731 Author: Benjamin Herrenschmidt Date: Wed Feb 15 23:36:55 2006 +0000 The engine setup would trigger a bogus line write before the proper addresses are setup, thus causing the card to try to bus master over the system bus to some stale location (usually 0 but could depend on whatever was used before X). Remove that useless init bit, and always setup some good enough engine source & destination pointers in case we have some other spurrious engine activity going on. commit d4ec0223029d8fe03a836a5a6e9a7cc8897b4c90 Author: Benjamin Herrenschmidt Date: Mon Feb 13 05:30:13 2006 +0000 Fix EXA acceleration of textures with byteswap or tiling From John Clemens commit 79c60ebbc34aaf0ac0b0723898d5b63015547178 Author: Eric Anholt Date: Tue Feb 7 04:39:59 2006 +0000 Fix a copy'n'paste-o in the EXA render implementation that resulted in [ax]8b8g8r8 pict formats not being supported on r200, but no other issues. commit 8d74f3d49e73626f5d658ba6586a7c1487dae141 Author: Daniel Stone Date: Thu Jan 19 14:20:37 2006 +0000 Bug #5656: Set all Radeon XPRESS 200 R[CS]4xx-based chips to have IsIGP = 1, fixing modesetting issues. commit e490f4b86e6bba70f7c884fca3cf41d159323689 Author: Alan Coopersmith Date: Fri Jan 13 01:37:43 2006 +0000 XF86_VERSION_CURRENT -> XORG_VERSION_CURRENT commit ac296d9137b02753bc79a9930d168855adea9c95 Author: Alan Coopersmith Date: Fri Jan 13 01:02:01 2006 +0000 When failing to parse MetaModes, reset CRT2pScrn to NULL after free'ing it so we don't crash when trying to use it later (such as in RADEONFreeRec). commit dd98ce78407c9eddd7adaad1d73d6910e6949b87 Author: Adam Jackson Date: Sun Jan 8 19:02:16 2006 +0000 Bug #5523: Make radeon compile without USE_XAA. (Tilman Sauerbeck) commit a99429b2bc6407ff2a094e6ee30ce2032f734966 Author: Kevin E Martin Date: Wed Dec 21 02:29:59 2005 +0000 Update package version for X11R7 release. commit 96e225b950c74e64f3f788be8a8489c5075ea55a Author: Adam Jackson Date: Mon Dec 19 16:25:52 2005 +0000 Stub COPYING files commit 6bea785ea0bdf01673a6ddc45765ae7372fdd371 Author: Alan Coopersmith Date: Mon Dec 19 09:07:50 2005 +0000 Typo fixes, mailing list & url updates, and other changes to prepare for X11R6.9 & 7.0 releases. commit 07d5cf8fc37eb72dbb344081ff07d59dbf568e9c Author: Alan Coopersmith Date: Thu Dec 15 23:15:37 2005 +0000 Bugzilla #5238 Patch #3978 r128 man page dualhead note update (Alex Deucher) commit 6db5cbfbf6d405d9871892d1255dd7442e4539e9 Author: Kevin E Martin Date: Thu Dec 15 00:21:32 2005 +0000 Update package version number for final X11R7 release candidate. Bump driver version number. commit 726fd3a81dfbd1b0c8e4ede104a48523daecab92 Author: Adam Jackson Date: Wed Dec 14 19:41:28 2005 +0000 Bug #1760: Fix ati wrapper multihead to be dlloader friendly. commit 328a2d74dabe32ce35e879799412666feedb0eef Author: Adam Jackson Date: Fri Dec 9 18:25:02 2005 +0000 Bug #3869: Don\'t walk off the end of an array in connector detection. (Eric Anholt) commit 03961a05438e916b6725f4e547f23a84ead13c5e Author: Adam Jackson Date: Fri Dec 9 18:15:31 2005 +0000 Bug #1106: Fix memory allocation for Render. (Michel Daenzer) commit 091e5c584124f9b849c0f46802b2f0d8b0cc2388 Author: Kevin E Martin Date: Thu Dec 8 17:55:18 2005 +0000 Add configure options to allow hard-coded paths to be changed. commit e38e2df15c9a4b08dee6386a225e98827bb35aad Author: Kevin E Martin Date: Thu Dec 8 17:54:40 2005 +0000 Allow hard-coded paths to be configurable. commit b8203604bf9bd3813668313a1c8c17040b9d93ce Author: Kevin E Martin Date: Tue Dec 6 22:48:33 2005 +0000 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. commit a86920e812bfd40ec9facfc234220e83066dd263 Author: Kevin E Martin Date: Sat Dec 3 05:49:32 2005 +0000 Update package version number for X11R7 RC3 release. commit 010adc8988846e6f76f111a9fd32eca021d12fbc Author: Kevin E Martin Date: Sat Dec 3 05:45:17 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC3. commit a5efa6724e7fd8318e262060b084630632dfcb44 Author: Kevin E Martin Date: Fri Dec 2 02:16:07 2005 +0000 Remove extraneous AC_MSG_RESULT. commit feeef3cba1f4736a96daf3002ec902ced2874198 Author: Adam Jackson Date: Wed Nov 30 18:51:22 2005 +0000 Bump libdrm dep to 2.0. commit 7ca2b3fa30fedd07951f7c6e73ed4d2a6f6606ea Author: Adam Jackson Date: Tue Nov 29 23:29:58 2005 +0000 Only build dlloader modules by default. commit e167e5151e32d54919e96cbfdcf932e16b1cab2a Author: Alan Coopersmith Date: Mon Nov 28 22:04:08 2005 +0000 Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) commit 0015b1a007bed61aaf389f8f927e4ae0568d7da7 Author: Eric Anholt Date: Mon Nov 21 10:49:09 2005 +0000 Add .cvsignores for drivers. commit 00b8f6ccfbb5163c47e9def0e4ecc6ac7be7e8af Author: Eric Anholt Date: Fri Nov 11 11:05:42 2005 +0000 Bug #1028: Don't (incorrectly) mark the 24/8 z/stencil case as slow, which resulted in whining at runtime about the visual not being supported. commit 33326847ccc9cf4cd6a23a257e5392e348e6dd22 Author: Kevin E Martin Date: Wed Nov 9 21:31:20 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC2. commit 68e11246bd6f6a641807230834dce4e7fd6911af Author: Kevin E Martin Date: Wed Nov 9 21:15:14 2005 +0000 Update package version number for X11R7 RC2 release. commit 1582d3b34643babcbb794d2df8d7c9a755d569c9 Author: Matthias Hopf Date: Wed Nov 9 17:42:57 2005 +0000 Bug #4998: Add ';' and ',' as valid separators for MetaModes as well. commit 2d22d78d157e07e6ec6a3e2d03fc17f102f6e00e Author: Kevin E Martin Date: Wed Nov 9 07:30:03 2005 +0000 Fix DoLoadableServer NO build. commit 999f67763a5ea9fef7b7b576262f0da079efcfee Author: Michel Daenzer Date: Tue Nov 8 16:30:48 2005 +0000 bugzilla #988 (https://bugs.freedesktop.org/show_bug.cgi?id=988) Fix typo which may or may not have had a negative impact on stability with R300 class cards. commit 5aa401efa0b8d81da418eafeb857142a33f85da9 Author: Michel Daenzer Date: Tue Nov 8 14:05:00 2005 +0000 bugzilla #4494 (https://bugs.freedesktop.org/show_bug.cgi?id=4494) Call RADEONDGAInit() even if EXA is enabled; the problematic DGA acceleration hooks are already disabled in that case. This fixes DGA issues such as DGA mouse (typically used by games in fullscreen mode) not working. Fix suggested by Eric Anholt. commit 345180131a7b2752773dc2a3ee1221ad1e05c815 Author: Michel Daenzer Date: Tue Nov 8 13:35:23 2005 +0000 bugzilla #4916 (https://bugs.freedesktop.org/show_bug.cgi?id=4916) Fix segfault with MergedFB and EXA enabled and HW cursor temporarily disabled. commit 23911421ffa7bdd2e191a72c41bf1f26c92c1a67 Author: Michel Daenzer Date: Tue Nov 8 09:44:41 2005 +0000 bugzilla #4951 (https://bugs.freedesktop.org/show_bug.cgi?id=4951) attachment #3689 (http://bugs.freedesktop.org/attachment.cgi?id=3689) Fix HW cursor getting silently disabled with EXA. commit e1259c0117a190cf4c6e7be07d5aa83e03afb3a0 Author: Bogdan Diaconescu Date: Mon Nov 7 19:28:40 2005 +0000 Replaced the variadic macros(gcc) by macros according to C99 standard commit 67bdaae04ab37f38a6d0c8dc4b6328c3ba3b3393 Author: Alan Coopersmith Date: Sun Nov 6 07:41:29 2005 +0000 Sun bug #6325220: Xorg dumps core in dual monitor configuration with radeon driver if CRT2Position not specified in xorg.conf (Stuart Krietman - Sun Microsystems) commit 733ebf6e4a7c7b2f1a861077d43da2a853e4c0d7 Author: Kevin E Martin Date: Tue Nov 1 15:08:52 2005 +0000 Update pkgcheck depedencies to work with separate build roots. commit dd0eb76337bfdaec8f456380a6ced9e0487e190f Author: Adam Jackson Date: Fri Oct 21 18:40:18 2005 +0000 Bug #4829: Remove some useless DRI symbol checks. commit e6c1859e3a7c84b882e0c30d0783255ed1258d9e Author: Donnie Berkholz Date: Thu Oct 20 23:01:58 2005 +0000 Bug #4831 . Check for x86_64 in addition to amd64 in host_cpu. commit 33460fb393c9591babcc43b30a73eef3971765c2 Author: Kevin E Martin Date: Wed Oct 19 02:48:02 2005 +0000 Update package version number for RC1 release. commit 77d5c3549db4f6a7ff9f969f885d7a4e58ab2b16 Author: Kevin E Martin Date: Tue Oct 18 15:46:37 2005 +0000 Do the following to make the drivers pass distcheck: - Only define EXTRA_DIST when there are actually man pages to be processed - Add missing man pages to keyboard and ati drivers EXTRA_DIST commit 35e717078c840414b0d6a0e37b3ffed0a7b102aa Author: Alan Coopersmith Date: Tue Oct 18 00:01:52 2005 +0000 Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro substitutions to work better with BSD make commit ff6e5b0412fe347575992c83bb7cb47b6f96f390 Author: Adam Jackson Date: Mon Oct 17 22:57:32 2005 +0000 More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead of indirectly commit a2e7c55850d383e3af948d445b1645d8a47811cf Author: Alan Coopersmith Date: Mon Oct 17 00:09:01 2005 +0000 Use sed & cpp to substitute variables in driver man pages commit 524fb1440760a14c53fb3f238aad6c3cdb7e6a08 Author: Dave Airlie Date: Sun Oct 9 10:36:50 2005 +0000 Secure the Radeon PCIE GART tables in framebuffer memory by not allowing the clients to get access to a secure area of framebuffer. commit e526211b86ec5343002978debfcf78f74a10c69e Author: Søren Sandmann Pedersen Date: Tue Oct 4 20:01:03 2005 +0000 Check in generated README files commit 431d0e144ae4c294e1f6110fc3db497ce9bd9cfd Author: Søren Sandmann Pedersen Date: Mon Oct 3 21:22:07 2005 +0000 - For all drivers that have a .sgml file, add code in their build system to build the README file at make dist time - in util/macros/xorg-macros.m4, add a new XORG_CHECK_LINUXDOC macro that will check if the required tools and files exist, and if so set a conditional. - util/modular/symlink.sh - Link all the .sgml to xf86-video-/README.sgml - Add all the README. to the list of excluded files - xc/programs/Xserver/hw/xfree86/doc/sgml/SiS.sgml: Various changes to make it spew less warnings when the text file is built. commit 9147c20e5ff662ac511a19e7623b406dffee2242 Author: Adam Jackson Date: Mon Oct 3 06:14:58 2005 +0000 Bug #4001: Don't crash when PanelSize is unset. (Alan Coopersmith) commit 7e2090e3ebf0bd699d66d336353c097d658a86ae Author: Matthieu Herrb Date: Sat Oct 1 20:42:06 2005 +0000 missed one missing return value. commit a843e4281134de1545d538cb8970179b1d6977f6 Author: Matthieu Herrb Date: Sat Oct 1 17:09:48 2005 +0000 add missing return value on success in RADEONSetupMemXAA(). commit 98f7d043f894c73fecaf14440c1a24b6c2fc4b06 Author: Søren Sandmann Pedersen Date: Wed Sep 28 15:10:38 2005 +0000 Make ati driver distcheck radeon_commonfuncs.c \ radeon_exa_render.c \ radeon_exa_funcs.c \ commit e7b1af5d1677e53820dd1c0926cc8b5a4284901e Author: Roland Scheidegger Date: Tue Sep 27 23:55:15 2005 +0000 Move the RADEONEnablePageFlip/RADEONChangeSurfaces calls back to the end of the function (the code above will cause pixmap cache to be freed and copied around, and these functions must be called after that otherwise pixmap damage will occur). May be related to #4440, #4456 (unclear if these setups involve 3d apps) commit bc3c26fe365347c427e04385c1df95a5eec14f28 Author: Eric Anholt Date: Tue Sep 27 23:34:11 2005 +0000 Fix Radeon MMIO Render acceleration with EXA by writing out floating- point coordinates rather than integers. commit 58dfb95c446b73fbc34784f0894cf89152dab043 Author: Adam Jackson Date: Sat Sep 24 18:45:45 2005 +0000 Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen stubs from drivers, comment the non-empty ones. commit 65b5f0017e29903565aff0b7527d955ed016c9a6 Author: Alan Coopersmith Date: Tue Sep 20 16:53:34 2005 +0000 Only include radeon_dri.h & radeon_sarea.h if XF86DRI is defined. Include "compiler.h" to define __inline__ on non-gcc compilers commit 0b7441b19a1a5df91aca6b1a02944afb636bc523 Author: Eric Anholt Date: Sun Sep 18 02:32:23 2005 +0000 Break EXA ABI while we still can. Add coordinates to the UploadToScreen hook so we can upload a subset of a pixmap, and convert the current drivers to respect that. Use this support to directly UploadToScreen in exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches hot). I would have bumped major version, only I can't tell what the EXA_VERSION_* is supposed to be doing as opposed to the module version. commit 64e7db2698ee48af92594c16d72e33c16372c9d7 Author: Eric Anholt Date: Sat Sep 17 20:02:01 2005 +0000 - Don't try to upload 0 byte-per-pixel (PICT_a1) data using RADEONHostDataBlit. - Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It appears that we do need the cache flush here, thought it's not clear why. Disable the 2d to 2d shortcut while here, since I'm unsure of what we're doing. Exposed by the following bit: - Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs were being accumulated in from non-migratable scratch pixmaps, causing the destination pixmap to move towards screen but the migration necessary for source never to happen, leading to abysmal performance. Instead, copy the scratch glyph data into a real pixmap first, then composite from that into the destination, allowing for migration. time ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall time (n=3). - Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of windows needing backing store. Makes migration code prettier, and ensures that composited windows will be migrated as normal when we turn off cw for EXA. (issue brought up by keithp) commit 3c71198a088e71a105e274f176c8ceb503615d46 Author: Dave Airlie Date: Sat Sep 17 07:47:51 2005 +0000 Switch radeon driver to using a card type rather than having a IsPCI flag, allow for PCI/AGP/PCIE cards. Set PCI gart allocation to only happen on PCIE cards. Add Radeon PCIE card detection using capability bits. commit 10cf3523f236a017a1ca7e5ee57e02176b924059 Author: Eric Anholt Date: Wed Sep 14 22:06:41 2005 +0000 Bug #2573: Remove the disabling of automatic cache flushing on non-r300 cards. It has been implicated in hanging at least r300s and some r100s, and seemed to be the cause of some bad rendering for me. commit d68894a463a3bb08c97e91ff6fc4b65b29183ff6 Author: Eric Anholt Date: Tue Sep 13 22:04:12 2005 +0000 Remove the hardcoded USE_EXA/USE_XAA defines now that they've been hardcoded in configure.ac (config.h). commit baa9b5b6e19cf9794bf810e3c582bf1d7f808663 Author: Dave Airlie Date: Mon Sep 12 09:27:07 2005 +0000 Fix Radeon EXA for when RENDER isn't defined commit 8c89610389197dc94d3bceaf44d9d2ea91848f1b Author: Dave Airlie Date: Mon Sep 12 09:17:42 2005 +0000 Move GART offset/size outside XAA commit eba44d9747adde8385f2a242dee5a8e73ce5a205 Author: Daniel Stone Date: Mon Sep 12 09:04:36 2005 +0000 Define USE_XAA and USE_EXA for the time being. commit a255e7b0984890daad98b74ace0c572965fe61f5 Author: Eric Anholt Date: Sun Sep 11 21:00:44 2005 +0000 Attempt to fix up the modular pieces for EXA support. (untested) commit 3e0d9c945a6a71cc476d27341ef18618529a91a8 Author: Eric Anholt Date: Sun Sep 11 20:58:53 2005 +0000 Add support for EXA to the radeon driver. Building EXA and XAA support is controlled at compile time, plus the runtime option of Option "AccelMethod" "EXA" or "XAA". The XAA support appears to remain as before, while the EXA pieces need just a little more polishing. Notable features: - Render acceleration working on Radeon 100 and 200-series with DRI on. - DRI works with EXA Notable issues: - DGA disabled in the EXA case. - Backbuffer moves disabled in the EXA case. - No textured XVideo. - MMIO render acceleration is close but still has some issues. - Memory pressure while using Composite is really troublesome with DRI on. This patch is based on an initial patch by Zack Rusin, with significant work by Benjamin Herrenschmidt and myself. commit fd62082b68ac3aadd8ffc441352d75d88334904e Author: Dave Airlie Date: Sun Sep 11 08:51:38 2005 +0000 Add support for allocating PCI GART table in framebuffer memory. This is needed to support PCIE Radeons using a new DRM. commit cb63f8d9c0563fb0eff28e2be6d4adf5666540d2 Author: Dave Airlie Date: Tue Sep 6 10:03:19 2005 +0000 Handle VIP timeouts more gracefully -- impose a hard limit of 10ms on waiting for VIP_BUSY so we don't lock up hard, spinning. commit dbd83cf18e1bf5e7e31e1ac150227bd27e8b1739 Author: Adam Jackson Date: Sun Aug 28 20:51:14 2005 +0000 Bug #4148: Bump required DRM version for r300 to 1.17. commit ce0589ff3b9fcf8c6bab64da4dba40ba540a6a03 Author: Adam Jackson Date: Sun Aug 28 18:10:34 2005 +0000 Bug #1109: Fix VGA init on Rage Mobility 7500 (Marc Le France) commit 250c8732a54924eeb459880f2905f8e59d038e60 Author: Bogdan Diaconescu Date: Sun Aug 28 18:00:23 2005 +0000 Modified the licens type from GPL to a X/MIT one commit 94c0196652c3cfa0558f61b55f5df9bf50f9ac49 Author: Alan Coopersmith Date: Fri Aug 26 20:04:01 2005 +0000 #include "extensions/dpms.h" -> commit 107e42cabe1cc41fe86b0218c3229b5f34b2df84 Author: Daniel Stone Date: Fri Aug 26 07:00:24 2005 +0000 Fix 'ugly' warning in r128. (Branden Robinson, Debian #069) commit d3f5911c85ccfaaf50c05ce80d56dac13fd15701 Author: Daniel Stone Date: Fri Aug 26 05:30:52 2005 +0000 Only use vgahw symbols if we're building vgahw for this architecture. TODO: Fix this for the modular tree (maybe an unconditional yes?). Define that we're using a DPMS server and include DPMS headers. (Debian #024b) commit 879213455740d2d653d38c712275f07610e4dc9c Author: Alex Deucher Date: Fri Aug 26 02:11:24 2005 +0000 - fix pitch increment (Aapo Tahkola, Roland Scheidegger) commit 6519cc71e4387ef979de90be517145611511ff1a Author: Daniel Stone Date: Thu Aug 25 03:34:58 2005 +0000 Fix bug in Radeon connector table parsing -- parse all entries, not just the first. (Ben Herrenschmidt) commit 8734a5d0bafb60f5e38b2cee10587f01fc016379 Author: Daniel Stone Date: Thu Aug 25 03:07:50 2005 +0000 Blacklist Radeon M300 from multimedia I2C code. Handle I2C timeouts more gracefully -- impose a hard limit of 10ms on waiting for I2C_GO so we don't lock up hard, spinning. commit 578564b4f7fce1f02d056c2b12ffb7803d268829 Author: Adam Jackson Date: Mon Aug 22 03:05:52 2005 +0000 Explicit license statement. commit c9005c91bf6aaf4728a6606284f5d24e0b4a8282 Author: Daniel Stone Date: Thu Aug 18 09:03:46 2005 +0000 Update autogen.sh to one that does objdir != srcdir. commit 508a7421a1386b5b783a867d860b858a55f216d3 Author: Alan Hourihane Date: Mon Aug 15 07:30:05 2005 +0000 Egbert's 64bit fixes for mixed 32/64bit clients commit 204290412fbe8b4ac1a0f4f97bc7aec2847a1df7 Author: Daniel Stone Date: Sun Aug 14 16:14:51 2005 +0000 Make DGA, CPIO, non-PCI, and TV-Out support detected per-platform, using the same semantics as in drivers/ati/Imakefile. commit adb093bdf3cea8108a40bcd72f09924b416de0c1 Author: Alex Deucher Date: Mon Aug 8 23:42:36 2005 +0000 - radeon XPRESS chips are actually RV3xx based commit 9c11018beb186b4b303524685fb62629b9ca863e Author: Vladimir Dergachev Date: Sun Aug 7 14:46:55 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Update warning about DRI support on R300 and later cards. commit a28b2c76c7df2fe65a93eed34bc85c2cf5afb314 Author: Vladimir Dergachev Date: Sun Aug 7 14:40:58 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Properly configure fbLocation and related registers for R300 cards. (Dave Airlie) commit 692fb0f8b51abeccaf70b51fc1defc62132b15e9 Author: Alex Deucher Date: Sat Aug 6 17:23:16 2005 +0000 - missing line in mergedfb option parsing. Spotted by Christoph Bauer commit 14e77a39320a7a074b5c2eeeea9750b469abc978 Author: Ian Romanick Date: Fri Aug 5 23:04:32 2005 +0000 I have resolved this by making all the "Direct rendering disabled" messages X_WARNING and all the "Direct rendering enabled" messages X_INFO. Ideally, we need to factor some of this stuff out to common code. There is a *LOT* of duplication among the *_dri.c files under programs/Xserver/hw/xfree86/drivers. I'm trying to clean up as much low hanging fruit as I can and got tired of waiting for ajax. :P commit 8e88d36f78c13025847310b411402f1d46a2e0cd Author: Adam Jackson Date: Sun Jul 31 17:19:27 2005 +0000 Post-merge fixups: - Disable building the gamma driver - Fix numerous Imakefiles to get header paths and subdirs right - Symlink client-side GLX lib source from Mesa - Add new shader subdirs to the Mesa core build - Tweak the DDX drivers to not ask for "xf86dri.h"; they don't need it, since they don't generate protocol, and it was breaking the build. commit fb9f712fd1044feb8ce6a99aabaeb5966123e268 Author: Kevin E Martin Date: Fri Jul 29 21:22:42 2005 +0000 Various changes preparing packages for RC0: - Verify and update package version numbers as needed - Implement versioning scheme - Change bug address to point to bugzilla bug entry form - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to reenable it) - Fix makedepend to use pkgconfig and pass distcheck - Update build script to build macros first - Update modular Xorg version commit ee45e1fb5da793fa14770b28fd662e69d52b2c6a Author: Michel Daenzer Date: Fri Jul 29 19:45:14 2005 +0000 bugzilla #3911 (https://bugs.freedesktop.org/show_bug.cgi?id=3911) attachment #3191 (http://bugs.freedesktop.org/attachment.cgi?id=3191) Disable bus mastering while updating MC_FB_LOCATION and friends to prevent the X server from hanging on startup every now and then under some circumstances. (ATI Technologies Inc.) commit 44a66ec5a01c3b4dfa046a66b80a3b7e9dfff537 Author: Søren Sandmann Pedersen Date: Fri Jul 15 15:02:47 2005 +0000 Install theathre drivers in @moduledir@/multimedia commit dbcf104689ca368523715eb5945bcd800985799b Author: Kevin E Martin Date: Fri Jul 15 03:39:58 2005 +0000 Fix filename typo commit 2256fabf1cd69c950639f236f61e59e68cc8e6fa Author: Kevin E Martin Date: Thu Jul 14 22:30:47 2005 +0000 Fix check for headers. Use {XORG,DRI}_CFLAGS subst instead of replacing CFLAGS. commit 520317863ffb365eca17c96b4d545adb554bbbd6 Author: Kevin E Martin Date: Thu Jul 14 19:35:48 2005 +0000 Make compiling with DRI support configurable/autodetecable. Autodetect DRI sdk headers. Expand help string for xorg-module-dir option. commit ab5264838ae34bb29791bc08d5a4f853a995faf1 Author: Søren Sandmann Pedersen Date: Thu Jul 14 17:10:01 2005 +0000 fuck you cvs commit a608c4422665ce1e933483b7c2a25ab2daae5930 Author: Søren Sandmann Pedersen Date: Thu Jul 14 16:03:36 2005 +0000 Try adding build system for ATI driver again. Who knows, maybe CVS works today. commit d715561d28d82591adf5c7504068c1818eb2245c Author: Adam Jackson Date: Mon Jul 11 02:29:45 2005 +0000 Prep for modular builds by adding guarded #include "config.h" everywhere. commit 5b37b695019b7a4522a96a63f1f6b035160e6a25 Author: Roland Scheidegger Date: Mon Jul 4 23:44:59 2005 +0000 Bug #2604: Disable workaround for horrible flickering when scrolling vertically in a virtual screen when color tiling and page flip are both enabled, as it potentially does more harm than good. The flickering still needs fixing probably though. commit 08b886850f115f404187acd619aa2c2ca18ae3c7 Author: Daniel Stone Date: Fri Jul 1 22:43:11 2005 +0000 Change all misc.h and os.h references to . commit 1c7c3372776d6d116facabbf055f27af3e96f59f Author: Alex Deucher Date: Fri Jul 1 04:16:42 2005 +0000 - fix depth tiling for r3/4xx chips (Aapo Tahkola) - adjust limits for tiled surfaces on r3/4xx commit e8c2574557950bfa150806432d566cd38c47158f Author: Alex Deucher Date: Fri Jul 1 02:56:04 2005 +0000 - Fix Support for Philips FM1236/F tuner on ATI AIW 9600 XT (Jeff Smith) Bug 3401 commit d258e1c1566d005693260230712c9d78f1447dba Author: Alex Deucher Date: Thu Jun 30 04:46:11 2005 +0000 - change back part of a comment I seem to have accidently changed. commit 6d9c02d58eae1966e8fa8d7d305849c6e57434ad Author: Alex Deucher Date: Thu Jun 30 02:02:10 2005 +0000 - small mergedfb fix from Thomas Winischhofer commit 85365b791542cab221c37c9b3b4593ea0c6c9e2d Author: Alex Deucher Date: Thu Jun 30 01:40:17 2005 +0000 - add support for colortiling on r3/4xx hardware (disabled by default). In order for pageflipping to work on r3/4xx we will need to update the the sarea and drm so that the crtc1/2 xytiling regs get updated. Initially worked out by Aapo Tahkola. commit 3ec99c9cd821aeacdd57a9bbc20c4e4ec4711790 Author: Alex Deucher Date: Thu Jun 30 00:56:01 2005 +0000 - Increase the priority of display 0/1 in the memory controller for r3/4xx hardware when displaypriority is set to HIGH. Fixes display problems in high res modes. Originally reported by Aapo Tahkola. commit a7523e6c0be7a600963e9de10cf0060d16117bf6 Author: Alex Deucher Date: Thu Jun 30 00:33:36 2005 +0000 - fix some OUTREGs that should be OUTPLLs in dynamicclocks code commit c7e1d31c6aec3a99061c77c4d6f57e2e874e37f1 Author: Adam Jackson Date: Sun Jun 26 04:38:12 2005 +0000 Bug #3628: Fix video driver submodule visibility. commit 1beca962ecee5b5c51eb2fb8451fcc2a2ed4b97c Author: Adam Jackson Date: Sat Jun 25 21:16:53 2005 +0000 Bug #3626: _X_EXPORT tags for video and input drivers. commit 9a4895c4c2fd9614d83adfe3967f4f46dc4dfff6 Author: Eric Anholt Date: Wed Jun 22 22:50:49 2005 +0000 Add missing detection of the PCI ID for 0x5b62, Radeon X600 (Vladimir Kushnir). commit 43e3cc7c21160f4536ed860f97d02545c267dfbc Author: Alex Deucher Date: Wed Jun 15 23:40:50 2005 +0000 Sync up radeon mergedfb with Thomas' latest sis mergedfb changes: - non-rectangular mergedfb desktops - screen offsets commit b67f9f5c875efaa41bded7ed2f38b2a5fbd17597 Author: Alan Coopersmith Date: Sat Jun 4 20:26:28 2005 +0000 Sync with 6.8.2 branch: Bug #591 (https://bugs.freedesktop.org/show_bug.cgi?id=591) attachment #308 (https://bugs.freedesktop.org/attachment.cgi?id=308): Fix video timing problems with Sony PCG-C1VN Vaio Picturebook notebook && co. Patch by Marc Aurele La France commit daae70d9083e9c15358f160f0df3176e344f1cb9 Author: Alan Coopersmith Date: Sat Jun 4 20:04:36 2005 +0000 Sync with 6.8.2 branch: Bugzilla #1306 (https://bugs.freedesktop.org/show_bug.cgi?id=1306) attachment #1291 (https://bugs.freedesktop.org/attachment.cgi?id=1291): Fix SEGV in "radeon" driver. Patch by Kevin E. Martin commit c27c193f192b117232dbe39575d3d5ab7c6a1b1e Author: Felix Kuehling Date: Fri May 27 22:33:23 2005 +0000 Fix for bugzilla https://bugs.freedesktop.org/show_bug.cgi?id=3414 (patch https://bugs.freedesktop.org/attachment.cgi?id=2782): Don't use RMX if we are Dell Server. commit 3b674815e0a6d19b0719e71261c0909b92173aed Author: Adam Jackson Date: Tue May 24 23:26:50 2005 +0000 Typo fix from bug #3163 commit commit 0845d1db801ae74688464bd4c41a7e40e4b50186 Author: Egbert Eich Date: Mon May 23 09:50:20 2005 +0000 Explicitely disable DPMS power states during close screen. Fix macro that takes a value and a mask of bits to modify to be behave evquvalently if the bits that should remain unchanged are set or unset in the value (Bugzilla #3369). commit 74b86b036def72e5180a46871b8452ba9eea9bb1 Author: Adam Jackson Date: Wed May 18 17:47:35 2005 +0000 Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version number of the DRIInfoRec, disambiguating it from the XF86DRI protocol version number. Modify DRIQueryVersion to return the libdri version number, which all DDXes were requesting implicitly. Fix the DDXes to check for the DRIINFO version they were compiled against. commit 0f4a8fc6aa5157a8b48beb49f30511665cfa4b63 Author: Matthieu Herrb Date: Wed Apr 20 21:07:44 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/theatre.h Build fix for DoLoadableServer = NO systems. commit 3355d12f832909b05e8b022fad784c9f7af7341f Author: Daniel Stone Date: Wed Apr 20 12:25:22 2005 +0000 Fix includes right throughout the Xserver tree: change "foo.h" to for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to for extension headers, e.g. Xv.h; change "foo.[ch]" to for Xtrans files. commit 31cb4758eae4703d4de31a0b291847cefa855fc3 Author: Bogdan Diaconescu Date: Sun Apr 17 23:28:09 2005 +0000 Added fifo_read and fifo_write in tge generic bus definition commit 2b363e02c7c122f07e6fc406fb8ee52d97b55cad Author: Bogdan Diaconescu Date: Sun Apr 17 23:26:36 2005 +0000 Added new options for the ATI driver: RageTheatreMicrocPath and RageTheatreMicrocType commit 6286efeba564c63ec198c091e4bba22027586901 Author: Bogdan Diaconescu Date: Sun Apr 17 23:23:45 2005 +0000 Addeded support for FI1216ME (PAL) version of the tuner, detection of UDA1380 sound processor commit 9a63c216e90622cd96d4555155df06dd66c3235b Author: Bogdan Diaconescu Date: Sun Apr 17 23:18:26 2005 +0000 Use the theatre_detect to determine the chip ID and then load the coresponding theatre module commit 247057762813f12f171b1fa05f31c5ace4c245a7 Author: Bogdan Diaconescu Date: Sun Apr 17 23:15:31 2005 +0000 Added functions that access the FIFO on RT200 commit bcccf9259784f21d84d52c526aa68df0787118b4 Author: Bogdan Diaconescu Date: Sun Apr 17 23:13:45 2005 +0000 Added RT200 registers commit da9d27f8c8cccf2f40a244b25ffe0d3162c41a63 Author: Bogdan Diaconescu Date: Sun Apr 17 23:09:28 2005 +0000 This is the theatre chip detection module commit e4623bbce161c41ccac65210fd2539211e8af715 Author: Bogdan Diaconescu Date: Sun Apr 17 23:07:54 2005 +0000 Now the detection of the theatre chip is in other module called theatre_detect commit 405b4dcb067346fce7fd9f6d8a6507a58c740ac7 Author: Bogdan Diaconescu Date: Sun Apr 17 23:06:17 2005 +0000 Added the RageTheatre200 video demodulator support commit 310eb24a45b145efbd47196a1c3ec750cf004154 Author: Daniel Stone Date: Mon Apr 4 23:07:08 2005 +0000 Release SDA/SDL I2C lines from an asserted-low state after a DDC probe, which caused Apple Studio Display monitors to shut off after a second or so (Ben Herrenschmidt). commit a416667f980a8679352be897af2fb3215da2d000 Author: Alex Deucher Date: Thu Mar 31 23:18:10 2005 +0000 - Add new Radeon pci ids (ATI devrel), bug 2827 commit 2e7365ffb767099faf3f191dc65341dbb3ef6247 Author: Vladimir Dergachev Date: Thu Mar 31 18:26:05 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Patch from Antti Ajanki - provide VBI capture support for PAL and SECAM (You need GATOS km module to actually get at the data, the change merely configures the hardware to handle it correctly). commit 9a3c1c8e4cba2885b707db0f855e11dc6e640b49 Author: Michel Daenzer Date: Tue Mar 29 06:14:34 2005 +0000 bugzilla #2844 (https://bugs.freedesktop.org/show_bug.cgi?id=2844) attachment #2230 (http://bugs.freedesktop.org/attachment.cgi?id=2230) Wait for idle before uploading HW cursor data to the framebuffer to avoid lockups when moving the mouse on some machines. commit 97863f112850be5206ea555297354c1c104fcdbe Author: Kevin E Martin Date: Tue Mar 29 03:49:04 2005 +0000 bugzilla #2840 (https://bugs.freedesktop.org/show_bug.cgi?id=2840) attachment #2227 (https://bugs.freedesktop.org/attachment.cgi?id=2227) Fix build problems introduced by previous Radeon PLL errata workarounds. commit 04cbb8d174cc5e3c7ecdd4e171170213ecb3c7ed Author: Dave Airlie Date: Sat Mar 26 00:53:01 2005 +0000 bugzilla #2057 (https://bugs.freedesktop.org/show_bug.cgi?id=2057) attachment #1516 (https://bugs.freedesktop.org/attachment.cgi?id=1516) Add TVOUT Support for Mach64 (Leif Delgass, fixed up for Xorg by me). commit 5be4bf9000bdf58584a10a6b8e285d0f173304fa Author: Alex Deucher Date: Thu Mar 24 06:45:52 2005 +0000 - radeon PLL access errata workarounds (Benjamin Herrenschmidt, acked by Hui Yu) commit 34af3da80304a13b6407dcc0f4db54d6c8bb7a41 Author: Michel Daenzer Date: Fri Mar 18 22:36:47 2005 +0000 Add support for production version of ATI RN50/ES1000. (ATI Technologies Inc.) commit b56a5f96048b920a7751318dde211e881f53b2bb Author: Vladimir Dergachev Date: Thu Mar 17 03:36:25 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_mergedfb.c Back out RadeonWaitForIdleMMIO that I put in earlier. From discussion on dri-devel we do not need to be as careful with INREG() access on Radeons as we are on mach64 chips. The fix is backed out due to: it breaks DRI on SMP systems (due to absense of the lock in mouse handling functions) I am no longer able to reproduce the lockup I saw before commit 01a9c1157cdfbc5f74b035383e060b8419979563 Author: Roland Scheidegger Date: Tue Mar 8 23:41:37 2005 +0000 Fix accidentally removed depth pitch adjustment if displayWidth is not a multiple of 32 pixels (bug #788) commit 9b994b40710103b263364153429ebdb9ea3f58ed Author: Vladimir Dergachev Date: Fri Mar 4 22:21:40 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Let through all chips R300 and above - presumably the filtering should take place at the DRM driver level. Correct cut'n'paste position misprint. Big thanks for Michel Danzer for pointing out both improvements. commit 7d37a9f1f9fffe98067c3b5bc4749cc799fb0c77 Author: Vladimir Dergachev Date: Fri Mar 4 05:48:31 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Turns out Radeon R420 chips work fine with R300 microcode. Thanks go to Rune Petersen for careful investigation. commit f1edbb7852d85f660188498f578a0a697c2094fe Author: Roland Scheidegger Date: Tue Feb 22 00:39:15 2005 +0000 Fix building radeon driver with BuildXF86DRI set to NO, the breakage was caused by the tiling support (bug #2481) commit b853dbb50fb7c46fb5a70f349a3f264f0bb94e8c Author: Vladimir Dergachev Date: Sat Feb 19 16:00:12 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Fix an INREG without WaitForIdleMMIO. This one should be unlikely to trigger, but we should still do this in the name of correctness. commit 84290849b4aee336e9db0779d93fc2d7ed8881b1 Author: Vladimir Dergachev Date: Sat Feb 19 00:57:23 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_mergedfb.c Add a call to RADEONWaitForIdleMMIO() within RADEONChooseCursorCRTC() as this function uses OUTREGP() which, internally, calls INREG(). Thus (due to SilkenMouse) INREG() could be called while CP engine was busy. I have observed this lockup on RV350 + R300 3d driver and have no idea why no issues were reported for R200 cards. Perhaps, few of them have enough memory to run merged fb and 3d simultaneously ? This fix is the right thing to do, however, we might also need to put fifo management calls into other cursor handling functions (in particular those that write cursor image directly to video memory). commit 60070063e2130af0b9d5d34eed7adbae0c0fa67b Author: Michel Daenzer Date: Fri Feb 18 19:55:35 2005 +0000 Bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) commit 32032cdc78097840b7e2685fdec11bc0816aa0ac Author: Adam Jackson Date: Fri Feb 18 16:42:11 2005 +0000 Bug #2567: Fix reversed memset arguments. (David Krause) commit d5fadd6d86ae2a2f8c1bb55e36ab3d6d49649b46 Author: Roland Scheidegger Date: Wed Feb 9 02:22:39 2005 +0000 do not enable color tiling on r300 chips and newer, since it doesn't work (yet) (Bugzilla #2504) commit 5ff35300e66a81ecc17c4e9396eb6d158f5c8e1b Author: Roland Scheidegger Date: Wed Feb 2 21:35:30 2005 +0000 fix error with color tiling and hw scrolling, it looks like rv100 doesn't need the special treatment, after all (reported by Stephane Marchesin) commit 7a9031683914bb1d17d223634e5dbf2e18955651 Author: Roland Scheidegger Date: Mon Jan 31 20:10:28 2005 +0000 change option EnableColorTiling to ColorTiling commit a2b123f7672ea678290798786ecb408a86d8c683 Author: Roland Scheidegger Date: Wed Jan 26 18:23:41 2005 +0000 (Stephane Marchesin, me) Add support for color (framebuffer) tiling. Convert all XAA accel code to use explicit dst and src offset pitch control to make it work. Use the new drm surface ioctls to set up the tiled surfaces (if dri is enabled). commit e0df1e41724cd009fe7c833d2f9555f5d87e3202 Author: Roland Scheidegger Date: Wed Jan 26 17:39:56 2005 +0000 fix issues with mergedfb + pageflip (fix up sarea frame values) commit aeb01807263c47f49abaf00031d8505e8ebda82c Author: Egbert Eich Date: Mon Jan 24 15:40:21 2005 +0000 Don't exclude 'RADEONInfoPtr info = ...' declaration even when not building with DRI support (Bugzilla #2370) commit c6c30cfa354eb456638f10771a7cb02271696af2 Author: Vladimir Dergachev Date: Thu Jan 13 17:35:49 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Some of the newer Radeons (R420 for example) have MM_TABLE's with size 0x33 (instead of 0x0c that we know). Furthermore, they lockup during access of I2C bus ! Add a check to validate MM_TABLE. Note: the check is not more stringent as other card manufacturers (like Asus or Tekram) might make cards with slightly different MM_TABLE. commit 414c035a965b9db15656058c0e9cfeb3acf0158f Author: Alex Deucher Date: Fri Dec 24 18:26:19 2004 +0000 - Fix MCLK / SCLK calculation (Benjamin Herrenschmidt) bug 2144 - formatting cleanup commit 7c7b278883676412f5709cf812587b1408628133 Author: Alex Deucher Date: Sun Dec 19 19:49:33 2004 +0000 - Add support for Dualhead on M3/M4 (bug 1760) commit 08a45118b53129f3b9c30004404b906c7d7690be Author: Alex Deucher Date: Sun Dec 19 19:29:10 2004 +0000 - Make dualhead ram allocation cleaner and related messages clearer commit 97cfd7b1489a9510cd233d6dc7154c210f32b9f5 Author: Alex Deucher Date: Sun Dec 19 06:56:37 2004 +0000 - Add DRI resume support (Micha Feigin) bug 2063 commit 5b8577ae3200d967b4316156f16028cbcfd21983 Author: Alex Deucher Date: Sun Dec 19 06:11:06 2004 +0000 - fix warnings (Ronny V. Vindenes) commit 447124a663a24a7fffb0cd241d18dd896a43098b Author: Alex Deucher Date: Sat Dec 18 21:37:48 2004 +0000 - fix warning and potential error in radeon_driver.c commit ac6166158a58b377e7383950c169956f78b62093 Author: Alex Deucher Date: Fri Dec 17 19:19:32 2004 +0000 - Add VGAAccess option to r128 driver. Based on Benh's radeon patch. r128 should now work on ppcs without usefbdev. To use this on ppc make sure you set "usefbdev" to false. (bug 2089) - Apply Benjamin Herrenschmidt's radeon patches (bug 2064) commit ac860ed6bbed84f6fc39a9acf53ee87646cfc8dc Author: Vladimir Dergachev Date: Fri Dec 17 16:50:36 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Move DMA robustness fix into radeon_dri.c::RADEONEnterServer() as per suggestion by Michel Dänzer. I could not trigger a lockup, even with r300_demo (possibly it has code that flushes cache inside ?), so this must be good enough.. commit 3ba5b525c4d6390184fdf79b28c954d5caadc6a4 Author: Vladimir Dergachev Date: Thu Dec 16 16:26:56 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Add DMA robustness fix from Nicolai Haehnle. TODO: move this fix into DRM driver or other parts of Xserver when R300 support is more stable. This fix affects only R300 and later variants and results in small slowdown when using CP acceleration in comparison to the previous version of the driver. We are still a lot faster in CP mode than using MMIO register access. commit c7b5f4a9eb49c0edd690c972be1015c98408ffaf Author: Adam Jackson Date: Wed Dec 15 19:35:33 2004 +0000 Bug #2008: Fix gcc4 compile problem. commit 8c1969f22fba2e1c9ed34d5ca77bee3a9f577640 Author: Vladimir Dergachev Date: Sun Dec 12 20:42:29 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_render.c programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Make DMA blitting code more robust. commit 8a9077bc70fd800983f138a224b95301992a2296 Author: Vladimir Dergachev Date: Sun Dec 12 19:28:37 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Enable DRM support permanently, allowing its use for any CHIP_FAMILY > R300. Fix bug in naming Mesa3d driver (it was defaulting to r200) commit 845df6dd96785b59c44c670009c4fcdb20e147ab Author: Alex Deucher Date: Sun Dec 12 17:29:45 2004 +0000 - missing diff from agp 8x support commit 36b92808e4ff1311f91543388c18cbe8e9eb4aab Author: Vladimir Dergachev Date: Sun Dec 12 16:05:35 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c programs/Xserver/hw/xfree86/drivers/ati/radeon_common.h programs/Xserver/hw/xfree86/drivers/ati/radeon_version.h Add R300 (and later) DRM support, protected by X_R300_DRM option. Note: at the moment this is for 2d support only, if enabled running glxgears locks up my machine, but DMAForXv=yes works fine. commit 68ea67ce98b8f3ad4c17f987e0e2b92f79a96fbf Author: Alex Deucher Date: Sun Dec 12 02:00:48 2004 +0000 - add AGP 8x support (Hui Yu, Michel Daenzer) bug 1819 commit 93675d288d5ebb35d4724ebbfc455a703e25a311 Author: Alex Deucher Date: Sun Dec 12 00:14:32 2004 +0000 - only mess with Dynamicclocks on mobility chips (Benh, me) bug 1912 - fix display detection (Hui Yu) bug 1559 - Add new option "BIOSHotkeys" to allow the bios to control output switching (off by default) bug 2000 - update the savage man page to document the "CrtOnly" option commit ed217003127028483fd2956851d438977169d154 Author: Daniel Stone Date: Mon Dec 6 13:27:56 2004 +0000 Apply Debian patch to re-POST via VBE if driver thinks it has no video memory (a symptom of incompletely coming up from D3 power state), which fixes some Dell laptops (closes: #1890). commit 2b8ab42b05b32710fa4f71a25e2f84192e637fbd Author: Michel Daenzer Date: Mon Dec 6 06:27:53 2004 +0000 When direct rendering is enabled, use hostdata blits to transfer data from system memory to video RAM, which should reduce CPU usage especially with larger videos. Can be disabled via Option "DMAForXv" if there should be any stability issues, but it's been stable for me during a week of testing. Based on a patch by Nikolaus Meine . Probably fix endianness issues in some newer XVideo code, untested. Also use hostdata blits to transfer RENDER image data to video RAM to avoid idling the accelerator engine. Increases RENDER performance significantly for me. These changes were only tested on an M9 in a Titanium PowerBook but should work with all Radeons where direct rendering is supported. commit 960d15ae3a44efe7c02a3d6d0acbabe63e07be74 Author: Daniel Stone Date: Sat Dec 4 22:34:54 2004 +0000 Disable interrupt handling after the DRM handler has been removed, preventing lockups (closes: #1886). Allow pitches with a granularity of 32, rather than 64, because some clamshell iBooks have 800-byte pitches. Change Xv allocation granularity to 8 bytes, rather than 16 bytes, also (closes: #1888). commit 4706dfb7804a46e3cc5aafc3644f5a1134ab3d19 Author: Daniel Stone Date: Sat Dec 4 22:24:06 2004 +0000 Retry CCE idle commands until the (higher) timeout is reached, and properly stop the engine if we totally fail -- gets rid of serious performance issues and lockups with r128 DRI. commit bce508a288d6b95708dbbfc6b235e2d95b6b96ad Author: Markus Kuhn Date: Sat Dec 4 00:42:59 2004 +0000 Encoding of numerous files changed to UTF-8 commit e9c9fd279ed43cc0d779266efcea69a67541c794 Author: Egbert Eich Date: Tue Nov 30 08:38:44 2004 +0000 Make Xorg the default server to install. Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside the VGA range are accessed. The ATi driver however does this to probe for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction should not be relevant to the user. Avoid recursive calls of xf86scanpci(). This function normally detects that it has been called before by checking if the PCI structure is filled out. So far if this was not the case (because PCI probing has failed for some reason) the function is traversed again. With the chipset specific PCI bus probing this can lead to an endless recursive loop as the post-probing code calls xf86scanpci() from within this function. The OS specific PCI code for Linux worked only if bus 0 was populated as it checked for the presence of /proc/bus/pci/00. Fixed to check for /proc/bus/pci/ instead. commit fffbcb761c178e025e3d55d428a803b1284481e0 Author: Matthieu Herrb Date: Sat Nov 27 15:14:15 2004 +0000 xc/programs/Xserver/hw/xfree86/driver/ati/radeon.man xc/programs/Xserver/hw/xfree86/driver/voodoo/voodo.man xc/programs/Xserver/hw/xfree86/driver/wsfb/wsfb.man XF86Config -> __xconfigfile__ commit ad6347d187f9afa053c755aa3a2da9d821916cb2 Author: Daniel Stone Date: Tue Nov 23 21:27:43 2004 +0000 Use fp_horz_stretch instead of fp_vert_stretch for horizontal stretch factor calculation in panel size derivation in the Radeon driver (closes: #1881). commit ac054e427c6ce8cd5b89459dd3f16ca20e6b2d6a Author: Vladimir Dergachev Date: Sun Oct 24 18:17:36 2004 +0000 Add registers to facilitate work with stereo 3d. commit 445ed4b9b61347c866ee67dc0cb110904d667b84 Author: Alex Deucher Date: Fri Oct 22 03:51:58 2004 +0000 - make the overlay work on crtc2 again - make PutVideo() MergedFB aware commit 54cffc3fe273cf3c9ed2a8aef833d4bd337a8a09 Author: Egbert Eich Date: Mon Oct 18 15:19:44 2004 +0000 Fixing one of the infamous 'control reaches end of non void function problems'. commit 7a97d363327e0b2c8646d961e00d05f99766b54f Author: Egbert Eich Date: Mon Oct 18 14:21:45 2004 +0000 Made handling of DevelDrivers for x86-64 more conformant to other platforms. Compress all font encodings (Stefan Dirsch). Fixed warnings. Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and Root mode (bugzilla #1580, James Su). Added another compose key combination for the Euro symbol (Stefan Dirsch). Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian). Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian). This is the encoding that is also used by glibc. We may break other libcs - lets see who complains. Added explanation for DESTDIR to install to a different directory than /. Added some early bailouts to atiprobe if PCI structure pointer is NULL to prevent sig11. XV support doesn't depend on 2D acceleration any more. This patch removes this limitation from the NSC driver. This is a patch that I have committed to XFree86 a while ago but never ported over to X.Org. Matthieu Herrb contributed some build fixes. Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate timer. This takes advantage of the fact that TimerSet() with a timeout argument 0 behaves like TimerCanel(). Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink). Create missing links for backward compatibility to XFree86 (Stefan Dirsch). Changed comment to mention xorg. Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If you don't like it we can change it back (original author unkown). Added 'pic' to the man page rendering command pipeline (Werner Fink). Added missing return value (Stefan Dirsch, Roland Mainz) commit c7ab340fecb94a89c25d6bc7f686b7c97cd3067f Author: Alex Deucher Date: Sun Oct 17 22:45:57 2004 +0000 - Fix DFP detection in r128 driver (bug 1386, Klaus Kusche) - Fix EmulateWheelInertia defaults (bug 1115, Andrew Pimlott) commit ace6e1b7933cb415b8efc41dffa335938f9c89b5 Author: Vladimir Dergachev Date: Sun Oct 17 17:57:33 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c On my Inspiron 8600 both internal and external ports are marked DAC_PRIMARY in BIOS. So be extra careful - only swap when the first port is not DAC_PRIMARY commit 22405e81b812c239b5d8653b402b5f846e6e10b1 Author: Alex Deucher Date: Sun Oct 17 16:52:02 2004 +0000 - Add Thomas' latest sis MergedFB enhancements to the radeon driver commit 186efa31b2cb7285717678bb1c4df4cd9e182395 Author: Vladimir Dergachev Date: Wed Oct 13 23:02:42 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.h Squash annoying warning about fi1236_dump_status commit 43b24861e36023613a99627c57ac44721ed1a548 Author: Egbert Eich Date: Tue Oct 12 19:13:43 2004 +0000 Set fbdev mode as the default mode on PPC (Olaf Hering). Added support for IBM space saver keyboard (Stefan Dirsch). Added support for Cherry CyMotion Master XPress (Marcus Schaefer). Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and RestoreBIOSMemSize() to be exactly opposite to the Save procedure in EnterVT() (Matthias Hopf, Alan Hourihane). Fix text mode restauration by removing the assumption that the register which determines which head is programmed is set. to the active head by the BIOS (Mark Vojkovich). When I wrote the resource code 5 years ago I made some assumptions which turned out to be false: I've assumed that the bus number of the PCI hostbridge would be the PCI bus the bridge links to. This is not correct. Fixing this assumption is not easy. However I hope that the attached patch will make the system work regardless as it 'ignores' host bridges from which the target bus is not known. This should not matter at all as we really don't care about host bridges (unless we have bridge specific code which retrieves information about the bridge). Fixed server crash on reset when a structure allocated in PreInit() was freed on CloseScreen(). Fixed ring buffer lock ups that happened because the structure that contained ringbuffer data was not zeroed after allocation. Fixed numerous warnings due to signed unsigned comparisons. programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: (NVBacklightEnable): Changed the order in which the sequencer registers and the backlight control registers are written. The sequencer control register need to be written first otherwise DPMS screen blanking produces vertical bars on a mobile device. lib/Xau/Imakefile: Build libXau static library PIC so it can be linked into toolkits that would like to wrap its functionality. commit 515b7c4b748f70c17aee149a33ee1b41632daa1a Author: Alex Deucher Date: Mon Oct 11 23:20:26 2004 +0000 - fix resume on radeons (bug 1220) - clean up some old cruft in the savage i2c code commit 07e1aaee862c4835601c704e14fcb12e28f4e78e Author: Egbert Eich Date: Mon Oct 11 09:58:04 2004 +0000 Improving DPMS handling on VT swich and server termination/abort: previous version called the driver directly and too late. Unblank secondary screen explicitely. Don't rely on the value read during register save as the BIOS have blanked the secondary head. Checking if server isn't switched away before calling sync. Sanity check for possible bugs in aother areas of the code. Fixing default amount of of allocated video memory from AGP for i810: Use 16MB if less than 192MB are installed else use 24MB (Matthias Hopf). commit a8c77480e7f4ddf8c45bea3ecec7b6564c0d6452 Author: Vladimir Dergachev Date: Fri Oct 8 00:56:05 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Remove redundant and incorrect line. commit ec831d4fba23dc5f4d0a1450aa63efe5ff5937a2 Author: Vladimir Dergachev Date: Tue Oct 5 01:16:01 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.h Patch from Matthieu Herrb - fix compilation with DoLoadableServer=NO commit f1dadde8f642b332a2dcd2e2a5779f25fec7a3de Author: Adam Jackson Date: Mon Oct 4 21:52:47 2004 +0000 Correct radeon man page, IGP is supported for 3D but R400 is not. commit e3dba9841521466629828501c4fdccbba3d6af89 Author: Vladimir Dergachev Date: Mon Oct 4 15:24:34 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Do not probe for Rage Theatre if no multimedia table is present and no parameters have been specified. commit 4aadb784928ebbd60dce172c9a9a80e8d84e943f Author: Vladimir Dergachev Date: Mon Oct 4 14:53:11 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c This is really embarassing - I found a part of code that had at the end of the lines. I am certain I never saw it before - talk about code rot ! commit db5a27081d9d3ab4cc1481a7d110d11103b3de19 Author: Vladimir Dergachev Date: Sun Oct 3 23:54:40 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_mm_i2c.c Remove debugging statement that cause loading of DLL modules to fail. commit 37a8d8a53f12f829783011c1e077fefb5729e618 Author: Vladimir Dergachev Date: Sun Oct 3 14:41:45 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Fix compilation with gcc 3.4.x (patch by Ronny V. Vindenes) commit 6dbcd503fe21c6dec27c2b97adc0f39ba0a7ab2a Author: Vladimir Dergachev Date: Sun Oct 3 03:07:17 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h Port the rest of GATOS Radeon-specific code. Remove "checkpoint" noise from logs. Test with AIW Radeon 7500 commit 7cb911291d459f08f54444d09081d3378fe73b8b Author: Vladimir Dergachev Date: Sun Oct 3 00:01:14 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c Detect and initialize Rage Theatre (RT100) commit 6c1996174b9f7afc8f4e33c35e4864b31696d4d6 Author: Vladimir Dergachev Date: Sat Oct 2 20:55:42 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_vip.c Add VIP bus access code, hook it into initialization system. commit 136649a1c2065624a9cf17386054c6595aa6d85e Author: Vladimir Dergachev Date: Sat Oct 2 20:35:04 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/theatre* xc/programs/Xserver/hw/xfree86/drivers/ati/generic_bus.h Add Rage Theatre (RT100) module code and hook it into the build system commit 7a17b1c294fa8c7af0b1cdea0618cb6060479356 Author: Vladimir Dergachev Date: Sat Oct 2 01:59:13 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_mm_i2c.c Add code to access and initialize multimedia i2c bus. Hook it up. commit e0123e24b6895dde7b385528da24c4e6e9d5a4cb Author: Vladimir Dergachev Date: Sat Oct 2 01:36:43 2004 +0000 Add more multimedia registers. commit 576f53be4f0fa54bde7167872b7508b98e5c9454 Author: Vladimir Dergachev Date: Sat Oct 2 00:43:08 2004 +0000 xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h Add TV-in specific options. Add TV-in specific fields to radeon per-screen structure, add code to initialize them. Preserve MM_TABLE (instead of whole VBIOS as was done in GATOS drivers) commit 9a9ba82172428b09312fdd6e11da04b21c8529fc Author: Adam Jackson Date: Wed Sep 22 04:38:03 2004 +0000 Bug #1252, #1253, #1255, #1256: Various typo fixes from Dave Jones. commit 700b0dc5148d0170c9223765d208ccef447242df Author: Adam Jackson Date: Tue Sep 21 18:10:34 2004 +0000 Convert the ATI drivers to ANSI function prototypes. commit 17e5f3c1169066be1004306d12b5398cf01cbd35 Author: Eric Anholt Date: Fri Sep 17 05:16:45 2004 +0000 Bugzilla #1170: Fix an overcounting of DMA in BEGIN_RING that wasn't harmful. Bugzilla #1169: Add counting for BEGIN_RING/OUT_RING/ADVANCE_RING to avoid these sorts of problems in the future. commit 29bbee6b8a8dd1b883e07547691ff8e1289459ce Author: Adam Jackson Date: Fri Sep 17 03:04:50 2004 +0000 Bug #1192: Remove cfb support from drivers where its use is an option. Delete xf24_32bpp, as s3virge was the last user. Fix up some comments to refer to fb rather than cfb. commit cec06d4126f5f31d14ace73798c71ec75e544c45 Author: Alex Deucher Date: Thu Sep 16 22:15:05 2004 +0000 Update comment commit dbeb8d28ac3469f4a7d7d8dae979ae876d4cdcba Author: Kevin E Martin Date: Fri Sep 3 23:26:19 2004 +0000 Updated release notes for bug #999. Update Radeon man page to note that RenderAccel is now enabled by default on certain chips. commit c829f667c8a79bbdd40e1f924d57638e7bd425dc Author: Michel Daenzer Date: Mon Aug 30 04:31:50 2004 +0000 Hotfix for Eric Anholt's fix for bug #1156 : Clear the RADEON_NONSURF_AP0_SWP_16BPP bit for 4 bpp data, otherwise it breaks at depth 16. commit 677246740b5b538e73a7fbde661ec6a97319430b Author: Adam Jackson Date: Fri Aug 27 20:31:26 2004 +0000 Back out my last change, dupe. commit a8eaa15264ff0db1596d653e91260c9a39a8b5ee Author: Adam Jackson Date: Fri Aug 27 18:32:40 2004 +0000 Bug #1061 (documentation-only update): Document the RenderAccel option in the radeon manpage. commit 360dab062f895c19e1784146e6684f75a20c5b24 Author: Eric Anholt Date: Fri Aug 27 03:36:28 2004 +0000 Bug #1156: Fix the build on PPC by splitting the byte-order-setting code into a separate routine. While here, fix the byte swapping in the 32bpp case. (Michel Daenzer) commit 9b19bbb4d37b79c97365aa492cd93931d492b3a8 Author: Eric Anholt Date: Fri Aug 27 03:23:47 2004 +0000 Bug #1157: Fix Radeon line acceleration in the DMA case (Michel Daenzer). commit 838488b6b46359334e5e781589dbee3832909628 Author: Kevin E Martin Date: Fri Aug 27 02:38:56 2004 +0000 Fix Radeon compilation without Xinerama (Bug #1179, Simon Schubert). commit 5f54d4f45e2adc6b15e98152db88743c243aa128 Author: Kevin E Martin Date: Wed Aug 25 00:30:41 2004 +0000 Fix hangs during startup with Radeon driver (Bug #1007, Sjoerd Simons). Fix i810 driver startup on Sony VAIO laptop (Bug #1084, Dave Airlie). Fix several library build problem (Bug #1147). Fix build problems (Bugs #1148 and #1149). commit dde880e876f455f1fd66efbcc055e177886397c9 Author: Eric Anholt Date: Tue Aug 17 20:22:55 2004 +0000 Reenable Radeon Render acceleration now that interactions with 3D clients should be resolved. commit 279efef503fdbd442a9bd00f0073d9f6006d9e61 Author: Eric Anholt Date: Sun Aug 15 00:44:57 2004 +0000 Fix unresolved symbol warnings in r128 driver (Adam Jackson) commit 955f2b89f94aaa20b5eafd045b01e3eeef3d29ad Author: Kevin E Martin Date: Thu Aug 12 05:00:22 2004 +0000 Fix context switching on Radeons and build problem when XF86DRI is not defined (Bug #922, Eric Anholt). commit 8f3ea53f26493a5f02410297a587d1d95c067094 Author: Adam Jackson Date: Thu Aug 12 02:23:46 2004 +0000 oops, these didn't added somehow. commit 6ec74414bd33e9d8dfd5119058d15f3a6206e9d9 Author: Adam Jackson Date: Thu Aug 12 01:03:06 2004 +0000 Factor out R{128,ADEON}Chipsets into their own headers so they can be sanely included in both the ati core and the r128/radeon submodules; r128 and radeon can now be directly loaded under dlloader. Teach imstt about the dlloader- frendly way to talk to fbdevhw. (Partial for bugs #393 and #400.) commit a5b1e4dd7adacd17b63582e477df3a585efb249a Author: Adam Jackson Date: Wed Aug 11 01:20:28 2004 +0000 Bug #978: Silence more unresolved symbol warnings from the ati driver. Patch from Stefan Dirsch. commit 1356884132491010a2e41eb2b5be4a227b9b8138 Author: Kevin E Martin Date: Wed Aug 11 01:14:14 2004 +0000 Fix Radeon build problem with #define DoLoadableServer NO commit f5c93cb015e334975c2797a23b68798372a284c9 Author: Adam Jackson Date: Tue Aug 10 04:01:42 2004 +0000 Bug #978: Silence unresolved symbol warnings from the ati driver. Reported by Michel Daenzer. commit a2da1caf5848a78b10afd99811fd1a5677af6786 Author: Kevin E Martin Date: Mon Aug 9 22:37:22 2004 +0000 Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339, Harold L. Hunt II, Alexander Gottwald). Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, David Dawes). Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). Fix attempt to read video ROM before enabling it (Bug #843, Ivan Kokshaysky, Mike A. Harris). Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. Harris). Clarify xset man page description of how to use the keyboard repeat rate settings (Bug #846, Mike A. Harris). Fix problem where print-screen key would get remapped to sys-req in certain keymaps, which broke GNOME printscreen functionality (Bug #847, Owen Taylor). Fix several render problems: - MMIO mode support - Hang on IGP chips - VT switching hang - 3D render corruption (Bug #922, Hui Yu). commit 3171664c6a02424736864204b731249097fa7aae Author: Kevin E Martin Date: Fri Aug 6 20:07:35 2004 +0000 Disable Render acceleration in Radeon driver temporarily until it no longer conflicts with the 3D code. commit 27ef7adf3c1f6c3ca79b42b468d08b8542348cdd Author: Michel Daenzer Date: Wed Aug 4 13:17:31 2004 +0000 Use info->ModeReg.surface_cntl to restore byte swapping for the framebuffer aperture on big endian machines, remove superfluous local variables and register reads. Adapt framebuffer aperture byte swapping to texture format before copying data to offscreen area and restore it afterwards on big endian machines, fixes Render acceleration there. reviewed by: Hui Yu , Kevin E. Martin commit 2efdc9f847fa9ff3096667b16df84817fc65605d Author: Eric Anholt Date: Wed Aug 4 10:05:37 2004 +0000 - Add two new XAA hooks, SetupForCPUToScreenTexture2 and SetupForCPUToScreenAlphaTexture2. These add a dstFormat argument after the previous format argument, which the driver needs to use to properly set up the destination format. Two new arrays are added for the list of destination formats supported that correspond to the previous format arrays for sources. - Make Render acceleration only occur when the new hook for that acceleration type is supplied and the dst format list is set, along with the src format list being set. Without knowing the destination format, the Render acceleration couldn't properly support all the destinations it might encounter. - Bump XAA module minor version. - Update the Radeon Render acceleration to use the new hooks when the XAA module is sufficiently new. Fix a bug in the src/dst alpha booleans for ops, and use them to set blend_cntl to support destinations without alpha. Add missing PICT_a1r5g5b5 texture format, and add list terminator. (!) commit 1e16c66551eed750330bb74a92208c45a7112cd0 Author: Matthieu Herrb Date: Tue Aug 3 09:42:20 2004 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_merged_fb.c Add missing argument to xf86DrvMsg(). commit fd440a1e2110e05d116207800c123c281fbf5e19 Author: Matthieu Herrb Date: Tue Aug 3 09:38:03 2004 +0000 programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c programs/Xserver/hw/xfree86/drivers/ati/r128_probe.h programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h Fix Constification problems. commit dd0f86c4cb046c79a65144f767e97fd99e7f61c9 Author: Kevin E Martin Date: Sun Aug 1 23:22:01 2004 +0000 Fix Radeon crash on server exit or generation commit c64f90b673f5c487dfe059f1636b04a1c2ab7dc2 Author: Adam Jackson Date: Sat Jul 31 01:21:18 2004 +0000 Change several LoaderSymbol calls introduced by the bug #400 patch to *Weak() resolver functions. commit b091b4b074cd61c9067ba95ef016f7a29a38c38d Author: Hui YU Date: Fri Jul 30 22:20:21 2004 +0000 Support for New radeon chips: R420/M18, R423, RV370/M22, RV380/M24, RS300. Add special handlings for DELL triple-head server (RV100). Misc. bug fixes for flat panel, host aperture, etc (Bug #946) commit d04f61bfaf6952e832d52e1cd6014e86435aebd9 Author: Adam Jackson Date: Fri Jul 30 20:30:51 2004 +0000 Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all framebuffer formats except cfb and the overlay modes should work, and r128 and radeon need to be loaded from the ati driver (both issues to be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga drivers. elfloader users shouldn't be affected. commit 6dcb78bb818c3c1c7fe406bee5379f9bef023f4b Author: Alex Deucher Date: Wed Jul 28 02:35:30 2004 +0000 - add gamma correction support to the radeon video overlay commit 26029dc9378bbd95835d397402bfc9e6b4f1a478 Author: Alex Deucher Date: Mon Jul 26 23:14:37 2004 +0000 - Add Radeon DynamicClocks option - Add small fixes and clean ups from ati's last code drop (typo_fixes, remove_fudge, laptop, xvfix) - fix possible segfault in mga_dri.c (Ryan Underwood) - Add Xv support to pre-nm2160 neomagic chipsets commit 9f251b16e702da486f824307e72a6f80c6987b5d Author: Adam Jackson Date: Mon Jul 26 19:14:58 2004 +0000 Bug #848: Clean up gatos notice messages. commit 6f1e01ecdb11913fd768b9918f516b8379b7858f Author: Eric Anholt Date: Fri Jul 23 05:36:14 2004 +0000 - Add a new option, BuildDevelDRIDrivers, which controls whether DevelDRIDrivers is non-empty. DevelDRIDrivers contains those drivers aren't built by default either due to being unusable on that architecture (but buildable for testing) or due to security concerns, as in the mach64 and savage cases. - Merge the Mach64 DDX's DRI support, under the XF86DRI_DEVEL define, which is set only when BuildDevelDRIDrivers is set. - Fix up of the sets of DRI drivers built for various architectures. - Fix build of unichrome DRI driver, which is now enabled on x86. commit b68322f467b7e524092af15e33ab872abb99b6a2 Author: Eric Anholt Date: Thu Jul 22 07:03:04 2004 +0000 Merge and resolve conflicts from DRI/DRM/Mesa 20040721 imports. commit 57de5e285d6271fc4b2bc8a951a98be6308d649d Author: Eric Anholt Date: Fri Jul 16 04:38:54 2004 +0000 Bugzilla #803,804: Fix build in the !XF86DRI case after DRI and Radeon Render acceleration merges. commit 9b0ec803bd588d9af778bfd307ee6d958e4a1e73 Author: Adam Jackson Date: Sat Jul 10 14:22:35 2004 +0000 Bugzilla #849: Fix DRI pagesize assumptions in radeon and r128 drivers. from mharris@, reviewed and applied to DRI by airlied@. commit ccd95bfb291a0c70272fab6822ef379b83dc298d Author: Egbert Eich Date: Tue Jul 6 14:37:47 2004 +0000 Separated Intel drivers from default DriDrivers to avoid building them on IA64 (Egbert Eich). Fixed wrong function prototype (Egbert Eich). Don't test for generic VGA on IA64 (Egbert Eich). Fixed a segfault when accessing a structure before verifying the pointer exists (Egbert Eich). Added a showcache option for debugging (Egbert Eich). Increase default video RAM size to 16MB when DRI is enabled and more than 128MB are available (Egbert Eich). Fixed lockups during mode switch. Problem was introduced when attempting to copy the behavior during LeaveVT()/EnterVT() but but forgetting to call I810DRILeave() before I810DRIEnter(). The entire DRILeave()/Enter() scenario has been commented out as it didn't seem to be necessary (Egbert Eich). Fix TweakMemorySize() (tested with i855/i865) (Egbert Eich). increased MAX_DEVICES to 128 (Egbert Eich). Use OS provided PCI config space access as default method (Egbert Eich). Added support for Linux 2.6 proc file format. Fixed unaligned accesses to pieces of the VBE info block. VESA did not align elements to size (Egbert Eich). commit 6bdf3d36ea3086432af5157540fde4e0aa0c44dc Author: Eric Anholt Date: Sun Jun 20 07:34:55 2004 +0000 Add file missed in last commit: Bug #748: - Add Render acceleration for Radeon 100 and 200-series cards, enabled by default. Notable performance gains include 27fps in cairogears instead of 6fps (compared to 50 with glitz), and my disks are now the bottleneck in an ls -lR in gnome-terminal. Only supported in DRI mode because the MMIO submission hangs the card so far, but the code is left in because it may be supportable soon. - Add xorg.conf options to disable Render acceleration and to force the subpixel order in the server (Hui Yu). Many thanks to Hui Yu at ATI for the code this was based off of, Michel Daenzer for bugfixes and suggestions, and LinuxFund for sponsoring the work. commit 8c1b37420ea890f76edb97aed61ee427a871cd3f Author: Eric Anholt Date: Sun Jun 20 07:26:08 2004 +0000 Bug #748: - Add Render acceleration for Radeon 100 and 200-series cards, enabled by default. Notable performance gains include 27fps in cairogears instead of 6fps (compared to 50 with glitz), and my disks are now the bottleneck in an ls -lR in gnome-terminal. Only supported in DRI mode because the MMIO submission hangs the card so far, but the code is left in because it may be supportable soon. - Add xorg.conf options to disable Render acceleration and to force the subpixel order in the server (Hui Yu). Many thanks to Hui Yu at ATI for the code this was based off of, Michel Daenzer for bugfixes and suggestions, and LinuxFund for sponsoring the work. commit 6ecf374d500afe6da494dfdd6566396ec65b6d6a Author: Eric Anholt Date: Wed Jun 16 09:43:59 2004 +0000 Merge DRI-trunk-20040613 changes in programs/Xserver/hw/xfree86/drivers, with the following notes: - Savage and Mach64 (= ati/ati*.[ch] changes) DRI not merged due to insecurity. - VIA driver converted to new drmContext and drmHandle names. - Radeon driver merge conflicted in many places, and MergedFB at least could probably use some checking at this point. commit bea8085e04136b0ef513c17bb65c54069ec531e1 Author: Eric Anholt Date: Wed Jun 16 09:25:58 2004 +0000 DRI trunk-20040613 import commit 7b588cda922992a8ee2d04853ba1533cf43592a3 Author: Eric Anholt Date: Wed Jun 16 09:25:58 2004 +0000 Initial revision commit 6cbb5bbff43d65a762d432659793333868837f0b Author: Eric Anholt Date: Wed Jun 16 09:22:56 2004 +0000 DRI XFree86-4_3_99_12-merge import commit 3586c3c7955365a2af0b8a286ea0d0488ddfd137 Author: Egbert Eich Date: Fri Apr 23 19:26:46 2004 +0000 Merging XORG-CURRENT into trunk commit 538768e0f472026325be9dd37dc4bfe7ea7d3b75 Author: Egbert Eich Date: Sun Mar 14 08:33:20 2004 +0000 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 commit 5f179e796d1cd310790d06eebb474ad67114ec84 Author: Egbert Eich Date: Wed Mar 3 12:12:18 2004 +0000 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 commit 493c44580191beff63575c4032f772fbbf1b06eb Author: Egbert Eich Date: Thu Feb 26 13:35:52 2004 +0000 readding XFree86's cvs IDs commit 942a47fd3c5e8df85642672c01072bf97285bc30 Author: Egbert Eich Date: Thu Feb 26 09:23:18 2004 +0000 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 commit dda79b5ee3eb49f924a3213592d93ba981c99394 Author: Kaleb Keithley Date: Mon Feb 23 20:35:02 2004 +0000 Import most of XFree86 4.4RC3. This import excludes files which have the new license. If we want to, later we can import 4.4RC3 again and pick up the files that have the new license, but for now the vendor branch is "pure." commit 08104f18ac497561c969694ff709da6c361ccea7 Author: Egbert Eich Date: Thu Jan 29 08:08:34 2004 +0000 Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 commit 162d76b9c48ed17d6e645057db58c9f13436f25f Author: Kaleb Keithley Date: Fri Dec 19 20:55:06 2003 +0000 XFree86 4.3.99.902 (RC 2) commit 195772ec74f7a9b7d5bf294b3bc2c3b960e08a31 Author: Kaleb Keithley Date: Thu Dec 4 22:03:16 2003 +0000 XFree86 4.3.99.901 (RC 1) commit 73105e438e90f950249cb265ba99001d4db3dc60 Author: Kaleb Keithley Date: Tue Nov 25 19:28:36 2003 +0000 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks commit 0a53864f9581196604d04fd28b4e94a9b0b73d18 Author: Kaleb Keithley Date: Tue Nov 25 19:28:36 2003 +0000 Initial revision commit c56aaef79028261e0a3be0c86ffd3f16b6bdd9ba Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 XFree86 4.3.0.1 commit d09f463a5d1ce73e0b65d5276fbcca393fa2da46 Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 Initial revision commit d9af6dc32652502d84ea8da5d57a5ab45429c4ad Author: Kaleb Keithley Date: Fri Nov 14 15:54:49 2003 +0000 R6.6 is the Xorg base-line xf86-video-mach64-6.9.5/INSTALL0000644000175000017500000003660012521747527012505 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. xf86-video-mach64-6.9.5/README0000644000175000017500000011057312270010352012312 00000000000000 ATI Adapters README file Marc Aurele La France 2002 February 12 This is the README for the ATI Mach64 driver included in this release. ______________________________________________________________________ Table of Contents 1. Statement of intent 2. A note on acceleration 3. Current implementation for ATI adapters 4. Current implementation of generic VGA support for non-ATI adapters 5. xorg.conf specifications 5.1 Driver ``ati'' 5.2 ChipSet ``name'' 5.3 ChipID & ChipRev specifications 5.4 IOBase 5.5 BusID 5.6 Clocks 5.6.1 Clocks for supported programmable clock generators 5.6.2 Clocks for unsupported programmable clock generators 5.6.3 Clocks for fixed clock generators on ATI adapters 5.6.4 Clocks for non-ATI adapters 5.7 Option ``nopanel_display'' 5.8 Option ``crt_display'' 5.9 Option ``noaccel'' 5.10 Option ``nolinear'' 5.11 Option ``HWCursor'' and Option ``SWCursor'' 5.12 Option ``SilkenMouse'' 5.13 Option ``shadowfb'' 5.14 Option ``dpms'' 5.15 Option ``backingstore'' 5.16 MemBase address 5.17 Option ``ReferenceClock'' ``frequency'' 5.18 ClockChip ``name'' 6. Video modes 7. Known problems and limitations 8. Reporting problems 9. Driver history 10. Driver versions ______________________________________________________________________ 1. Statement of intent Generally speaking, the driver is intended for all ATI video adapters based on the Mach64 series or older chipsets, providing maximum video function within hardware limitations. The driver is also intended to optionally provide the same level of support for generic VGA or 8514/A adapters. The newer Rage 128 and Radeon chips are not supported by this driver. Rage 128's and Radeon's are, however, supported by separate drivers, and owners of such adapters should consult the documentation provided with these drivers. This driver will also invoke the appropriate driver if it finds Rage 128 and/or Radeon adapter(s) in the system. This driver is still being actively developed, meaning that it currently does not yet fully meet these goals. The driver will provide o accelerated support if an ATI accelerator is detected and the user has not requested that this support be disabled; otherwise o accelerated support if a non-ATI 8514/A-capable adapter is detected and the user has requested such support; otherwise o unaccelerated SuperVGA support if an ATI VGA-capable adapter is detected; otherwise o generic VGA support if a non-ATI VGA-capable adapter is detected and the user has requested such support. Thus, the level of support provided not only depends on what the driver detects in the system, but also, on what the user specifies in the xorg.conf file. See the ``xorg.conf specifications'' section below for details. If none of the above conditions are met, the ATI driver will essentially disable itself to allow other drivers to examine the system. 2. A note on acceleration The meaning of ``acceleration'', as used in this document, needs to be clarified. Two of the many components in an accelerator are the CRT controller (CRTC) and the Draw Engine. This is in addition to another CRTC that, generally, is also present in the system (often in the same chip) and typically provides EGA, VGA or SuperVGA functionality. A CRTC is the component of a graphics controller that is responsible for reading video memory for output to the screen. A Draw Engine is an accelerator component that can be programmed to manipulate video memory contents, thus freeing the CPU for other tasks. When the VGA CRTC is used, all drawing operations into video memory are the responsibility of the system's CPU, i.e. no Draw Engine can be used. On the other hand, if the accelerator's CRTC is chosen to drive the screen, the Draw Engine can also be used for drawing operations, although the CPU can still be used for this purpose if it can access the accelerator's video memory. Video acceleration refers to the programming of an accelerator's Draw Engine to offload drawing operations from the CPU, and thus also implies the use of the accelerator's CRTC. 3. Current implementation for ATI adapters The driver currently supports the SuperVGA capabilities of all ATI adapters except some early Mach8 and Mach32 adapters that do not provide the required functionality. This support works for monochrome, 16-colour and 256-colour video modes, if one of the following ATI graphics controller chips is present: VGAWonder series: 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6 Mach32 series: 68800-3, 68800-6, 68800AX, 68800LX Mach64 series: 88800GX-C, 88800GX-D, 88800GX-E, 88800GX-F, 88800CX, 264CT, 264ET, 264VT, 264GT (3D Rage), 264VT-B, 264VT3, 264VT4, 264GT-B (3D Rage II), 3D Rage IIc, 3D Rage Pro, 3D Rage LT, 3D Rage LT Pro, 3D Rage XL, 3D Rage XC, 3D Rage Mobility (including the -M and -P variants) The driver also supports 32K, 64K and 16M-colour modes on the 264xT and 3D Rage series of adapters using the accelerator CRTC (but not the VGA CRTC). The newer Rage 128 and Radeon chips are not supported by this driver. Rage 128's and Radeon's are, however, supported by separate drivers, and owners of such adapters should consult the documentation provided with these drivers. This driver will also invoke the appropriate driver if it finds Rage 128 and/or Radeon adapter(s) in the system. Adapters based on the above chips have been marketed under a rather large number of names over the years. Among them are: VGAWonder series: VGAWonder V3, VGAWonder V4, VGAWonder V5, VGAWonder+, VGAWonder XL, VGAWonder XL24, VGAWonder VLB, VGA Basic, VGA Basic 16, VGA Edge, VGA Edge 16, VGA Integra, VGA Charger, VGAStereo F/X, VGA 640, VGA 800, VGA 1024, VGA 1024D, VGA 1024 XL, VGA 1024 DXL, VGA 1024 VLB Mach8 series: Graphics Ultra, Graphics Vantage, VGAWonder GT (None of the 8514/Ultra and 8514 Vantage series is supported at this time) Mach32 series: Graphics Ultra+, Graphics Ultra Pro, Graphics Wonder, Graphics Ultra XLR, Graphics Ultra AXO, VLB mach32-D, PCI mach32-D, ISA mach32 Mach64 series: Graphics Xpression, Graphics Pro Turbo, WinBoost, WinTurbo, Graphics Pro Turbo 1600, Video Xpression, 3D Xpression, Video Xpression+, 3D Xpression+, 3D Charger, Video Charger, WinCharger, All-In-Wonder, All-In-Wonder PRO, 3D Pro Turbo, XPERT@Play, XPERT@Play 98, XPERT@Work, XPERT 98, XPERT LCD, XPERT XL Also, a number of mainboards, laptops and notebooks harbour a Mach32 or Mach64 controller. VGAWonder, Mach8 and Mach32 ISA adapters are available with or without a mouse. These adapters are available with a variety of clock generators and RAMDACs. The 264xT and 3D Rage series of chips are integrated controllers, meaning that they include a programmable clock generator and a RAMDAC. For all but Mach64 adapters, this driver still does not provide support for accelerated drawing to the screen. This means that all drawing is done by the CPU, rather than by any accelerator present in the system. This can make opaque moves, for example, quite ``jerky''. Also, given that IBM 8514/A and ATI Mach8 do not allow CPU access to their frame buffer, the driver will currently ignore these accelerators. Most Mach32 adapters provide both accelerated function and SuperVGA functionality, but the driver currently only uses the VGA. The driver does however support the accelerator CRTC present in all ATI Mach64 adapters. For 256-colour, and higher depth modes, this support will be used by default, although an xorg.conf option can be specified to use the SuperVGA CRTC instead. A linear video memory aperture is also available in 256-colour and higher depth modes and enabled by default if a 264xT or 3D Rage controller is detected or, on 88800 controllers, if the accelerator CRTC is used. xorg.conf options are available to disable this aperture, or (for non-PCI adapters) enable it or move it to some other address. By default, the driver provides some acceleration for Mach64 if the accelerator CRTC is used, and modes whose colour depth greater than or equal to 8 are to be used. This support is as yet incomplete and can be disabled entirely with an xorg.conf option. On non-Intel platforms, the driver can, currently, only support PCI Mach64 adapters. 4. Current implementation of generic VGA support for non-ATI adapters Support for generic VGA with non-ATI adapters is also implemented, but has undergone only limited testing. The driver will intentionally disallow the use of this support with ATI adapters. This support must be explicitly requested through an xorg.conf ChipSet specification. This prevents the current VGA generic driver from being disabled. This driver's generic VGA support is intended as an extension of that provided by the current generic driver. Specifically, within the architectural bounds defined by IBM's VGA standard, this driver will allow the use of any 256-colour mode, and any dot clock frequencies both of which allow for many more mode possibilities. The driver will enforce the following limitations derived from IBM's original VGA implementation: o There can only be a set of four (non-programmable) clocks to choose from. o Video memory is limited to 256kB in monochrome and 16-colour modes. o Video memory is limited to 64kB in 256-colour modes. o Interlaced modes are not available. o Colour depths higher than 8 are not available. 5. xorg.conf specifications The driver recognises a number of xorg.conf options. In general, all such options should be specified in a ``Device'' section, and affect only that ``Device'' section. Those options that affect how the driver associates adapters with ``Device'' sections are described first. The driver will ignore (with a message) a ``Device'' section if the section cannot be associated with exactly one adapter in the system. Similarly, the driver will ignore, or disable, (with a message) any adapter that cannot be associated with exactly one ``Device'' section. Thus, these options will be required in those uncommon cases where such unique associations cannot automatically be made by the driver. Other options affect the driver's operation once an adapter has been assigned to the ``Device'' section which contains them. 5.1. Driver ``ati'' The use of this specification is highly recommended if the ``Device'' section is to be recognised by the driver. In fact, it is almost (but not quite) mandatory, particularly when using the loader server as it indicates what driver is to be loaded and associated with the ``Device'' section. 5.2. ChipSet ``name'' The default ChipSet name for this driver is ``ati''. In this case, any ATI adapter can be associated with the ``Device'' section. If an ATI accelerator is detected and the driver supports it, the accelerator's CRTC will be used to drive the screen. Otherwise, the driver will programme the adapter's SuperVGA CRTC. If ``ativga'' is specified instead, the driver will ignore any ATI accelerator it detects, but otherwise operate as if ``ati'' had been specified. This specification ensures the VGA CRTC is used. A ChipSet name of ``ibmvga'' causes any VGA-capable adapter in the system to be associated with the ``Device'' section. It enables the driver's generic VGA support, but only for non-ATI adapters. If an ATI adapter is associated with the ``Device'' section, the driver will operate as if ``ativga'' had been specified instead. A ChipSet name of ``vgawonder'' is equivalent to ``ativga'', except that only VGAWonder-capable adapters can be assigned to the ``Device'' section. This specifically excludes the newer integrated Mach64 controllers. In some PCI or AGP systems, the driver will not, by default, probe for non-PCI Mach32's or Mach64's. This is because, before doing any such probe, the driver attempts to determine if the probe can cause a lockup. If the driver has enough information to determine that a lockup would occur, it will skip the probe. In some situations, this determination cannot be accurate, and the driver will err on the side of caution, skipping the probe. Specifying a ChipSet name of ``mach32'' or ``mach64'', as appropriate, will force the driver to probe for the non-PCI adapter. These ChipSet names should, therefore, only be used when there is in fact such an adapter in the system. They are otherwise equivalent to ``ati''. On non-Intel platforms, only ``ati'' and ``mach64'' ChipSet values are operative. 5.3. ChipID & ChipRev specifications These specifications will cause the driver to associate the ``Device'' section only with an adapter having the same attributes, or an adapter whose PCI device ID the driver does not recognise. In the second case, these options cause the driver to treat the adapter as if it was one with the specified PCI device ID or revision. ChipID can only be used with Mach32 or Mach64 adapters, and, thus, specifically excludes any other adapter from matching the ``Device'' section. ChipRev is meaningful only with Mach64 adapters, and then only if ChipID is also specified in the same ``Device'' section. 5.4. IOBase This option limits the adapters that can be associated with the ``Device'' section to the one with the specified I/O base. This option only applies to Mach64 adapters and specifically excludes other adapters. 5.5. BusID This option limits the adapters that can be associated with the ``Device'' section to the one with the specified PCI Bus ID. This specification excludes non-PCI adapters. 5.6. Clocks For the purpose of specifying a clock line in your xorg.conf, one of four different situations can occur, as follows. Those configuring the driver's generic VGA support for a non-ATI adapter, can skip ahead to the ``Clocks for non-ATI adapters'' section below. Those not trying to configure the driver for a Mach64 adapter, can skip ahead to the ``Clocks for fixed clock generators on ATI adapters'' section below. The very earliest Mach64 adapters use fixed (i.e. non-programmable) clock generators. Very few of these (mostly prototypes) are known to exist, but if you have one of these, you can also skip ahead to the ``Clocks for fixed clock generators on ATI adapters'' section below. The two cases that are left deal with programmable clock generators, which are used on the great majority of Mach64 adapters. If you are uncertain which situation applies to your adapter, you can run a clock probe with the command ``X -probeonly''. 5.6.1. Clocks for supported programmable clock generators At bootup, video BIOS initialisation programmes an initial set of frequencies. Two of these are reserved to allow the setting of modes that do not use a frequency from this initial set. One of these reserved slots is used by the BIOS mode set routine, the other by the particular driver used (e.g. MS-Windows, AutoCAD, X, etc.). The clock numbers reserved in this way are dependent on the particular clock generator used by the adapter. The driver currently supports all programmable clock generators known to exist on Mach64 adapters. In this case, the driver will completely ignore any xorg.conf clock specification, and programme the clock generator as needed by the modes used during the X session. 5.6.2. Clocks for unsupported programmable clock generators This case is unlikely to occur, but is documented for the sake of completeness. In this situation, the driver will probe the adapter for clock frequencies unless xorg.conf clocks are already specified. In either case, the driver will then attempt to normalise the clocks to one of the following specifications: BIOS setting 1: Clocks 0.000 110.000 126.000 135.000 50.350 56.640 63.000 72.000 0.000 80.000 75.000 65.000 40.000 44.900 49.500 50.000 0.000 55.000 63.000 67.500 25.180 28.320 31.500 36.000 0.000 40.000 37.500 32.500 20.000 22.450 24.750 25.000 BIOS setting 2: Clocks 0.000 110.000 126.000 135.000 25.180 28.320 31.500 36.000 0.000 80.000 75.000 65.000 40.000 44.900 49.500 50.000 0.000 55.000 63.000 67.500 12.590 14.160 15.750 18.000 0.000 40.000 37.500 32.500 20.000 22.450 24.750 25.000 BIOS setting 3: Clocks 0.000 0.000 0.000 0.000 25.180 28.320 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 12.590 14.160 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 If the driver matches the clocks to the third setting above, function- ality will be extremely limited (assuming the driver works at all). 5.6.3. Clocks for fixed clock generators on ATI adapters This section applies to all VGAWonder and Mach32 adapters, and to early Mach64 prototypes. One of the following clocks specifications (or an initial subset thereof) can be used depending on what the adapter uses to generate dot clocks: Crystals (VGA Wonder V3 and V4 adapters only): Clocks 50.000 56.644 0.000 44.900 44.900 50.000 0.000 36.000 25.000 28.322 0.000 22.450 22.450 25.000 0.000 18.000 16.667 18.881 0.000 14.967 14.967 16.667 0.000 12.000 12.500 14.161 0.000 11.225 11.225 12.500 0.000 9.000 ATI 18810 clock generator: Clocks 30.240 32.000 37.500 39.000 42.954 48.771 0.000 36.000 40.000 0.000 75.000 65.000 50.350 56.640 0.000 44.900 15.120 16.000 18.750 19.500 21.477 24.386 0.000 18.000 20.000 0.000 37.500 32.500 25.175 28.320 0.000 22.450 10.080 10.667 12.500 13.000 14.318 16.257 0.000 12.000 13.333 0.000 25.000 21.667 16.783 18.880 0.000 14.967 7.560 8.000 9.375 9.750 10.739 12.193 0.000 9.000 10.000 0.000 18.750 16.250 12.586 14.160 0.000 11.225 ATI 18811-0 and ATI 18812-0 clock generators: Clocks 30.240 32.000 110.000 80.000 42.954 48.771 92.400 36.000 39.910 44.900 75.000 65.000 50.350 56.640 0.000 44.900 15.120 16.000 55.000 40.000 21.477 24.386 46.200 18.000 19.955 22.450 37.500 32.500 25.175 28.320 0.000 22.450 10.080 10.667 36.667 26.667 14.318 16.257 30.800 12.000 13.303 14.967 25.000 21.667 16.783 18.880 0.000 14.967 7.560 8.000 27.500 20.000 10.739 12.193 23.100 9.000 9.978 11.225 18.750 16.250 12.588 14.160 0.000 11.225 ATI 18811-1 and ATI 18811-2 clock generators: Clocks 135.000 32.000 110.000 80.000 100.000 126.000 92.400 36.000 39.910 44.900 75.000 65.000 50.350 56.640 0.000 44.900 67.500 16.000 55.000 40.000 50.000 63.000 46.200 18.000 19.955 22.450 37.500 32.500 25.175 28.320 0.000 22.450 45.000 10.667 36.667 26.667 33.333 42.000 30.800 12.000 13.303 14.967 25.000 21.667 16.783 18.880 0.000 14.967 33.750 8.000 27.500 20.000 25.000 31.500 23.100 9.000 9.978 11.225 18.750 16.250 12.588 14.160 0.000 11.225 ICS 2494-AM clock generators (found on some Dell motherboards): Clocks 75.000 77.500 80.000 90.000 25.175 28.322 31.500 36.000 100.000 110.000 126.000 135.000 40.000 44.900 50.000 65.000 37.500 38.750 40.000 45.000 12.588 14.161 15.750 18.000 50.000 55.000 63.000 67.500 20.000 22.450 25.000 32.500 25.000 25.833 26.667 30.000 8.392 9.441 10.500 12.000 33.333 36.667 42.000 45.000 13.333 14.767 16.667 21.667 18.750 19.375 20.000 22.500 6.294 7.081 7.875 9.000 25.000 27.500 31.500 33.750 10.000 11.225 12.500 16.250 VGAWonder VLB, VGA 1024 VLB, Mach32 and Mach64 owners should only specify up to the first 32 frequencies. Any more will be ignored. Other clock generators that have been used on ATI adapters (which can all be said to be clones of one of the above) might generate non-zero frequencies for those that are zero above, or vice-versa. The order of the clocks is very important, although the driver will reorder the specified clocks if it deems it appropriate to do so. Mach32 and Mach64 owners should note that this order is different than what they would use for previous accelerated servers. 5.6.4. Clocks for non-ATI adapters If no clocks are specified in the xorg.conf, the driver will probe for four clocks, the second of which will be assumed to be 28.322 MHz. The first clock will typically be 25.175 MHz, but there are exceptions. You can include up to four clock frequencies in your xorg.conf to specify the actual values used by the adapter. Any more will be ignored. 5.7. Option ``nopanel_display'' This specification is only effective when the driver detects that the adapter's BIOS has initialised both the digital flat panel and CRT interfaces. In such a situation, the driver will normally drive both the panel and the CRT. This specification causes the driver to disable the digital flat panel and display the screen image on the CRT instead, which could potentially allow for larger physical resolutions than the panel can handle. 5.8. Option ``crt_display'' This specification is only effective when the driver detects that the adapter's BIOS has initialised the digital flat panel interface, but has disabled the CRT interface. In such a situation the driver will normally drive only the panel. This specification causes the driver to instead display the same image on both the panel and the CRT. 5.9. Option ``noaccel'' By default, the driver will accelerate draw operations if a Mach64 CRTC is used to drive the display. As implemented in this driver, acceleration does not require a linear video memory aperture. This option disables this acceleration. 5.10. Option ``nolinear'' By default, the driver will enable a linear video memory aperture for 256-colour and higher depth modes if it is also using a Mach64 accelerator CRTC or an integrated Mach64 graphics chip. This option disables this linear aperture. On non-Intel platforms, the driver requires a linear aperture and, so, this option is ignored. 5.11. Option ``HWCursor'' and Option ``SWCursor'' Option ``HWCursor'', which is the default, specifies that hardware facilities are to be used to paint the mouse pointer on the screen. Option ``SWCursor'' specifies that the mouse pointer is to be drawn by software, which is much slower. If both options are specified, option ``SWCursor'' prevails. Currently, these options are only acted upon for 256-colour or higher depth modes, if a Mach64 accelerator CRTC, or a Mach64 integrated controller is being used. In all other situations, a software cursor will be used, regardless of what these options specify. 5.12. Option ``SilkenMouse'' This option is only acted upon when a hardware cursor is being used. It specifies that the cursor's position on the screen is to be updated as quickly as possible when the mouse is moved. This is the default behaviour. If this option is negated, the cursor may lag the mouse when the X server is very busy. 5.13. Option ``shadowfb'' If this option is enabled, the driver will cause the CPU to do each drawing operation first into a shadow frame buffer in system virtual memory and then copy the result into video memory. If this option is not active, the CPU will draw directly into video memory. Enabling this option is beneficial for those systems where reading from video memory is, on average, slower than the corresponding read/modify/write operation in system virtual memory. This is normally the case for PCI or AGP adapters, and, so, this option is enabled by default. For other bus types, the default behaviour is to disable this option. Note that, due to various limitations, this option is forcibly disabled when a linear video memory aperture is not enabled, when the frame buffer depth is less than 8, or when acceleration is used. 5.14. Option ``dpms'' This option enables the driver's support for VESA's Display Power Management Specification. 5.15. Option ``backingstore'' This is not specifically a driver option. It is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. 5.16. MemBase address This specification is only effective for non-PCI Mach64 adapters, and is used to override the CPU address at which the adapter will map its video memory. Normally, for non-PCI adapters, this address is set by a DOS install utility provided with the adapter. The MemBase option can also be used to enable the linear aperture in those cases where ATI's utility was not, or can not be, used. For PCI and AGP adapters, this address is determined at system bootup according to the PCI Plug'n'Play specification which arbitrates the resource requirements of most devices in the system. This means the driver can not easily change the linear aperture address. 5.17. Option ``ReferenceClock'' ``frequency'' This option is only applicable to non-Intel platforms, where an adapter BIOS is not available to the driver. The option specifies the reference frequency used by the adapter's clock generator. The default is 14.318 MHz, and other typical values are 28.636, or 29.5 MHz. 5.18. ClockChip ``name'' This option is only applicable to non-Intel platforms, where an adapter BIOS is not available to the driver, and the driver cannot reliably determine whether the clock generator the adapter uses is a variant of an ATI 18818 (a.k.a. ICS 2595) or an unsupported clock generator. The only values that are acted upon are ``ATI 18818-0'' or ``ATI 18818-1''. From this specification, the driver derives a reference divider of 43 or 46 (respectively) for use in clock programming calculations. The driver's default behaviour, in this case, is to assume an unsupported clock generator, which means it will treat it as a fixed-frequency clock generator, as described under the heading ``Clocks for unsupported programmable clock generators'' above. 6. Video modes Mode timings can be derived from the information in X's doc subdirectory. However, it is no longer required to specify such timings in an xorg.conf's ``Monitor'' section(s), if only standard mode timings are to be used. The server automatically inserts VESA standard mode timings in every ``Monitor'' section, and these modes will be checked first for mode constraints (monitor sync tolerances, video memory size, etc.). Furthermore, it is also no longer required to specify mode names in ``Display'' subsections. Should no mode names be specified (or those specified do not yield a usable mode), the server will automatically select as a default resolution the largest usable mode, whether or not the chosen mode is specified in the corresponding ``Monitor'' section. For a digital flat panel, any sync tolerances should be removed from the corresponding ``Monitor'' section. The driver will automatically calculate these from the mode that is active on server entry. The driver also inserts timings for a mode called "Native panel mode" that represents the panel's native resolution. 7. Known problems and limitations There are several known problems or limitations related to the ATI driver. They include: o When using a Mach64's accelerator CRTC, the virtual resolution must be less than 8192 pixels wide. The VGA CRTC further limits the virtual resolution width to less than 4096 pixels, or to less than 2048 pixels for adapters based on 18800-x's (with 256kB of memory) and on Mach64 integrated controllers. These are hardware limits that cannot be circumvented. o Virtual resolutions requiring more than 1MB of video memory (256kB in the monochrome case) are not supported by the VGA CRTC on 88800GX and 88800CX adapters. This is a hardware limit that cannot be circumvented. o Due to hardware limitations, doublescanned modes are not supported by the accelerator CRTC in 88800GX, 88800CX, 264CT and 264ET adapters. o The ``VScan'' modeline parameter is only supported when using the VGA CRTC. o Interlaced modes are not supported on 18800-x and 28800-x adapters when using a virtual resolution that is 2048 pixels or wider. When using a 18800-x with 256kB of video memory in 256-colour modes, this limit is reduced to 1024. This is yet another hardware limitation that cannot be circumvented. o Video memory banking does not work in monochrome and 16-colour modes on 18800-x adapters. This appears to be another hardware limit, but this conclusion cannot be confirmed at this time. The driver's default behaviour in this case is to limit video memory to 256kB. o Video memory corruption can still occur during mode switches on 18800-x adapters. Symptoms of this problem include garbled fonts on return to text mode, and various effects (snow, dashed lines, etc) on initial entry into a graphics mode. In the first case, the workaround is to use some other means of restoring the text font. On Linux, this can be accomplished with the kbd or svgalib packages. In the second case, xrefresh(1) will usually clean up the image. No complete solution to this problem is currently known. It appears this corruption occurs due to either video memory bandwidth or RAMDAC limitations, and so the driver will limit mode clocks to 40MHz. o There is some controversy over what the maximum allowed clock frequency should be on 264xT and 3D Rage adapters. For now, clocks will, by default, be limited to 80MHz, 135MHz, 170MHz, 200MHz or 230MHz, depending on the specific controller. This limit can only be increased (up to a driver-calculated absolute maximum) through the DACSpeed specification in xorg.conf. Be aware however that doing so is untested and might damage the adapter. o Except as in the previous items, clocks are limited to 80MHz on most adapters, although many are capable of higher frequencies. This will eventually be fixed in a future release. o The use of a laptop's hot-keys to switch displays while this driver is active can cause lockups and/or other woes, and is therefore not recommended. It is not currently possible to solve this problem. o In situations where the driver is to simultaneously display on both a panel and a CRT, the same image will be seen on both. In particular, this means the CRT must be able to synchronise with the timings of the panel's native resolution. This is quite evident when the panel has ``odd-ball'' dimensions, such as 1400x1050, a resolution not commonly possible on CRTs or projection equipment. Also, the display of independent images on the panel and CRT is not currently implemented, and might never be, pending resolution of the previous item. Support for the following will be added in a future release: o Mach32's accelerator CRTC. This support is the first step towards accelerated support for Mach32's, Mach8's, 8514/A's and other clones. o Colour depth greater than 8 on non-integrated controllers, where permitted by the hardware. o Mach32, Mach8 and 8514/A Draw Engines. o Hardware cursors where implemented by hardware. This has already been done for Mach64 integrated controllers. o TVOut, i.e. the ability to use a television screen as a monitor. o Motion Video, i.e. displaying an asynchronous data stream (TV signal, DVD, etc.) in a window or full-screen. o 3D operations. 8. Reporting problems If you are experiencing problems that are not already recorded in this document, first ensure that you have the latest current release of this driver and the Xorg X server. Check the server's log (usually found in /var/log/Xorg.0.log) and http://www.x.org/releases/individual/ if you are uncertain. Secondly, please check Xorg's doc directory for additional information. Thirdly, a scan through the comp.windows.x.i386unix and comp.os.linux.x newsgroups, the xorg mailing list archives at http://lists.freedesktop.org/mailman/listinfo/xorg, and the Xorg bug database at https://bugs.freedesktop.org/enter_bug.cgi?product=xorg can also prove useful in resolving problems. If you are still experiencing problems, you can send non-HTMLised e- mail to . Please be as specific as possible when describing the problem(s), and include an unedited copy of the server's log and the xorg.conf file used. 9. Driver history The complete history of the driver is rather cloudy. The following is more than likely to be incomplete and inaccurate. Apparently, Per Lindqvist first got a driver working with an early ATI adapter under X386 1.1a. This original driver might have actually been based on a non-functional ATI driver written by Thomas Roell (currently of Xi Graphics). Then Doug Evans added support for the ATI VGA Wonder XL, trying in the process to make the driver work with all other ATI adapters available at the time. Rik Faith obtained the X11R4 driver from Doug Evans in the summer of 1992 and ported the code to the X386 part of X11R5. This subsequently became part of XFree86. Marc Aurele La France took over development and maintenance of the driver in the fall of 1993 after Rik got rid of his VGA Wonder adapter. 10. Driver versions Due to the introduction of loadable drivers in XFree86 4.0, it has become necessary to track driver versions separately. Driver releases use the following version numbering scheme. Version 1 of this driver is the one I inherited from Rik Faith. This is the version found in XFree86 2.0 and 2.1. Version 2 is my first rewrite of this code which only ended up being a partially unsuccessful attempt at generalising the driver for all VGA Wonder, Mach32, and early Mach64 adapters. Various releases of this version of the driver can be found in XFree86 2.1.1, 3.1, 3.1.1 and 3.1.2. Version 3 represents my second rewrite (although a rather lame one as rewrites go). Into version 3, I introduced clock programming for Mach64 adapters and merged in the old ati_test debugging tool. This is the version found in XFree86 3.2, 3.3 and 3.3.1. Version 4 is a rather major restructuring of version 3, which became larger than I could comfortably handle in one source file. This is the version found in XFree86 3.3.2, 3.3.3, 3.3.3.1, 3.3.3.2, 3.3.4, 3.3.5 and 3.3.6. Version 5 is an almost complete restructuring of version 4 to fit in the newer driver API of XFree86 4.0 and later. The introduction of version 6 is a first swipe at porting the driver to non-Intel architectures. All questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg Please submit bug reports to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg The master development code repository can be found at: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-mach64 http://cgit.freedesktop.org/xorg/driver/xf86-video-mach64 For patch submission instructions, see: http://www.x.org/wiki/Development/Documentation/SubmittingPatches For more information on the git code manager, see: http://wiki.x.org/wiki/GitPage xf86-video-mach64-6.9.5/compile0000755000175000017500000001624512521746617013034 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-video-mach64-6.9.5/config.guess0000755000175000017500000012367212521746617014001 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xf86-video-mach64-6.9.5/config.sub0000755000175000017500000010624612521746617013442 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xf86-video-mach64-6.9.5/install-sh0000755000175000017500000003452312521746617013461 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-video-mach64-6.9.5/ltmain.sh0000644000175000017500000105152212521746612013267 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed 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) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # 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 # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # 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. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { 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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # 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 # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_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 () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # 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. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "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 "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # 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 } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_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 () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_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 () { $opt_debug 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 "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </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 "$lt_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 () { $opt_debug # 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 () { $opt_debug 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 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug $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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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_mode_compile arg... func_mode_compile () { $opt_debug # 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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$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 "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then 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 "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $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 test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug 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_silent && 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 "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no 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=yes ;; -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$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. 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 ;; 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 "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$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 "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #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 con'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 /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$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 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[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) 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"' # 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_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 () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # 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 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 } }'` 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 () { $opt_debug 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 () { $opt_debug 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 which possess that section. Heuristic: eliminate # all those which 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_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 () { $opt_debug 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 () { $opt_debug 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_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 () { $opt_debug 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 () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | 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 in which 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$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which 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$TIMESTAMP) $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 "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # 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 "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$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 /* 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 platforms) ... */ #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 # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #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 ((void *) 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]; int 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 = 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 (strcmp (str, pat) == 0) *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 int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } 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 #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { 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 () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then 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 ;; 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 "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" 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$arg" = "X-lc" || test "X$arg" = "X-lm"; 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$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -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*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$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\" 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 "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) 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=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= 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 "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" 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 "$pass" = link; 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 "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. 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 "X$installed" = Xyes; 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 "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later 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 "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; 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 "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_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 "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) 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 test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; 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 "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) 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*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$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 "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) 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 "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" 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 "$link_all_deplibs" != no; 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 "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" 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 "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # 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 "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi 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 "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; 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 "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) 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 "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; 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 "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $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 "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then 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 "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do 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 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for 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 "$try_normal_branch" = yes \ && { 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 "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter 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 "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" 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 "$thread_safe" = yes && 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 "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output 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 "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do 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 "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do 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 "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. 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 if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$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 fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" 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="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` 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 "$build_libtool_libs" != yes && 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" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $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 "$tagname" = CXX ; 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 "$build_old_libs" = yes; 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@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$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 fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do 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 "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$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 if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi 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 "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" 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 "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" 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 "x$bindir" != x ; 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$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) 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 "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; 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 test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do 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" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then 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 "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe 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 "$fast_install" = yes && 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 } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} 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 # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 xf86-video-mach64-6.9.5/missing0000755000175000017500000001533012521746617013047 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-video-mach64-6.9.5/src/0000755000175000017500000000000012521747527012316 500000000000000xf86-video-mach64-6.9.5/src/Makefile.am0000644000175000017500000000604512270010352014253 00000000000000# Copyright 2005 Adam Jackson. # Copyright 2005 Red Hat, Inc. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, 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 (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. if DRI ATIMISC_DRI_SRCS = atidri.c endif if ATIMISC_CPIO ATIMISC_CPIO_SOURCES = ativga.c ativgaio.c atibank.c atiwonder.c atiwonderio.c endif if ATIMISC_DGA ATIMISC_DGA_SOURCES = atidga.c endif if USE_EXA ATIMISC_EXA_SOURCES = atimach64exa.c endif AM_CFLAGS = $(CWARNFLAGS) @XORG_CFLAGS@ @DRI_CFLAGS@ mach64_drv_la_LTLIBRARIES = mach64_drv.la mach64_drv_la_LDFLAGS = -module -avoid-version mach64_drv_ladir = @moduledir@/drivers mach64_drv_la_SOURCES = \ atibus.c atichip.c atiprobe.c atividmem.c \ atiadjust.c aticlock.c aticonfig.c aticonsole.c \ atidac.c atidsp.c atii2c.c \ atilock.c atimach64.c atimach64accel.c atimach64cursor.c \ atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \ atiprint.c atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \ atiload.c atimisc.c atimach64probe.c $(ATIMISC_CPIO_SOURCES) \ $(ATIMISC_DGA_SOURCES) $(ATIMISC_DRI_SRCS) $(ATIMISC_EXA_SOURCES) EXTRA_DIST = \ atimach64render.c \ \ atiadjust.h \ atiaudio.h \ atibank.h \ atibus.h \ atichip.h \ aticlock.h \ aticonsole.h \ aticrtc.h \ aticursor.h \ atidac.h \ atidga.h \ atidri.h \ atidripriv.h \ atidsp.h \ ati.h \ atii2c.h \ atiload.h \ atilock.h \ atimach64accel.h \ atimach64.h \ atimach64i2c.h \ atimach64io.h \ atimach64probe.h \ atimach64version.h \ atimode.h \ atioption.h \ atipreinit.h \ atiprint.h \ atipriv.h \ atiprobe.h \ atiregs.h \ atirgb514.h \ atiscreen.h \ atistruct.h \ atituner.h \ atiutil.h \ ativalid.h \ ativga.h \ ativgaio.h \ atividmem.h \ atiwonder.h \ atiwonderio.h \ atixv.h \ mach64_common.h \ mach64_dri.h \ mach64_sarea.h \ atipcirename.h \ compat-api.h xf86-video-mach64-6.9.5/src/Makefile.in0000644000175000017500000006655612521746617014324 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # Copyright 2005 Red Hat, Inc. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, 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 (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__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)$(mach64_drv_ladir)" LTLIBRARIES = $(mach64_drv_la_LTLIBRARIES) mach64_drv_la_LIBADD = am__mach64_drv_la_SOURCES_DIST = atibus.c atichip.c atiprobe.c \ atividmem.c atiadjust.c aticlock.c aticonfig.c aticonsole.c \ atidac.c atidsp.c atii2c.c atilock.c atimach64.c \ atimach64accel.c atimach64cursor.c atimach64i2c.c \ atimach64io.c atimach64xv.c atimode.c atipreinit.c atiprint.c \ atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \ atiload.c atimisc.c atimach64probe.c ativga.c ativgaio.c \ atibank.c atiwonder.c atiwonderio.c atidga.c atidri.c \ atimach64exa.c @ATIMISC_CPIO_TRUE@am__objects_1 = ativga.lo ativgaio.lo atibank.lo \ @ATIMISC_CPIO_TRUE@ atiwonder.lo atiwonderio.lo @ATIMISC_DGA_TRUE@am__objects_2 = atidga.lo @DRI_TRUE@am__objects_3 = atidri.lo @USE_EXA_TRUE@am__objects_4 = atimach64exa.lo am_mach64_drv_la_OBJECTS = atibus.lo atichip.lo atiprobe.lo \ atividmem.lo atiadjust.lo aticlock.lo aticonfig.lo \ aticonsole.lo atidac.lo atidsp.lo atii2c.lo atilock.lo \ atimach64.lo atimach64accel.lo atimach64cursor.lo \ atimach64i2c.lo atimach64io.lo atimach64xv.lo atimode.lo \ atipreinit.lo atiprint.lo atirgb514.lo atiscreen.lo \ atituner.lo atiutil.lo ativalid.lo atiload.lo atimisc.lo \ atimach64probe.lo $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) mach64_drv_la_OBJECTS = $(am_mach64_drv_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 = mach64_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mach64_drv_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mach64_drv_la_SOURCES) DIST_SOURCES = $(am__mach64_drv_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DRI_CFLAGS = @DRI_CFLAGS@ DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ 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@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ 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@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @DRI_TRUE@ATIMISC_DRI_SRCS = atidri.c @ATIMISC_CPIO_TRUE@ATIMISC_CPIO_SOURCES = ativga.c ativgaio.c atibank.c atiwonder.c atiwonderio.c @ATIMISC_DGA_TRUE@ATIMISC_DGA_SOURCES = atidga.c @USE_EXA_TRUE@ATIMISC_EXA_SOURCES = atimach64exa.c AM_CFLAGS = $(CWARNFLAGS) @XORG_CFLAGS@ @DRI_CFLAGS@ mach64_drv_la_LTLIBRARIES = mach64_drv.la mach64_drv_la_LDFLAGS = -module -avoid-version mach64_drv_ladir = @moduledir@/drivers mach64_drv_la_SOURCES = \ atibus.c atichip.c atiprobe.c atividmem.c \ atiadjust.c aticlock.c aticonfig.c aticonsole.c \ atidac.c atidsp.c atii2c.c \ atilock.c atimach64.c atimach64accel.c atimach64cursor.c \ atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \ atiprint.c atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \ atiload.c atimisc.c atimach64probe.c $(ATIMISC_CPIO_SOURCES) \ $(ATIMISC_DGA_SOURCES) $(ATIMISC_DRI_SRCS) $(ATIMISC_EXA_SOURCES) EXTRA_DIST = \ atimach64render.c \ \ atiadjust.h \ atiaudio.h \ atibank.h \ atibus.h \ atichip.h \ aticlock.h \ aticonsole.h \ aticrtc.h \ aticursor.h \ atidac.h \ atidga.h \ atidri.h \ atidripriv.h \ atidsp.h \ ati.h \ atii2c.h \ atiload.h \ atilock.h \ atimach64accel.h \ atimach64.h \ atimach64i2c.h \ atimach64io.h \ atimach64probe.h \ atimach64version.h \ atimode.h \ atioption.h \ atipreinit.h \ atiprint.h \ atipriv.h \ atiprobe.h \ atiregs.h \ atirgb514.h \ atiscreen.h \ atistruct.h \ atituner.h \ atiutil.h \ ativalid.h \ ativga.h \ ativgaio.h \ atividmem.h \ atiwonder.h \ atiwonderio.h \ atixv.h \ mach64_common.h \ mach64_dri.h \ mach64_sarea.h \ atipcirename.h \ compat-api.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-mach64_drv_laLTLIBRARIES: $(mach64_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(mach64_drv_la_LTLIBRARIES)'; test -n "$(mach64_drv_ladir)" || 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)$(mach64_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(mach64_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(mach64_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(mach64_drv_ladir)"; \ } uninstall-mach64_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(mach64_drv_la_LTLIBRARIES)'; test -n "$(mach64_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(mach64_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(mach64_drv_ladir)/$$f"; \ done clean-mach64_drv_laLTLIBRARIES: -test -z "$(mach64_drv_la_LTLIBRARIES)" || rm -f $(mach64_drv_la_LTLIBRARIES) @list='$(mach64_drv_la_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}; \ } mach64_drv.la: $(mach64_drv_la_OBJECTS) $(mach64_drv_la_DEPENDENCIES) $(EXTRA_mach64_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(mach64_drv_la_LINK) -rpath $(mach64_drv_ladir) $(mach64_drv_la_OBJECTS) $(mach64_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiadjust.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atibank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atibus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atichip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aticlock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aticonfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aticonsole.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atidac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atidga.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atidri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atidsp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atii2c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atilock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64accel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64i2c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64probe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimach64xv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimisc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atipreinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiprobe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atirgb514.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiscreen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atituner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiutil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ativalid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ativga.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ativgaio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atividmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiwonder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atiwonderio.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(mach64_drv_ladir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-mach64_drv_laLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-mach64_drv_laLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-mach64_drv_laLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-mach64_drv_laLTLIBRARIES 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-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-mach64_drv_laLTLIBRARIES 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-mach64_drv_laLTLIBRARIES .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: xf86-video-mach64-6.9.5/src/atibus.c0000644000175000017500000000667412270010352013662 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atibus.h" #include "atichip.h" #include "atimach64io.h" #include "atistruct.h" /* * Definitions related to an adapter's system bus interface. */ const char *ATIBusNames[] = { "PCI", "AGP" }; /* * ATIClaimResources -- * * This function registers most of the bus resources used by an adapter. The * exceptions are PCI-configured resources and non-PCI non-AGP linear * apertures, both of which are registered by ATIPreInit(). This function also * attempts to register unshareable resources for inactive PCI adapters, * whether or not they are relocatable. */ static void ATIClaimResources ( ATIPtr pATI, Bool Active ) { #ifndef XSERVER_LIBPCIACCESS #ifndef AVOID_CPIO resRange Resources[2] = {{0, 0, 0}, _END}; /* Claim VGA and VGAWonder resources */ if ((pATI->VGAAdapter) && (Active)) { /* * 18800-x's are the only ATI controllers that decode all ISA aliases * of VGA and VGA Wonder I/O ports. Other x8800's do not decode >any< * VGA aliases, but do decode VGA Wonder aliases whose most significant * nibble is zero. */ xf86ClaimFixedResources(resVgaShared, pATI->iEntity); if (pATI->CPIO_VGAWonder) { Resources[0].type = ResShrIoSparse | ResBus; Resources[0].rBase = pATI->CPIO_VGAWonder; Resources[0].rMask = 0xF3FEU; xf86ClaimFixedResources(Resources, pATI->iEntity); (void)memcpy(pATI->VGAWonderResources, Resources, SizeOf(Resources)); } } if (!Active) return; /* Claim Mach64 sparse I/O resources */ if ((pATI->CPIODecoding == SPARSE_IO)) { Resources[0].type = ResShrIoSparse | ResBus; Resources[0].rBase = pATI->CPIOBase; Resources[0].rMask = 0x03FCU; xf86ClaimFixedResources(Resources, pATI->iEntity); } #endif /* AVOID_CPIO */ #endif } /* * ATIClaimBusSlot -- * * Claim an adapter and register its resources. */ int ATIClaimBusSlot ( Bool Active, ATIPtr pATI ) { if (pATI->iEntity >= 0) ATIClaimResources(pATI, Active); return pATI->iEntity; } xf86-video-mach64-6.9.5/src/atichip.c0000644000175000017500000002225612270010352014006 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atibus.h" #include "atichip.h" #include "atimach64io.h" #include "atimach64version.h" const char *ATIFoundryNames[] = { "SGS", "NEC", "KCS", "UMC", "TSMC", "5", "6", "UMC" }; /* * ATIMach64ChipID -- * * Set variables whose value is dependent upon a Mach64's CONFIG_CHIP_ID * register. */ void ATIMach64ChipID ( ATIPtr pATI, const CARD16 ExpectedChipType ) { pATI->config_chip_id = inr(CONFIG_CHIP_ID); pATI->ChipType = GetBits(pATI->config_chip_id, CFG_CHIP_TYPE); pATI->ChipClass = GetBits(pATI->config_chip_id, CFG_CHIP_CLASS); pATI->ChipRev = GetBits(pATI->config_chip_id, CFG_CHIP_REV); pATI->ChipVersion = GetBits(pATI->config_chip_id, CFG_CHIP_VERSION); pATI->ChipFoundry = GetBits(pATI->config_chip_id, CFG_CHIP_FOUNDRY); pATI->ChipRevision = GetBits(pATI->config_chip_id, CFG_CHIP_REVISION); switch (pATI->ChipType) { case OldChipID('G', 'X'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'X'): switch (pATI->ChipRev) { case 0x00U: pATI->Chip = ATI_CHIP_88800GXC; break; case 0x01U: pATI->Chip = ATI_CHIP_88800GXD; break; case 0x02U: pATI->Chip = ATI_CHIP_88800GXE; break; case 0x03U: pATI->Chip = ATI_CHIP_88800GXF; break; default: pATI->Chip = ATI_CHIP_88800GX; break; } break; case OldChipID('C', 'X'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('C', 'X'): pATI->Chip = ATI_CHIP_88800CX; break; case OldChipID('C', 'T'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('C', 'T'): pATI->Chip = ATI_CHIP_264CT; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('E', 'T'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('E', 'T'): pATI->Chip = ATI_CHIP_264ET; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('V', 'T'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('V', 'T'): pATI->Chip = ATI_CHIP_264VT; pATI->BusType = ATI_BUS_PCI; /* Some early GT's are detected as VT's */ if (ExpectedChipType && (pATI->ChipType != ExpectedChipType)) { if (ExpectedChipType == NewChipID('G', 'T')) pATI->Chip = ATI_CHIP_264GT; else xf86Msg(X_WARNING, MACH64_NAME ": Mach64 chip type probe discrepancy" " detected: PCI=0x%04X; CHIP_ID=0x%04X.\n", ExpectedChipType, pATI->ChipType); } else if (pATI->ChipVersion) pATI->Chip = ATI_CHIP_264VTB; break; case OldChipID('G', 'T'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'T'): pATI->BusType = ATI_BUS_PCI; if (!pATI->ChipVersion) pATI->Chip = ATI_CHIP_264GT; else pATI->Chip = ATI_CHIP_264GTB; break; case OldChipID('V', 'U'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('V', 'U'): pATI->Chip = ATI_CHIP_264VT3; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('G', 'U'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'U'): pATI->Chip = ATI_CHIP_264GTDVD; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('L', 'G'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('L', 'G'): pATI->Chip = ATI_CHIP_264LT; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('V', 'V'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('V', 'V'): pATI->Chip = ATI_CHIP_264VT4; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('G', 'V'): case OldChipID('G', 'Y'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'V'): case NewChipID('G', 'Y'): pATI->Chip = ATI_CHIP_264GT2C; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('G', 'W'): case OldChipID('G', 'Z'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'W'): case NewChipID('G', 'Z'): pATI->Chip = ATI_CHIP_264GT2C; pATI->BusType = ATI_BUS_AGP; break; case OldChipID('G', 'I'): case OldChipID('G', 'P'): case OldChipID('G', 'Q'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'I'): case NewChipID('G', 'P'): case NewChipID('G', 'Q'): pATI->Chip = ATI_CHIP_264GTPRO; pATI->BusType = ATI_BUS_PCI; break; case OldChipID('G', 'B'): case OldChipID('G', 'D'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'B'): case NewChipID('G', 'D'): pATI->Chip = ATI_CHIP_264GTPRO; pATI->BusType = ATI_BUS_AGP; break; case OldChipID('L', 'I'): case OldChipID('L', 'P'): case OldChipID('L', 'Q'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('L', 'I'): case NewChipID('L', 'P'): case NewChipID('L', 'Q'): pATI->Chip = ATI_CHIP_264LTPRO; pATI->BusType = ATI_BUS_PCI; pATI->LCDVBlendFIFOSize = 800; break; case OldChipID('L', 'B'): case OldChipID('L', 'D'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('L', 'B'): case NewChipID('L', 'D'): pATI->Chip = ATI_CHIP_264LTPRO; pATI->BusType = ATI_BUS_AGP; pATI->LCDVBlendFIFOSize = 800; break; case OldChipID('G', 'L'): case OldChipID('G', 'O'): case OldChipID('G', 'R'): case OldChipID('G', 'S'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'L'): case NewChipID('G', 'O'): case NewChipID('G', 'R'): case NewChipID('G', 'S'): pATI->Chip = ATI_CHIP_264XL; pATI->BusType = ATI_BUS_PCI; pATI->LCDVBlendFIFOSize = 1024; break; case OldChipID('G', 'M'): case OldChipID('G', 'N'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('G', 'M'): case NewChipID('G', 'N'): pATI->Chip = ATI_CHIP_264XL; pATI->BusType = ATI_BUS_AGP; pATI->LCDVBlendFIFOSize = 1024; break; case OldChipID('L', 'R'): case OldChipID('L', 'S'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('L', 'R'): case NewChipID('L', 'S'): pATI->Chip = ATI_CHIP_MOBILITY; pATI->BusType = ATI_BUS_PCI; pATI->LCDVBlendFIFOSize = 1024; break; case OldChipID('L', 'M'): case OldChipID('L', 'N'): pATI->ChipType = OldToNewChipID(pATI->ChipType); case NewChipID('L', 'M'): case NewChipID('L', 'N'): pATI->Chip = ATI_CHIP_MOBILITY; pATI->BusType = ATI_BUS_AGP; pATI->LCDVBlendFIFOSize = 1024; break; default: pATI->Chip = ATI_CHIP_Mach64; break; } } xf86-video-mach64-6.9.5/src/atiprobe.c0000644000175000017500000003245312270010352014172 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "ati.h" #include "atibus.h" #include "atichip.h" #include "atimach64io.h" #include "atimach64version.h" #include "atiprobe.h" #include "atividmem.h" #include "atiwonderio.h" #ifndef AVOID_CPIO /* * ATIVGAWonderProbe -- * * This function determines if ATI extended VGA registers can be accessed * through the I/O port specified by pATI->CPIO_VGAWonder. If not, the * function resets pATI->CPIO_VGAWonder to zero. */ static void ATIVGAWonderProbe ( pciVideoPtr pVideo, ATIPtr pATI ) { CARD8 IOValue1, IOValue2, IOValue3, IOValue4, IOValue5, IOValue6; if (!pATI->OptionProbeSparse) { xf86Msg(X_WARNING, MACH64_NAME ": Expected VGA Wonder capability at I/O port" " 0x%04lX will not be probed\n" "set option \"probe_sparse\" to force probing.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; return; } if (pVideo && !xf86IsPrimaryPci(pVideo) && (pATI->Chip <= ATI_CHIP_88800GXD)) { /* Set up extended VGA register addressing */ PutReg(GRAX, 0x50U, GetByte(pATI->CPIO_VGAWonder, 0)); PutReg(GRAX, 0x51U, GetByte(pATI->CPIO_VGAWonder, 1) | 0x80U); } /* * Register 0xBB is used by the BIOS to keep track of various * things (monitor type, etc.). Except for 18800-x's, register * 0xBC must be zero and causes the adapter to enter a test mode * when written to with a non-zero value. */ IOValue1 = inb(pATI->CPIO_VGAWonder); IOValue2 = ATIGetExtReg(IOValue1); IOValue3 = ATIGetExtReg(0xBBU); ATIPutExtReg(0xBBU, IOValue3 ^ 0xAAU); IOValue4 = ATIGetExtReg(0xBBU); ATIPutExtReg(0xBBU, IOValue3 ^ 0x55U); IOValue5 = ATIGetExtReg(0xBBU); ATIPutExtReg(0xBBU, IOValue3); IOValue6 = ATIGetExtReg(0xBCU); ATIPutExtReg(IOValue1, IOValue2); if ((IOValue4 == (IOValue3 ^ 0xAAU)) && (IOValue5 == (IOValue3 ^ 0x55U)) && (IOValue6 == 0)) { xf86MsgVerb(X_INFO, 3, MACH64_NAME ": VGA Wonder at I/O port 0x%04lX detected.\n", pATI->CPIO_VGAWonder); } else { xf86Msg(X_WARNING, MACH64_NAME ": Expected VGA Wonder capability at I/O port" " 0x%04lX was not detected.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; } } #endif /* AVOID_CPIO */ /* * ATIMach64Detect -- * * This function determines if a Mach64 is detectable at a particular base * address. */ static Bool ATIMach64Detect ( ATIPtr pATI, const CARD16 ChipType, const ATIChipType Chip ) { CARD32 IOValue, bus_cntl, gen_test_cntl; Bool DetectSuccess = FALSE; (void)ATIMapApertures(-1, pATI); /* Ignore errors */ #ifdef AVOID_CPIO if (!pATI->pBlock[0]) { ATIUnmapApertures(-1, pATI); return FALSE; } #endif /* AVOID_CPIO */ /* Make sure any Mach64 is not in some weird state */ bus_cntl = inr(BUS_CNTL); if (Chip < ATI_CHIP_264VTB) outr(BUS_CNTL, (bus_cntl & ~(BUS_HOST_ERR_INT_EN | BUS_FIFO_ERR_INT_EN)) | (BUS_HOST_ERR_INT | BUS_FIFO_ERR_INT)); else if (Chip < ATI_CHIP_264VT4) outr(BUS_CNTL, (bus_cntl & ~BUS_HOST_ERR_INT_EN) | BUS_HOST_ERR_INT); gen_test_cntl = inr(GEN_TEST_CNTL); IOValue = gen_test_cntl & (GEN_OVR_OUTPUT_EN | GEN_OVR_POLARITY | GEN_CUR_EN | GEN_BLOCK_WR_EN); outr(GEN_TEST_CNTL, IOValue | GEN_GUI_EN); outr(GEN_TEST_CNTL, IOValue); outr(GEN_TEST_CNTL, IOValue | GEN_GUI_EN); /* See if a Mach64 answers */ IOValue = inr(SCRATCH_REG0); /* Test odd bits */ outr(SCRATCH_REG0, 0x55555555U); if (inr(SCRATCH_REG0) == 0x55555555U) { /* Test even bits */ outr(SCRATCH_REG0, 0xAAAAAAAAU); if (inr(SCRATCH_REG0) == 0xAAAAAAAAU) { /* * *Something* has a R/W 32-bit register at this address. Try to * make sure it's a Mach64. The following assumes that ATI will * not be producing any more adapters that do not register * themselves in PCI configuration space. */ ATIMach64ChipID(pATI, ChipType); if ((pATI->Chip != ATI_CHIP_Mach64) || (pATI->CPIODecoding == BLOCK_IO)) DetectSuccess = TRUE; } } /* Restore clobbered register value */ outr(SCRATCH_REG0, IOValue); /* If no Mach64 was detected, return now */ if (!DetectSuccess) { outr(GEN_TEST_CNTL, gen_test_cntl); outr(BUS_CNTL, bus_cntl); ATIUnmapApertures(-1, pATI); return FALSE; } ATIUnmapApertures(-1, pATI); return TRUE; } #ifdef AVOID_CPIO /* * ATIMach64Probe -- * * This function looks for a Mach64 at a particular MMIO address and returns an * ATIRec if one is found. */ static ATIPtr ATIMach64Probe ( ATIPtr pATI, pciVideoPtr pVideo, const ATIChipType Chip ) { CARD16 ChipType = PCI_DEV_DEVICE_ID(pVideo); pATI->MMIOInLinear = FALSE; /* * Probe through auxiliary MMIO aperture if one exists. Because such * apertures can be enabled/disabled only through PCI, this probes no * further. */ if ((PCI_REGION_SIZE(pVideo, 2) >= (1 << 12)) && (pATI->Block0Base = PCI_REGION_BASE(pVideo, 2, REGION_MEM))) { pATI->Block0Base += 0x00000400U; if (ATIMach64Detect(pATI, ChipType, Chip)) return pATI; return NULL; } /* * Probe through the primary MMIO aperture that exists at the tail end * of the linear aperture. Test for both 8MB and 4MB linear apertures. */ if ((PCI_REGION_SIZE(pVideo, 0) >= (1 << 22)) && (pATI->Block0Base = PCI_REGION_BASE(pVideo, 0, REGION_MEM))) { pATI->MMIOInLinear = TRUE; pATI->Block0Base += 0x007FFC00U; if ((PCI_REGION_SIZE(pVideo, 0) >= (1 << 23)) && ATIMach64Detect(pATI, ChipType, Chip)) return pATI; pATI->Block0Base -= 0x00400000U; if (ATIMach64Detect(pATI, ChipType, Chip)) return pATI; } return NULL; } #else /* AVOID_CPIO */ /* * ATIMach64Probe -- * * This function looks for a Mach64 at a particular PIO address and returns an * ATIRec if one is found. */ static ATIPtr ATIMach64Probe ( ATIPtr pATI, pciVideoPtr pVideo, const ATIChipType Chip ) { CARD32 IOValue; CARD16 ChipType = PCI_DEV_DEVICE_ID(pVideo); if ((pATI->CPIODecoding == BLOCK_IO) && (PCI_REGION_SIZE(pVideo, 1) < (1 << 8))) return NULL; if (!ATIMach64Detect(pATI, ChipType, Chip)) { return NULL; } /* * Determine VGA capability. VGA can always be enabled on integrated * controllers. For the GX/CX, it's a board strap. */ if (pATI->Chip >= ATI_CHIP_264CT) { pATI->VGAAdapter = TRUE; } else { IOValue = inr(CONFIG_STATUS64_0); pATI->BusType = GetBits(IOValue, CFG_BUS_TYPE); IOValue &= (CFG_VGA_EN | CFG_CHIP_EN); if (pATI->Chip == ATI_CHIP_88800CX) IOValue |= CFG_VGA_EN; if (IOValue == (CFG_VGA_EN | CFG_CHIP_EN)) { pATI->VGAAdapter = TRUE; pATI->CPIO_VGAWonder = 0x01CEU; } } return pATI; } static void ATIAssignVGA ( pciVideoPtr pVideo, ATIPtr pATI ) { if (pATI->CPIO_VGAWonder) { ATIVGAWonderProbe(pVideo, pATI); if (!pATI->CPIO_VGAWonder) { /* * Some adapters are reputed to append ATI extended VGA registers * to the VGA Graphics controller registers. In particular, 0x01CE * cannot, in general, be used in a PCI environment due to routing * of I/O through the bus tree. */ pATI->CPIO_VGAWonder = GRAX; ATIVGAWonderProbe(pVideo, pATI); } } } /* * ATIFindVGA -- * * This function determines if a VGA associated with an ATI PCI adapter is * shareable. */ static void ATIFindVGA ( pciVideoPtr pVideo, ATIPtr pATI ) { /* * An ATI PCI adapter has been detected at this point, and its VGA, if * any, is shareable. Ensure the VGA isn't in sleep mode. */ outb(GENENA, 0x16U); outb(GENVS, 0x01U); outb(GENENA, 0x0EU); ATIAssignVGA(pVideo, pATI); } #endif /* AVOID_CPIO */ /* * ATIMach64ProbeIO -- * * This function determines the IO method and IO base of the ATI PCI adapter. */ Bool ATIMach64ProbeIO ( pciVideoPtr pVideo, ATIPtr pATI ) { /* Next, look for sparse I/O Mach64's */ if (!PCI_REGION_SIZE(pVideo, 1)) { #ifndef AVOID_CPIO static const unsigned long Mach64SparseIOBases[] = { 0x02ECU, 0x01CCU, 0x01C8U }; uint32_t PciReg; uint32_t j; #ifndef XSERVER_LIBPCIACCESS pciConfigPtr pPCI = pVideo->thisCard; if (pPCI == NULL) return FALSE; #endif PCI_READ_LONG(pVideo, &PciReg, PCI_REG_USERCONFIG); j = PciReg & 0x03U; if (j == 0x03U) { xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d cannot be enabled\n" "because it has neither a block, nor a sparse, I/O base.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); return FALSE; } /* Possibly fix block I/O indicator */ if (PciReg & 0x00000004U) { PciReg &= ~0x00000004U; PCI_WRITE_LONG(pVideo, PciReg, PCI_REG_USERCONFIG); } /* FIXME: * Should not probe at sparse I/O bases which have been registered to * other PCI devices. The old ATIProbe() would scan the PCI space and * build a list of registered I/O ports. If there was a conflict * between a mach64 sparse I/O base and a registered I/0 port, probing * that port was not allowed... * * We just add an option and let the user decide, this will not work * with "X -configure" though... */ if (!pATI->OptionProbeSparse) { xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d will not be probed\n" "set option \"probe_sparse\" to force sparse I/O probing.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); return FALSE; } pATI->CPIOBase = Mach64SparseIOBases[j]; pATI->CPIODecoding = SPARSE_IO; pATI->PCIInfo = pVideo; #else /* AVOID_CPIO */ /* The adapter's CPIO base is of little concern here */ pATI->CPIOBase = 0; pATI->CPIODecoding = SPARSE_IO; pATI->PCIInfo = pVideo; #endif /* AVOID_CPIO */ } /* Lastly, look for block I/O devices */ if (PCI_REGION_SIZE(pVideo, 1)) { pATI->CPIOBase = PCI_REGION_BASE(pVideo, 1, REGION_IO); pATI->CPIODecoding = BLOCK_IO; pATI->PCIInfo = pVideo; } if (!ATIMach64Probe(pATI, pVideo, pATI->Chip)) { xf86Msg(X_WARNING, MACH64_NAME ": " "Mach64 in slot %d:%d:%d could not be detected!\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); return FALSE; } xf86Msg(X_INFO, MACH64_NAME ": " "Mach64 in slot %d:%d:%d detected.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); #ifndef AVOID_CPIO if (pATI->VGAAdapter) ATIFindVGA(pVideo, pATI); #endif /* AVOID_CPIO */ return TRUE; } xf86-video-mach64-6.9.5/src/atividmem.c0000644000175000017500000002723212270010352014343 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atistruct.h" #include "atividmem.h" /* Memory types for 68800's and 88800GX's */ const char *ATIMemoryTypeNames_Mach[] = { "DRAM (256Kx4)", "VRAM (256Kx4, x8, x16)", "VRAM (256Kx16 with short shift register)", "DRAM (256Kx16)", "Graphics DRAM (256Kx16)", "Enhanced VRAM (256Kx4, x8, x16)", "Enhanced VRAM (256Kx16 with short shift register)", "Unknown video memory type" }; /* Memory types for 88800CX's */ const char *ATIMemoryTypeNames_88800CX[] = { "DRAM (256Kx4, x8, x16)", "EDO DRAM (256Kx4, x8, x16)", "Unknown video memory type", "DRAM (256Kx16 with assymetric RAS/CAS)", "Unknown video memory type", "Unknown video memory type", "Unknown video memory type", "Unknown video memory type" }; /* Memory types for 264xT's */ const char *ATIMemoryTypeNames_264xT[] = { "Disabled video memory", "DRAM", "EDO DRAM", "Pseudo-EDO DRAM", "SDRAM (1:1)", "SGRAM (1:1)", "SGRAM (2:1) 32-bit", "Unknown video memory type" }; #ifndef AVOID_CPIO /* * ATIUnmapVGA -- * * Unmap VGA aperture. */ static void ATIUnmapVGA ( int iScreen, ATIPtr pATI ) { if (!pATI->pBank) return; #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(iScreen, pATI->pBank, 0x00010000U); #else (void) pci_device_unmap_legacy(pATI->PCIInfo, pATI->pBank, 0x00010000U); #endif pATI->pBank = NULL; } #endif /* AVOID_CPIO */ /* * ATIUnmapLinear -- * * Unmap linear aperture. */ static void ATIUnmapLinear ( int iScreen, ATIPtr pATI ) { if (pATI->pMemory) { #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(iScreen, pATI->pMemory, pATI->LinearSize); #else pci_device_unmap_range(pATI->PCIInfo, pATI->pMemory, pATI->LinearSize); #endif #if X_BYTE_ORDER != X_LITTLE_ENDIAN if (pATI->pMemoryLE) { #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(iScreen, pATI->pMemoryLE, pATI->LinearSize); #else pci_device_unmap_range(pATI->PCIInfo, pATI->pMemoryLE, pATI->LinearSize); #endif } #endif /* X_BYTE_ORDER */ } pATI->pMemory = pATI->pMemoryLE = NULL; } /* * ATIUnmapMMIO -- * * Unmap MMIO registers. */ static void ATIUnmapMMIO ( int iScreen, ATIPtr pATI ) { if (pATI->pMMIO) { #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(iScreen, pATI->pMMIO, getpagesize()); #else unsigned long size; size = PCI_REGION_SIZE(pATI->PCIInfo, 2); if (!size || size > getpagesize()) size = getpagesize(); pci_device_unmap_range(pATI->PCIInfo, pATI->pMMIO, size); #endif } pATI->pMMIO = pATI->pBlock[0] = pATI->pBlock[1] = NULL; } /* * ATIUnmapCursor -- * * Unmap hardware cursor image area. */ static void ATIUnmapCursor ( int iScreen, ATIPtr pATI ) { if (pATI->pCursorPage) { #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(iScreen, pATI->pCursorPage, getpagesize()); #else pci_device_unmap_range(pATI->PCIInfo, pATI->pCursorPage, getpagesize()); #endif } pATI->pCursorPage = pATI->pCursorImage = NULL; } /* * ATIMapApertures -- * * This function maps all apertures used by the driver. * * It is called three times: * - to setup MMIO for an MMIO-only driver during Probe * - to setup MMIO for an MMIO-only driver during PreInit * - to setup MMIO (with Block0Base set) and FB (with LinearBase set) */ Bool ATIMapApertures ( int iScreen, ATIPtr pATI ) { pciVideoPtr pVideo = pATI->PCIInfo; #ifndef XSERVER_LIBPCIACCESS PCITAG Tag = PCI_CFG_TAG(pVideo); #else pciVideoPtr Tag = pVideo; #endif unsigned long PageSize = getpagesize(); if (pATI->Mapped) return TRUE; #ifndef AVOID_CPIO /* Map VGA aperture */ if (pATI->VGAAdapter) { /* * No relocation, resizing, caching or write-combining of this * aperture is supported. Hence, the hard-coded values here... */ #ifndef XSERVER_LIBPCIACCESS pATI->pBank = xf86MapDomainMemory(iScreen, VIDMEM_MMIO_32BIT, Tag, 0x000A0000U, 0x00010000U); #else (void) pci_device_map_legacy(Tag, 0x000A0000U, 0x00010000U, PCI_DEV_MAP_FLAG_WRITABLE, &pATI->pBank); #endif if (!pATI->pBank) return FALSE; pATI->Mapped = TRUE; } #endif /* AVOID_CPIO */ /* Map linear aperture */ if (pATI->LinearBase) { #ifndef XSERVER_LIBPCIACCESS pATI->pMemory = xf86MapPciMem(iScreen, VIDMEM_FRAMEBUFFER, Tag, pATI->LinearBase, pATI->LinearSize); #else /* XSERVER_LIBPCIACCESS */ int mode = PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE; int err = pci_device_map_range(pVideo, pATI->LinearBase, pATI->LinearSize, mode, &pATI->pMemory); if (err) { xf86DrvMsg (iScreen, X_ERROR, "Unable to map linear aperture. %s (%d)\n", strerror (err), err); } #endif /* XSERVER_LIBPCIACCESS */ if (!pATI->pMemory) { #ifndef AVOID_CPIO ATIUnmapVGA(iScreen, pATI); #endif /* AVOID_CPIO */ pATI->Mapped = FALSE; return FALSE; } pATI->Mapped = TRUE; #if X_BYTE_ORDER == X_LITTLE_ENDIAN if ((pATI->CursorBase >= pATI->LinearBase) && ((pATI->CursorOffset + 0x00000400UL) <= (CARD32)pATI->LinearSize)) pATI->pCursorImage = (char *)pATI->pMemory + pATI->CursorOffset; pATI->pMemoryLE = pATI->pMemory; #else /* if X_BYTE_ORDER != X_LITTLE_ENDIAN */ /* * Map the little-endian aperture (used for video, etc.). Note that * caching of this area is _not_ wanted. */ { #ifndef XSERVER_LIBPCIACCESS pATI->pMemoryLE = xf86MapPciMem(iScreen, VIDMEM_MMIO, Tag, pATI->LinearBase - 0x00800000U, pATI->LinearSize); #else /* XSERVER_LIBPCIACCESS */ int mode = PCI_DEV_MAP_FLAG_WRITABLE; int err = pci_device_map_range(pVideo, pATI->LinearBase - 0x00800000U, pATI->LinearSize, mode, &pATI->pMemoryLE); if (err) { xf86DrvMsg (iScreen, X_ERROR, "Unable to map extended linear aperture. %s (%d)\n", strerror (err), err); } #endif /* XSERVER_LIBPCIACCESS */ if (!pATI->pMemoryLE) { ATIUnmapLinear(iScreen, pATI); #ifndef AVOID_CPIO ATIUnmapVGA(iScreen, pATI); #endif /* AVOID_CPIO */ pATI->Mapped = FALSE; return FALSE; } } #endif /* X_BYTE_ORDER */ } /* Map MMIO aperture */ if (pATI->Block0Base) { unsigned long MMIOBase = pATI->Block0Base & ~(PageSize - 1); #ifndef XSERVER_LIBPCIACCESS pATI->pMMIO = xf86MapPciMem(iScreen, VIDMEM_MMIO, Tag, MMIOBase, PageSize); #else /* XSERVER_LIBPCIACCESS */ int mode = PCI_DEV_MAP_FLAG_WRITABLE; int err; int size; size = PCI_REGION_SIZE(pVideo, 2); if (!size || size > PageSize) size = PageSize; err = pci_device_map_range(pVideo, MMIOBase, size, mode, &pATI->pMMIO); if (err) { xf86DrvMsg (iScreen, X_ERROR, "Unable to map mmio aperture. %s (%d)\n", strerror (err), err); } #endif /* XSERVER_LIBPCIACCESS */ if (!pATI->pMMIO) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN ATIUnmapCursor(iScreen, pATI); #endif /* X_BYTE_ORDER */ ATIUnmapLinear(iScreen, pATI); #ifndef AVOID_CPIO ATIUnmapVGA(iScreen, pATI); #endif /* AVOID_CPIO */ pATI->Mapped = FALSE; return FALSE; } pATI->Mapped = TRUE; pATI->pBlock[0] = (char *)pATI->pMMIO + (pATI->Block0Base - MMIOBase); if (pATI->Block1Base) pATI->pBlock[1] = (char *)pATI->pBlock[0] - 0x00000400U; #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (!pATI->pCursorImage) #endif /* X_BYTE_ORDER */ { if ((pATI->CursorBase >= MMIOBase) && ((pATI->CursorBase + 0x00000400UL) <= (MMIOBase + PageSize))) pATI->pCursorImage = (char *)pATI->pMMIO + (pATI->CursorBase - MMIOBase); } } /* Map hardware cursor image area */ if (pATI->CursorBase && !pATI->pCursorImage) { unsigned long CursorBase = pATI->CursorBase & ~(PageSize - 1); #ifndef XSERVER_LIBPCIACCESS pATI->pCursorPage = xf86MapPciMem(iScreen, VIDMEM_FRAMEBUFFER, Tag, CursorBase, PageSize); #else /* XSERVER_LIBPCIACCESS */ int mode = PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE; int err = pci_device_map_range(pVideo, CursorBase, PageSize, mode, &pATI->pCursorPage); if (err) { xf86DrvMsg (iScreen, X_ERROR, "Unable to map cursor aperture. %s (%d)\n", strerror (err), err); } #endif /* XSERVER_LIBPCIACCESS */ if (!pATI->pCursorPage) { ATIUnmapCursor(iScreen, pATI); ATIUnmapMMIO(iScreen, pATI); ATIUnmapLinear(iScreen, pATI); #ifndef AVOID_CPIO ATIUnmapVGA(iScreen, pATI); #endif /* AVOID_CPIO */ pATI->Mapped = FALSE; return FALSE; } pATI->pCursorImage = (char *)pATI->pCursorPage + (pATI->CursorBase - CursorBase); } return TRUE; } /* * ATIUnmapApertures -- * * This function unmaps all apertures used by the driver. */ void ATIUnmapApertures ( int iScreen, ATIPtr pATI ) { if (!pATI->Mapped) return; pATI->Mapped = FALSE; /* Unmap hardware cursor image area */ ATIUnmapCursor(iScreen, pATI); /* Unmap MMIO area */ ATIUnmapMMIO(iScreen, pATI); /* Unmap linear aperture */ ATIUnmapLinear(iScreen, pATI); #ifndef AVOID_CPIO /* Unmap VGA aperture */ ATIUnmapVGA(iScreen, pATI); #endif /* AVOID_CPIO */ } xf86-video-mach64-6.9.5/src/atiadjust.c0000644000175000017500000001001012270010352014336 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atistruct.h" #include "atichip.h" #include "atilock.h" #include "atimach64io.h" #include "atiwonderio.h" #include "atiadjust.h" /* * The display start address is expressed in units of 32-bit (VGA) or 64-bit * (accelerator) words where all planar modes are considered as 4bpp modes. * These functions ensure the start address does not exceed architectural * limits. Also, to avoid colour changes while panning, these 32-bit or 64-bit * boundaries may not fall within a pixel. */ /* * ATIAjustPreInit -- * * This function calculates values needed to speed up the setting of the * display start address. */ void ATIAdjustPreInit ( ATIPtr pATI ) { unsigned long MaxBase; { pATI->AdjustDepth = (pATI->bitsPerPixel + 7) >> 3; pATI->AdjustMask = 64; while (pATI->AdjustMask % (unsigned long)(pATI->AdjustDepth)) pATI->AdjustMask += 64; pATI->AdjustMask = ~(((pATI->AdjustMask / (unsigned long)(pATI->AdjustDepth)) >> 3) - 1); } { pATI->AdjustMaxBase = MaxBits(CRTC_OFFSET) << 3; } MaxBase = (pATI->AdjustMaxBase / (unsigned long)pATI->AdjustDepth) | ~pATI->AdjustMask; pATI->AdjustMaxX = MaxBase % pATI->displayWidth; pATI->AdjustMaxY = MaxBase / pATI->displayWidth; } /* * ATIAdjustFrame -- * * This function is used to initialise the SVGA Start Address - the first * displayed location in video memory. This is used to implement the virtual * window. */ void ATIAdjustFrame(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); int Base, xy; /* * Assume the caller has already done its homework in ensuring the physical * screen is still contained in the virtual resolution. */ if (y >= pATI->AdjustMaxY) { y = pATI->AdjustMaxY; if (x > pATI->AdjustMaxX) y--; } Base = ((((y * pATI->displayWidth) + x) & pATI->AdjustMask) * pATI->AdjustDepth) >> 3; if (!pATI->currentMode) { /* * Not in DGA. This reverse-calculates pScreenInfo->frame[XY][01] so * that the cursor does not move on mode switches. */ xy = (Base << 3) / pATI->AdjustDepth; pScreenInfo->frameX0 = xy % pATI->displayWidth; pScreenInfo->frameY0 = xy / pATI->displayWidth; pScreenInfo->frameX1 = pScreenInfo->frameX0 + pScreenInfo->currentMode->HDisplay - 1; pScreenInfo->frameY1 = pScreenInfo->frameY0 + pScreenInfo->currentMode->VDisplay - 1; } /* Unlock registers */ ATIUnlock(pATI); { outr(CRTC_OFF_PITCH, SetBits(pATI->displayWidth >> 3, CRTC_PITCH) | SetBits(Base, CRTC_OFFSET)); } } xf86-video-mach64-6.9.5/src/aticlock.c0000644000175000017500000003563712270010352014165 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /* * For all supported programmable clock generators, the driver will ignore any * XF86Config clock line and programme, as needed, the clock number reserved by * the BIOS for accelerated drivers. The driver's mode initialisation routine * finds integers N, M and D such that * * N * R * ------- MHz * M * D * * best approximates the mode's clock frequency, where R is the crystal- * generated reference frequency (usually 14.318 MHz). D is a power of 2 * except for those integrated controllers that also offer odd dividers. * Different clock generators have different restrictions on the value N, M and * D can assume. The driver contains an internal table to record these * restrictions (among other things). The resulting values of N, M and D are * then encoded in a generator-specific way and used to programme the clock. * The Mach64's clock divider is not used in this case. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atichip.h" #include "atidac.h" #include "atidsp.h" #include "atimach64io.h" #include "atimode.h" #include "atiwonderio.h" /* * Definitions related to programmable clock generators. */ static CARD16 ATIPostDividers[] = {1, 2, 4, 8, 16, 32, 64, 128}, ATI264xTPostDividers[] = {1, 2, 4, 8, 3, 0, 6, 12}; ClockRec ATIClockDescriptors[] = { { 0, 0, 0, 1, 1, 1, 1, 0, 0, NULL, "Non-programmable" }, { 257, 512, 257, 1, 1, 46, 46, 0, 4, ATIPostDividers, "ATI 18818 or ICS 2595 or similar" }, { 2, 129, 2, 1, 1, 8, 14, 2, 8, ATIPostDividers, "SGS-Thompson 1703 or similar" }, { 16, 263, 8, 8, 9, 4, 12, 2, 4, ATIPostDividers, "Chrontel 8398 or similar" }, { 2, 255, 0, 1, 1, 45, 45, 0, 4, ATI264xTPostDividers, "Internal" }, { 2, 257, 2, 1, 1, 2, 32, 2, 4, ATIPostDividers, "AT&T 20C408 or similar" }, { 65, 128, 65, 1, 1, 2, 14, 0, 4, ATIPostDividers, "IBM RGB 514 or similar" } }; /* * ATIClockPreInit -- * * This function is called by ATIPreInit() and handles the XF86Config clocks * line (or lack thereof). */ void ATIClockPreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { /* * Recognise supported clock generators. This involves telling the * rest of the server about it and (re-)initializing the XF86Config * clocks line. */ pScreenInfo->progClock = TRUE; xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s programmable clock generator detected.\n", pATI->ClockDescriptor.ClockName); if (pATI->ReferenceDenominator == 1) xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "Reference clock %.3f MHz.\n", (double)pATI->ReferenceNumerator / 1000.0); else xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "Reference clock %.6g/%d (%.3f) MHz.\n", (double)pATI->ReferenceNumerator / 1000.0, pATI->ReferenceDenominator, (double)pATI->ReferenceNumerator / ((double)pATI->ReferenceDenominator * 1000.0)); #if defined(__sparc__) if ((pATI->refclk / 100000) != 286 && (pATI->refclk / 100000) != 295) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "If modes do not work on Ultra 5/10 or Blade 100/150,\n" "\tset option \"reference_clock\" to \"28.636 MHz\"" " or \"29.5 MHz\"\n"); } #endif if (pATI->ProgrammableClock == ATI_CLOCK_CH8398) { /* First two are fixed */ pScreenInfo->numClocks = 2; pScreenInfo->clock[0] = 25175; pScreenInfo->clock[1] = 28322; } else if (pATI->ProgrammableClock == ATI_CLOCK_INTERNAL) { /* * The integrated PLL generates clocks as if the reference * frequency were doubled. */ pATI->ReferenceNumerator <<= 1; } } /* * ATIClockCalculate -- * * This function is called to generate, if necessary, the data needed for clock * programming, and set clock select bits in various register values. */ Bool ATIClockCalculate ( int iScreen, ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { int N, M, D; int ClockSelect, N1, MinimumGap; int Frequency, Multiple; /* Used as temporaries */ /* Set default values */ pATIHW->FeedbackDivider = pATIHW->ReferenceDivider = pATIHW->PostDivider = 0; if (((pATI->ProgrammableClock == ATI_CLOCK_CH8398) && (pMode->ClockIndex < 2))) { xf86DrvMsg(iScreen, X_ERROR, "First two clocks of Chrontel 8398 clock generator are fixed\n"); return FALSE; } { /* Generate clock programme word, using units of kHz */ MinimumGap = ((unsigned int)(-1)) >> 1; /* Loop through reference dividers */ for (M = pATI->ClockDescriptor.MinM; M <= pATI->ClockDescriptor.MaxM; M++) { /* Loop through post-dividers */ for (D = 0; D < pATI->ClockDescriptor.NumD; D++) { if (!pATI->ClockDescriptor.PostDividers[D]) continue; /* Limit undivided VCO to maxClock */ if (pATI->maxClock && ((pATI->maxClock / pATI->ClockDescriptor.PostDividers[D]) < pMode->Clock)) continue; /* * Calculate closest feedback divider and apply its * restrictions. */ Multiple = M * pATI->ReferenceDenominator * pATI->ClockDescriptor.PostDividers[D]; N = ATIDivide(pMode->Clock * Multiple, pATI->ReferenceNumerator, 0, 0); if (N < pATI->ClockDescriptor.MinN) N = pATI->ClockDescriptor.MinN; else if (N > pATI->ClockDescriptor.MaxN) N = pATI->ClockDescriptor.MaxN; N -= pATI->ClockDescriptor.NAdjust; N1 = (N / pATI->ClockDescriptor.N1) * pATI->ClockDescriptor.N2; if (N > N1) N = ATIDivide(N1 + 1, pATI->ClockDescriptor.N1, 0, 1); N += pATI->ClockDescriptor.NAdjust; N1 += pATI->ClockDescriptor.NAdjust; for (; ; N = N1) { /* Pick the closest setting */ Frequency = abs(ATIDivide(N * pATI->ReferenceNumerator, Multiple, 0, 0) - pMode->Clock); if ((Frequency < MinimumGap) || ((Frequency == MinimumGap) && (pATIHW->FeedbackDivider < N))) { /* Save settings */ pATIHW->FeedbackDivider = N; pATIHW->ReferenceDivider = M; pATIHW->PostDivider = D; MinimumGap = Frequency; } if (N <= N1) break; } } } Multiple = pATIHW->ReferenceDivider * pATI->ReferenceDenominator * pATI->ClockDescriptor.PostDividers[pATIHW->PostDivider]; Frequency = pATIHW->FeedbackDivider * pATI->ReferenceNumerator; Frequency = ATIDivide(Frequency, Multiple, 0, 0); if (abs(Frequency - pMode->Clock) > CLOCK_TOLERANCE) { xf86DrvMsg(iScreen, X_ERROR, "Unable to programme clock %.3fMHz for mode %s.\n", (double)(pMode->Clock) / 1000.0, pMode->name); return FALSE; } pMode->SynthClock = Frequency; ClockSelect = pATI->ClockNumberToProgramme; xf86ErrorFVerb(4, "\n Programming clock %d to %.3fMHz for mode %s." " N=%d, M=%d, D=%d.\n", ClockSelect, (double)Frequency / 1000.0, pMode->name, pATIHW->FeedbackDivider, pATIHW->ReferenceDivider, pATIHW->PostDivider); if (pATI->Chip >= ATI_CHIP_264VTB) ATIDSPCalculate(pATI, pATIHW, pMode); } /* Set clock select bits */ pATIHW->clock = ClockSelect; { pATIHW->clock_cntl = CLOCK_STROBE | SetBits(ClockSelect, CLOCK_SELECT | CLOCK_DIVIDER); } return TRUE; } /* * ATIClockSet -- * * This function is called to programme a clock for the mode being set. */ void ATIClockSet ( ATIPtr pATI, ATIHWPtr pATIHW ) { CARD32 crtc_gen_cntl, tmp; CARD8 clock_cntl0; CARD8 tmp2; unsigned int Programme; int N = pATIHW->FeedbackDivider - pATI->ClockDescriptor.NAdjust; int M = pATIHW->ReferenceDivider - pATI->ClockDescriptor.MAdjust; int D = pATIHW->PostDivider; /* Temporarily switch to accelerator mode */ crtc_gen_cntl = inr(CRTC_GEN_CNTL); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl | CRTC_EXT_DISP_EN); switch (pATI->ProgrammableClock) { case ATI_CLOCK_ICS2595: clock_cntl0 = in8(CLOCK_CNTL); Programme = (SetBits(pATIHW->clock, ICS2595_CLOCK) | SetBits(N, ICS2595_FB_DIV) | SetBits(D, ICS2595_POST_DIV)) ^ ICS2595_TOGGLE; ATIDelay(50000); /* 50 milliseconds */ /* Send all 20 bits of programme word */ while (Programme >= CLOCK_BIT) { tmp = (Programme & CLOCK_BIT) | CLOCK_STROBE; out8(CLOCK_CNTL, tmp); ATIDelay(26); /* 26 microseconds */ out8(CLOCK_CNTL, tmp | CLOCK_PULSE); ATIDelay(26); /* 26 microseconds */ Programme >>= 1; } /* Restore register */ out8(CLOCK_CNTL, clock_cntl0 | CLOCK_STROBE); break; case ATI_CLOCK_STG1703: (void)ATIGetDACCmdReg(pATI); (void)in8(M64_DAC_MASK); out8(M64_DAC_MASK, (pATIHW->clock << 1) + 0x20U); out8(M64_DAC_MASK, 0); out8(M64_DAC_MASK, SetBits(N, 0xFFU)); out8(M64_DAC_MASK, SetBits(M, 0x1FU) | SetBits(D, 0xE0U)); break; case ATI_CLOCK_CH8398: tmp = inr(DAC_CNTL) | (DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3); outr(DAC_CNTL, tmp); out8(M64_DAC_WRITE, pATIHW->clock); out8(M64_DAC_DATA, SetBits(N, 0xFFU)); out8(M64_DAC_DATA, SetBits(M, 0x3FU) | SetBits(D, 0xC0U)); out8(M64_DAC_MASK, 0x04U); outr(DAC_CNTL, tmp & ~(DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3)); tmp2 = in8(M64_DAC_WRITE); out8(M64_DAC_WRITE, (tmp2 & 0x70U) | 0x80U); outr(DAC_CNTL, tmp & ~DAC_EXT_SEL_RS2); break; case ATI_CLOCK_INTERNAL: /* Reset VCLK generator */ ATIMach64PutPLLReg(PLL_VCLK_CNTL, pATIHW->pll_vclk_cntl); /* Set post-divider */ tmp2 = pATIHW->clock << 1; tmp = ATIMach64GetPLLReg(PLL_VCLK_POST_DIV); tmp &= ~(0x03U << tmp2); tmp |= SetBits(D, 0x03U) << tmp2; ATIMach64PutPLLReg(PLL_VCLK_POST_DIV, tmp); /* Set extended post-divider */ tmp = ATIMach64GetPLLReg(PLL_XCLK_CNTL); tmp &= ~(SetBits(1, PLL_VCLK0_XDIV) << pATIHW->clock); tmp |= SetBits(D >> 2, PLL_VCLK0_XDIV) << pATIHW->clock; ATIMach64PutPLLReg(PLL_XCLK_CNTL, tmp); /* Set feedback divider */ tmp = PLL_VCLK0_FB_DIV + pATIHW->clock; ATIMach64PutPLLReg(tmp, SetBits(N, 0xFFU)); /* End VCLK generator reset */ ATIMach64PutPLLReg(PLL_VCLK_CNTL, pATIHW->pll_vclk_cntl & ~PLL_VCLK_RESET); /* Reset write bit */ ATIMach64AccessPLLReg(pATI, 0, FALSE); break; case ATI_CLOCK_ATT20C408: (void)ATIGetDACCmdReg(pATI); tmp = in8(M64_DAC_MASK); (void)ATIGetDACCmdReg(pATI); out8(M64_DAC_MASK, tmp | 1); out8(M64_DAC_WRITE, 1); out8(M64_DAC_MASK, tmp | 9); ATIDelay(400); /* 400 microseconds */ tmp2 = (pATIHW->clock << 2) + 0x40U; out8(M64_DAC_WRITE, tmp2); out8(M64_DAC_MASK, SetBits(N, 0xFFU)); out8(M64_DAC_WRITE, ++tmp2); out8(M64_DAC_MASK, SetBits(M, 0x3FU) | SetBits(D, 0xC0U)); out8(M64_DAC_WRITE, ++tmp2); out8(M64_DAC_MASK, 0x77U); ATIDelay(400); /* 400 microseconds */ out8(M64_DAC_WRITE, 1); out8(M64_DAC_MASK, tmp); break; case ATI_CLOCK_IBMRGB514: /* * Here, only update in-core data. It will be written out later by * ATIRGB514Set(). */ tmp = (pATIHW->clock << 1) + 0x20U; pATIHW->ibmrgb514[tmp] = (SetBits(N, 0x3FU) | SetBits(D, 0xC0U)) ^ 0xC0U; pATIHW->ibmrgb514[tmp + 1] = SetBits(M, 0x3FU); break; default: break; } (void)in8(M64_DAC_WRITE); /* Clear DAC counter */ /* Restore register */ if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl); } xf86-video-mach64-6.9.5/src/aticonfig.c0000644000175000017500000003165112270010352014327 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Leif Delgass */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atichip.h" #include "aticursor.h" #include "atioption.h" #include "atistruct.h" #include "mach64_common.h" #ifdef TV_OUT /* * List of supported TV standard names */ const char *ATITVStandardNames[ATI_TV_STDS_MAX_VALID+1] = { "NTSC", "PAL", "PAL-M", "PAL-60", "NTSC-J", "PAL-CN", "PAL-N", "Reserved1", "Reserved2", "SCART-PAL", "None", "Invalid" }; #endif /* TV_OUT */ /* * Recognised XF86Config options. */ static const OptionInfoRec ATIPublicOptions[] = { { ATI_OPTION_PROBE_SPARSE, "probe_sparse", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_ACCEL, "accel", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_CRT_DISPLAY, "crt_display", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_CSYNC, "composite_sync", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_HWCURSOR, "hw_cursor", OPTV_BOOLEAN, {0, }, FALSE, }, #ifdef XF86DRI_DEVEL { ATI_OPTION_IS_PCI, "force_pci_mode", OPTV_BOOLEAN, {0, }, FALSE, }, { ATI_OPTION_DMA_MODE, "dma_mode", OPTV_STRING, {0, }, FALSE, }, { ATI_OPTION_AGP_MODE, "agp_mode", OPTV_INTEGER, {0, }, FALSE, }, { ATI_OPTION_AGP_SIZE, "agp_size", OPTV_INTEGER, {0, }, FALSE, }, { ATI_OPTION_LOCAL_TEXTURES, "local_textures", OPTV_BOOLEAN, {0, }, FALSE, }, { ATI_OPTION_BUFFER_SIZE, "buffer_size", OPTV_INTEGER, {0, }, FALSE, }, #endif /* XF86DRI_DEVEL */ #ifdef TV_OUT { ATI_OPTION_TV_OUT, "tv_out", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_TV_STD, "tv_standard", OPTV_STRING, {0, }, FALSE }, #endif /* TV_OUT */ { ATI_OPTION_MMIO_CACHE, "mmio_cache", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_TEST_MMIO_CACHE, "test_mmio_cache", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_PANEL_DISPLAY, "panel_display", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_REFERENCE_CLOCK, "reference_clock", OPTV_FREQ, {0, }, FALSE }, { ATI_OPTION_SHADOW_FB, "shadow_fb", OPTV_BOOLEAN, {0, }, FALSE }, { ATI_OPTION_SWCURSOR, "sw_cursor", OPTV_BOOLEAN, {0, }, FALSE, }, { ATI_OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0, }, FALSE }, { ATI_OPTION_RENDER_ACCEL, "RenderAccel", OPTV_BOOLEAN, {0, }, FALSE }, { -1, NULL, OPTV_NONE, {0, }, FALSE } }; static const unsigned long ATIPublicOptionSize = SizeOf(ATIPublicOptions); const OptionInfoRec * ATIOptionsWeak(void) { return ATIPublicOptions; } /* * Non-publicised XF86Config options. */ typedef enum { ATI_OPTION_BIOS_DISPLAY, /* Allow BIOS interference */ ATI_OPTION_CRT_SCREEN, /* Legacy negation of "PanelDisplay" */ ATI_OPTION_DEVEL, /* Intentionally undocumented */ ATI_OPTION_BLEND, /* Force horizontal blending of small modes */ ATI_OPTION_LCDSYNC /* Use XF86Config panel mode porches */ } ATIPrivateOptionType; /* * ATIProcessOptions -- * * This function extracts options from what was parsed out of the XF86Config * file. */ void ATIProcessOptions ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { OptionInfoPtr PublicOption = xnfalloc(ATIPublicOptionSize); OptionInfoRec PrivateOption[] = { { /* ON: Let BIOS change display(s) */ ATI_OPTION_BIOS_DISPLAY, /* OFF: Don't */ "biosdisplay", OPTV_BOOLEAN, {0, }, FALSE }, { /* Negation of "PanelDisplay" public option */ ATI_OPTION_CRT_SCREEN, "crtscreen", OPTV_BOOLEAN, {0, }, FALSE }, { /* ON: Ease exploration of loose ends */ ATI_OPTION_DEVEL, /* OFF: Fit for public consumption */ "tsi", OPTV_BOOLEAN, {0, }, FALSE }, { /* ON: Horizontally blend most modes */ ATI_OPTION_BLEND, /* OFF: Use pixel replication more often */ "lcdblend", OPTV_BOOLEAN, {0, }, FALSE }, { /* ON: Use XF86Config porch timings */ ATI_OPTION_LCDSYNC, /* OFF: Use porches from mode on entry */ "lcdsync", OPTV_BOOLEAN, {0, }, FALSE }, { -1, NULL, OPTV_NONE, {0, }, FALSE } }; (void)memcpy(PublicOption, ATIPublicOptions, ATIPublicOptionSize); # define ProbeSparse PublicOption[ATI_OPTION_PROBE_SPARSE].value.bool # define Accel PublicOption[ATI_OPTION_ACCEL].value.bool # define BIOSDisplay PrivateOption[ATI_OPTION_BIOS_DISPLAY].value.bool # define Blend PrivateOption[ATI_OPTION_BLEND].value.bool # define CRTDisplay PublicOption[ATI_OPTION_CRT_DISPLAY].value.bool # define CRTScreen PrivateOption[ATI_OPTION_CRT_SCREEN].value.bool # define CSync PublicOption[ATI_OPTION_CSYNC].value.bool # define Devel PrivateOption[ATI_OPTION_DEVEL].value.bool # define HWCursor PublicOption[ATI_OPTION_HWCURSOR].value.bool #ifdef XF86DRI_DEVEL # define IsPCI PublicOption[ATI_OPTION_IS_PCI].value.bool # define DMAMode PublicOption[ATI_OPTION_DMA_MODE].value.str # define AGPMode PublicOption[ATI_OPTION_AGP_MODE].value.num # define AGPSize PublicOption[ATI_OPTION_AGP_SIZE].value.num # define LocalTex PublicOption[ATI_OPTION_LOCAL_TEXTURES].value.bool # define BufferSize PublicOption[ATI_OPTION_BUFFER_SIZE].value.num #endif /* XF86DRI_DEVEL */ #ifdef TV_OUT # define TvOut PublicOption[ATI_OPTION_TV_OUT].value.bool # define TvStd PublicOption[ATI_OPTION_TV_STD].value.str #endif /* TV_OUT */ # define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.bool # define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.bool # define PanelDisplay PublicOption[ATI_OPTION_PANEL_DISPLAY].value.bool # define ShadowFB PublicOption[ATI_OPTION_SHADOW_FB].value.bool # define SWCursor PublicOption[ATI_OPTION_SWCURSOR].value.bool # define AccelMethod PublicOption[ATI_OPTION_ACCELMETHOD].value.str # define RenderAccel PublicOption[ATI_OPTION_RENDER_ACCEL].value.bool # define LCDSync PrivateOption[ATI_OPTION_LCDSYNC].value.bool # define ReferenceClock \ PublicOption[ATI_OPTION_REFERENCE_CLOCK].value.freq.freq /* Pick up XF86Config options */ xf86CollectOptions(pScreenInfo, NULL); /* Set non-zero defaults */ Accel = CacheMMIO = HWCursor = TRUE; ReferenceClock = ((double)157500000.0) / ((double)11.0); ShadowFB = TRUE; Blend = PanelDisplay = TRUE; #ifdef USE_EXA RenderAccel = TRUE; #endif #ifdef XF86DRI_DEVEL DMAMode = "async"; #endif #ifdef TV_OUT TvStd = "None"; /* No tv standard change requested */ #endif xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options, PublicOption); xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options, PrivateOption); /* Move option values into driver private structure */ pATI->OptionProbeSparse = ProbeSparse; pATI->OptionAccel = Accel; pATI->OptionBIOSDisplay = BIOSDisplay; pATI->OptionBlend = Blend; pATI->OptionCRTDisplay = CRTDisplay; pATI->OptionCSync = CSync; pATI->OptionDevel = Devel; #ifdef TV_OUT if (TvOut && pATI->Chip < ATI_CHIP_264GT) { /* Only allow this for 3D Rage (I) or greater chip ID * AFAIK, no chips before this supported TV-Out * mach64VT has support for TV tuner, but no TV-Out */ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "TV Out not supported for this chip.\n"); } else { ATITVStandard std; pATI->OptionTvOut = TvOut; pATI->OptionTvStd = ATI_TV_STD_INVALID; for (std = 0; std < ATI_TV_STDS_MAX_VALID; std++) { if (std != ATI_TV_STD_RESERVED1 && std != ATI_TV_STD_RESERVED2) { if (strncasecmp(TvStd, ATITVStandardNames[std], ATI_TV_STDS_NAME_MAXLEN)==0) { pATI->OptionTvStd = std; break; } } } } #endif /* TV_OUT */ pATI->OptionMMIOCache = CacheMMIO; pATI->OptionTestMMIOCache = TestCacheMMIO; pATI->OptionShadowFB = ShadowFB; pATI->OptionLCDSync = LCDSync; /* "CRTScreen" is now "NoPanelDisplay" */ if ((PanelDisplay != CRTScreen) || PublicOption[ATI_OPTION_PANEL_DISPLAY].found) pATI->OptionPanelDisplay = PanelDisplay; else pATI->OptionPanelDisplay = !CRTScreen; #ifdef XF86DRI_DEVEL pATI->OptionIsPCI = IsPCI; pATI->OptionAGPMode = AGPMode; pATI->OptionAGPSize = AGPSize; pATI->OptionLocalTextures = LocalTex; pATI->OptionBufferSize = BufferSize; if (strcasecmp(DMAMode, "async")==0) pATI->OptionDMAMode = MACH64_MODE_DMA_ASYNC; else if (strcasecmp(DMAMode, "sync")==0) pATI->OptionDMAMode = MACH64_MODE_DMA_SYNC; else if (strcasecmp(DMAMode, "mmio")==0 ) pATI->OptionDMAMode = MACH64_MODE_MMIO; else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unkown dma_mode: '%s'\n", DMAMode); xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Valid dma_mode options are: 'async','sync','mmio'\n"); xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Defaulting to async DMA mode\n"); pATI->OptionDMAMode = MACH64_MODE_DMA_ASYNC; } #endif /* XF86DRI_DEVEL */ /* Validate and set cursor options */ pATI->Cursor = ATI_CURSOR_SOFTWARE; if (SWCursor || !HWCursor) { if (HWCursor && PublicOption[ATI_OPTION_HWCURSOR].found) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Option \"sw_cursor\" overrides Option \"hw_cursor\".\n"); } else if (pATI->Chip < ATI_CHIP_264CT) { if (HWCursor && PublicOption[ATI_OPTION_HWCURSOR].found) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Option \"hw_cursor\" not supported in this configuration.\n"); } else { pATI->Cursor = ATI_CURSOR_HARDWARE; } pATI->refclk = (int)ReferenceClock; pATI->useEXA = FALSE; if (pATI->OptionAccel) { MessageType from = X_DEFAULT; #if defined(USE_EXA) #if defined(USE_XAA) if (AccelMethod != NULL) { from = X_CONFIG; if (xf86NameCmp(AccelMethod, "EXA") == 0) pATI->useEXA = TRUE; } #else /* USE_XAA */ pATI->useEXA = TRUE; #endif /* !USE_XAA */ #endif /* USE_EXA */ xf86DrvMsg(pScreenInfo->scrnIndex, from, "Using %s acceleration architecture\n", pATI->useEXA ? "EXA" : "XAA"); #if defined(USE_EXA) if (pATI->useEXA && pATI->Chip >= ATI_CHIP_264GTPRO) pATI->RenderAccelEnabled = TRUE; if (pATI->useEXA && !RenderAccel) pATI->RenderAccelEnabled = FALSE; #endif } free(PublicOption); } xf86-video-mach64-6.9.5/src/aticonsole.c0000644000175000017500000005116412270010352014525 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Manuel Teira * Leif Delgass */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xorgVersion.h" #include "ati.h" #include "atii2c.h" #include "atilock.h" #include "atimach64.h" #include "atimach64io.h" #include "atimode.h" #include "atistruct.h" #include "ativga.h" #include "atividmem.h" #include "aticonsole.h" #ifdef XF86DRI_DEVEL #include "mach64_common.h" #include "atidri.h" #endif #ifdef TV_OUT #include "atichip.h" #include "atiprint.h" #include "atioption.h" #include "vbe.h" #endif /* TV_OUT */ /* * ATISaveScreen -- * * This function is a screen saver hook for DIX. */ Bool ATISaveScreen ( ScreenPtr pScreen, int Mode ) { ScrnInfoPtr pScreenInfo; ATIPtr pATI; if ((Mode != SCREEN_SAVER_ON) && (Mode != SCREEN_SAVER_CYCLE)) SetTimeSinceLastInputEvent(); if (!pScreen) return TRUE; pScreenInfo = xf86ScreenToScrn(pScreen); if (!pScreenInfo->vtSema) return TRUE; pATI = ATIPTR(pScreenInfo); { ATIMach64SaveScreen(pATI, Mode); } return TRUE; } /* * ATISetDPMSMode -- * * This function sets the adapter's VESA Display Power Management Signaling * mode. */ void ATISetDPMSMode ( ScrnInfoPtr pScreenInfo, int DPMSMode, int flags ) { ATIPtr pATI; if (!pScreenInfo || !pScreenInfo->vtSema) return; pATI = ATIPTR(pScreenInfo); { ATIMach64SetDPMSMode(pScreenInfo, pATI, DPMSMode); } } #ifdef TV_OUT static void ATIProbeAndSetActiveDisplays ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { vbeInfoPtr pVbe; Bool tv_attached, crt_attached, lcd_attached; int disp_request; ATITVStandard tv_std, tv_std_request; if (xf86GetVerbosity() > 3) { xf86ErrorFVerb(4, "\n Before TV-Out queries\n\n"); ATIPrintRegisters(pATI); } pATI->tvActive = FALSE; pVbe = pATI->pVBE; if (pVbe) { /* LT Pro, XL, Mobility specific BIOS functions */ if (pATI->Chip == ATI_CHIP_264LTPRO || pATI->Chip == ATI_CHIP_264XL || pATI->Chip == ATI_CHIP_MOBILITY) { /* Get attached display(s) - LTPro, XL, Mobility */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa083; pVbe->pInt10->cx = 0x0700; /* ch=0x07 - probe all, 0x01 CRT, 0x02 TV, 0x04 LCD */ xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Attached displays: ax=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->cx); tv_attached = crt_attached = lcd_attached = FALSE; if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to detect attached displays\n"); } else { if (pVbe->pInt10->cx & 0x3) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " CRT attached\n"); crt_attached = TRUE; } else crt_attached = FALSE; if ((pVbe->pInt10->cx >> 2) & 0x3) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " DFP/LCD attached\n"); lcd_attached = TRUE; } else lcd_attached = FALSE; switch ((pVbe->pInt10->cx >> 4) & 0x3) { case 0: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " No TV attached\n"); break; case 1: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " TV attached (composite connector)\n"); tv_attached = TRUE; break; case 2: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " TV attached (S-video connector)\n"); tv_attached = TRUE; break; case 3: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " TV attached (S-video/composite connectors)\n"); tv_attached = TRUE; break; default: xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unrecognized return code: 0x%04x\n", pVbe->pInt10->cx); } } /* Get active display - LTPro, XL, Mobility */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa084; pVbe->pInt10->bx = 0x0000; /* bh=0x00 get active, bh=0x01 set active */ xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Active displays: ax=0x%04x, bx=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to detect active display\n"); } else { if (pVbe->pInt10->bx & 0x1) xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " DFP/LCD is active\n"); if (pVbe->pInt10->bx & 0x2) xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " CRT is active\n"); if (pVbe->pInt10->bx & 0x4) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, " TV is active\n"); if (!tv_attached) { /* tv not connected - disable tv */ disp_request = 0x00; if (crt_attached) disp_request |= 0x02; /* enable CRT */ if (lcd_attached && pATI->OptionPanelDisplay) disp_request |= 0x01; /* enable DFP/LCD */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa084; pVbe->pInt10->bx = 0x0100; /* bh=0x01 set active */ pVbe->pInt10->cx = disp_request; xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV not present, disabling: ax=0x%04x, bx=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Disabling TV failed\n"); } } else { pATI->tvActive = TRUE; } } else if (tv_attached && (pVbe->pInt10->bx & 0x0400)) { /* tv connected and available - enable TV */ disp_request = 0x04; /* enable TV */ #if 0 /* This works, but CRT image is vertically compressed */ if (crt_attached) disp_request |= 0x02; /* enable CRT */ /* NOTE: For me, LCD+TV does NOT work */ /*if (lcd_attached && pATI->OptionPanelDisplay) disp_request |= 0x01; * enable DFP/LCD */ #endif pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa084; pVbe->pInt10->bx = 0x0100; /* bh=0x01 set active */ pVbe->pInt10->cx = disp_request; /* try to activate TV */ xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Setting TV active: ax=0x%04x, bx=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Setting TV active failed\n"); } else { pATI->tvActive = TRUE; } } } } else { /* pATI->Chip < ATI_CHIP_264LTPRO */ /* TVOut Hooks - Check for TVOut BIOS/hardware */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa019; pVbe->pInt10->cx = 0x0000; /* TVOut BIOS query */ xf86ExecX86int10(pVbe->pInt10); tv_attached = FALSE; if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to detect TV-Out BIOS\n"); } else { switch (pVbe->pInt10->ax & 0x0003) { case 3: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out BIOS detected and active\n"); /* TV attached query */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa070; pVbe->pInt10->bx = 0x0002; /* Sub-function: return tv attached info */ xf86ExecX86int10(pVbe->pInt10); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to detect if TV is attached\n"); } else { switch (pVbe->pInt10->cx & 0x0003) { case 3: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV attached to composite and S-video connectors\n"); tv_attached = TRUE; break; case 2: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV attached to S-video connector\n"); tv_attached = TRUE; break; case 1: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV attached to composite connector\n"); tv_attached = TRUE; break; default: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV is not attached\n"); } } break; case 1: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out BIOS service is not available due to" "a system BIOS error or TV-Out hardware not being installed\n"); break; default: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "No TV-Out BIOS or hardware detected\n"); } } } /* Return TV-Out configuration * see Programmer's Guide under "TV Out Specific Functions" * It's not clear exactly which adapters support these */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa070; pVbe->pInt10->bx = 0x00; xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out query: ax=0x%04x, bx=0x%04x, cx=0x%04x, dx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx, pVbe->pInt10->dx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to detect TV-Out configuration.\n"); } else if (pVbe->pInt10->bx == 0) { if (pVbe->pInt10->dx == 0) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out is not detected.\n"); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out is detected but not supported.\n"); } } else if ((pVbe->pInt10->cx & 0xff) == 0) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out is currently disabled.\n"); if (tv_attached && pATI->Chip < ATI_CHIP_264LTPRO) { /* Try to enable TV-Out */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa070; pVbe->pInt10->bx = 0x0001; /* Sub-function: Select TV Out */ /* cl=0x001 enable, cl=0x000 disable, * cl=0x080 disable with feature connector bit preserved */ pVbe->pInt10->cx = 0x0001; xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Setting TV active: ax=0x%04x, bx=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Setting TV active failed\n"); } else { pATI->tvActive = TRUE; } } } else { pATI->tvActive = TRUE; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV-Out is currently enabled (TV-Out revision code: %d).\n", (pVbe->pInt10->dx >> 8) & 0xff); switch ((pVbe->pInt10->cx >> 8) & 0xff) { case 0: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Reference frequency 29.49892\n"); break; case 1: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Reference frequency 28.63636\n"); break; case 2: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Reference frequency 14.31818\n"); break; case 3: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Reference frequency 27.00000\n"); break; default: xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unknown reference frequency cx=0x%04x\n", pVbe->pInt10->cx); } /* Return TV standard * see Programmer's Guide under "TV Out Specific Functions" * It's not clear exactly which adapters support these */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa071; pVbe->pInt10->bx = 0x00; xf86ExecX86int10(pVbe->pInt10); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "TV standard query result: ax=0x%04x, bx=0x%04x, cx=0x%04x\n", pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx); if (pVbe->pInt10->ax & 0xff00) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to return TV standard.\n"); } else { tv_std = pVbe->pInt10->cx & 0x00ff; switch (tv_std) { case ATI_TV_STD_NTSC: case ATI_TV_STD_PAL: case ATI_TV_STD_PALM: case ATI_TV_STD_PAL60: case ATI_TV_STD_NTSCJ: case ATI_TV_STD_PALCN: case ATI_TV_STD_PALN: case ATI_TV_STD_SCARTPAL: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Current TV standard: %s\n", ATITVStandardNames[tv_std]); break; default: xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unrecognized TV standard return code cx=0x%04x\n", pVbe->pInt10->cx); } tv_std_request = pATI->OptionTvStd; if (tv_std_request < 0 || tv_std_request > ATI_TV_STD_NONE || tv_std_request == ATI_TV_STD_RESERVED1 || tv_std_request == ATI_TV_STD_RESERVED2) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Invalid TV standard requested, please check configuration file\n"); } else if (tv_std_request != ATI_TV_STD_NONE) { /* Set TV standard if requested (LT Pro not supported) */ if (pATI->Chip != ATI_CHIP_264LTPRO && tv_std_request != tv_std) { pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0xa070; pVbe->pInt10->bx = 0x0003; /* sub-function: set TV standard */ pVbe->pInt10->cx = tv_std_request; xf86ExecX86int10(pVbe->pInt10); if (pVbe->pInt10->ax & 0xff00) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to set TV standard\n"); else xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG, "Set TV standard to %s\n", ATITVStandardNames[tv_std_request]); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Setting TV standard not supported on ATI Rage LT Pro\n"); } } } } } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBE module not loaded\n"); } } #endif /* TV_OUT */ /* * ATIEnterGraphics -- * * This function sets the hardware to a graphics video state. */ Bool ATIEnterGraphics ( ScreenPtr pScreen, ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { /* Map apertures */ if (!ATIMapApertures(pScreenInfo->scrnIndex, pATI)) return FALSE; /* Unlock device */ ATIUnlock(pATI); /* Calculate hardware data */ if (pScreen && !ATIModeCalculate(pScreenInfo->scrnIndex, pATI, &pATI->NewHW, pScreenInfo->currentMode)) return FALSE; pScreenInfo->vtSema = TRUE; #ifdef TV_OUT if (pATI->OptionTvOut) { if (pATI->pVBE) { if (VBEGetVBEMode(pATI->pVBE, &pATI->vbemode)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Saving VESA mode: 0x%x\n", pATI->vbemode); } } } #endif /* TV_OUT */ /* Save current state */ ATIModeSave(pScreenInfo, pATI, &pATI->OldHW); #ifdef TV_OUT if (pATI->OptionTvOut) ATIProbeAndSetActiveDisplays(pScreenInfo, pATI); #endif /* TV_OUT */ /* Set graphics state */ ATIModeSet(pScreenInfo, pATI, &pATI->NewHW); /* Possibly blank the screen */ if (pScreen) (void)ATISaveScreen(pScreen, SCREEN_SAVER_ON); /* Position the screen */ (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, pScreenInfo->frameX0, pScreenInfo->frameY0)); SetTimeSinceLastInputEvent(); return TRUE; } /* * ATILeaveGraphics -- * * This function restores the hardware to its previous state. */ void ATILeaveGraphics ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { if (pScreenInfo->vtSema) { /* If not exiting, save graphics video state */ if (!xf86ServerIsExiting()) ATIModeSave(pScreenInfo, pATI, &pATI->NewHW); #ifdef TV_OUT if (pATI->OptionTvOut) ATIProbeAndSetActiveDisplays(pScreenInfo, pATI); #endif /* TV_OUT */ /* Restore mode in effect on server entry */ ATIModeSet(pScreenInfo, pATI, &pATI->OldHW); pScreenInfo->vtSema = FALSE; } /* Lock device */ ATILock(pATI); /* Unmap apertures */ #ifdef AVOID_DGA if (!pATI->Closeable) #else /* AVOID_DGA */ if (!pATI->Closeable || !pATI->nDGAMode) #endif /* AVOID_DGA */ ATIUnmapApertures(pScreenInfo->scrnIndex, pATI); SetTimeSinceLastInputEvent(); } /* * ATISwitchMode -- * * This function switches to another graphics video state. */ Bool ATISwitchMode(SWITCH_MODE_ARGS_DECL) { SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); /* Calculate new hardware data */ if (!ATIModeCalculate(pScreenInfo->scrnIndex, pATI, &pATI->NewHW, pMode)) return FALSE; /* Set new hardware state */ if (pScreenInfo->vtSema) { pScreenInfo->currentMode = pMode; #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { DRILock(pScreenInfo->pScreen,0); ATIDRIWaitForIdle(pATI); } #endif /* XF86DRI_DEVEL */ /* XXX Workaround for X server not hiding the cursor for Xcursor (but * only for core cursor), leaving a 64x64 garbage upper-left. */ if (pATI->pCursorInfo) (*pATI->pCursorInfo->HideCursor)(pScreenInfo); ATIModeSet(pScreenInfo, pATI, &pATI->NewHW); #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { DRIUnlock(pScreenInfo->pScreen); } #endif /* XF86DRI_DEVEL */ } SetTimeSinceLastInputEvent(); return TRUE; } /* * ATIEnterVT -- * * This function sets the server's virtual console to a graphics video state. */ Bool ATIEnterVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); ScreenPtr pScreen = pScreenInfo->pScreen; ATIPtr pATI = ATIPTR(pScreenInfo); PixmapPtr pScreenPixmap; #if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0)) DevUnion PixmapPrivate; #endif Bool Entered; if (!ATIEnterGraphics(NULL, pScreenInfo, pATI)) return FALSE; /* The rest of this isn't needed for shadowfb */ if (pATI->OptionShadowFB) { #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { /* get the Mach64 back into shape after resume */ ATIDRIResume(pScreen); DRIUnlock(pScreen); } #endif /* XF86DRI_DEVEL */ return TRUE; } pScreenPixmap = (*pScreen->GetScreenPixmap)(pScreen); #if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0)) PixmapPrivate = pScreenPixmap->devPrivate; if (!PixmapPrivate.ptr) pScreenPixmap->devPrivate = pScreenInfo->pixmapPrivate; #endif /* Tell framebuffer about remapped aperture */ Entered = (*pScreen->ModifyPixmapHeader)(pScreenPixmap, -1, -1, -1, -1, -1, pATI->pMemory); #if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0)) if (!PixmapPrivate.ptr) { pScreenInfo->pixmapPrivate = pScreenPixmap->devPrivate; pScreenPixmap->devPrivate.ptr = NULL; } #endif #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { /* get the Mach64 back into shape after resume */ ATIDRIResume(pScreen); DRIUnlock(pScreen); } #endif /* XF86DRI_DEVEL */ return Entered; } /* * ATILeaveVT -- * * This function restores the server's virtual console to its state on server * entry. */ void ATILeaveVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); ScreenPtr pScreen = pScreenInfo->pScreen; ATIPtr pATI = ATIPTR(pScreenInfo); #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { DRILock(pScreen,0); ATIDRIWaitForIdle(pATI); } #endif /* XF86DRI_DEVEL */ ATILeaveGraphics(pScreenInfo, ATIPTR(pScreenInfo)); } /* * ATIFreeScreen -- * * This function frees all driver data related to a screen. */ void ATIFreeScreen(FREE_SCREEN_ARGS_DECL) { SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); ATII2CFreeScreen(pScreenInfo->scrnIndex); #ifndef AVOID_CPIO free(pATI->OldHW.frame_buffer); free(pATI->NewHW.frame_buffer); #endif /* AVOID_CPIO */ free(pATI->pShadow); #ifndef AVOID_DGA free(pATI->pDGAMode); #endif /* AVOID_DGA */ free(pATI); pScreenInfo->driverPrivate = NULL; } xf86-video-mach64-6.9.5/src/atidac.c0000644000175000017500000003004412270010352013604 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atidac.h" #include "atimach64io.h" /* * RAMDAC-related definitions. */ const SymTabRec ATIDACDescriptors[] = { /* Keep this table in ascending DACType order */ {ATI_DAC_ATI68830, "ATI 68830 or similar"}, {ATI_DAC_SC11483, "Sierra 11483 or similar"}, {ATI_DAC_ATI68875, "ATI 68875 or similar"}, {ATI_DAC_TVP3026_A, "TI ViewPoint3026 or similar"}, {ATI_DAC_GENERIC, "Brooktree 476 or similar"}, {ATI_DAC_BT481, "Brooktree 481 or similar"}, {ATI_DAC_ATT20C491, "AT&T 20C491 or similar"}, {ATI_DAC_SC15026, "Sierra 15026 or similar"}, {ATI_DAC_MU9C1880, "Music 9C1880 or similar"}, {ATI_DAC_IMSG174, "Inmos G174 or similar"}, {ATI_DAC_ATI68860_B, "ATI 68860 (Revision B) or similar"}, {ATI_DAC_ATI68860_C, "ATI 68860 (Revision C) or similar"}, {ATI_DAC_TVP3026_B, "TI ViewPoint3026 or similar"}, {ATI_DAC_STG1700, "SGS-Thompson 1700 or similar"}, {ATI_DAC_ATT20C498, "AT&T 20C498 or similar"}, {ATI_DAC_STG1702, "SGS-Thompson 1702 or similar"}, {ATI_DAC_SC15021, "Sierra 15021 or similar"}, {ATI_DAC_ATT21C498, "AT&T 21C498 or similar"}, {ATI_DAC_STG1703, "SGS-Thompson 1703 or similar"}, {ATI_DAC_CH8398, "Chrontel 8398 or similar"}, {ATI_DAC_ATT20C408, "AT&T 20C408 or similar"}, {ATI_DAC_INTERNAL, "Internal"}, {ATI_DAC_IBMRGB514, "IBM RGB 514 or similar"}, {ATI_DAC_UNKNOWN, "Unknown"} /* Must be last */ }; #ifndef AVOID_CPIO /* * ATISetDACIOPorts -- * * This function sets up DAC access I/O port numbers. */ void ATISetDACIOPorts ( ATIPtr pATI, ATICRTCType crtc ) { switch (crtc) { case ATI_CRTC_VGA: pATI->CPIO_DAC_DATA = VGA_DAC_DATA; pATI->CPIO_DAC_MASK = VGA_DAC_MASK; pATI->CPIO_DAC_READ = VGA_DAC_READ; pATI->CPIO_DAC_WRITE = VGA_DAC_WRITE; pATI->CPIO_DAC_WAIT = GENS1(pATI->CPIO_VGABase); break; case ATI_CRTC_8514: pATI->CPIO_DAC_DATA = IBM_DAC_DATA; pATI->CPIO_DAC_MASK = IBM_DAC_MASK; pATI->CPIO_DAC_READ = IBM_DAC_READ; pATI->CPIO_DAC_WRITE = IBM_DAC_WRITE; pATI->CPIO_DAC_WAIT = pATI->CPIO_DAC_MASK; break; case ATI_CRTC_MACH64: pATI->CPIO_DAC_DATA = ATIIOPort(DAC_REGS) + 1; pATI->CPIO_DAC_MASK = ATIIOPort(DAC_REGS) + 2; pATI->CPIO_DAC_READ = ATIIOPort(DAC_REGS) + 3; pATI->CPIO_DAC_WRITE = ATIIOPort(DAC_REGS) + 0; pATI->CPIO_DAC_WAIT = pATI->CPIOBase; break; default: break; } } #endif /* AVOID_CPIO */ /* * ATIGetDACCmdReg -- * * Setup to access a RAMDAC's command register. */ CARD8 ATIGetDACCmdReg ( ATIPtr pATI ) { #ifdef AVOID_CPIO (void)in8(M64_DAC_WRITE); /* Reset to PEL mode */ (void)in8(M64_DAC_MASK); (void)in8(M64_DAC_MASK); (void)in8(M64_DAC_MASK); return in8(M64_DAC_MASK); #else /* AVOID_CPIO */ (void)inb(pATI->CPIO_DAC_WRITE); /* Reset to PEL mode */ (void)inb(pATI->CPIO_DAC_MASK); (void)inb(pATI->CPIO_DAC_MASK); (void)inb(pATI->CPIO_DAC_MASK); return inb(pATI->CPIO_DAC_MASK); #endif /* AVOID_CPIO */ } /* * ATIDACPreInit -- * * This function initialises the fields in an ATIHWRec that relate to DACs. */ void ATIDACPreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { int Index, Index2; CARD8 maxColour = (1 << pATI->rgbBits) - 1; pATIHW->dac_read = pATIHW->dac_write = 0x00U; pATIHW->dac_mask = 0xFFU; /* * Set colour lookup table. The first entry has already been zeroed out. */ if (pATI->depth > 8) for (Index = 1; Index < (NumberOf(pATIHW->lut) / 3); Index++) { Index2 = Index * 3; pATIHW->lut[Index2 + 0] = pATIHW->lut[Index2 + 1] = pATIHW->lut[Index2 + 2] = Index; } else { /* * Initialise hardware colour map so that use of uninitialised * software colour map entries can easily be seen. For 256-colour * modes, this doesn't remain effective for very long... */ pATIHW->lut[3] = pATIHW->lut[4] = pATIHW->lut[5] = 0xFFU; for (Index = 2; Index < (NumberOf(pATIHW->lut) / 3); Index++) { Index2 = Index * 3; pATIHW->lut[Index2 + 0] = maxColour; pATIHW->lut[Index2 + 1] = 0x00U; pATIHW->lut[Index2 + 2] = maxColour; } } } /* * ATIDACSave -- * * This function is called to save the current RAMDAC state into an ATIHWRec * structure occurrence. */ void ATIDACSave ( ATIPtr pATI, ATIHWPtr pATIHW ) { int Index; #ifdef AVOID_CPIO pATIHW->dac_read = in8(M64_DAC_READ); DACDelay; pATIHW->dac_write = in8(M64_DAC_WRITE); DACDelay; pATIHW->dac_mask = in8(M64_DAC_MASK); DACDelay; /* Save DAC's colour lookup table */ out8(M64_DAC_MASK, 0xFFU); DACDelay; out8(M64_DAC_READ, 0x00U); DACDelay; for (Index = 0; Index < NumberOf(pATIHW->lut); Index++) { pATIHW->lut[Index] = in8(M64_DAC_DATA); DACDelay; } out8(M64_DAC_MASK, pATIHW->dac_mask); DACDelay; out8(M64_DAC_READ, pATIHW->dac_read); DACDelay; #else /* AVOID_CPIO */ ATISetDACIOPorts(pATI, pATIHW->crtc); pATIHW->dac_read = inb(pATI->CPIO_DAC_READ); DACDelay; pATIHW->dac_write = inb(pATI->CPIO_DAC_WRITE); DACDelay; pATIHW->dac_mask = inb(pATI->CPIO_DAC_MASK); DACDelay; /* Save DAC's colour lookup table */ outb(pATI->CPIO_DAC_MASK, 0xFFU); DACDelay; outb(pATI->CPIO_DAC_READ, 0x00U); DACDelay; for (Index = 0; Index < NumberOf(pATIHW->lut); Index++) { pATIHW->lut[Index] = inb(pATI->CPIO_DAC_DATA); DACDelay; } outb(pATI->CPIO_DAC_MASK, pATIHW->dac_mask); DACDelay; outb(pATI->CPIO_DAC_READ, pATIHW->dac_read); DACDelay; #endif /* AVOID_CPIO */ } /* * ATIDACSet -- * * This function loads RAMDAC data from an ATIHWRec structure occurrence. */ void ATIDACSet ( ATIPtr pATI, ATIHWPtr pATIHW ) { int Index; #ifdef AVOID_CPIO /* Load DAC's colour lookup table */ out8(M64_DAC_MASK, 0xFFU); DACDelay; out8(M64_DAC_WRITE, 0x00U); DACDelay; for (Index = 0; Index < NumberOf(pATIHW->lut); Index++) { out8(M64_DAC_DATA, pATIHW->lut[Index]); DACDelay; } out8(M64_DAC_MASK, pATIHW->dac_mask); DACDelay; out8(M64_DAC_READ, pATIHW->dac_read); DACDelay; out8(M64_DAC_WRITE, pATIHW->dac_write); DACDelay; #else /* AVOID_CPIO */ ATISetDACIOPorts(pATI, pATIHW->crtc); /* Load DAC's colour lookup table */ outb(pATI->CPIO_DAC_MASK, 0xFFU); DACDelay; outb(pATI->CPIO_DAC_WRITE, 0x00U); DACDelay; for (Index = 0; Index < NumberOf(pATIHW->lut); Index++) { outb(pATI->CPIO_DAC_DATA, pATIHW->lut[Index]); DACDelay; } outb(pATI->CPIO_DAC_MASK, pATIHW->dac_mask); DACDelay; outb(pATI->CPIO_DAC_READ, pATIHW->dac_read); DACDelay; outb(pATI->CPIO_DAC_WRITE, pATIHW->dac_write); DACDelay; #endif /* AVOID_CPIO */ } /* * ATISetLUTEntry -- * * This function is called to set one of a DAC's LUT entries. */ static void ATISetLUTEntry ( ATIPtr pATI, int Index, CARD8 *LUTEntry ) { #ifdef AVOID_CPIO out8(M64_DAC_WRITE, Index); DACDelay; out8(M64_DAC_DATA, LUTEntry[0]); DACDelay; out8(M64_DAC_DATA, LUTEntry[1]); DACDelay; out8(M64_DAC_DATA, LUTEntry[2]); DACDelay; #else /* AVOID_CPIO */ outb(pATI->CPIO_DAC_WRITE, Index); DACDelay; outb(pATI->CPIO_DAC_DATA, LUTEntry[0]); DACDelay; outb(pATI->CPIO_DAC_DATA, LUTEntry[1]); DACDelay; outb(pATI->CPIO_DAC_DATA, LUTEntry[2]); DACDelay; #endif /* AVOID_CPIO */ } /* * ATILoadPalette -- * * This function updates the RAMDAC's LUT and the in-memory copy of it in * NewHW. */ void ATILoadPalette ( ScrnInfoPtr pScreenInfo, int nColours, int *Indices, LOCO *Colours, VisualPtr pVisual ) { ATIPtr pATI = ATIPTR(pScreenInfo); CARD8 *LUTEntry; int i, j, Index; if (((pVisual->class | DynamicClass) == DirectColor) && ((1 << pVisual->nplanes) > (SizeOf(pATI->NewHW.lut) / 3))) { int reds = pVisual->redMask >> pVisual->offsetRed; int greens = pVisual->greenMask >> pVisual->offsetGreen; int blues = pVisual->blueMask >> pVisual->offsetBlue; int redShift = 8 - pATI->weight.red; int greenShift = 8 - pATI->weight.green; int blueShift = 8 - pATI->weight.blue; int redMult = 3 << redShift; int greenMult = 3 << greenShift; int blueMult = 3 << blueShift; int minShift; CARD8 fChanged[SizeOf(pATI->NewHW.lut) / 3]; (void)memset(fChanged, 0, SizeOf(fChanged)); minShift = redShift; if (minShift > greenShift) minShift = greenShift; if (minShift > blueShift) minShift = blueShift; for (i = 0; i < nColours; i++) { if((Index = Indices[i]) < 0) continue; if (Index <= reds) { j = Index * redMult; pATI->NewHW.lut[j + 0] = Colours[Index].red; fChanged[j / 3] = TRUE; } if (Index <= greens) { j = Index * greenMult; pATI->NewHW.lut[j + 1] = Colours[Index].green; fChanged[j / 3] = TRUE; } if (Index <= blues) { j = Index * blueMult; pATI->NewHW.lut[j + 2] = Colours[Index].blue; fChanged[j / 3] = TRUE; } } if (pScreenInfo->vtSema || pATI->currentMode) { /* Rewrite LUT entries that could have been changed */ i = 1 << minShift; LUTEntry = pATI->NewHW.lut; for (Index = 0; Index < (SizeOf(pATI->NewHW.lut) / 3); Index += i, LUTEntry += i * 3) if (fChanged[Index]) ATISetLUTEntry(pATI, Index, LUTEntry); } } else { for (i = 0; i < nColours; i++) { Index = Indices[i]; if ((Index < 0) || (Index >= (SizeOf(pATI->NewHW.lut) / 3))) continue; LUTEntry = &pATI->NewHW.lut[Index * 3]; LUTEntry[0] = Colours[Index].red; LUTEntry[1] = Colours[Index].green; LUTEntry[2] = Colours[Index].blue; if (pScreenInfo->vtSema || pATI->currentMode) ATISetLUTEntry(pATI, Index, LUTEntry); } } } xf86-video-mach64-6.9.5/src/atidsp.c0000644000175000017500000002201612270010352013643 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atidsp.h" #include "atimach64io.h" #include "atividmem.h" /* * ATIDSPPreInit -- * * This function initialises global variables used to set DSP registers on a * VT-B or later. */ Bool ATIDSPPreInit ( int iScreen, ATIPtr pATI ) { CARD32 IOValue, dsp_config, dsp_on_off, vga_dsp_config, vga_dsp_on_off; int trp; /* * VT-B's and later have additional post-dividers that are not powers of * two. */ pATI->ClockDescriptor.NumD = 8; /* Retrieve XCLK settings */ IOValue = ATIMach64GetPLLReg(PLL_XCLK_CNTL); pATI->XCLKPostDivider = GetBits(IOValue, PLL_XCLK_SRC_SEL); pATI->XCLKReferenceDivider = 1; switch (pATI->XCLKPostDivider) { case 0: case 1: case 2: case 3: break; case 4: pATI->XCLKReferenceDivider = 3; pATI->XCLKPostDivider = 0; break; default: xf86DrvMsg(iScreen, X_ERROR, "Unsupported XCLK source: %d.\n", pATI->XCLKPostDivider); return FALSE; } pATI->XCLKPostDivider -= GetBits(IOValue, PLL_MFB_TIMES_4_2B); pATI->XCLKFeedbackDivider = ATIMach64GetPLLReg(PLL_MCLK_FB_DIV); xf86DrvMsgVerb(iScreen, X_INFO, 2, "Engine XCLK %.3f MHz; Refresh rate code %ld.\n", ATIDivide(pATI->XCLKFeedbackDivider * pATI->ReferenceNumerator, pATI->XCLKReferenceDivider * pATI->ClockDescriptor.MaxM * pATI->ReferenceDenominator, 1 - pATI->XCLKPostDivider, 0) / (double)1000.0, GetBits(pATI->LockData.mem_cntl, CTL_MEM_REFRESH_RATE_B)); /* Compute maximum RAS delay and friends */ trp = GetBits(pATI->LockData.mem_cntl, CTL_MEM_TRP); pATI->XCLKPageFaultDelay = GetBits(pATI->LockData.mem_cntl, CTL_MEM_TRCD) + GetBits(pATI->LockData.mem_cntl, CTL_MEM_TCRD) + trp + 2; pATI->XCLKMaxRASDelay = GetBits(pATI->LockData.mem_cntl, CTL_MEM_TRAS) + trp + 2; pATI->DisplayFIFODepth = 32; if (pATI->Chip < ATI_CHIP_264VT4) { pATI->XCLKPageFaultDelay += 2; pATI->XCLKMaxRASDelay += 3; pATI->DisplayFIFODepth = 24; } switch (pATI->MemoryType) { case MEM_264_DRAM: if (pATI->VideoRAM <= 1024) { pATI->DisplayLoopLatency = 10; } else { pATI->DisplayLoopLatency = 8; pATI->XCLKPageFaultDelay += 2; } break; case MEM_264_EDO: case MEM_264_PSEUDO_EDO: if (pATI->VideoRAM <= 1024) { pATI->DisplayLoopLatency = 9; } else { pATI->DisplayLoopLatency = 8; pATI->XCLKPageFaultDelay++; } break; case MEM_264_SDRAM: if (pATI->VideoRAM <= 1024) { pATI->DisplayLoopLatency = 11; } else { pATI->DisplayLoopLatency = 10; pATI->XCLKPageFaultDelay++; } break; case MEM_264_SGRAM: pATI->DisplayLoopLatency = 8; pATI->XCLKPageFaultDelay += 3; break; default: /* Set maximums */ pATI->DisplayLoopLatency = 11; pATI->XCLKPageFaultDelay += 3; break; } if (pATI->XCLKMaxRASDelay <= pATI->XCLKPageFaultDelay) pATI->XCLKMaxRASDelay = pATI->XCLKPageFaultDelay + 1; /* Allow BIOS to override */ dsp_config = inr(DSP_CONFIG); dsp_on_off = inr(DSP_ON_OFF); vga_dsp_config = inr(VGA_DSP_CONFIG); vga_dsp_on_off = inr(VGA_DSP_ON_OFF); if (dsp_config) pATI->DisplayLoopLatency = GetBits(dsp_config, DSP_LOOP_LATENCY); if ((!dsp_on_off && (pATI->Chip < ATI_CHIP_264GTPRO)) || ((dsp_on_off == vga_dsp_on_off) && (!dsp_config || !((dsp_config ^ vga_dsp_config) & DSP_XCLKS_PER_QW)))) { if (ATIDivide(GetBits(vga_dsp_on_off, VGA_DSP_OFF), GetBits(vga_dsp_config, VGA_DSP_XCLKS_PER_QW), 5, 1) > 24) pATI->DisplayFIFODepth = 32; else pATI->DisplayFIFODepth = 24; } return TRUE; } /* * ATIDSPSave -- * * This function is called to remember DSP register values on VT-B and later * controllers. */ void ATIDSPSave ( ATIPtr pATI, ATIHWPtr pATIHW ) { pATIHW->dsp_on_off = inr(DSP_ON_OFF); pATIHW->dsp_config = inr(DSP_CONFIG); } /* * ATIDSPCalculate -- * * This function sets up DSP register values for a VTB or later. Note that * this would be slightly different if VCLK 0 or 1 were used for the mode * instead. In that case, this function would set VGA_DSP_CONFIG and * VGA_DSP_ON_OFF, would have to zero out DSP_CONFIG and DSP_ON_OFF, and would * have to consider that VGA_DSP_CONFIG is partitioned slightly differently * than DSP_CONFIG. */ void ATIDSPCalculate ( ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { int Multiplier, Divider; int RASMultiplier = pATI->XCLKMaxRASDelay, RASDivider = 1; int dsp_precision, dsp_on, dsp_off, dsp_xclks; int tmp, vshift, xshift; # define Maximum_DSP_PRECISION ((int)MaxBits(DSP_PRECISION)) /* Compute a memory-to-screen bandwidth ratio */ Multiplier = pATI->XCLKFeedbackDivider * pATI->ClockDescriptor.PostDividers[pATIHW->PostDivider]; Divider = pATIHW->FeedbackDivider * pATI->XCLKReferenceDivider; { Divider *= pATI->bitsPerPixel / 4; } /* Start by assuming a display FIFO width of 64 bits */ vshift = (6 - 2) - pATI->XCLKPostDivider; if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { /* Compensate for horizontal stretching */ Multiplier *= pATI->LCDHorizontal; Divider *= pMode->HDisplay & ~7; RASMultiplier *= pATI->LCDHorizontal; RASDivider *= pMode->HDisplay & ~7; } /* Determine dsp_precision first */ tmp = ATIDivide(Multiplier * pATI->DisplayFIFODepth, Divider, vshift, -1); for (dsp_precision = -5; tmp; dsp_precision++) tmp >>= 1; if (dsp_precision < 0) dsp_precision = 0; else if (dsp_precision > Maximum_DSP_PRECISION) dsp_precision = Maximum_DSP_PRECISION; xshift = 6 - dsp_precision; vshift += xshift; /* Move on to dsp_off */ dsp_off = ATIDivide(Multiplier * (pATI->DisplayFIFODepth - 1), Divider, vshift, -1) - ATIDivide(1, 1, vshift - xshift, 1); /* Next is dsp_on */ { dsp_on = ATIDivide(Multiplier, Divider, vshift, 1); tmp = ATIDivide(RASMultiplier, RASDivider, xshift, 1); if (dsp_on < tmp) dsp_on = tmp; dsp_on += (tmp * 2) + ATIDivide(pATI->XCLKPageFaultDelay, 1, xshift, 1); } /* Calculate rounding factor and apply it to dsp_on */ tmp = ((1 << (Maximum_DSP_PRECISION - dsp_precision)) - 1) >> 1; dsp_on = ((dsp_on + tmp) / (tmp + 1)) * (tmp + 1); if (dsp_on >= ((dsp_off / (tmp + 1)) * (tmp + 1))) { dsp_on = dsp_off - ATIDivide(Multiplier, Divider, vshift, -1); dsp_on = (dsp_on / (tmp + 1)) * (tmp + 1); } /* Last but not least: dsp_xclks */ dsp_xclks = ATIDivide(Multiplier, Divider, vshift + 5, 1); /* Build DSP register contents */ pATIHW->dsp_on_off = SetBits(dsp_on, DSP_ON) | SetBits(dsp_off, DSP_OFF); pATIHW->dsp_config = SetBits(dsp_precision, DSP_PRECISION) | SetBits(dsp_xclks, DSP_XCLKS_PER_QW) | SetBits(pATI->DisplayLoopLatency, DSP_LOOP_LATENCY); } /* * ATIDSPSet -- * * This function is called to set DSP registers on VT-B and later controllers. */ void ATIDSPSet ( ATIPtr pATI, ATIHWPtr pATIHW ) { outr(DSP_ON_OFF, pATIHW->dsp_on_off); outr(DSP_CONFIG, pATIHW->dsp_config); } xf86-video-mach64-6.9.5/src/atii2c.c0000644000175000017500000002554212270010352013541 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "atii2c.h" #include "atimach64i2c.h" #include "atistruct.h" #include "xf86.h" /* This is derived from GATOS code, with a liberal sprinkling of bug fixes */ /* * Some local macros for use by the mid-level I2C functions. */ #define ATII2CDelay \ (*pI2CBus->I2CUDelay)(pI2CBus, pI2CBus->HoldTime) #define ATII2CSCLDirOff \ if (pATII2C->SCLDir != 0) \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur & ~pATII2C->SCLDir) #define ATII2CSCLDirOn \ if (pATII2C->SCLDir != 0) \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur | pATII2C->SCLDir) #define ATII2CSDADirOff \ if (pATII2C->SDADir != 0) \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur & ~pATII2C->SDADir) #define ATII2CSDADirOn \ if (pATII2C->SDADir != 0) \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur | pATII2C->SDADir) #define ATII2CSCLBitGet \ ((*pATII2C->I2CGetBits)(pATI) & pATII2C->SCLGet) #define ATII2CSCLBitOff \ do \ { \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur & ~pATII2C->SCLSet); \ ATII2CDelay; \ } while (0) #define ATII2CSCLBitOn \ do \ { \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur | pATII2C->SCLSet); \ do /* Wait until all devices have released SCL */ \ { \ ATII2CDelay; \ } while (ATII2CSCLBitGet == 0); \ } while (0) #define ATII2CSDABitGet \ ((*pATII2C->I2CGetBits)(pATI) & pATII2C->SDAGet) #define ATII2CSDABitOff \ do \ { \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur & ~pATII2C->SDASet); \ ATII2CDelay; \ } while (0) #define ATII2CSDABitOn \ do \ { \ (*pATII2C->I2CSetBits)(pATII2C, pATI, \ pATII2C->I2CCur | pATII2C->SDASet); \ ATII2CDelay; \ } while (0) #define ATII2CSDABitSet(_flag) \ do \ { \ if (_flag) \ ATII2CSDABitOn; \ else \ ATII2CSDABitOff; \ } while (0) /* * ATII2CStart -- * * This function puts a start signal on the I2C bus. */ static Bool ATII2CStart ( I2CBusPtr pI2CBus, int timeout ) { ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; ATIPtr pATI = pATII2C->pATI; (void)timeout; /* * Set I2C line directions to out-bound. SCL will remain out-bound until * next I2C Stop. */ ATII2CSCLDirOn; ATII2CSDADirOn; /* * Send Start bit. This is a pull-down of the data line while the clock * line is pulled up. */ ATII2CSDABitOn; ATII2CSCLBitOn; ATII2CSDABitOff; ATII2CSCLBitOff; return TRUE; } /* * ATII2CAddress -- * * This function puts an 8-bit address on the I2C bus. */ static Bool ATII2CAddress ( I2CDevPtr pI2CDev, I2CSlaveAddr Address ) { I2CBusPtr pI2CBus = pI2CDev->pI2CBus; /* Send low byte of device address */ if ((*pI2CBus->I2CPutByte)(pI2CDev, (I2CByte)Address)) { /* Send top byte of address, if appropriate */ if (((Address & 0x00F8U) != 0x00F0U) && ((Address & 0x00FEU) != 0x0000U)) return TRUE; if ((*pI2CBus->I2CPutByte)(pI2CDev, (I2CByte)(Address >> 8))) return TRUE; } /* Kill I2C transaction on failure */ (*pI2CBus->I2CStop)(pI2CDev); return FALSE; } /* * ATII2CStop -- * * This function puts a stop signal on the I2C bus. */ static void ATII2CStop ( I2CDevPtr pI2CDev ) { I2CBusPtr pI2CBus = pI2CDev->pI2CBus; ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; ATIPtr pATI = pATII2C->pATI; ATII2CSDADirOn; /* Set data line direction to out-bound */ /* * Send Stop bit. This is a pull-up of the data line while the clock line * is pulled up. */ ATII2CSDABitOff; ATII2CSCLBitOn; ATII2CSDABitOn; ATII2CSCLBitOff; /* Reset I2C line directions to in-bound */ ATII2CSCLDirOff; ATII2CSDADirOff; } /* * ATII2CPutByte -- * * This function puts an 8-bit value on the I2C bus, starting with its MSB. */ static Bool ATII2CPutByte ( I2CDevPtr pI2CDev, I2CByte Data ) { I2CBusPtr pI2CBus = pI2CDev->pI2CBus; ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; ATIPtr pATI = pATII2C->pATI; int i; Bool Result; ATII2CSDADirOn; /* Set data line direction to out-bound */ /* Send data byte */ for (i = 0; i < 8; i++) { ATII2CSDABitSet(Data & 0x80U); ATII2CSCLBitOn; ATII2CSCLBitOff; Data <<= 1; } ATII2CSDABitOn; /* Release data line */ ATII2CSDADirOff; /* Set data line direction to in-bound */ ATII2CSCLBitOn; /* Start bit-read clock pulse */ /* Get [N]ACK bit */ if (ATII2CSDABitGet) Result = FALSE; else Result = TRUE; ATII2CSCLBitOff; /* End clock pulse */ return Result; } /* * ATII2CGetByte -- * * This function retrieves an 8-bit value from the I2C bus. */ static Bool ATII2CGetByte ( I2CDevPtr pI2CDev, I2CByte *pData, Bool Last ) { I2CBusPtr pI2CBus = pI2CDev->pI2CBus; ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; ATIPtr pATI = pATII2C->pATI; unsigned long Value = 1; do { ATII2CSCLBitOn; /* Start bit-read clock pulse */ /* Accumulate bit into byte value */ Value <<= 1; if (ATII2CSDABitGet) Value++; ATII2CSCLBitOff; /* End clock pulse */ } while (Value <= (unsigned long)((I2CByte)(-1))); *pData = (I2CByte)Value; ATII2CSDADirOn; /* Set data line direction to out-bound */ /* Send [N]ACK bit */ ATII2CSDABitSet(Last); ATII2CSCLBitOn; ATII2CSCLBitOff; if (!Last) ATII2CSDABitOn; /* Release data line */ ATII2CSDADirOff; /* Set data line direction to in-bound */ return TRUE; } /* * ATICreateI2CBusRec -- * * This function is called to initialise an I2CBusRec. */ I2CBusPtr ATICreateI2CBusRec ( int iScreen, ATIPtr pATI, char *BusName ) { I2CBusPtr pI2CBus; ATII2CPtr pATII2C = xnfcalloc(1, SizeOf(ATII2CRec)); if (!(pI2CBus = xf86CreateI2CBusRec())) { xf86DrvMsg(iScreen, X_WARNING, "Unable to allocate I2C Bus record.\n"); free(pATII2C); return NULL; } /* Fill in generic structure fields */ pI2CBus->BusName = BusName; pI2CBus->scrnIndex = iScreen; pI2CBus->I2CAddress = ATII2CAddress; pI2CBus->I2CStart = ATII2CStart; pI2CBus->I2CStop = ATII2CStop; pI2CBus->I2CPutByte = ATII2CPutByte; pI2CBus->I2CGetByte = ATII2CGetByte; pI2CBus->DriverPrivate.ptr = pATII2C; pATII2C->pATI = pATI; if (xf86I2CBusInit(pI2CBus)) return pI2CBus; xf86DrvMsg(iScreen, X_WARNING, "I2C bus %s initialisation failure.\n", BusName); xf86DestroyI2CBusRec(pI2CBus, TRUE, TRUE); free(pATII2C); return NULL; } /* * ATII2CPreInit -- * * This is called by ATIPreInit() to create I2C bus record(s) for the adapter. */ void ATII2CPreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { if (!xf86LoadSubModule(pScreenInfo, "i2c")) return; ATIMach64I2CPreInit(pScreenInfo, pATI); } /* * ATII2CFreeScreen -- * * This is called by ATIFreeScreen() to remove the driver's I2C interface. */ void ATII2CFreeScreen ( int iScreen ) { I2CBusPtr pI2CBus, *ppI2CBus; ATII2CPtr pATII2C; int nI2CBus; nI2CBus = xf86I2CGetScreenBuses(iScreen, &ppI2CBus); while (--nI2CBus >= 0) { pI2CBus = ppI2CBus[nI2CBus]; pATII2C = pI2CBus->DriverPrivate.ptr; xf86DestroyI2CBusRec(pI2CBus, TRUE, TRUE); free(pATII2C); } free(ppI2CBus); } xf86-video-mach64-6.9.5/src/atilock.c0000644000175000017500000004737612270010352014025 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atilock.h" #include "atimach64io.h" #include "atiwonderio.h" /* * ATIUnlock -- * * This function is entered to unlock registers and disable unwanted * emulations. It saves the current state for later restoration by ATILock(). */ void ATIUnlock ( ATIPtr pATI ) { CARD32 tmp; #ifndef AVOID_CPIO CARD32 saved_lcd_gen_ctrl = 0, lcd_gen_ctrl = 0; #endif /* AVOID_CPIO */ if (pATI->Unlocked) return; pATI->Unlocked = TRUE; { /* Reset everything */ pATI->LockData.bus_cntl = inr(BUS_CNTL); if (pATI->Chip < ATI_CHIP_264VT4) { pATI->LockData.bus_cntl = (pATI->LockData.bus_cntl & ~BUS_HOST_ERR_INT_EN) | BUS_HOST_ERR_INT; if (pATI->Chip < ATI_CHIP_264VTB) pATI->LockData.bus_cntl = (pATI->LockData.bus_cntl & ~BUS_FIFO_ERR_INT_EN) | BUS_FIFO_ERR_INT; } tmp = pATI->LockData.bus_cntl & ~BUS_ROM_DIS; if (pATI->Chip < ATI_CHIP_264VTB) tmp |= SetBits(15, BUS_FIFO_WS); else tmp &= ~BUS_MASTER_DIS; if (pATI->Chip >= ATI_CHIP_264VT) tmp |= BUS_EXT_REG_EN; /* Enable Block 1 */ outr(BUS_CNTL, tmp); pATI->LockData.crtc_int_cntl = inr(CRTC_INT_CNTL); outr(CRTC_INT_CNTL, (pATI->LockData.crtc_int_cntl & ~CRTC_INT_ENS) | CRTC_INT_ACKS); #ifdef XF86DRI_DEVEL if (pATI->irq > 0) outr(CRTC_INT_CNTL, (inr(CRTC_INT_CNTL) & ~CRTC_INT_ACKS) | CRTC_VBLANK_INT_EN); /* Enable VBLANK interrupt - handled by DRM */ #endif /* XF86DRI_DEVEL */ pATI->LockData.gen_test_cntl = inr(GEN_TEST_CNTL) & (GEN_OVR_OUTPUT_EN | GEN_OVR_POLARITY | GEN_CUR_EN | GEN_BLOCK_WR_EN); tmp = pATI->LockData.gen_test_cntl & ~GEN_CUR_EN; outr(GEN_TEST_CNTL, tmp | GEN_GUI_EN); outr(GEN_TEST_CNTL, tmp); outr(GEN_TEST_CNTL, tmp | GEN_GUI_EN); tmp = pATI->LockData.crtc_gen_cntl = inr(CRTC_GEN_CNTL) & ~(CRTC_EN | CRTC_LOCK_REGS); if (pATI->Chip >= ATI_CHIP_264XL) tmp = (tmp & ~CRTC_INT_ENS_X) | CRTC_INT_ACKS_X; outr(CRTC_GEN_CNTL, tmp | CRTC_EN); outr(CRTC_GEN_CNTL, tmp); outr(CRTC_GEN_CNTL, tmp | CRTC_EN); if ((pATI->LCDPanelID >= 0) && (pATI->Chip != ATI_CHIP_264LT)) { pATI->LockData.lcd_index = inr(LCD_INDEX); if (pATI->Chip >= ATI_CHIP_264XL) outr(LCD_INDEX, pATI->LockData.lcd_index & ~(LCD_MONDET_INT_EN | LCD_MONDET_INT)); /* * Prevent BIOS initiated display switches on dual-CRT controllers. */ if (!pATI->OptionBIOSDisplay && (pATI->Chip != ATI_CHIP_264XL)) { #ifdef TV_OUT pATI->LockData.scratch_reg3 = inr(SCRATCH_REG3) & ~DISPLAY_SWITCH_DISABLE; outr(SCRATCH_REG3, pATI->LockData.scratch_reg3); #else pATI->LockData.scratch_reg3 = inr(SCRATCH_REG3); outr(SCRATCH_REG3, pATI->LockData.scratch_reg3 | DISPLAY_SWITCH_DISABLE); #endif /* TV_OUT */ } } pATI->LockData.mem_cntl = inr(MEM_CNTL); if (pATI->Chip < ATI_CHIP_264CT) outr(MEM_CNTL, pATI->LockData.mem_cntl & ~(CTL_MEM_BNDRY | CTL_MEM_BNDRY_EN)); /* Disable feature connector on integrated controllers */ tmp = pATI->LockData.dac_cntl = inr(DAC_CNTL); if (pATI->Chip >= ATI_CHIP_264CT) tmp &= ~DAC_FEA_CON_EN; #ifndef AVOID_CPIO /* Ensure VGA aperture is enabled */ pATI->LockData.config_cntl = inr(CONFIG_CNTL); tmp |= DAC_VGA_ADR_EN; outr(CONFIG_CNTL, pATI->LockData.config_cntl & ~CFG_VGA_DIS); #endif /* AVOID_CPIO */ outr(DAC_CNTL, tmp); if (pATI->Chip >= ATI_CHIP_264VTB) { pATI->LockData.mpp_config = inr(MPP_CONFIG); pATI->LockData.mpp_strobe_seq = inr(MPP_STROBE_SEQ); pATI->LockData.tvo_cntl = inr(TVO_CNTL); if (pATI->Chip >= ATI_CHIP_264GT2C) { pATI->LockData.hw_debug = inr(HW_DEBUG); if (pATI->Chip >= ATI_CHIP_264GTPRO) { if (!(pATI->LockData.hw_debug & CMDFIFO_SIZE_EN)) outr(HW_DEBUG, pATI->LockData.hw_debug | CMDFIFO_SIZE_EN); pATI->LockData.i2c_cntl_0 = inr(I2C_CNTL_0) | (I2C_CNTL_STAT | I2C_CNTL_HPTR_RST); outr(I2C_CNTL_0, pATI->LockData.i2c_cntl_0 & ~I2C_CNTL_INT_EN); pATI->LockData.i2c_cntl_1 = inr(I2C_CNTL_1); } else { if (pATI->LockData.hw_debug & CMDFIFO_SIZE_DIS) outr(HW_DEBUG, pATI->LockData.hw_debug & ~CMDFIFO_SIZE_DIS); } } } } #ifndef AVOID_CPIO if (pATI->VGAAdapter) { if (pATI->CPIO_VGAWonder) { /* * Ensure all registers are read/write and disable all non-VGA * emulations. */ pATI->LockData.b1 = ATIGetExtReg(0xB1U); ATIModifyExtReg(pATI, 0xB1U, pATI->LockData.b1, 0xFCU, 0x00U); pATI->LockData.b4 = ATIGetExtReg(0xB4U); ATIModifyExtReg(pATI, 0xB4U, pATI->LockData.b4, 0x00U, 0x00U); pATI->LockData.b5 = ATIGetExtReg(0xB5U); ATIModifyExtReg(pATI, 0xB5U, pATI->LockData.b5, 0xBFU, 0x00U); pATI->LockData.b6 = ATIGetExtReg(0xB6U); ATIModifyExtReg(pATI, 0xB6U, pATI->LockData.b6, 0xDDU, 0x00U); pATI->LockData.b8 = ATIGetExtReg(0xB8U); ATIModifyExtReg(pATI, 0xB8U, pATI->LockData.b8, 0xC0U, 0x00U); pATI->LockData.b9 = ATIGetExtReg(0xB9U); ATIModifyExtReg(pATI, 0xB9U, pATI->LockData.b9, 0x7FU, 0x00U); { pATI->LockData.be = ATIGetExtReg(0xBEU); ATIModifyExtReg(pATI, 0xBEU, pATI->LockData.be, 0xFAU, 0x01U); { pATI->LockData.a6 = ATIGetExtReg(0xA6U); ATIModifyExtReg(pATI, 0xA6U, pATI->LockData.a6, 0x7FU, 0x00U); pATI->LockData.ab = ATIGetExtReg(0xABU); ATIModifyExtReg(pATI, 0xABU, pATI->LockData.ab, 0xE7U, 0x00U); } } } if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) { saved_lcd_gen_ctrl = inr(LCD_GEN_CTRL); /* Setup to unlock non-shadow registers */ lcd_gen_ctrl = saved_lcd_gen_ctrl & ~SHADOW_RW_EN; outr(LCD_GEN_CTRL, lcd_gen_ctrl); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { saved_lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); /* Setup to unlock non-shadow registers */ lcd_gen_ctrl = saved_lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); } } ATISetVGAIOBase(pATI, inb(R_GENMO)); /* * There's a bizarre interaction here. If bit 0x80 of CRTC[17] is on, * then CRTC[3] is read-only. If bit 0x80 of CRTC[3] is off, then * CRTC[17] is write-only (or a read attempt actually returns bits from * C/EGA's light pen position). This means that if both conditions are * met, CRTC[17]'s value on server entry cannot be retrieved. */ pATI->LockData.crt03 = tmp = GetReg(CRTX(pATI->CPIO_VGABase), 0x03U); if ((tmp & 0x80U) || ((outb(CRTD(pATI->CPIO_VGABase), tmp | 0x80U), tmp = inb(CRTD(pATI->CPIO_VGABase))) & 0x80U)) { /* CRTC[16-17] should be readable */ pATI->LockData.crt11 = tmp = GetReg(CRTX(pATI->CPIO_VGABase), 0x11U); if (tmp & 0x80U) /* Unprotect CRTC[0-7] */ outb(CRTD(pATI->CPIO_VGABase), tmp & 0x7FU); } else { /* * Could not make CRTC[17] readable, so unprotect CRTC[0-7] * replacing VSyncEnd with zero. This zero will be replaced after * acquiring the needed access. */ unsigned int VSyncEnd, VBlankStart, VBlankEnd; CARD8 crt07, crt09; PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, 0x20U); /* Make CRTC[16-17] readable */ PutReg(CRTX(pATI->CPIO_VGABase), 0x03U, tmp | 0x80U); /* Make vertical synch pulse as wide as possible */ crt07 = GetReg(CRTX(pATI->CPIO_VGABase), 0x07U); crt09 = GetReg(CRTX(pATI->CPIO_VGABase), 0x09U); VBlankStart = (((crt09 & 0x20U) << 4) | ((crt07 & 0x08U) << 5) | GetReg(CRTX(pATI->CPIO_VGABase), 0x15U)) + 1; VBlankEnd = (VBlankStart & 0x0300U) | GetReg(CRTX(pATI->CPIO_VGABase), 0x16U); if (VBlankEnd <= VBlankStart) VBlankEnd += 0x0100U; VSyncEnd = (((crt07 & 0x80U) << 2) | ((crt07 & 0x04U) << 6) | GetReg(CRTX(pATI->CPIO_VGABase), 0x10U)) + 0x0FU; if (VSyncEnd >= VBlankEnd) VSyncEnd = VBlankEnd - 1; pATI->LockData.crt11 = (VSyncEnd & 0x0FU) | 0x20U; PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, pATI->LockData.crt11); pATI->LockData.crt11 |= 0x80U; } if (pATI->LCDPanelID >= 0) { /* Setup to unlock shadow registers */ lcd_gen_ctrl |= SHADOW_RW_EN; if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, lcd_gen_ctrl); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); /* Unlock shadow registers */ ATISetVGAIOBase(pATI, inb(R_GENMO)); pATI->LockData.shadow_crt03 = tmp = GetReg(CRTX(pATI->CPIO_VGABase), 0x03U); if ((tmp & 0x80U) || ((outb(CRTD(pATI->CPIO_VGABase), tmp | 0x80U), tmp = inb(CRTD(pATI->CPIO_VGABase))) & 0x80U)) { /* CRTC[16-17] should be readable */ pATI->LockData.shadow_crt11 = tmp = GetReg(CRTX(pATI->CPIO_VGABase), 0x11U); if (tmp & 0x80U) /* Unprotect CRTC[0-7] */ { outb(CRTD(pATI->CPIO_VGABase), tmp & 0x7FU); } else if (!tmp && pATI->LockData.crt11) { pATI->LockData.shadow_crt11 = tmp = pATI->LockData.crt11; outb(CRTD(pATI->CPIO_VGABase), tmp & 0x7FU); } } else { /* * Could not make CRTC[17] readable, so unprotect CRTC[0-7] * replacing VSyncEnd with zero. This zero will be replaced * after acquiring the needed access. */ unsigned int VSyncEnd, VBlankStart, VBlankEnd; CARD8 crt07, crt09; PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, 0x20U); /* Make CRTC[16-17] readable */ PutReg(CRTX(pATI->CPIO_VGABase), 0x03U, tmp | 0x80U); /* Make vertical synch pulse as wide as possible */ crt07 = GetReg(CRTX(pATI->CPIO_VGABase), 0x07U); crt09 = GetReg(CRTX(pATI->CPIO_VGABase), 0x09U); VBlankStart = (((crt09 & 0x20U) << 4) | ((crt07 & 0x08U) << 5) | GetReg(CRTX(pATI->CPIO_VGABase), 0x15U)) + 1; VBlankEnd = (VBlankStart & 0x0300U) | GetReg(CRTX(pATI->CPIO_VGABase), 0x16U); if (VBlankEnd <= VBlankStart) VBlankEnd += 0x0100U; VSyncEnd = (((crt07 & 0x80U) << 2) | ((crt07 & 0x04U) << 6) | GetReg(CRTX(pATI->CPIO_VGABase), 0x10U)) + 0x0FU; if (VSyncEnd >= VBlankEnd) VSyncEnd = VBlankEnd - 1; pATI->LockData.shadow_crt11 = (VSyncEnd & 0x0FU) | 0x20U; PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, pATI->LockData.shadow_crt11); pATI->LockData.shadow_crt11 |= 0x80U; } /* Restore selection */ if (pATI->Chip == ATI_CHIP_264LT) { outr(LCD_GEN_CTRL, saved_lcd_gen_ctrl); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_GEN_CNTL, saved_lcd_gen_ctrl); /* Restore LCD index */ out8(LCD_INDEX, GetByte(pATI->LockData.lcd_index, 0)); } } } #endif /* AVOID_CPIO */ } /* * ATILock -- * * This function restores the state saved by ATIUnlock() above. */ void ATILock ( ATIPtr pATI ) { #ifndef AVOID_CPIO CARD32 saved_lcd_gen_ctrl = 0, lcd_gen_ctrl = 0; #endif /* AVOID_CPIO */ if (!pATI->Unlocked) return; pATI->Unlocked = FALSE; #ifndef AVOID_CPIO if (pATI->VGAAdapter) { if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) { saved_lcd_gen_ctrl = inr(LCD_GEN_CTRL); /* Setup to lock non-shadow registers */ lcd_gen_ctrl = saved_lcd_gen_ctrl & ~SHADOW_RW_EN; outr(LCD_GEN_CTRL, lcd_gen_ctrl); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { saved_lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); /* Setup to lock non-shadow registers */ lcd_gen_ctrl = saved_lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); } } ATISetVGAIOBase(pATI, inb(R_GENMO)); /* Restore VGA locks */ PutReg(CRTX(pATI->CPIO_VGABase), 0x03U, pATI->LockData.crt03); PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, pATI->LockData.crt11); if (pATI->LCDPanelID >= 0) { /* Setup to lock shadow registers */ lcd_gen_ctrl |= SHADOW_RW_EN; if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, lcd_gen_ctrl); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); /* Lock shadow registers */ ATISetVGAIOBase(pATI, inb(R_GENMO)); PutReg(CRTX(pATI->CPIO_VGABase), 0x03U, pATI->LockData.shadow_crt03); PutReg(CRTX(pATI->CPIO_VGABase), 0x11U, pATI->LockData.shadow_crt11); /* Restore selection */ if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, saved_lcd_gen_ctrl); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, saved_lcd_gen_ctrl); } if (pATI->CPIO_VGAWonder) { /* * Restore emulation and protection bits in ATI extended VGA * registers. */ ATIModifyExtReg(pATI, 0xB1U, -1, 0xFCU, pATI->LockData.b1); ATIModifyExtReg(pATI, 0xB4U, -1, 0x00U, pATI->LockData.b4); ATIModifyExtReg(pATI, 0xB5U, -1, 0xBFU, pATI->LockData.b5); ATIModifyExtReg(pATI, 0xB6U, -1, 0xDDU, pATI->LockData.b6); ATIModifyExtReg(pATI, 0xB8U, -1, 0xC0U, pATI->LockData.b8 & 0x03U); ATIModifyExtReg(pATI, 0xB9U, -1, 0x7FU, pATI->LockData.b9); { ATIModifyExtReg(pATI, 0xBEU, -1, 0xFAU, pATI->LockData.be); { ATIModifyExtReg(pATI, 0xA6U, -1, 0x7FU, pATI->LockData.a6); ATIModifyExtReg(pATI, 0xABU, -1, 0xE7U, pATI->LockData.ab); } } ATIModifyExtReg(pATI, 0xB8U, -1, 0xC0U, pATI->LockData.b8); } } #endif /* AVOID_CPIO */ { /* Reset everything */ outr(BUS_CNTL, pATI->LockData.bus_cntl); outr(CRTC_INT_CNTL, pATI->LockData.crtc_int_cntl); outr(GEN_TEST_CNTL, pATI->LockData.gen_test_cntl | GEN_GUI_EN); outr(GEN_TEST_CNTL, pATI->LockData.gen_test_cntl); outr(GEN_TEST_CNTL, pATI->LockData.gen_test_cntl | GEN_GUI_EN); outr(CRTC_GEN_CNTL, pATI->LockData.crtc_gen_cntl | CRTC_EN); outr(CRTC_GEN_CNTL, pATI->LockData.crtc_gen_cntl); outr(CRTC_GEN_CNTL, pATI->LockData.crtc_gen_cntl | CRTC_EN); #ifndef AVOID_CPIO outr(CONFIG_CNTL, pATI->LockData.config_cntl); #endif /* AVOID_CPIO */ outr(DAC_CNTL, pATI->LockData.dac_cntl); if (pATI->Chip < ATI_CHIP_264CT) outr(MEM_CNTL, pATI->LockData.mem_cntl); if ((pATI->LCDPanelID >= 0) && (pATI->Chip != ATI_CHIP_264LT)) { outr(LCD_INDEX, pATI->LockData.lcd_index); #ifndef TV_OUT if (!pATI->OptionBIOSDisplay && (pATI->Chip != ATI_CHIP_264XL)) outr(SCRATCH_REG3, pATI->LockData.scratch_reg3); #endif /* TV_OUT */ } if (pATI->Chip >= ATI_CHIP_264VTB) { outr(MPP_CONFIG, pATI->LockData.mpp_config); outr(MPP_STROBE_SEQ, pATI->LockData.mpp_strobe_seq); #ifndef TV_OUT outr(TVO_CNTL, pATI->LockData.tvo_cntl); #endif /* TV_OUT */ if (pATI->Chip >= ATI_CHIP_264GT2C) { outr(HW_DEBUG, pATI->LockData.hw_debug); if (pATI->Chip >= ATI_CHIP_264GTPRO) { outr(I2C_CNTL_0, pATI->LockData.i2c_cntl_0); outr(I2C_CNTL_1, pATI->LockData.i2c_cntl_1); } } } } } xf86-video-mach64-6.9.5/src/atimach64.c0000644000175000017500000012766112270010352014153 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /* * Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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 (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * DRI support by: * Manuel Teira * Leif Delgass */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atibus.h" #include "atichip.h" #include "atidac.h" #include "atimach64.h" #include "atimach64accel.h" #include "atimach64io.h" #include "atirgb514.h" #ifdef HAVE_XEXTPROTO_71 #include #else #ifndef DPMS_SERVER # define DPMS_SERVER #endif #include #endif /* * ATIMach64PreInit -- * * This function fills in the Mach64 portion of an ATIHWRec that is common to * all video modes generated by the driver. */ void ATIMach64PreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { if ((pATI->LockData.crtc_gen_cntl & CRTC_CSYNC_EN) && !pATI->OptionCSync) { xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE, "Using composite sync to match input timing.\n"); pATI->OptionCSync = TRUE; } pATIHW->bus_cntl = inr(BUS_CNTL); if (pATI->Chip < ATI_CHIP_264VT4) pATIHW->bus_cntl = (pATIHW->bus_cntl & ~BUS_HOST_ERR_INT_EN) | BUS_HOST_ERR_INT; if (pATI->Chip < ATI_CHIP_264VTB) { pATIHW->bus_cntl &= ~(BUS_FIFO_ERR_INT_EN | BUS_ROM_DIS); pATIHW->bus_cntl |= SetBits(15, BUS_FIFO_WS) | BUS_FIFO_ERR_INT; } else if (pATI->MMIOInLinear) { pATIHW->bus_cntl &= ~BUS_APER_REG_DIS; } else { pATIHW->bus_cntl |= BUS_APER_REG_DIS; } if (pATI->Chip >= ATI_CHIP_264VT) pATIHW->bus_cntl |= BUS_EXT_REG_EN; /* Enable Block 1 */ #ifdef AVOID_CPIO pATIHW->mem_vga_wp_sel = SetBits(0, MEM_VGA_WPS0) | SetBits(1, MEM_VGA_WPS1); pATIHW->mem_vga_rp_sel = SetBits(0, MEM_VGA_RPS0) | SetBits(1, MEM_VGA_RPS1); #else /* AVOID_CPIO */ pATIHW->mem_vga_wp_sel = SetBits(0, MEM_VGA_WPS0) | SetBits(pATIHW->nPlane, MEM_VGA_WPS1); pATIHW->mem_vga_rp_sel = SetBits(0, MEM_VGA_RPS0) | SetBits(pATIHW->nPlane, MEM_VGA_RPS1); #endif /* AVOID_CPIO */ pATIHW->dac_cntl = inr(DAC_CNTL) & ~(DAC1_CLK_SEL | DAC_PALETTE_ACCESS_CNTL | DAC_8BIT_EN); if (pATI->Chip >= ATI_CHIP_264CT) pATIHW->dac_cntl &= ~DAC_FEA_CON_EN; if (pATI->rgbBits == 8) pATIHW->dac_cntl |= DAC_8BIT_EN; pATIHW->gen_test_cntl = pATI->LockData.gen_test_cntl & ~GEN_CUR_EN; if (pATI->DAC == ATI_DAC_IBMRGB514) pATIHW->gen_test_cntl |= GEN_OVR_OUTPUT_EN; pATIHW->config_cntl = inr(CONFIG_CNTL); #ifndef AVOID_CPIO if (pATI->VGAAdapter) { pATIHW->config_cntl |= CFG_MEM_VGA_AP_EN; } else #endif /* AVOID_CPIO */ { pATIHW->config_cntl &= ~CFG_MEM_VGA_AP_EN; } if ((pATI->Chip < ATI_CHIP_264CT)) { /* Replace linear aperture size and address */ pATIHW->config_cntl &= ~(CFG_MEM_AP_LOC | CFG_MEM_AP_SIZE); pATIHW->config_cntl |= SetBits(pATI->LinearBase >> 22, CFG_MEM_AP_LOC); if ((pATI->Chip < ATI_CHIP_264CT) && (pATI->VideoRAM < 4096)) pATIHW->config_cntl |= SetBits(1, CFG_MEM_AP_SIZE); else pATIHW->config_cntl |= SetBits(2, CFG_MEM_AP_SIZE); } if (pATI->Chip >= ATI_CHIP_264VTB) { pATIHW->mem_buf_cntl = inr(MEM_BUF_CNTL) | INVALIDATE_RB_CACHE; pATIHW->mem_cntl = (pATI->LockData.mem_cntl & ~(CTL_MEM_LOWER_APER_ENDIAN | CTL_MEM_UPPER_APER_ENDIAN)) | SetBits(CTL_MEM_APER_BYTE_ENDIAN, CTL_MEM_LOWER_APER_ENDIAN); switch (pATI->bitsPerPixel) { default: pATIHW->mem_cntl |= SetBits(CTL_MEM_APER_BYTE_ENDIAN, CTL_MEM_UPPER_APER_ENDIAN); break; case 16: pATIHW->mem_cntl |= SetBits(CTL_MEM_APER_WORD_ENDIAN, CTL_MEM_UPPER_APER_ENDIAN); break; case 32: pATIHW->mem_cntl |= SetBits(CTL_MEM_APER_LONG_ENDIAN, CTL_MEM_UPPER_APER_ENDIAN); break; } pATIHW->mpp_config = inr(MPP_CONFIG); pATIHW->mpp_config &= ~(MPP_PRESCALE | MPP_NSTATES | MPP_FORMAT | MPP_WAIT_STATE | MPP_INSERT_WAIT | MPP_TRISTATE_ADDR | MPP_AUTO_INC_EN | MPP_CHKREQ_EN | MPP_BUFFER_SIZE | MPP_BUFFER_MODE | MPP_BUSY); pATIHW->mpp_config |= (MPP_NSTATES_8 | MPP_FORMAT_DA8 | SetBits(4, MPP_WAIT_STATE) | MPP_CHKRDY_EN | MPP_READ_EARLY | MPP_RW_MODE | MPP_EN); pATIHW->mpp_strobe_seq = inr(MPP_STROBE_SEQ); pATIHW->mpp_strobe_seq &= ~(MPP_STB0_SEQ | MPP_STB1_SEQ); pATIHW->mpp_strobe_seq |= SetBits(0x0087U, MPP_STB0_SEQ) | SetBits(0x0083U, MPP_STB1_SEQ); pATIHW->tvo_cntl = 0; } /* Draw engine setup */ if (pATI->Block0Base) { CARD32 bus_cntl = inr(BUS_CNTL); CARD32 config_cntl = inr(CONFIG_CNTL); /* Ensure apertures are enabled */ outr(BUS_CNTL, pATIHW->bus_cntl); outr(CONFIG_CNTL, pATIHW->config_cntl); /* * When possible, max out command FIFO size. */ if (pATI->Chip >= ATI_CHIP_264VT4) #ifdef XF86DRI_DEVEL /* Changing the FIFO depth seems to interfere with DMA, so use * default of 128 entries (0x01) */ pATIHW->gui_cntl = (inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE) | 0x01; #else /* XF86DRI_DEVEL */ pATIHW->gui_cntl = inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE; #endif /* XF86DRI_DEVEL */ /* Initialise destination registers */ pATIHW->dst_off_pitch = SetBits((pATI->displayWidth * pATI->XModifier) >> 3, DST_PITCH); pATIHW->dst_cntl = DST_X_DIR | DST_Y_DIR | DST_LAST_PEL; /* Initialise source registers */ pATIHW->src_off_pitch = pATIHW->dst_off_pitch; pATIHW->src_width1 = pATIHW->src_height1 = pATIHW->src_width2 = pATIHW->src_height2 = 1; pATIHW->src_cntl = SRC_LINE_X_DIR; /* Initialise scissor, allowing for offscreen areas */ #ifdef USE_XAA if (!pATI->useEXA) { int width, height, total; pATIHW->sc_right = (pATI->displayWidth * pATI->XModifier) - 1; width = pATI->displayWidth * pATI->bitsPerPixel; total = pScreenInfo->videoRam * (1024 * 8); height = (total + width - 1) / width; if (height > ATIMach64MaxY + 1) height = ATIMach64MaxY + 1; pATIHW->sc_bottom = height - 1; } #endif /* USE_XAA */ #ifdef USE_EXA if (pATI->useEXA) { pATIHW->sc_right = ATIMach64MaxX; pATIHW->sc_bottom = ATIMach64MaxY; } #endif /* USE_EXA */ pATI->sc_left_right = SetWord(pATI->NewHW.sc_right, 1) | SetWord(pATI->NewHW.sc_left, 0); pATI->sc_top_bottom = SetWord(pATI->NewHW.sc_bottom, 1) | SetWord(pATI->NewHW.sc_top, 0); /* Initialise data path */ pATIHW->dp_frgd_clr = (CARD32)(-1); pATIHW->dp_write_mask = (CARD32)(-1); switch (pATI->depth) { case 8: pATIHW->dp_chain_mask = DP_CHAIN_8BPP; pATIHW->dp_pix_width = SetBits(PIX_WIDTH_8BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_8BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 15: pATIHW->dp_chain_mask = DP_CHAIN_15BPP_1555; pATIHW->dp_pix_width = SetBits(PIX_WIDTH_15BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_15BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 16: pATIHW->dp_chain_mask = DP_CHAIN_16BPP_565; pATIHW->dp_pix_width = SetBits(PIX_WIDTH_16BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_16BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 24: if (pATI->bitsPerPixel == 24) { pATIHW->dp_chain_mask = DP_CHAIN_24BPP_888; pATIHW->dp_pix_width = SetBits(PIX_WIDTH_8BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_8BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); } else { pATIHW->dp_chain_mask = DP_CHAIN_32BPP_8888; pATIHW->dp_pix_width = SetBits(PIX_WIDTH_32BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_32BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); } break; default: break; } #if X_BYTE_ORDER == X_LITTLE_ENDIAN pATIHW->dp_pix_width |= DP_BYTE_PIX_ORDER; #endif /* X_BYTE_ORDER */ pATIHW->dp_mix = SetBits(MIX_SRC, DP_FRGD_MIX) | SetBits(MIX_DST, DP_BKGD_MIX); pATIHW->dp_src = DP_MONO_SRC_ALLONES | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC); /* Initialise colour compare */ pATIHW->clr_cmp_msk = (1 << pATI->depth) - 1; if (pATI->Block1Base) { pATIHW->overlay_y_x_start = SetBits(0, OVERLAY_Y_START) | SetBits(0, OVERLAY_X_START) | OVERLAY_LOCK_START; pATIHW->overlay_y_x_end = SetBits(0, OVERLAY_Y_END) | SetBits(0, OVERLAY_X_END) | OVERLAY_LOCK_END; pATIHW->overlay_graphics_key_clr = (3 << ((2 * pATI->depth) / 3)) | (2 << ((1 * pATI->depth) / 3)) | (1 << ((0 * pATI->depth) / 3)); pATIHW->overlay_graphics_key_msk = (1 << pATI->depth) - 1; pATIHW->overlay_key_cntl = SetBits(OVERLAY_MIX_FALSE, OVERLAY_VIDEO_FN) | SetBits(OVERLAY_MIX_EQUAL, OVERLAY_GRAPHICS_FN); pATIHW->overlay_scale_cntl = SCALE_EN; pATIHW->video_format = VIDEO_IN_VYUY422 | SCALER_IN_VYUY422; if (pATI->Chip >= ATI_CHIP_264GTPRO) { /* These values are documented voodoo */ pATIHW->scaler_h_coeff0 = SetByte(0x20U, 1); pATIHW->scaler_h_coeff1 = SetByte(0x0DU, 0) | SetByte(0x20U, 1) | SetByte(0x06U, 2) | SetByte(0x0DU, 3); pATIHW->scaler_h_coeff2 = SetByte(0x0DU, 0) | SetByte(0x1CU, 1) | SetByte(0x0AU, 2) | SetByte(0x0DU, 3); pATIHW->scaler_h_coeff3 = SetByte(0x0CU, 0) | SetByte(0x1AU, 1) | SetByte(0x0EU, 2) | SetByte(0x0CU, 3); pATIHW->scaler_h_coeff4 = SetByte(0x0CU, 0) | SetByte(0x14U, 1) | SetByte(0x14U, 2) | SetByte(0x0CU, 3); } } /* Restore aperture enablement */ outr(BUS_CNTL, bus_cntl); outr(CONFIG_CNTL, config_cntl); } } /* * ATIMach64Save -- * * This function is called to save the Mach64 portion of the current video * state. */ void ATIMach64Save ( ATIPtr pATI, ATIHWPtr pATIHW ) { pATIHW->crtc_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->crtc_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->crtc_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->crtc_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); pATIHW->crtc_off_pitch = inr(CRTC_OFF_PITCH); pATIHW->crtc_gen_cntl = inr(CRTC_GEN_CNTL); pATIHW->ovr_clr = inr(OVR_CLR); pATIHW->ovr_wid_left_right = inr(OVR_WID_LEFT_RIGHT); pATIHW->ovr_wid_top_bottom = inr(OVR_WID_TOP_BOTTOM); pATIHW->cur_clr0 = inr(CUR_CLR0); pATIHW->cur_clr1 = inr(CUR_CLR1); pATIHW->cur_offset = inr(CUR_OFFSET); pATIHW->cur_horz_vert_posn = inr(CUR_HORZ_VERT_POSN); pATIHW->cur_horz_vert_off = inr(CUR_HORZ_VERT_OFF); pATIHW->clock_cntl = inr(CLOCK_CNTL); pATIHW->bus_cntl = inr(BUS_CNTL); pATIHW->mem_vga_wp_sel = inr(MEM_VGA_WP_SEL); pATIHW->mem_vga_rp_sel = inr(MEM_VGA_RP_SEL); pATIHW->dac_cntl = inr(DAC_CNTL); pATIHW->config_cntl = inr(CONFIG_CNTL); pATIHW->gen_test_cntl = inr(GEN_TEST_CNTL) & ~GEN_CUR_EN; if (pATI->Chip >= ATI_CHIP_264VTB) { pATIHW->mem_buf_cntl = inr(MEM_BUF_CNTL) | INVALIDATE_RB_CACHE; pATIHW->mem_cntl = inr(MEM_CNTL); pATIHW->mpp_config = inr(MPP_CONFIG); pATIHW->mpp_strobe_seq = inr(MPP_STROBE_SEQ); pATIHW->tvo_cntl = inr(TVO_CNTL); } /* Save draw engine state */ if (pATI->Block0Base && (pATIHW == &pATI->OldHW)) { /* Ensure apertures are enabled */ outr(BUS_CNTL, pATI->NewHW.bus_cntl); outr(CONFIG_CNTL, pATI->NewHW.config_cntl); ATIMach64WaitForIdle(pATI); /* Save FIFO size */ if (pATI->Chip >= ATI_CHIP_264VT4) pATIHW->gui_cntl = inm(GUI_CNTL); /* Save destination registers */ pATIHW->dst_off_pitch = inm(DST_OFF_PITCH); pATIHW->dst_x = inm(DST_X); pATIHW->dst_y = inm(DST_Y); pATIHW->dst_height = inm(DST_HEIGHT); pATIHW->dst_bres_err = inm(DST_BRES_ERR); pATIHW->dst_bres_inc = inm(DST_BRES_INC); pATIHW->dst_bres_dec = inm(DST_BRES_DEC); pATIHW->dst_cntl = inm(DST_CNTL); /* Save source registers */ pATIHW->src_off_pitch = inm(SRC_OFF_PITCH); pATIHW->src_x = inm(SRC_X); pATIHW->src_y = inm(SRC_Y); pATIHW->src_width1 = inm(SRC_WIDTH1); pATIHW->src_height1 = inm(SRC_HEIGHT1); pATIHW->src_x_start = inm(SRC_X_START); pATIHW->src_y_start = inm(SRC_Y_START); pATIHW->src_width2 = inm(SRC_WIDTH2); pATIHW->src_height2 = inm(SRC_HEIGHT2); pATIHW->src_cntl = inm(SRC_CNTL); if (pATI->Chip >= ATI_CHIP_264GTPRO) { CARD32 offset = TEX_LEVEL(inm(TEX_SIZE_PITCH)); /* Save 3D control & texture registers */ pATIHW->tex_offset = inm(TEX_0_OFF + offset); pATIHW->scale_3d_cntl = inm(SCALE_3D_CNTL); } /* Save host data register */ pATIHW->host_cntl = inm(HOST_CNTL); /* Save pattern registers */ pATIHW->pat_reg0 = inm(PAT_REG0); pATIHW->pat_reg1 = inm(PAT_REG1); pATIHW->pat_cntl = inm(PAT_CNTL); /* Save scissor registers */ pATIHW->sc_left = pATI->sc_left = inm(SC_LEFT); pATIHW->sc_right = pATI->sc_right = inm(SC_RIGHT); pATIHW->sc_top = pATI->sc_top = inm(SC_TOP); pATIHW->sc_bottom = pATI->sc_bottom = inm(SC_BOTTOM); /* Save data path registers */ pATIHW->dp_bkgd_clr = inm(DP_BKGD_CLR); pATIHW->dp_frgd_clr = inm(DP_FRGD_CLR); pATIHW->dp_write_mask = inm(DP_WRITE_MASK); pATIHW->dp_chain_mask = inm(DP_CHAIN_MASK); pATIHW->dp_pix_width = inm(DP_PIX_WIDTH); pATIHW->dp_mix = inm(DP_MIX); pATIHW->dp_src = inm(DP_SRC); /* Save colour compare registers */ pATIHW->clr_cmp_clr = inm(CLR_CMP_CLR); pATIHW->clr_cmp_msk = inm(CLR_CMP_MSK); pATIHW->clr_cmp_cntl = inm(CLR_CMP_CNTL); /* Save context */ pATIHW->context_mask = inm(CONTEXT_MASK); if (pATI->Chip >= ATI_CHIP_264GTPRO) { /* Save texture setup registers */ pATIHW->tex_size_pitch = inm(TEX_SIZE_PITCH); pATIHW->tex_cntl = inm(TEX_CNTL); } if (pATI->Block1Base) { /* Save overlay & scaler registers */ pATIHW->overlay_y_x_start = inm(OVERLAY_Y_X_START); pATIHW->overlay_y_x_end = inm(OVERLAY_Y_X_END); pATIHW->overlay_graphics_key_clr = inm(OVERLAY_GRAPHICS_KEY_CLR); pATIHW->overlay_graphics_key_msk = inm(OVERLAY_GRAPHICS_KEY_MSK); pATIHW->overlay_key_cntl = inm(OVERLAY_KEY_CNTL); pATIHW->overlay_scale_inc = inm(OVERLAY_SCALE_INC); pATIHW->overlay_scale_cntl = inm(OVERLAY_SCALE_CNTL); pATIHW->scaler_height_width = inm(SCALER_HEIGHT_WIDTH); pATIHW->scaler_test = inm(SCALER_TEST); pATIHW->video_format = inm(VIDEO_FORMAT); if (pATI->Chip < ATI_CHIP_264VTB) { pATIHW->buf0_offset = inm(BUF0_OFFSET); pATIHW->buf0_pitch = inm(BUF0_PITCH); pATIHW->buf1_offset = inm(BUF1_OFFSET); pATIHW->buf1_pitch = inm(BUF1_PITCH); } else { pATIHW->scaler_buf0_offset = inm(SCALER_BUF0_OFFSET); pATIHW->scaler_buf1_offset = inm(SCALER_BUF1_OFFSET); pATIHW->scaler_buf_pitch = inm(SCALER_BUF_PITCH); pATIHW->overlay_exclusive_horz = inm(OVERLAY_EXCLUSIVE_HORZ); pATIHW->overlay_exclusive_vert = inm(OVERLAY_EXCLUSIVE_VERT); if (pATI->Chip >= ATI_CHIP_264GTPRO) { pATIHW->scaler_colour_cntl = inm(SCALER_COLOUR_CNTL); pATIHW->scaler_h_coeff0 = inm(SCALER_H_COEFF0); pATIHW->scaler_h_coeff1 = inm(SCALER_H_COEFF1); pATIHW->scaler_h_coeff2 = inm(SCALER_H_COEFF2); pATIHW->scaler_h_coeff3 = inm(SCALER_H_COEFF3); pATIHW->scaler_h_coeff4 = inm(SCALER_H_COEFF4); pATIHW->scaler_buf0_offset_u = inm(SCALER_BUF0_OFFSET_U); pATIHW->scaler_buf0_offset_v = inm(SCALER_BUF0_OFFSET_V); pATIHW->scaler_buf1_offset_u = inm(SCALER_BUF1_OFFSET_U); pATIHW->scaler_buf1_offset_v = inm(SCALER_BUF1_OFFSET_V); } } } /* Restore aperture enablement */ outr(BUS_CNTL, pATIHW->bus_cntl); outr(CONFIG_CNTL, pATIHW->config_cntl); } } /* * ATIMach64ModeAdjust -- * * This function is called to adjust horizontal and vertical timings. */ static void ATIMach64ModeAdjust ( ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { int VDisplay; /* Clobber mode timings */ if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { if (!pMode->CrtcHAdjusted && !pMode->CrtcVAdjusted && (!pATI->OptionLCDSync || (pMode->type & M_T_BUILTIN))) { int VScan; pMode->Clock = pATI->LCDClock; pMode->Flags &= ~(V_DBLSCAN | V_INTERLACE | V_CLKDIV2); pMode->VScan = 0; /* * Use doublescanning or multiscanning to get around vertical blending * limitations. */ VScan = pATI->LCDVertical / pMode->VDisplay; if (VScan > 1) { VScan = 2; pMode->Flags |= V_DBLSCAN; } pMode->HSyncStart = pMode->HDisplay + pATI->LCDHSyncStart; pMode->HSyncEnd = pMode->HSyncStart + pATI->LCDHSyncWidth; pMode->HTotal = pMode->HDisplay + pATI->LCDHBlankWidth; pMode->VSyncStart = pMode->VDisplay + ATIDivide(pATI->LCDVSyncStart, VScan, 0, 0); pMode->VSyncEnd = pMode->VSyncStart + ATIDivide(pATI->LCDVSyncWidth, VScan, 0, 1); pMode->VTotal = pMode->VDisplay + ATIDivide(pATI->LCDVBlankWidth, VScan, 0, 0); } } /* If not already done adjust horizontal timings */ if (!pMode->CrtcHAdjusted) { pMode->CrtcHAdjusted = TRUE; /* XXX Deal with Blank Start/End and overscan later */ pMode->CrtcHDisplay = (pMode->HDisplay >> 3) - 1; pMode->CrtcHSyncStart = (pMode->HSyncStart >> 3) - 1; pMode->CrtcHSyncEnd = (pMode->HSyncEnd >> 3) - 1; pMode->CrtcHTotal = (pMode->HTotal >> 3) - 1; /* Make adjustments if sync pulse width is out-of-bounds */ if ((pMode->CrtcHSyncEnd - pMode->CrtcHSyncStart) > (int)MaxBits(CRTC_H_SYNC_WID)) { pMode->CrtcHSyncEnd = pMode->CrtcHSyncStart + MaxBits(CRTC_H_SYNC_WID); } else if (pMode->CrtcHSyncStart == pMode->CrtcHSyncEnd) { if (pMode->CrtcHDisplay < pMode->CrtcHSyncStart) pMode->CrtcHSyncStart--; else if (pMode->CrtcHSyncEnd < pMode->CrtcHTotal) pMode->CrtcHSyncEnd++; } } /* * Always re-do vertical adjustments. */ pMode->CrtcVDisplay = pMode->VDisplay; pMode->CrtcVSyncStart = pMode->VSyncStart; pMode->CrtcVSyncEnd = pMode->VSyncEnd; pMode->CrtcVTotal = pMode->VTotal; if ((pATI->Chip >= ATI_CHIP_264CT) && ((pMode->Flags & V_DBLSCAN) || (pMode->VScan > 1))) { pMode->CrtcVDisplay <<= 1; pMode->CrtcVSyncStart <<= 1; pMode->CrtcVSyncEnd <<= 1; pMode->CrtcVTotal <<= 1; } /* * Might as well default to the same as VGA with respect to sync * polarities. */ if ((!(pMode->Flags & (V_PHSYNC | V_NHSYNC))) || (!(pMode->Flags & (V_PVSYNC | V_NVSYNC)))) { pMode->Flags &= ~(V_PHSYNC | V_NHSYNC | V_PVSYNC | V_NVSYNC); if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) VDisplay = pATI->LCDVertical; else VDisplay = pMode->CrtcVDisplay; #ifdef TV_OUT if (pATI->tvActive) VDisplay = pMode->CrtcVDisplay; #endif if (VDisplay < 400) pMode->Flags |= V_PHSYNC | V_NVSYNC; else if (VDisplay < 480) pMode->Flags |= V_NHSYNC | V_PVSYNC; else if (VDisplay < 768) pMode->Flags |= V_NHSYNC | V_NVSYNC; else pMode->Flags |= V_PHSYNC | V_PVSYNC; } pMode->CrtcVDisplay--; pMode->CrtcVSyncStart--; pMode->CrtcVSyncEnd--; pMode->CrtcVTotal--; /* Make sure sync pulse is not too wide */ if ((pMode->CrtcVSyncEnd - pMode->CrtcVSyncStart) > (int)MaxBits(CRTC_V_SYNC_WID)) pMode->CrtcVSyncEnd = pMode->CrtcVSyncStart + MaxBits(CRTC_V_SYNC_WID); pMode->CrtcVAdjusted = TRUE; /* Redundant */ } /* * ATIMach64Calculate -- * * This function is called to fill in the Mach64 portion of an ATIHWRec. */ void ATIMach64Calculate ( ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { ATIMach64ModeAdjust(pATI, pATIHW, pMode); /* Build register contents */ pATIHW->crtc_h_total_disp = SetBits(pMode->CrtcHTotal, CRTC_H_TOTAL) | SetBits(pMode->CrtcHDisplay, CRTC_H_DISP); pATIHW->crtc_h_sync_strt_wid = SetBits(pMode->CrtcHSyncStart, CRTC_H_SYNC_STRT) | SetBits(pMode->CrtcHSkew, CRTC_H_SYNC_DLY) | /* ? */ SetBits(GetBits(pMode->CrtcHSyncStart, 0x0100U), CRTC_H_SYNC_STRT_HI) | SetBits(pMode->CrtcHSyncEnd - pMode->CrtcHSyncStart, CRTC_H_SYNC_WID); if (pMode->Flags & V_NHSYNC) pATIHW->crtc_h_sync_strt_wid |= CRTC_H_SYNC_POL; pATIHW->crtc_v_total_disp = SetBits(pMode->CrtcVTotal, CRTC_V_TOTAL) | SetBits(pMode->CrtcVDisplay, CRTC_V_DISP); pATIHW->crtc_v_sync_strt_wid = SetBits(pMode->CrtcVSyncStart, CRTC_V_SYNC_STRT) | SetBits(pMode->CrtcVSyncEnd - pMode->CrtcVSyncStart, CRTC_V_SYNC_WID); if (pMode->Flags & V_NVSYNC) pATIHW->crtc_v_sync_strt_wid |= CRTC_V_SYNC_POL; pATIHW->crtc_off_pitch = SetBits(pATI->displayWidth >> 3, CRTC_PITCH); pATIHW->crtc_gen_cntl = inr(CRTC_GEN_CNTL) & ~(CRTC_DBL_SCAN_EN | CRTC_INTERLACE_EN | CRTC_HSYNC_DIS | CRTC_VSYNC_DIS | CRTC_CSYNC_EN | CRTC_PIX_BY_2_EN | CRTC_DISPLAY_DIS | CRTC_VGA_XOVERSCAN | CRTC_PIX_WIDTH | CRTC_BYTE_PIX_ORDER | CRTC_VGA_128KAP_PAGING | CRTC_VFC_SYNC_TRISTATE | CRTC_LOCK_REGS | /* Already off, but ... */ CRTC_SYNC_TRISTATE | CRTC_DISP_REQ_EN | CRTC_VGA_TEXT_132 | CRTC_CUR_B_TEST); pATIHW->crtc_gen_cntl |= CRTC_EXT_DISP_EN | CRTC_EN | CRTC_VGA_LINEAR | CRTC_CNT_EN; switch (pATI->depth) { case 8: pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_8BPP, CRTC_PIX_WIDTH); break; case 15: pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_15BPP, CRTC_PIX_WIDTH); break; case 16: pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_16BPP, CRTC_PIX_WIDTH); break; case 24: if (pATI->bitsPerPixel == 24) { pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_24BPP, CRTC_PIX_WIDTH); break; } if (pATI->bitsPerPixel != 32) break; /* Fall through */ case 32: pATIHW->crtc_gen_cntl |= SetBits(PIX_WIDTH_32BPP, CRTC_PIX_WIDTH); break; default: break; } if ((pMode->Flags & V_DBLSCAN) || (pMode->VScan > 1)) pATIHW->crtc_gen_cntl |= CRTC_DBL_SCAN_EN; if (pMode->Flags & V_INTERLACE) pATIHW->crtc_gen_cntl |= CRTC_INTERLACE_EN; if (pATI->OptionCSync || (pMode->Flags & (V_CSYNC | V_PCSYNC))) pATIHW->crtc_gen_cntl |= CRTC_CSYNC_EN; /* For now, set display FIFO low water mark as high as possible */ if (pATI->Chip < ATI_CHIP_264VTB) pATIHW->crtc_gen_cntl |= CRTC_FIFO_LWM; } /* * ATIMach64Set -- * * This function is called to load a Mach64's accelerator CRTC and draw engine. */ void ATIMach64Set ( ATIPtr pATI, ATIHWPtr pATIHW ) { #ifndef AVOID_CPIO if (pATIHW->crtc == ATI_CRTC_MACH64) #endif /* AVOID_CPIO */ { if ((pATIHW->FeedbackDivider > 0)) ATIClockSet(pATI, pATIHW); /* Programme clock */ if (pATI->DAC == ATI_DAC_IBMRGB514) ATIRGB514Set(pATI, pATIHW); /* Load Mach64 CRTC registers */ outr(CRTC_H_TOTAL_DISP, pATIHW->crtc_h_total_disp); outr(CRTC_H_SYNC_STRT_WID, pATIHW->crtc_h_sync_strt_wid); outr(CRTC_V_TOTAL_DISP, pATIHW->crtc_v_total_disp); outr(CRTC_V_SYNC_STRT_WID, pATIHW->crtc_v_sync_strt_wid); outr(CRTC_OFF_PITCH, pATIHW->crtc_off_pitch); /* Load overscan registers */ outr(OVR_CLR, pATIHW->ovr_clr); outr(OVR_WID_LEFT_RIGHT, pATIHW->ovr_wid_left_right); outr(OVR_WID_TOP_BOTTOM, pATIHW->ovr_wid_top_bottom); /* Load hardware cursor registers */ outr(CUR_CLR0, pATIHW->cur_clr0); outr(CUR_CLR1, pATIHW->cur_clr1); outr(CUR_OFFSET, pATIHW->cur_offset); outr(CUR_HORZ_VERT_POSN, pATIHW->cur_horz_vert_posn); outr(CUR_HORZ_VERT_OFF, pATIHW->cur_horz_vert_off); /* Set pixel clock */ outr(CLOCK_CNTL, pATIHW->clock_cntl | CLOCK_STROBE); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl | GEN_GUI_EN); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl | GEN_GUI_EN); /* Finalise CRTC setup and turn on the screen */ outr(CRTC_GEN_CNTL, pATIHW->crtc_gen_cntl); } /* Load draw engine */ if (pATI->Block0Base) { /* Clobber MMIO cache */ (void)memset(pATI->MMIOCached, 0, SizeOf(pATI->MMIOCached)); /* Ensure apertures are enabled */ outr(BUS_CNTL, pATI->NewHW.bus_cntl); outr(CONFIG_CNTL, pATI->NewHW.config_cntl); pATI->EngineIsBusy = TRUE; /* Force engine poll */ ATIMach64WaitForIdle(pATI); /* Load FIFO size */ if (pATI->Chip >= ATI_CHIP_264VT4) { outm(GUI_CNTL, pATIHW->gui_cntl); pATI->nAvailableFIFOEntries = 0; ATIMach64PollEngineStatus(pATI); } /* Set FIFO depth */ pATI->nFIFOEntries = pATI->nAvailableFIFOEntries; /* Load destination registers */ ATIMach64WaitForFIFO(pATI, 7); outf(DST_OFF_PITCH, pATIHW->dst_off_pitch); outf(DST_Y_X, SetWord(pATIHW->dst_x, 1) | SetWord(pATIHW->dst_y, 0)); outf(DST_HEIGHT, pATIHW->dst_height); outf(DST_BRES_ERR, pATIHW->dst_bres_err); outf(DST_BRES_INC, pATIHW->dst_bres_inc); outf(DST_BRES_DEC, pATIHW->dst_bres_dec); outf(DST_CNTL, pATIHW->dst_cntl); if (pATI->Chip >= ATI_CHIP_264GTPRO) { /* Load ROP unit registers */ ATIMach64WaitForFIFO(pATI, 2); outf(Z_CNTL, 0); outf(ALPHA_TST_CNTL, 0); } /* Load source registers */ ATIMach64WaitForFIFO(pATI, 6); outf(SRC_OFF_PITCH, pATIHW->src_off_pitch); outf(SRC_Y_X, SetWord(pATIHW->src_x, 1) | SetWord(pATIHW->src_y, 0)); outf(SRC_HEIGHT1_WIDTH1, SetWord(pATIHW->src_width1, 1) | SetWord(pATIHW->src_height1, 0)); outf(SRC_Y_X_START, SetWord(pATIHW->src_x_start, 1) | SetWord(pATIHW->src_y_start, 0)); outf(SRC_HEIGHT2_WIDTH2, SetWord(pATIHW->src_width2, 1) | SetWord(pATIHW->src_height2, 0)); outf(SRC_CNTL, pATIHW->src_cntl); if (pATI->Chip >= ATI_CHIP_264GTPRO) { CARD32 offset = TEX_LEVEL(pATIHW->tex_size_pitch); /* Load 3D control & texture registers */ ATIMach64WaitForFIFO(pATI, 2); outf(TEX_0_OFF + offset, pATIHW->tex_offset); outf(SCALE_3D_CNTL, pATIHW->scale_3d_cntl); } /* Load host data register */ ATIMach64WaitForFIFO(pATI, 1); outf(HOST_CNTL, pATIHW->host_cntl); /* Set host transfer window address and size clamp */ pATI->pHOST_DATA = ATIHostDataAddr(HOST_DATA_0); pATI->nHostFIFOEntries = pATI->nFIFOEntries >> 1; if (pATI->nHostFIFOEntries > 16) pATI->nHostFIFOEntries = 16; /* Load pattern registers */ ATIMach64WaitForFIFO(pATI, 3); outf(PAT_REG0, pATIHW->pat_reg0); outf(PAT_REG1, pATIHW->pat_reg1); outf(PAT_CNTL, pATIHW->pat_cntl); /* Load scissor registers */ ATIMach64WaitForFIFO(pATI, 2); outf(SC_LEFT_RIGHT, SetWord(pATIHW->sc_right, 1) | SetWord(pATIHW->sc_left, 0)); outf(SC_TOP_BOTTOM, SetWord(pATIHW->sc_bottom, 1) | SetWord(pATIHW->sc_top, 0)); pATI->sc_left = pATIHW->sc_left; pATI->sc_right = pATIHW->sc_right; pATI->sc_top = pATIHW->sc_top; pATI->sc_bottom = pATIHW->sc_bottom; /* Load data path registers */ ATIMach64WaitForFIFO(pATI, 7); outf(DP_BKGD_CLR, pATIHW->dp_bkgd_clr); outf(DP_FRGD_CLR, pATIHW->dp_frgd_clr); outf(DP_WRITE_MASK, pATIHW->dp_write_mask); outf(DP_CHAIN_MASK, pATIHW->dp_chain_mask); outf(DP_PIX_WIDTH, pATIHW->dp_pix_width); outf(DP_MIX, pATIHW->dp_mix); outf(DP_SRC, pATIHW->dp_src); /* Load colour compare registers */ ATIMach64WaitForFIFO(pATI, 3); outf(CLR_CMP_CLR, pATIHW->clr_cmp_clr); outf(CLR_CMP_MSK, pATIHW->clr_cmp_msk); outf(CLR_CMP_CNTL, pATIHW->clr_cmp_cntl); /* Load context mask */ ATIMach64WaitForFIFO(pATI, 1); outf(CONTEXT_MASK, pATIHW->context_mask); if (pATI->Chip >= ATI_CHIP_264GTPRO) { /* Load texture setup registers */ ATIMach64WaitForFIFO(pATI, 2); outf(TEX_SIZE_PITCH, pATIHW->tex_size_pitch); outf(TEX_CNTL, pATIHW->tex_cntl); } if (pATI->Block1Base) { /* Load overlay & scaler registers */ ATIMach64WaitForFIFO(pATI, 10); outf(OVERLAY_Y_X_START, pATIHW->overlay_y_x_start); outf(OVERLAY_Y_X_END, pATIHW->overlay_y_x_end); outf(OVERLAY_GRAPHICS_KEY_CLR, pATIHW->overlay_graphics_key_clr); outf(OVERLAY_GRAPHICS_KEY_MSK, pATIHW->overlay_graphics_key_msk); outf(OVERLAY_KEY_CNTL, pATIHW->overlay_key_cntl); outf(OVERLAY_SCALE_INC, pATIHW->overlay_scale_inc); outf(OVERLAY_SCALE_CNTL, pATIHW->overlay_scale_cntl); outf(SCALER_HEIGHT_WIDTH, pATIHW->scaler_height_width); outf(SCALER_TEST, pATIHW->scaler_test); outf(VIDEO_FORMAT, pATIHW->video_format); if (pATI->Chip < ATI_CHIP_264VTB) { ATIMach64WaitForFIFO(pATI, 4); outf(BUF0_OFFSET, pATIHW->buf0_offset); outf(BUF0_PITCH, pATIHW->buf0_pitch); outf(BUF1_OFFSET, pATIHW->buf1_offset); outf(BUF1_PITCH, pATIHW->buf1_pitch); } else { ATIMach64WaitForFIFO(pATI, 5); outf(SCALER_BUF0_OFFSET, pATIHW->scaler_buf0_offset); outf(SCALER_BUF1_OFFSET, pATIHW->scaler_buf1_offset); outf(SCALER_BUF_PITCH, pATIHW->scaler_buf_pitch); outf(OVERLAY_EXCLUSIVE_HORZ, pATIHW->overlay_exclusive_horz); outf(OVERLAY_EXCLUSIVE_VERT, pATIHW->overlay_exclusive_vert); if (pATI->Chip >= ATI_CHIP_264GTPRO) { ATIMach64WaitForFIFO(pATI, 10); outf(SCALER_COLOUR_CNTL, pATIHW->scaler_colour_cntl); outf(SCALER_H_COEFF0, pATIHW->scaler_h_coeff0); outf(SCALER_H_COEFF1, pATIHW->scaler_h_coeff1); outf(SCALER_H_COEFF2, pATIHW->scaler_h_coeff2); outf(SCALER_H_COEFF3, pATIHW->scaler_h_coeff3); outf(SCALER_H_COEFF4, pATIHW->scaler_h_coeff4); outf(SCALER_BUF0_OFFSET_U, pATIHW->scaler_buf0_offset_u); outf(SCALER_BUF0_OFFSET_V, pATIHW->scaler_buf0_offset_v); outf(SCALER_BUF1_OFFSET_U, pATIHW->scaler_buf1_offset_u); outf(SCALER_BUF1_OFFSET_V, pATIHW->scaler_buf1_offset_v); } } } ATIMach64WaitForIdle(pATI); if (pATI->OptionMMIOCache) { /* * Enable write caching for selected MMIO registers. This can only * be done for those registers whose value does not change without * driver intervention. */ CacheRegister(SRC_CNTL); if (pATI->Chip >= ATI_CHIP_264GTPRO) { CacheRegister(SCALE_3D_CNTL); } CacheRegister(HOST_CNTL); CacheRegister(PAT_REG0); CacheRegister(PAT_REG1); CacheRegister(PAT_CNTL); CacheRegister(SC_LEFT_RIGHT); CacheRegister(SC_TOP_BOTTOM); CacheRegister(DP_BKGD_CLR); CacheRegister(DP_FRGD_CLR); CacheRegister(DP_PIX_WIDTH); CacheRegister(DP_MIX); CacheRegister(CLR_CMP_CLR); CacheRegister(CLR_CMP_MSK); CacheRegister(CLR_CMP_CNTL); if (pATI->Chip >= ATI_CHIP_264GTPRO) { CacheRegister(TEX_SIZE_PITCH); } if (pATI->Block1Base) { CacheRegister(OVERLAY_Y_X_START); CacheRegister(OVERLAY_Y_X_END); CacheRegister(OVERLAY_GRAPHICS_KEY_CLR); CacheRegister(OVERLAY_GRAPHICS_KEY_MSK); CacheRegister(OVERLAY_KEY_CNTL); CacheRegister(OVERLAY_SCALE_INC); CacheRegister(OVERLAY_SCALE_CNTL); CacheRegister(SCALER_HEIGHT_WIDTH); CacheRegister(SCALER_TEST); CacheRegister(VIDEO_FORMAT); if (pATI->Chip < ATI_CHIP_264VTB) { CacheRegister(BUF0_OFFSET); CacheRegister(BUF0_PITCH); CacheRegister(BUF1_OFFSET); CacheRegister(BUF1_PITCH); } else { CacheRegister(SCALER_BUF0_OFFSET); CacheRegister(SCALER_BUF1_OFFSET); CacheRegister(SCALER_BUF_PITCH); CacheRegister(OVERLAY_EXCLUSIVE_HORZ); CacheRegister(OVERLAY_EXCLUSIVE_VERT); if (pATI->Chip >= ATI_CHIP_264GTPRO) { CacheRegister(SCALER_COLOUR_CNTL); CacheRegister(SCALER_H_COEFF0); CacheRegister(SCALER_H_COEFF1); CacheRegister(SCALER_H_COEFF2); CacheRegister(SCALER_H_COEFF3); CacheRegister(SCALER_H_COEFF4); CacheRegister(SCALER_BUF0_OFFSET_U); CacheRegister(SCALER_BUF0_OFFSET_V); CacheRegister(SCALER_BUF1_OFFSET_U); CacheRegister(SCALER_BUF1_OFFSET_V); } } } } } #ifndef AVOID_CPIO if (pATIHW->crtc == ATI_CRTC_MACH64) #endif /* AVOID_CPIO */ { /* Aperture setup */ outr(MEM_VGA_WP_SEL, pATIHW->mem_vga_wp_sel); outr(MEM_VGA_RP_SEL, pATIHW->mem_vga_rp_sel); outr(DAC_CNTL, pATIHW->dac_cntl); outr(CONFIG_CNTL, pATIHW->config_cntl); outr(BUS_CNTL, pATIHW->bus_cntl); if (pATI->Chip >= ATI_CHIP_264VTB) { outr(MEM_BUF_CNTL, pATIHW->mem_buf_cntl); outr(MEM_CNTL, pATIHW->mem_cntl); outr(MPP_CONFIG, pATIHW->mpp_config); outr(MPP_STROBE_SEQ, pATIHW->mpp_strobe_seq); outr(TVO_CNTL, pATIHW->tvo_cntl); } } } /* * ATIMach64SaveScreen -- * * This function blanks or unblanks a Mach64 screen. */ void ATIMach64SaveScreen ( ATIPtr pATI, int Mode ) { CARD32 crtc_gen_cntl = inr(CRTC_GEN_CNTL); switch (Mode) { case SCREEN_SAVER_OFF: case SCREEN_SAVER_FORCER: outr(CRTC_GEN_CNTL, crtc_gen_cntl & ~CRTC_DISPLAY_DIS); break; case SCREEN_SAVER_ON: case SCREEN_SAVER_CYCLE: outr(CRTC_GEN_CNTL, crtc_gen_cntl | CRTC_DISPLAY_DIS); break; default: break; } } /* * ATIMach64SetDPMSMode -- * * This function sets a Mach64's VESA Display Power Management Signaling mode. */ void ATIMach64SetDPMSMode ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, int DPMSMode ) { CARD32 crtc_gen_cntl = inr(CRTC_GEN_CNTL) & ~(CRTC_HSYNC_DIS | CRTC_VSYNC_DIS); switch (DPMSMode) { case DPMSModeOn: /* HSync on, VSync on */ break; case DPMSModeStandby: /* HSync off, VSync on */ crtc_gen_cntl |= CRTC_HSYNC_DIS; break; case DPMSModeSuspend: /* HSync on, VSync off */ crtc_gen_cntl |= CRTC_VSYNC_DIS; break; case DPMSModeOff: /* HSync off, VSync off */ crtc_gen_cntl |= CRTC_HSYNC_DIS | CRTC_VSYNC_DIS; break; default: /* Muffle compiler */ return; } #ifdef XF86DRI_DEVEL /* XAA Sync requires the DRM lock if DRI enabled */ ATIDRILock(pScreenInfo); #endif /* XF86DRI_DEVEL */ ATIMach64Sync(pScreenInfo); outr(CRTC_GEN_CNTL, crtc_gen_cntl); if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { CARD32 lcd_index = 0; /* * ATI's BIOS simply turns the panel on and off, so do the same by * default, but keep the previous behaviour around for reference. */ if (pATI->OptionDevel) { CARD32 power_management; if (pATI->Chip == ATI_CHIP_264LT) { power_management = inr(POWER_MANAGEMENT); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { lcd_index = inr(LCD_INDEX); power_management = ATIMach64GetLCDReg(LCD_POWER_MANAGEMENT); } power_management &= ~(STANDBY_NOW | SUSPEND_NOW); switch (DPMSMode) { case DPMSModeOn: break; case DPMSModeStandby: power_management |= STANDBY_NOW; break; case DPMSModeSuspend: power_management |= SUSPEND_NOW; break; case DPMSModeOff: power_management |= STANDBY_NOW | SUSPEND_NOW; /* ? */ break; default: /* Muffle compiler */ return; } if (pATI->Chip == ATI_CHIP_264LT) { outr(POWER_MANAGEMENT, power_management); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_POWER_MANAGEMENT, power_management); outr(LCD_INDEX, lcd_index); } } else { CARD32 lcd_gen_ctrl; if (pATI->Chip == ATI_CHIP_264LT) { lcd_gen_ctrl = inr(LCD_GEN_CTRL); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { lcd_index = inr(LCD_INDEX); lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); } if (DPMSMode == DPMSModeOn) lcd_gen_ctrl |= LCD_ON; else lcd_gen_ctrl &= ~LCD_ON; if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, lcd_gen_ctrl); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); outr(LCD_INDEX, lcd_index); } } } #ifdef XF86DRI_DEVEL ATIDRIUnlock(pScreenInfo); #endif /* XF86DRI_DEVEL */ } xf86-video-mach64-6.9.5/src/atimach64accel.c0000644000175000017500000007307112270010352015136 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /* * Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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 (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * DRI support by: * Manuel Teira * Leif Delgass */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atimach64accel.h" #include "atimach64io.h" #include "atipriv.h" #include "atiregs.h" #ifdef XF86DRI_DEVEL #include "mach64_common.h" #endif #include "miline.h" /* Used to test MMIO cache integrity in ATIMach64Sync() */ #define TestRegisterCaching(_Register) \ if (RegisterIsCached(_Register) && \ (CacheSlot(_Register) != inm(_Register))) \ { \ UncacheRegister(_Register); \ xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, \ #_Register " MMIO write cache disabled!\n"); \ } /* * X-to-Mach64 mix translation table. */ CARD8 ATIMach64ALU[16] = { MIX_0, /* GXclear */ MIX_AND, /* GXand */ MIX_SRC_AND_NOT_DST, /* GXandReverse */ MIX_SRC, /* GXcopy */ MIX_NOT_SRC_AND_DST, /* GXandInverted */ MIX_DST, /* GXnoop */ MIX_XOR, /* GXxor */ MIX_OR, /* GXor */ MIX_NOR, /* GXnor */ MIX_XNOR, /* GXequiv */ MIX_NOT_DST, /* GXinvert */ MIX_SRC_OR_NOT_DST, /* GXorReverse */ MIX_NOT_SRC, /* GXcopyInverted */ MIX_NOT_SRC_OR_DST, /* GXorInverted */ MIX_NAND, /* GXnand */ MIX_1 /* GXset */ }; /* * ATIMach64ValidateClip -- * * This function ensures the current scissor settings do not interfere with * the current draw request. */ void ATIMach64ValidateClip ( ATIPtr pATI, int sc_left, int sc_right, int sc_top, int sc_bottom ) { if ((sc_left < (int)pATI->sc_left) || (sc_right > (int)pATI->sc_right)) { outf(SC_LEFT_RIGHT, pATI->sc_left_right); pATI->sc_left = pATI->NewHW.sc_left; pATI->sc_right = pATI->NewHW.sc_right; } if ((sc_top < (int)pATI->sc_top) || (sc_bottom > (int)pATI->sc_bottom)) { outf(SC_TOP_BOTTOM, pATI->sc_top_bottom); pATI->sc_top = pATI->NewHW.sc_top; pATI->sc_bottom = pATI->NewHW.sc_bottom; } } static __inline__ void TestRegisterCachingDP(ScrnInfoPtr pScreenInfo); static __inline__ void TestRegisterCachingXV(ScrnInfoPtr pScreenInfo); /* * ATIMach64Sync -- * * This is called to wait for the draw engine to become idle. */ void ATIMach64Sync ( ScrnInfoPtr pScreenInfo ) { ATIPtr pATI = ATIPTR(pScreenInfo); #ifdef XF86DRI_DEVEL if ( pATI->directRenderingEnabled && pATI->NeedDRISync ) { ATIHWPtr pATIHW = &pATI->NewHW; CARD32 offset; if (pATI->OptionMMIOCache) { /* "Invalidate" the MMIO cache so the cache slots get updated */ UncacheRegister(SRC_CNTL); UncacheRegister(SCALE_3D_CNTL); UncacheRegister(HOST_CNTL); UncacheRegister(PAT_CNTL); UncacheRegister(SC_LEFT_RIGHT); UncacheRegister(SC_TOP_BOTTOM); UncacheRegister(DP_BKGD_CLR); UncacheRegister(DP_FRGD_CLR); UncacheRegister(DP_PIX_WIDTH); UncacheRegister(DP_MIX); UncacheRegister(CLR_CMP_CNTL); UncacheRegister(TEX_SIZE_PITCH); } ATIDRIWaitForIdle(pATI); outr( BUS_CNTL, pATIHW->bus_cntl ); /* DRI uses GUI_TRAJ_CNTL, which is a composite of * src_cntl, dst_cntl, pat_cntl, and host_cntl */ outf( SRC_CNTL, pATIHW->src_cntl ); outf( DST_CNTL, pATIHW->dst_cntl ); outf( PAT_CNTL, pATIHW->pat_cntl ); outf( HOST_CNTL, pATIHW->host_cntl ); outf( DST_OFF_PITCH, pATIHW->dst_off_pitch ); outf( SRC_OFF_PITCH, pATIHW->src_off_pitch ); outf( DP_SRC, pATIHW->dp_src ); outf( DP_MIX, pATIHW->dp_mix ); outf( DP_FRGD_CLR, pATIHW->dp_frgd_clr ); outf( DP_WRITE_MASK, pATIHW->dp_write_mask ); outf( DP_PIX_WIDTH, pATIHW->dp_pix_width ); outf( CLR_CMP_CNTL, pATIHW->clr_cmp_cntl ); offset = TEX_LEVEL(pATIHW->tex_size_pitch); ATIMach64WaitForFIFO(pATI, 6); outf( ALPHA_TST_CNTL, 0 ); outf( Z_CNTL, 0 ); outf( SCALE_3D_CNTL, pATIHW->scale_3d_cntl ); outf( TEX_0_OFF + offset, pATIHW->tex_offset ); outf( TEX_SIZE_PITCH, pATIHW->tex_size_pitch ); outf( TEX_CNTL, pATIHW->tex_cntl ); ATIMach64WaitForFIFO(pATI, 2); outf( SC_LEFT_RIGHT, SetWord(pATIHW->sc_right, 1) | SetWord(pATIHW->sc_left, 0) ); outf( SC_TOP_BOTTOM, SetWord(pATIHW->sc_bottom, 1) | SetWord(pATIHW->sc_top, 0) ); if (pATI->OptionMMIOCache) { /* Now that the cache slots reflect the register state, re-enable MMIO cache */ CacheRegister(SRC_CNTL); CacheRegister(SCALE_3D_CNTL); CacheRegister(HOST_CNTL); CacheRegister(PAT_CNTL); CacheRegister(SC_LEFT_RIGHT); CacheRegister(SC_TOP_BOTTOM); CacheRegister(DP_BKGD_CLR); CacheRegister(DP_FRGD_CLR); CacheRegister(DP_PIX_WIDTH); CacheRegister(DP_MIX); CacheRegister(CLR_CMP_CNTL); CacheRegister(TEX_SIZE_PITCH); } ATIMach64WaitForIdle(pATI); if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache) { /* Only check registers we didn't restore */ TestRegisterCaching(PAT_REG0); TestRegisterCaching(PAT_REG1); TestRegisterCaching(CLR_CMP_CLR); TestRegisterCaching(CLR_CMP_MSK); TestRegisterCachingXV(pScreenInfo); } pATI->NeedDRISync = FALSE; } else #endif /* XF86DRI_DEVEL */ { ATIMach64WaitForIdle(pATI); if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache) { /* * For debugging purposes, attempt to verify that each cached register * should actually be cached. */ TestRegisterCachingDP(pScreenInfo); TestRegisterCachingXV(pScreenInfo); } } #ifdef USE_EXA /* EXA sets pEXA->needsSync to FALSE on its own */ #endif #ifdef USE_XAA if (pATI->pXAAInfo) pATI->pXAAInfo->NeedToSync = FALSE; #endif if (pATI->Chip >= ATI_CHIP_264VTB) { /* * Flush the read-back cache (by turning on INVALIDATE_RB_CACHE), * otherwise the host might get stale data when reading through the * aperture. */ outr(MEM_BUF_CNTL, pATI->NewHW.mem_buf_cntl); } /* * Note: * Before actually invalidating the read-back cache, the mach64 driver * was using the trick below which is buggy. The code is left here for * reference, DRI uses this trick and needs updating. * * For VTB's and later, the first CPU read of the framebuffer will return * zeroes, so do it here. This appears to be due to some kind of engine * caching of framebuffer data I haven't found any way of disabling, or * otherwise circumventing. Thanks to Mark Vojkovich for the suggestion. * * pATI = *(volatile ATIPtr *)pATI->pMemory; */ } static __inline__ void TestRegisterCachingDP(ScrnInfoPtr pScreenInfo) { ATIPtr pATI = ATIPTR(pScreenInfo); TestRegisterCaching(SRC_CNTL); if (pATI->Chip >= ATI_CHIP_264GTPRO) { TestRegisterCaching(SCALE_3D_CNTL); } TestRegisterCaching(HOST_CNTL); TestRegisterCaching(PAT_REG0); TestRegisterCaching(PAT_REG1); TestRegisterCaching(PAT_CNTL); if (RegisterIsCached(SC_LEFT_RIGHT) && /* Special case */ (CacheSlot(SC_LEFT_RIGHT) != (SetWord(inm(SC_RIGHT), 1) | SetWord(inm(SC_LEFT), 0)))) { UncacheRegister(SC_LEFT_RIGHT); xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "SC_LEFT_RIGHT write cache disabled!\n"); } if (RegisterIsCached(SC_TOP_BOTTOM) && /* Special case */ (CacheSlot(SC_TOP_BOTTOM) != (SetWord(inm(SC_BOTTOM), 1) | SetWord(inm(SC_TOP), 0)))) { UncacheRegister(SC_TOP_BOTTOM); xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "SC_TOP_BOTTOM write cache disabled!\n"); } TestRegisterCaching(DP_BKGD_CLR); TestRegisterCaching(DP_FRGD_CLR); TestRegisterCaching(DP_PIX_WIDTH); TestRegisterCaching(DP_MIX); TestRegisterCaching(CLR_CMP_CLR); TestRegisterCaching(CLR_CMP_MSK); TestRegisterCaching(CLR_CMP_CNTL); if (pATI->Chip >= ATI_CHIP_264GTPRO) { TestRegisterCaching(TEX_SIZE_PITCH); } } static __inline__ void TestRegisterCachingXV(ScrnInfoPtr pScreenInfo) { ATIPtr pATI = ATIPTR(pScreenInfo); if (!pATI->Block1Base) return; TestRegisterCaching(OVERLAY_Y_X_START); TestRegisterCaching(OVERLAY_Y_X_END); TestRegisterCaching(OVERLAY_GRAPHICS_KEY_CLR); TestRegisterCaching(OVERLAY_GRAPHICS_KEY_MSK); TestRegisterCaching(OVERLAY_KEY_CNTL); TestRegisterCaching(OVERLAY_SCALE_INC); TestRegisterCaching(OVERLAY_SCALE_CNTL); TestRegisterCaching(SCALER_HEIGHT_WIDTH); TestRegisterCaching(SCALER_TEST); TestRegisterCaching(VIDEO_FORMAT); if (pATI->Chip < ATI_CHIP_264VTB) { TestRegisterCaching(BUF0_OFFSET); TestRegisterCaching(BUF0_PITCH); TestRegisterCaching(BUF1_OFFSET); TestRegisterCaching(BUF1_PITCH); return; } TestRegisterCaching(SCALER_BUF0_OFFSET); TestRegisterCaching(SCALER_BUF1_OFFSET); TestRegisterCaching(SCALER_BUF_PITCH); TestRegisterCaching(OVERLAY_EXCLUSIVE_HORZ); TestRegisterCaching(OVERLAY_EXCLUSIVE_VERT); if (pATI->Chip < ATI_CHIP_264GTPRO) return; TestRegisterCaching(SCALER_COLOUR_CNTL); TestRegisterCaching(SCALER_H_COEFF0); TestRegisterCaching(SCALER_H_COEFF1); TestRegisterCaching(SCALER_H_COEFF2); TestRegisterCaching(SCALER_H_COEFF3); TestRegisterCaching(SCALER_H_COEFF4); TestRegisterCaching(SCALER_BUF0_OFFSET_U); TestRegisterCaching(SCALER_BUF0_OFFSET_V); TestRegisterCaching(SCALER_BUF1_OFFSET_U); TestRegisterCaching(SCALER_BUF1_OFFSET_V); } #ifdef USE_XAA /* * ATIMach64SetupForScreenToScreenCopy -- * * This function sets up the draw engine for a series of screen-to-screen copy * operations. */ static void ATIMach64SetupForScreenToScreenCopy ( ScrnInfoPtr pScreenInfo, int xdir, int ydir, int rop, unsigned int planemask, int TransparencyColour ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 3); outf(DP_WRITE_MASK, planemask); outf(DP_SRC, DP_MONO_SRC_ALLONES | SetBits(SRC_BLIT, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX)); #ifdef AVOID_DGA if (TransparencyColour == -1) #else /* AVOID_DGA */ if (!pATI->XAAForceTransBlit && (TransparencyColour == -1)) #endif /* AVOID_DGA */ { outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); } else { ATIMach64WaitForFIFO(pATI, 2); outf(CLR_CMP_CLR, TransparencyColour); outf(CLR_CMP_CNTL, CLR_CMP_FN_EQUAL | CLR_CMP_SRC_2D); } pATI->dst_cntl = 0; if (ydir > 0) pATI->dst_cntl |= DST_Y_DIR; if (xdir > 0) pATI->dst_cntl |= DST_X_DIR; if (pATI->XModifier == 1) outf(DST_CNTL, pATI->dst_cntl); else pATI->dst_cntl |= DST_24_ROT_EN; } /* * ATIMach64SubsequentScreenToScreenCopy -- * * This function performs a screen-to-screen copy operation. */ static void ATIMach64SubsequentScreenToScreenCopy ( ScrnInfoPtr pScreenInfo, int xSrc, int ySrc, int xDst, int yDst, int w, int h ) { ATIPtr pATI = ATIPTR(pScreenInfo); xSrc *= pATI->XModifier; xDst *= pATI->XModifier; w *= pATI->XModifier; ATIDRISync(pScreenInfo); /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, xDst, xDst + w - 1, yDst, yDst + h - 1); if (!(pATI->dst_cntl & DST_X_DIR)) { xSrc += w - 1; xDst += w - 1; } if (!(pATI->dst_cntl & DST_Y_DIR)) { ySrc += h - 1; yDst += h - 1; } if (pATI->XModifier != 1) outf(DST_CNTL, pATI->dst_cntl | SetBits((xDst / 4) % 6, DST_24_ROT)); ATIMach64WaitForFIFO(pATI, 4); outf(SRC_Y_X, SetWord(xSrc, 1) | SetWord(ySrc, 0)); outf(SRC_WIDTH1, w); outf(DST_Y_X, SetWord(xDst, 1) | SetWord(yDst, 0)); outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0)); /* * On VTB's and later, the engine will randomly not wait for a copy * operation to commit its results to video memory before starting the next * one. The probability of such occurrences increases with GUI_WB_FLUSH * (or GUI_WB_FLUSH_P) setting, bitsPerPixel and/or CRTC clock. This * would point to some kind of video memory bandwidth problem were it noti * for the fact that the problem occurs less often (but still occurs) when * copying larger rectangles. */ if ((pATI->Chip >= ATI_CHIP_264VTB) && !pATI->OptionDevel) ATIMach64Sync(pScreenInfo); } /* * ATIMach64SetupForSolidFill -- * * This function sets up the draw engine for a series of solid fills. */ static void ATIMach64SetupForSolidFill ( ScrnInfoPtr pScreenInfo, int colour, int rop, unsigned int planemask ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 5); outf(DP_WRITE_MASK, planemask); outf(DP_SRC, DP_MONO_SRC_ALLONES | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_FRGD_CLR, colour); outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX)); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); if (pATI->XModifier == 1) outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); } /* * ATIMach64SubsequentSolidFillRect -- * * This function performs a solid rectangle fill. */ static void ATIMach64SubsequentSolidFillRect ( ScrnInfoPtr pScreenInfo, int x, int y, int w, int h ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); if (pATI->XModifier != 1) { x *= pATI->XModifier; w *= pATI->XModifier; outf(DST_CNTL, SetBits((x / 4) % 6, DST_24_ROT) | (DST_X_DIR | DST_Y_DIR | DST_24_ROT_EN)); } /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, x, x + w - 1, y, y + h - 1); ATIMach64WaitForFIFO(pATI, 2); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0)); } /* * ATIMach64SetupForSolidLine -- * * This function sets up the draw engine for a series of solid lines. It is * not used for 24bpp because the engine doesn't support it. */ static void ATIMach64SetupForSolidLine ( ScrnInfoPtr pScreenInfo, int colour, int rop, unsigned int planemask ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 5); outf(DP_WRITE_MASK, planemask); outf(DP_SRC, DP_MONO_SRC_ALLONES | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_FRGD_CLR, colour); outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX)); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); ATIMach64ValidateClip(pATI, pATI->NewHW.sc_left, pATI->NewHW.sc_right, pATI->NewHW.sc_top, pATI->NewHW.sc_bottom); } /* * ATIMach64SubsequentSolidHorVertLine -- * * This is called to draw a solid horizontal or vertical line. This does a * one-pixel wide solid fill. */ static void ATIMach64SubsequentSolidHorVertLine ( ScrnInfoPtr pScreenInfo, int x, int y, int len, int dir ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 3); outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); if (dir == DEGREES_0) outf(DST_HEIGHT_WIDTH, SetWord(len, 1) | SetWord(1, 0)); else /* if (dir == DEGREES_270) */ outf(DST_HEIGHT_WIDTH, SetWord(1, 1) | SetWord(len, 0)); } /* * ATIMach64SubsequentSolidBresenhamLine -- * * This function draws a line using the Bresenham line engine. */ static void ATIMach64SubsequentSolidBresenhamLine ( ScrnInfoPtr pScreenInfo, int x, int y, int major, int minor, int err, int len, int octant ) { ATIPtr pATI = ATIPTR(pScreenInfo); CARD32 dst_cntl = DST_LAST_PEL; if (octant & YMAJOR) dst_cntl |= DST_Y_MAJOR; if (!(octant & XDECREASING)) dst_cntl |= DST_X_DIR; if (!(octant & YDECREASING)) dst_cntl |= DST_Y_DIR; ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 6); outf(DST_CNTL, dst_cntl); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); outf(DST_BRES_ERR, minor + err); outf(DST_BRES_INC, minor); outf(DST_BRES_DEC, minor - major); outf(DST_BRES_LNTH, len); } /* * ATIMach64SetupForMono8x8PatternFill -- * * This function sets up the draw engine for a series of 8x8 1bpp pattern * fills. */ static void ATIMach64SetupForMono8x8PatternFill ( ScrnInfoPtr pScreenInfo, int patx, int paty, int fg, int bg, int rop, unsigned int planemask ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 3); outf(DP_WRITE_MASK, planemask); outf(DP_SRC, DP_MONO_SRC_PATTERN | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_FRGD_CLR, fg); if (bg == -1) { outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX) | SetBits(MIX_DST, DP_BKGD_MIX)); } else { ATIMach64WaitForFIFO(pATI, 2); outf(DP_BKGD_CLR, bg); outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX) | SetBits(ATIMach64ALU[rop], DP_BKGD_MIX)); } ATIMach64WaitForFIFO(pATI, 4); outf(PAT_REG0, patx); outf(PAT_REG1, paty); outf(PAT_CNTL, PAT_MONO_EN); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); if (pATI->XModifier == 1) outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); } /* * ATIMach64SubsequentMono8x8PatternFillRect -- * * This function performs an 8x8 1bpp pattern fill. */ static void ATIMach64SubsequentMono8x8PatternFillRect ( ScrnInfoPtr pScreenInfo, int patx, int paty, int x, int y, int w, int h ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); if (pATI->XModifier != 1) { x *= pATI->XModifier; w *= pATI->XModifier; outf(DST_CNTL, SetBits((x / 4) % 6, DST_24_ROT) | (DST_X_DIR | DST_Y_DIR | DST_24_ROT_EN)); } /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, x, x + w - 1, y, y + h - 1); ATIMach64WaitForFIFO(pATI, 2); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0)); } /* * ATIMach64SetupForScanlineCPUToScreenColorExpandFill -- * * This function sets up the engine for a series of colour expansion fills. */ static void ATIMach64SetupForScanlineCPUToScreenColorExpandFill ( ScrnInfoPtr pScreenInfo, int fg, int bg, int rop, unsigned int planemask ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); ATIMach64WaitForFIFO(pATI, 3); outf(DP_WRITE_MASK, planemask); outf(DP_SRC, DP_MONO_SRC_HOST | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_FRGD_CLR, fg); if (bg == -1) { outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX) | SetBits(MIX_DST, DP_BKGD_MIX)); } else { ATIMach64WaitForFIFO(pATI, 2); outf(DP_BKGD_CLR, bg); outf(DP_MIX, SetBits(ATIMach64ALU[rop], DP_FRGD_MIX) | SetBits(ATIMach64ALU[rop], DP_BKGD_MIX)); } outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); if (pATI->XModifier == 1) outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); } /* * ATIMach64SubsequentScanlineCPUToScreenColorExpandFill -- * * This function sets up the engine for a single colour expansion fill. */ static void ATIMach64SubsequentScanlineCPUToScreenColorExpandFill ( ScrnInfoPtr pScreenInfo, int x, int y, int w, int h, int skipleft ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); if (pATI->XModifier != 1) { x *= pATI->XModifier; w *= pATI->XModifier; skipleft *= pATI->XModifier; outf(DST_CNTL, SetBits((x / 4) % 6, DST_24_ROT) | (DST_X_DIR | DST_Y_DIR | DST_24_ROT_EN)); } pATI->ExpansionBitmapWidth = (w + 31) / 32; ATIMach64WaitForFIFO(pATI, 3); pATI->sc_left = x + skipleft; pATI->sc_right = x + w - 1; outf(SC_LEFT_RIGHT, SetWord(pATI->sc_right, 1) | SetWord(pATI->sc_left, 0)); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); outf(DST_HEIGHT_WIDTH, SetWord(pATI->ExpansionBitmapWidth * 32, 1) | SetWord(h, 0)); } /* * ATIMach64SubsequentColorExpandScanline -- * * This function feeds a bitmap scanline to the engine for a colour expansion * fill. This is written to do burst transfers for those platforms that can do * them, and to improve CPU/engine concurrency. */ static void ATIMach64SubsequentColorExpandScanline ( ScrnInfoPtr pScreenInfo, int iBuffer ) { ATIPtr pATI = ATIPTR(pScreenInfo); CARD32 *pBitmapData = pATI->ExpansionBitmapScanlinePtr[iBuffer]; int w = pATI->ExpansionBitmapWidth; int nDWord; ATIDRISync(pScreenInfo); while (w > 0) { /* * Transfers are done in chunks of up to 64 bytes in length (32 on * earlier controllers). */ nDWord = w; if (nDWord > pATI->nHostFIFOEntries) nDWord = pATI->nHostFIFOEntries; /* Make enough FIFO slots available */ ATIMach64WaitForFIFO(pATI, nDWord); /* * Always start transfers on a chuck-sized boundary. Note that * HOST_DATA_0 is actually on a 512-byte boundary, but *pBitmapData can * only be guaranteed to be on a chunk-sized boundary. * * Transfer current chunk. With any luck, the compiler won't mangle * this too badly... */ # if defined(ATIMove32) { ATIMove32(pATI->pHOST_DATA, pBitmapData, nDWord); } # else { volatile CARD32 *pDst; CARD32 *pSrc; unsigned int iDWord; iDWord = 16 - nDWord; pDst = (volatile CARD32 *)pATI->pHOST_DATA - iDWord; pSrc = pBitmapData - iDWord; switch (iDWord) { case 0: MMIO_MOVE32(pDst + 0, 0, *(pSrc + 0)); case 1: MMIO_MOVE32(pDst + 1, 0, *(pSrc + 1)); case 2: MMIO_MOVE32(pDst + 2, 0, *(pSrc + 2)); case 3: MMIO_MOVE32(pDst + 3, 0, *(pSrc + 3)); case 4: MMIO_MOVE32(pDst + 4, 0, *(pSrc + 4)); case 5: MMIO_MOVE32(pDst + 5, 0, *(pSrc + 5)); case 6: MMIO_MOVE32(pDst + 6, 0, *(pSrc + 6)); case 7: MMIO_MOVE32(pDst + 7, 0, *(pSrc + 7)); case 8: MMIO_MOVE32(pDst + 8, 0, *(pSrc + 8)); case 9: MMIO_MOVE32(pDst + 9, 0, *(pSrc + 9)); case 10: MMIO_MOVE32(pDst + 10, 0, *(pSrc + 10)); case 11: MMIO_MOVE32(pDst + 11, 0, *(pSrc + 11)); case 12: MMIO_MOVE32(pDst + 12, 0, *(pSrc + 12)); case 13: MMIO_MOVE32(pDst + 13, 0, *(pSrc + 13)); case 14: MMIO_MOVE32(pDst + 14, 0, *(pSrc + 14)); case 15: MMIO_MOVE32(pDst + 15, 0, *(pSrc + 15)); default: /* Muffle compiler */ break; } } # endif /* Step to next chunk */ pBitmapData += nDWord; w -= nDWord; pATI->nAvailableFIFOEntries -= nDWord; } pATI->EngineIsBusy = TRUE; } /* * ATIMach64AccelInit -- * * This function fills in structure fields needed for acceleration on Mach64 * variants. */ Bool ATIMach64AccelInit ( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); XAAInfoRecPtr pXAAInfo; if (!(pATI->pXAAInfo = XAACreateInfoRec())) return FALSE; pXAAInfo = pATI->pXAAInfo; /* This doesn't seem quite right... */ if (pATI->XModifier == 1) { pXAAInfo->Flags = PIXMAP_CACHE | OFFSCREEN_PIXMAPS; pXAAInfo->Flags |= LINEAR_FRAMEBUFFER; } /* Sync */ pXAAInfo->Sync = ATIMach64Sync; /* Screen-to-screen copy */ pXAAInfo->SetupForScreenToScreenCopy = ATIMach64SetupForScreenToScreenCopy; pXAAInfo->SubsequentScreenToScreenCopy = ATIMach64SubsequentScreenToScreenCopy; /* Solid fills */ pXAAInfo->SetupForSolidFill = ATIMach64SetupForSolidFill; pXAAInfo->SubsequentSolidFillRect = ATIMach64SubsequentSolidFillRect; /* 8x8 mono pattern fills */ pXAAInfo->Mono8x8PatternFillFlags = #if X_BYTE_ORDER != X_LITTLE_ENDIAN BIT_ORDER_IN_BYTE_MSBFIRST | #endif /* X_BYTE_ORDER */ HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN; pXAAInfo->SetupForMono8x8PatternFill = ATIMach64SetupForMono8x8PatternFill; pXAAInfo->SubsequentMono8x8PatternFillRect = ATIMach64SubsequentMono8x8PatternFillRect; /* * Use scanline version of colour expansion, not only for the non-ix86 * case, but also to avoid PCI retries. */ pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags = LEFT_EDGE_CLIPPING | LEFT_EDGE_CLIPPING_NEGATIVE_X | CPU_TRANSFER_PAD_DWORD | SCANLINE_PAD_DWORD; if (pATI->XModifier != 1) pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags |= TRIPLE_BITS_24BPP; pXAAInfo->NumScanlineColorExpandBuffers = 1; /* Align bitmap data on a 64-byte boundary */ pATI->ExpansionBitmapWidth = /* DWord size in bits */ ((pATI->displayWidth * pATI->XModifier) + 31) & ~31U; pATI->ExpansionBitmapScanlinePtr[1] = (CARD32 *)xnfalloc((pATI->ExpansionBitmapWidth >> 3) + 63); pATI->ExpansionBitmapScanlinePtr[0] = (pointer)(((unsigned long)pATI->ExpansionBitmapScanlinePtr[1] + 63) & ~63UL); pXAAInfo->ScanlineColorExpandBuffers = (CARD8 **)pATI->ExpansionBitmapScanlinePtr; pXAAInfo->SetupForScanlineCPUToScreenColorExpandFill = ATIMach64SetupForScanlineCPUToScreenColorExpandFill; pXAAInfo->SubsequentScanlineCPUToScreenColorExpandFill = ATIMach64SubsequentScanlineCPUToScreenColorExpandFill; pXAAInfo->SubsequentColorExpandScanline = ATIMach64SubsequentColorExpandScanline; /* The engine does not support the following primitives for 24bpp */ if (pATI->XModifier != 1) goto XAAInit; /* Solid lines */ pXAAInfo->SetupForSolidLine = ATIMach64SetupForSolidLine; pXAAInfo->SubsequentSolidHorVertLine = ATIMach64SubsequentSolidHorVertLine; pXAAInfo->SubsequentSolidBresenhamLine = ATIMach64SubsequentSolidBresenhamLine; XAAInit: if (!XAAInit(pScreen, pATI->pXAAInfo)) { XAADestroyInfoRec(pATI->pXAAInfo); pATI->pXAAInfo = NULL; return FALSE; } return TRUE; } #endif /* USE_XAA */ xf86-video-mach64-6.9.5/src/atimach64cursor.c0000644000175000017500000003422212270010352015377 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "aticursor.h" #include "atimach64accel.h" #include "atimach64io.h" /* * ATIMach64SetCursorColours -- * * Set hardware cursor foreground and background colours. */ static void ATIMach64SetCursorColours ( ScrnInfoPtr pScreenInfo, int fg, int bg ) { ATIPtr pATI = ATIPTR(pScreenInfo); outr(CUR_CLR0, SetBits(fg, CUR_CLR)); outr(CUR_CLR1, SetBits(bg, CUR_CLR)); } /* * ATIMach64SetCursorPosition -- * * Set position of hardware cursor. */ static void ATIMach64SetCursorPosition ( ScrnInfoPtr pScreenInfo, int x, int y ) { ATIPtr pATI = ATIPTR(pScreenInfo); CARD16 CursorXOffset, CursorYOffset; /* Adjust x & y when the cursor is partially obscured */ if (x < 0) { if ((CursorXOffset = -x) > 63) CursorXOffset = 63; x = 0; } else { CursorXOffset = pScreenInfo->frameX1 - pScreenInfo->frameX0; if (x > CursorXOffset) x = CursorXOffset; CursorXOffset = 0; } if (y < 0) { if ((CursorYOffset = -y) > 63) CursorYOffset = 63; y = 0; } else { CursorYOffset = pScreenInfo->frameY1 - pScreenInfo->frameY0; if (y > CursorYOffset) y = CursorYOffset; CursorYOffset = 0; } /* Adjust for multiscanned modes */ if (pScreenInfo->currentMode->Flags & V_DBLSCAN) y *= 2; if (pScreenInfo->currentMode->VScan > 1) y *= pScreenInfo->currentMode->VScan; do { if (CursorYOffset != pATI->CursorYOffset) { pATI->CursorYOffset = CursorYOffset; outr(CUR_OFFSET, ((CursorYOffset << 4) + pATI->CursorOffset) >> 3); } else if (CursorXOffset == pATI->CursorXOffset) break; pATI->CursorXOffset = CursorXOffset; outr(CUR_HORZ_VERT_OFF, SetBits(CursorXOffset, CUR_HORZ_OFF) | SetBits(CursorYOffset, CUR_VERT_OFF)); } while (0); outr(CUR_HORZ_VERT_POSN, SetBits(x, CUR_HORZ_POSN) | SetBits(y, CUR_VERT_POSN)); } /* * ATIMach64LoadCursorImage -- * * Copy hardware cursor image into offscreen video memory. */ static void ATIMach64LoadCursorImage ( ScrnInfoPtr pScreenInfo, CARD8 *pImage ) { ATIPtr pATI = ATIPTR(pScreenInfo); CARD32 *pSrc = (pointer)pImage; volatile CARD32 *pDst = pATI->pCursorImage; #ifdef XF86DRI_DEVEL /* XAA Sync requires the DRM lock if DRI enabled */ ATIDRILock(pScreenInfo); #endif /* XF86DRI_DEVEL */ /* Synchronise video memory accesses */ ATIMach64Sync(pScreenInfo); # if defined(ATIMove32) { ATIMove32(pDst, pSrc, 256); } # else { /* This is lengthy, but it does maximise burst modes */ pDst[ 0] = pSrc[ 0]; pDst[ 1] = pSrc[ 1]; pDst[ 2] = pSrc[ 2]; pDst[ 3] = pSrc[ 3]; pDst[ 4] = pSrc[ 4]; pDst[ 5] = pSrc[ 5]; pDst[ 6] = pSrc[ 6]; pDst[ 7] = pSrc[ 7]; pDst[ 8] = pSrc[ 8]; pDst[ 9] = pSrc[ 9]; pDst[ 10] = pSrc[ 10]; pDst[ 11] = pSrc[ 11]; pDst[ 12] = pSrc[ 12]; pDst[ 13] = pSrc[ 13]; pDst[ 14] = pSrc[ 14]; pDst[ 15] = pSrc[ 15]; pDst[ 16] = pSrc[ 16]; pDst[ 17] = pSrc[ 17]; pDst[ 18] = pSrc[ 18]; pDst[ 19] = pSrc[ 19]; pDst[ 20] = pSrc[ 20]; pDst[ 21] = pSrc[ 21]; pDst[ 22] = pSrc[ 22]; pDst[ 23] = pSrc[ 23]; pDst[ 24] = pSrc[ 24]; pDst[ 25] = pSrc[ 25]; pDst[ 26] = pSrc[ 26]; pDst[ 27] = pSrc[ 27]; pDst[ 28] = pSrc[ 28]; pDst[ 29] = pSrc[ 29]; pDst[ 30] = pSrc[ 30]; pDst[ 31] = pSrc[ 31]; pDst[ 32] = pSrc[ 32]; pDst[ 33] = pSrc[ 33]; pDst[ 34] = pSrc[ 34]; pDst[ 35] = pSrc[ 35]; pDst[ 36] = pSrc[ 36]; pDst[ 37] = pSrc[ 37]; pDst[ 38] = pSrc[ 38]; pDst[ 39] = pSrc[ 39]; pDst[ 40] = pSrc[ 40]; pDst[ 41] = pSrc[ 41]; pDst[ 42] = pSrc[ 42]; pDst[ 43] = pSrc[ 43]; pDst[ 44] = pSrc[ 44]; pDst[ 45] = pSrc[ 45]; pDst[ 46] = pSrc[ 46]; pDst[ 47] = pSrc[ 47]; pDst[ 48] = pSrc[ 48]; pDst[ 49] = pSrc[ 49]; pDst[ 50] = pSrc[ 50]; pDst[ 51] = pSrc[ 51]; pDst[ 52] = pSrc[ 52]; pDst[ 53] = pSrc[ 53]; pDst[ 54] = pSrc[ 54]; pDst[ 55] = pSrc[ 55]; pDst[ 56] = pSrc[ 56]; pDst[ 57] = pSrc[ 57]; pDst[ 58] = pSrc[ 58]; pDst[ 59] = pSrc[ 59]; pDst[ 60] = pSrc[ 60]; pDst[ 61] = pSrc[ 61]; pDst[ 62] = pSrc[ 62]; pDst[ 63] = pSrc[ 63]; pDst[ 64] = pSrc[ 64]; pDst[ 65] = pSrc[ 65]; pDst[ 66] = pSrc[ 66]; pDst[ 67] = pSrc[ 67]; pDst[ 68] = pSrc[ 68]; pDst[ 69] = pSrc[ 69]; pDst[ 70] = pSrc[ 70]; pDst[ 71] = pSrc[ 71]; pDst[ 72] = pSrc[ 72]; pDst[ 73] = pSrc[ 73]; pDst[ 74] = pSrc[ 74]; pDst[ 75] = pSrc[ 75]; pDst[ 76] = pSrc[ 76]; pDst[ 77] = pSrc[ 77]; pDst[ 78] = pSrc[ 78]; pDst[ 79] = pSrc[ 79]; pDst[ 80] = pSrc[ 80]; pDst[ 81] = pSrc[ 81]; pDst[ 82] = pSrc[ 82]; pDst[ 83] = pSrc[ 83]; pDst[ 84] = pSrc[ 84]; pDst[ 85] = pSrc[ 85]; pDst[ 86] = pSrc[ 86]; pDst[ 87] = pSrc[ 87]; pDst[ 88] = pSrc[ 88]; pDst[ 89] = pSrc[ 89]; pDst[ 90] = pSrc[ 90]; pDst[ 91] = pSrc[ 91]; pDst[ 92] = pSrc[ 92]; pDst[ 93] = pSrc[ 93]; pDst[ 94] = pSrc[ 94]; pDst[ 95] = pSrc[ 95]; pDst[ 96] = pSrc[ 96]; pDst[ 97] = pSrc[ 97]; pDst[ 98] = pSrc[ 98]; pDst[ 99] = pSrc[ 99]; pDst[100] = pSrc[100]; pDst[101] = pSrc[101]; pDst[102] = pSrc[102]; pDst[103] = pSrc[103]; pDst[104] = pSrc[104]; pDst[105] = pSrc[105]; pDst[106] = pSrc[106]; pDst[107] = pSrc[107]; pDst[108] = pSrc[108]; pDst[109] = pSrc[109]; pDst[110] = pSrc[110]; pDst[111] = pSrc[111]; pDst[112] = pSrc[112]; pDst[113] = pSrc[113]; pDst[114] = pSrc[114]; pDst[115] = pSrc[115]; pDst[116] = pSrc[116]; pDst[117] = pSrc[117]; pDst[118] = pSrc[118]; pDst[119] = pSrc[119]; pDst[120] = pSrc[120]; pDst[121] = pSrc[121]; pDst[122] = pSrc[122]; pDst[123] = pSrc[123]; pDst[124] = pSrc[124]; pDst[125] = pSrc[125]; pDst[126] = pSrc[126]; pDst[127] = pSrc[127]; pDst[128] = pSrc[128]; pDst[129] = pSrc[129]; pDst[130] = pSrc[130]; pDst[131] = pSrc[131]; pDst[132] = pSrc[132]; pDst[133] = pSrc[133]; pDst[134] = pSrc[134]; pDst[135] = pSrc[135]; pDst[136] = pSrc[136]; pDst[137] = pSrc[137]; pDst[138] = pSrc[138]; pDst[139] = pSrc[139]; pDst[140] = pSrc[140]; pDst[141] = pSrc[141]; pDst[142] = pSrc[142]; pDst[143] = pSrc[143]; pDst[144] = pSrc[144]; pDst[145] = pSrc[145]; pDst[146] = pSrc[146]; pDst[147] = pSrc[147]; pDst[148] = pSrc[148]; pDst[149] = pSrc[149]; pDst[150] = pSrc[150]; pDst[151] = pSrc[151]; pDst[152] = pSrc[152]; pDst[153] = pSrc[153]; pDst[154] = pSrc[154]; pDst[155] = pSrc[155]; pDst[156] = pSrc[156]; pDst[157] = pSrc[157]; pDst[158] = pSrc[158]; pDst[159] = pSrc[159]; pDst[160] = pSrc[160]; pDst[161] = pSrc[161]; pDst[162] = pSrc[162]; pDst[163] = pSrc[163]; pDst[164] = pSrc[164]; pDst[165] = pSrc[165]; pDst[166] = pSrc[166]; pDst[167] = pSrc[167]; pDst[168] = pSrc[168]; pDst[169] = pSrc[169]; pDst[170] = pSrc[170]; pDst[171] = pSrc[171]; pDst[172] = pSrc[172]; pDst[173] = pSrc[173]; pDst[174] = pSrc[174]; pDst[175] = pSrc[175]; pDst[176] = pSrc[176]; pDst[177] = pSrc[177]; pDst[178] = pSrc[178]; pDst[179] = pSrc[179]; pDst[180] = pSrc[180]; pDst[181] = pSrc[181]; pDst[182] = pSrc[182]; pDst[183] = pSrc[183]; pDst[184] = pSrc[184]; pDst[185] = pSrc[185]; pDst[186] = pSrc[186]; pDst[187] = pSrc[187]; pDst[188] = pSrc[188]; pDst[189] = pSrc[189]; pDst[190] = pSrc[190]; pDst[191] = pSrc[191]; pDst[192] = pSrc[192]; pDst[193] = pSrc[193]; pDst[194] = pSrc[194]; pDst[195] = pSrc[195]; pDst[196] = pSrc[196]; pDst[197] = pSrc[197]; pDst[198] = pSrc[198]; pDst[199] = pSrc[199]; pDst[200] = pSrc[200]; pDst[201] = pSrc[201]; pDst[202] = pSrc[202]; pDst[203] = pSrc[203]; pDst[204] = pSrc[204]; pDst[205] = pSrc[205]; pDst[206] = pSrc[206]; pDst[207] = pSrc[207]; pDst[208] = pSrc[208]; pDst[209] = pSrc[209]; pDst[210] = pSrc[210]; pDst[211] = pSrc[211]; pDst[212] = pSrc[212]; pDst[213] = pSrc[213]; pDst[214] = pSrc[214]; pDst[215] = pSrc[215]; pDst[216] = pSrc[216]; pDst[217] = pSrc[217]; pDst[218] = pSrc[218]; pDst[219] = pSrc[219]; pDst[220] = pSrc[220]; pDst[221] = pSrc[221]; pDst[222] = pSrc[222]; pDst[223] = pSrc[223]; pDst[224] = pSrc[224]; pDst[225] = pSrc[225]; pDst[226] = pSrc[226]; pDst[227] = pSrc[227]; pDst[228] = pSrc[228]; pDst[229] = pSrc[229]; pDst[230] = pSrc[230]; pDst[231] = pSrc[231]; pDst[232] = pSrc[232]; pDst[233] = pSrc[233]; pDst[234] = pSrc[234]; pDst[235] = pSrc[235]; pDst[236] = pSrc[236]; pDst[237] = pSrc[237]; pDst[238] = pSrc[238]; pDst[239] = pSrc[239]; pDst[240] = pSrc[240]; pDst[241] = pSrc[241]; pDst[242] = pSrc[242]; pDst[243] = pSrc[243]; pDst[244] = pSrc[244]; pDst[245] = pSrc[245]; pDst[246] = pSrc[246]; pDst[247] = pSrc[247]; pDst[248] = pSrc[248]; pDst[249] = pSrc[249]; pDst[250] = pSrc[250]; pDst[251] = pSrc[251]; pDst[252] = pSrc[252]; pDst[253] = pSrc[253]; pDst[254] = pSrc[254]; pDst[255] = pSrc[255]; } #endif #ifdef XF86DRI_DEVEL ATIDRIUnlock(pScreenInfo); #endif /* XF86DRI_DEVEL */ } /* * ATIMach64HideCursor -- * * Turn off hardware cursor. */ static void ATIMach64HideCursor ( ScrnInfoPtr pScreenInfo ) { ATIPtr pATI = ATIPTR(pScreenInfo); if (!(pATI->NewHW.gen_test_cntl & GEN_CUR_EN)) return; pATI->NewHW.gen_test_cntl &= ~GEN_CUR_EN; out8(GEN_TEST_CNTL, GetByte(pATI->NewHW.gen_test_cntl, 0)); } /* * ATIMach64ShowCursor -- * * Turn on hardware cursor. */ static void ATIMach64ShowCursor ( ScrnInfoPtr pScreenInfo ) { ATIPtr pATI = ATIPTR(pScreenInfo); if (pATI->NewHW.gen_test_cntl & GEN_CUR_EN) return; pATI->NewHW.gen_test_cntl |= GEN_CUR_EN; out8(GEN_TEST_CNTL, GetByte(pATI->NewHW.gen_test_cntl, 0)); } /* * ATIMach64UseHWCursor -- * * Notify cursor layer whether a hardware cursor is configured. */ static Bool ATIMach64UseHWCursor ( ScreenPtr pScreen, CursorPtr pCursor ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); if (!pATI->CursorBase) return FALSE; return TRUE; } /* * ATIMach64CursorInit -- * * Initialise xf86CursorInfoRec fields with information specific to Mach64 * variants. */ Bool ATIMach64CursorInit ( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); xf86CursorInfoPtr pCursorInfo; /* Initialise software cursor */ if (!miDCInitialize(pScreen, xf86GetPointerScreenFuncs())) return FALSE; if (pATI->Cursor == ATI_CURSOR_SOFTWARE) return TRUE; /* Initialise hardware cursor */ if (!(pATI->pCursorInfo = xf86CreateCursorInfoRec())) return FALSE; pCursorInfo = pATI->pCursorInfo; /* * For Mach64 variants, toggling hardware cursors off and on causes display * artifacts. Ask the cursor support layers to always paint the cursor * (whether or not it is entirely transparent) and to not hide the cursor * when reloading its image. The two remaining reasons for turning off the * hardware cursor are when it moves to a different screen or on a switch * to a different virtual console. */ pCursorInfo->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | HARDWARE_CURSOR_INVERT_MASK | HARDWARE_CURSOR_SHOW_TRANSPARENT | HARDWARE_CURSOR_UPDATE_UNHIDDEN | HARDWARE_CURSOR_AND_SOURCE_WITH_MASK | #if X_BYTE_ORDER != X_LITTLE_ENDIAN HARDWARE_CURSOR_BIT_ORDER_MSBFIRST | #endif /* X_BYTE_ORDER */ HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1; pCursorInfo->MaxWidth = pCursorInfo->MaxHeight = 64; pCursorInfo->SetCursorColors = ATIMach64SetCursorColours; pCursorInfo->SetCursorPosition = ATIMach64SetCursorPosition; pCursorInfo->LoadCursorImage = ATIMach64LoadCursorImage; pCursorInfo->HideCursor = ATIMach64HideCursor; pCursorInfo->ShowCursor = ATIMach64ShowCursor; pCursorInfo->UseHWCursor = ATIMach64UseHWCursor; if (!xf86InitCursor(pScreen, pATI->pCursorInfo)) { xf86DestroyCursorInfoRec(pATI->pCursorInfo); pATI->pCursorInfo = NULL; return FALSE; } xf86SetSilkenMouse(pScreen); return TRUE; } xf86-video-mach64-6.9.5/src/atimach64i2c.c0000644000175000017500000003050412270010352014536 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atii2c.h" #include "atimach64i2c.h" #include "atimach64io.h" #include "atituner.h" /* MPP_CONFIG register values */ #define MPP_INIT pATI->NewHW.mpp_config #define MPP_WRITE (MPP_INIT ) #define MPP_WRITEINC (MPP_INIT | (MPP_AUTO_INC_EN )) #define MPP_READ (MPP_INIT | ( MPP_BUFFER_MODE_PREFETCH)) #define MPP_READINC (MPP_INIT | (MPP_AUTO_INC_EN | MPP_BUFFER_MODE_PREFETCH)) /* * ATIMach64MPPWaitForIdle -- * * Support function to wait for the Multimedia Peripheral Port to become idle. * Currently, this function's return value indicates whether or not the port * became idle within 512 polling iterations. For now, this value is ignored * by the rest of the code, but might be used in the future. */ static Bool ATIMach64MPPWaitForIdle ( ATIPtr pATI ) { CARD32 Count = 0x0200; while (in8(MPP_CONFIG + 3) & GetByte(MPP_BUSY, 3)) { if (!--Count) return FALSE; usleep(1); /* XXX Excessive? */ } return TRUE; } /* * ATIMach64MPPSetAddress -- * * Sets a 16-bit ImpacTV address on the Multimedia Peripheral Port. */ static void ATIMach64MPPSetAddress ( ATIPtr pATI, CARD16 Address ) { ATIMach64MPPWaitForIdle(pATI); outr(MPP_CONFIG, MPP_WRITEINC); outr(MPP_ADDR, 0x00000008U); out8(MPP_DATA, (CARD8)Address); ATIMach64MPPWaitForIdle(pATI); out8(MPP_DATA, (CARD8)(Address >> 8)); ATIMach64MPPWaitForIdle(pATI); outr(MPP_CONFIG, MPP_WRITE); outr(MPP_ADDR, 0x00000018U); ATIMach64MPPWaitForIdle(pATI); } /* * ATIMach64ImpacTVProbe -- * * This probes for an ImpacTV chip and returns its chip ID, or 0. */ static int ATIMach64ImpacTVProbe ( int iScreen, ATIPtr pATI ) { CARD8 ChipID = 0; /* Assume ATIModePreInit() has already been called */ outr(MPP_STROBE_SEQ, pATI->NewHW.mpp_strobe_seq); outr(TVO_CNTL, pATI->NewHW.tvo_cntl); outr(MPP_CONFIG, MPP_READ); ATIMach64MPPWaitForIdle(pATI); outr(MPP_ADDR, 0x0000000AU); if (!(ChipID = in8(MPP_DATA))) { ATIMach64MPPWaitForIdle(pATI); outr(MPP_ADDR, 0x00000023U); if ((ChipID = in8(MPP_DATA)) != 0x54U) { ATIMach64MPPWaitForIdle(pATI); outr(MPP_ADDR, 0x0000000BU); ChipID = in8(MPP_DATA); } } ATIMach64MPPWaitForIdle(pATI); outr(MPP_CONFIG, MPP_WRITE); if (ChipID) xf86DrvMsg(iScreen, X_PROBED, "ImpacTV chip ID 0x%02X detected.\n", ChipID); return (int)(CARD16)ChipID; } /* * ATIMach64ImpacTVSetBits -- * * Controls I2C SDA and SCL lines through ImpacTV. */ static void ATIMach64ImpacTVSetBits ( ATII2CPtr pATII2C, ATIPtr pATI, CARD32 Bits ) { pATII2C->I2CCur = Bits; ATIMach64MPPSetAddress(pATI, IT_I2C_CNTL); outr(MPP_CONFIG, MPP_WRITE); out8(MPP_DATA, (CARD8)Bits); ATIMach64MPPWaitForIdle(pATI); } /* * ATIMach64ImpacTVGetBits -- * * Returns the status of an ImpacTV's I2C control lines. */ static CARD32 ATIMach64ImpacTVGetBits ( ATIPtr pATI ) { ATIMach64MPPSetAddress(pATI, IT_I2C_CNTL); outr(MPP_CONFIG, MPP_READ); ATIMach64MPPWaitForIdle(pATI); return in8(MPP_DATA); } /* * ATIMach64I2C_CNTLSetBits -- * * Controls SDA and SCL lines through a 3D Rage Pro's hardware assisted I2C. */ static void ATIMach64I2C_CNTLSetBits ( ATII2CPtr pATII2C, ATIPtr pATI, CARD32 Bits ) { pATII2C->I2CCur = Bits; out8(I2C_CNTL_0 + 1, (CARD8)Bits); } /* * ATIMach64I2C_CNTLGetBits -- * * Returns the status of a 3D Rage Pro's hardware assisted I2C control lines. */ static CARD32 ATIMach64I2C_CNTLGetBits ( ATIPtr pATI ) { return in8(I2C_CNTL_0 + 1); } /* * ATIMach64GP_IOSetBits -- * * Controls SDA and SCL control lines through a Mach64's GP_IO register. */ static void ATIMach64GP_IOSetBits ( ATII2CPtr pATII2C, ATIPtr pATI, CARD32 Bits ) { pATII2C->I2CCur = Bits; outr(GP_IO, Bits); } /* * ATIMach64GP_IOGetBits -- * * Returns the status of I2C control lines through a Mach64's GP_IO register. */ static CARD32 ATIMach64GP_IOGetBits ( ATIPtr pATI ) { return inr(GP_IO); } #define GPIO1_MASK \ (DAC_GIO_STATE_1 | DAC_GIO_DIR_1) #define GPIO2_MASK \ (GEN_GIO2_DATA_OUT | GEN_GIO2_DATA_IN | GEN_GIO2_WRITE) /* * ATIMach64DAC_GENSetBits -- * * Controls SDA and SCL control lines through a Mach64's GEN_TEST_CNTL and * DAC_CNTL registers. */ static void ATIMach64DAC_GENSetBits ( ATII2CPtr pATII2C, ATIPtr pATI, CARD32 Bits ) { CARD32 tmp; pATII2C->I2CCur = Bits; tmp = inr(DAC_CNTL) & ~GPIO1_MASK; outr(DAC_CNTL, tmp | (Bits & GPIO1_MASK)); tmp = inr(GEN_TEST_CNTL) & ~GPIO2_MASK; outr(GEN_TEST_CNTL, tmp | (Bits & GPIO2_MASK)); } /* * ATIMach64DAC_GENGetBits -- * * Returns the status of I2C control lines through a Mach64's GEN_TEST_CNTL and * DAC_CNTL registers. */ static CARD32 ATIMach64DAC_GENGetBits ( ATIPtr pATI ) { return (inr(DAC_CNTL) & GPIO1_MASK) | (inr(GEN_TEST_CNTL) & GPIO2_MASK); } /* * ATITVAddOnProbe -- * * Probe for an ATI-TV add-on card at specific addresses on an I2C bus. */ static Bool ATITVAddOnProbe ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, I2CBusPtr pI2CBus ) { I2CDevPtr pI2CDev = xnfcalloc(1, SizeOf(I2CDevRec)); int Index; I2CByte tmp; static const CARD8 ATITVAddOnAddresses[] = {0x70, 0x40, 0x78, 0x72, 0x42}; pI2CDev->DevName = "ATI-TV Add-on"; pI2CDev->pI2CBus = pI2CBus; pI2CDev->StartTimeout = pI2CBus->StartTimeout; pI2CDev->BitTimeout = pI2CBus->BitTimeout; pI2CDev->AcknTimeout = pI2CBus->AcknTimeout; pI2CDev->ByteTimeout = pI2CBus->ByteTimeout; for (Index = 0; Index < NumberOf(ATITVAddOnAddresses); Index++) { pI2CDev->SlaveAddr = ATITVAddOnAddresses[Index]; if (xf86I2CFindDev(pI2CBus, pI2CDev->SlaveAddr)) continue; tmp = 0xFFU; if (!(*pI2CBus->I2CWriteRead)(pI2CDev, &tmp, 1, NULL, 0) || !(*pI2CBus->I2CWriteRead)(pI2CDev, NULL, 0, &tmp, 1) || (tmp == 0xFFU) || ((tmp = tmp & 0x1FU) == /*ATI_TUNER_NONE*/0)) continue; if (!xf86I2CDevInit(pI2CDev)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Failed to register I2C device for ATI-TV add-on.\n"); break; } if (pATI->Tuner != tmp) { if (pATI->Tuner != ATI_TUNER_NONE) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Tuner type mismatch: BIOS 0x%x, ATI-TV 0x%x.\n", pATI->Tuner, tmp); pATI->Tuner = tmp; } xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s tuner detected on ATI-TV add-on adapter at I2C bus address" " 0x%2x.\n", ATITuners[pATI->Tuner].name, pI2CDev->SlaveAddr); return TRUE; } free(pI2CDev); return FALSE; } /* * ATIMach64I2CPreInit -- * * This function potentially allocates an I2CBusRec and initialises it with * ATI-specific and Mach64-specific information. */ void ATIMach64I2CPreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { I2CBusPtr pI2CBus; ATII2CPtr pATII2C; if ((pATI->Chip < ATI_CHIP_264CT) || (pATI->Chip >= ATI_CHIP_Mach64)) return; /* Create an I2CBusRec and generically prime it */ if (!(pI2CBus = ATICreateI2CBusRec(pScreenInfo->scrnIndex, pATI, "Mach64"))) return; pATII2C = pI2CBus->DriverPrivate.ptr; switch (pATI->Chip) { case ATI_CHIP_264GTPRO: case ATI_CHIP_264LTPRO: case ATI_CHIP_264XL: case ATI_CHIP_MOBILITY: /* * These have I2C-specific registers. Assume older I2C access * mechanisms are inoperative. */ pATII2C->I2CSetBits = ATIMach64I2C_CNTLSetBits; pATII2C->I2CGetBits = ATIMach64I2C_CNTLGetBits; pATII2C->SCLDir = pATII2C->SDADir = 0; pATII2C->SCLGet = pATII2C->SCLSet = GetByte(I2C_CNTL_SCL, 1); pATII2C->SDAGet = pATII2C->SDASet = GetByte(I2C_CNTL_SDA, 1); out8(I2C_CNTL_1 + 2, GetByte(I2C_SEL, 2)); out8(I2C_CNTL_0 + 0, GetByte(I2C_CNTL_STAT | I2C_CNTL_HPTR_RST, 0)); break; case ATI_CHIP_264VTB: case ATI_CHIP_264GTB: case ATI_CHIP_264VT3: case ATI_CHIP_264GTDVD: case ATI_CHIP_264LT: case ATI_CHIP_264VT4: case ATI_CHIP_264GT2C: /* If an ImpacTV chip is found, use it to provide I2C access */ if (ATIMach64ImpacTVProbe(pScreenInfo->scrnIndex, pATI)) { pATII2C->I2CSetBits = ATIMach64ImpacTVSetBits; pATII2C->I2CGetBits = ATIMach64ImpacTVGetBits; pATII2C->SCLDir = IT_SCL_DIR; pATII2C->SCLGet = IT_SCL_GET; pATII2C->SCLSet = IT_SCL_SET; pATII2C->SDADir = IT_SDA_DIR; pATII2C->SDAGet = IT_SDA_GET; pATII2C->SDASet = IT_SDA_SET; ATIMach64MPPSetAddress(pATI, IT_I2C_CNTL); outr(MPP_CONFIG, MPP_WRITEINC); out8(MPP_DATA, 0x00U); out8(MPP_DATA, 0x55U); out8(MPP_DATA, 0x00U); out8(MPP_DATA, 0x00U); ATIMach64MPPWaitForIdle(pATI); break; } /* Otherwise, fall through to the older case */ case ATI_CHIP_264VT: case ATI_CHIP_264GT: /* First try GIO pins 11 (clock) and 4 (data) */ pATII2C->I2CSetBits = ATIMach64GP_IOSetBits; pATII2C->I2CGetBits = ATIMach64GP_IOGetBits; pATII2C->SCLDir = GP_IO_DIR_B; pATII2C->SCLGet = pATII2C->SCLSet = GP_IO_B; pATII2C->SDADir = GP_IO_DIR_4; pATII2C->SDAGet = pATII2C->SDASet = GP_IO_4; if (ATITVAddOnProbe(pScreenInfo, pATI, pI2CBus)) break; /* Next, try pins 10 (clock) and 12 (data) */ pATII2C->SCLDir = GP_IO_DIR_A; pATII2C->SCLGet = pATII2C->SCLSet = GP_IO_A; pATII2C->SDADir = GP_IO_DIR_C; pATII2C->SDAGet = pATII2C->SDASet = GP_IO_C; if (ATITVAddOnProbe(pScreenInfo, pATI, pI2CBus)) break; /* Otherwise, fall back to ATI's first I2C implementation */ default: /* * First generation integrated controllers access GIO pin 1 (clock) * though DAC_CNTL, and pin 2 (data) through GEN_TEST_CNTL. */ pATII2C->I2CSetBits = ATIMach64DAC_GENSetBits; pATII2C->I2CGetBits = ATIMach64DAC_GENGetBits; pATII2C->SCLDir = DAC_GIO_DIR_1; pATII2C->SCLGet = pATII2C->SCLSet = DAC_GIO_STATE_1; pATII2C->SDADir = GEN_GIO2_WRITE; pATII2C->SDAGet = GEN_GIO2_DATA_IN; pATII2C->SDASet = GEN_GIO2_DATA_OUT; (void)ATITVAddOnProbe(pScreenInfo, pATI, pI2CBus); break; } } xf86-video-mach64-6.9.5/src/atimach64io.c0000644000175000017500000000635612270010352014500 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atimach64io.h" /* * ATIMach64AccessPLLReg -- * * This function sets up the addressing required to access, for read or write, * a 264xT's PLL registers. */ void ATIMach64AccessPLLReg ( ATIPtr pATI, const CARD8 Index, const Bool Write ) { CARD8 clock_cntl1 = in8(CLOCK_CNTL + 1) & ~GetByte(PLL_WR_EN | PLL_ADDR, 1); /* Set PLL register to be read or written */ out8(CLOCK_CNTL + 1, clock_cntl1 | GetByte(SetBits(Index, PLL_ADDR) | SetBits(Write, PLL_WR_EN), 1)); } /* * ATIMach64PollEngineStatus -- * * This function refreshes the driver's view of the draw engine's status. This * has been moved into a separate compilation unit to prevent inlining. */ void ATIMach64PollEngineStatus ( ATIPtr pATI ) { CARD32 IOValue; int Count; if (pATI->Chip < ATI_CHIP_264VTB) { /* * TODO: Deal with locked engines. */ IOValue = inm(FIFO_STAT); pATI->EngineIsLocked = GetBits(IOValue, FIFO_ERR); /* * The following counts the number of bits in FIFO_STAT_BITS, and is * derived from miSetVisualTypes(). */ IOValue = GetBits(IOValue, FIFO_STAT_BITS); Count = (IOValue >> 1) & 0x36DBU; Count = IOValue - Count - ((Count >> 1) & 0x36DBU); Count = ((Count + (Count >> 3)) & 0x71C7U) % 0x3FU; Count = pATI->nFIFOEntries - Count; if (Count > pATI->nAvailableFIFOEntries) pATI->nAvailableFIFOEntries = Count; /* * If the command FIFO is non-empty, then the engine isn't idle. */ if (pATI->nAvailableFIFOEntries < pATI->nFIFOEntries) { pATI->EngineIsBusy = TRUE; return; } } IOValue = inm(GUI_STAT); pATI->EngineIsBusy = GetBits(IOValue, GUI_ACTIVE); Count = GetBits(IOValue, GUI_FIFO); if (Count > pATI->nAvailableFIFOEntries) pATI->nAvailableFIFOEntries = Count; } xf86-video-mach64-6.9.5/src/atimach64xv.c0000644000175000017500000012116012270010352014515 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atichip.h" #include "atimach64accel.h" #include "atimach64io.h" #include "atixv.h" #include "atimach64version.h" #include #include "fourcc.h" #include "xf86xv.h" #define MAKE_ATOM(string) MakeAtom(string, strlen(string), TRUE) #define MaxScale (CARD32)(CARD16)(-1) static unsigned long ATIMach64XVAtomGeneration = (unsigned long)(-1); static XF86VideoEncodingRec ATIMach64VideoEncoding[] = { { 0, "XV_IMAGE", 720, 2048, {1, 1} } }; #define nATIMach64VideoEncoding NumberOf(ATIMach64VideoEncoding) static XF86VideoFormatRec ATIMach64VideoFormat[] = { { 8, TrueColor}, { 8, DirectColor}, { 8, PseudoColor}, { 8, GrayScale}, { 8, StaticGray}, { 8, StaticColor}, {15, TrueColor}, {16, TrueColor}, {24, TrueColor}, {15, DirectColor}, {16, DirectColor}, {24, DirectColor} }; #define nATIMach64VideoFormat NumberOf(ATIMach64VideoFormat) static XF86AttributeRec ATIMach64Attribute[] = { /* These are only supported on the Rage Pro and later ... */ { XvSettable | XvGettable, -1000, 1000, "XV_SATURATION" }, { XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS" }, { XvSettable | XvGettable, -1000, 1000, "XV_COLOUR" }, { XvSettable | XvGettable, -1000, 1000, "XV_COLOR" }, /* Local attributes, odds and ends for compatibility, etc... */ { XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLOURKEY" }, { XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY" }, { XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLOURKEY" }, { XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY" }, { XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLOURKEY_MASK" }, { XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY_MASK" }, { XvSettable, 0, 0, "XV_SET_DEFAULTS" }, { /* Keep last */ XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER" } }; #define nATIMach64Attribute NumberOf(ATIMach64Attribute) static XF86ImageRec ATIMach64Image[] = { XVIMAGE_YUY2, XVIMAGE_UYVY, XVIMAGE_YV12, XVIMAGE_I420 }; #define nATIMach64Image NumberOf(ATIMach64Image) /* A local XVideo adaptor attribute record */ typedef struct _ATIMach64Attribute { Atom AttributeID; INT32 MaxValue; /* ... for the hardware */ void (*SetAttribute) (ATIPtr, INT32); INT32 (*GetAttribute) (ATIPtr); } ATIMach64AttributeRec, *ATIMach64AttributePtr; /* Functions to get/set XVideo adaptor attributes */ static void ATIMach64SetSaturationAttribute ( ATIPtr pATI, INT32 Value ) { /* Set the register */ pATI->NewHW.scaler_colour_cntl &= ~(SCALE_SATURATION_U | SCALE_SATURATION_V); pATI->NewHW.scaler_colour_cntl |= SetBits(Value, SCALE_SATURATION_U) | SetBits(Value, SCALE_SATURATION_V); outf(SCALER_COLOUR_CNTL, pATI->NewHW.scaler_colour_cntl); } static INT32 ATIMach64GetSaturationAttribute ( ATIPtr pATI ) { return (INT32)GetBits(pATI->NewHW.scaler_colour_cntl, SCALE_SATURATION_U); } static void ATIMach64SetBrightnessAttribute ( ATIPtr pATI, INT32 Value ) { /* Set the register */ pATI->NewHW.scaler_colour_cntl &= ~SCALE_BRIGHTNESS; pATI->NewHW.scaler_colour_cntl |= SetBits(Value, SCALE_BRIGHTNESS); outf(SCALER_COLOUR_CNTL, pATI->NewHW.scaler_colour_cntl); } static INT32 ATIMach64GetBrightnessAttribute ( ATIPtr pATI ) { return (INT32)GetBits(pATI->NewHW.scaler_colour_cntl, SCALE_BRIGHTNESS); } static void ATIMach64SetDoubleBufferAttribute ( ATIPtr pATI, INT32 Value ) { pATI->DoubleBuffer = Value; } static INT32 ATIMach64GetDoubleBufferAttribute ( ATIPtr pATI ) { return (int)pATI->DoubleBuffer; } static void ATIMach64SetAutoPaintAttribute ( ATIPtr pATI, INT32 Value ) { pATI->AutoPaint = Value; } static INT32 ATIMach64GetAutoPaintAttribute ( ATIPtr pATI ) { return (int)pATI->AutoPaint; } static void ATIMach64SetColourKeyAttribute ( ATIPtr pATI, INT32 Value ) { pATI->NewHW.overlay_graphics_key_clr = (CARD32)(Value & ((1 << pATI->depth) - 1)); outf(OVERLAY_GRAPHICS_KEY_CLR, pATI->NewHW.overlay_graphics_key_clr); } static INT32 ATIMach64GetColourKeyAttribute ( ATIPtr pATI ) { return (INT32)pATI->NewHW.overlay_graphics_key_clr; } static void ATIMach64SetColourKeyMaskAttribute ( ATIPtr pATI, INT32 Value ) { pATI->NewHW.overlay_graphics_key_msk = (CARD32)(Value & ((1 << pATI->depth) - 1)); outf(OVERLAY_GRAPHICS_KEY_MSK, pATI->NewHW.overlay_graphics_key_msk); } static INT32 ATIMach64GetColourKeyMaskAttribute ( ATIPtr pATI ) { return (INT32)pATI->NewHW.overlay_graphics_key_msk; } /* * ATIMach64SetDefaultAttributes -- * * This function calls other functions to set default values for the various * attributes of an XVideo port. */ static void ATIMach64SetDefaultAttributes ( ATIPtr pATI, INT32 Value ) { ATIMach64SetAutoPaintAttribute(pATI, TRUE); ATIMach64SetDoubleBufferAttribute(pATI, FALSE); ATIMach64SetColourKeyMaskAttribute(pATI, (1 << pATI->depth) - 1); ATIMach64SetColourKeyAttribute(pATI, (3 << ((2 * pATI->depth) / 3)) | (2 << ((1 * pATI->depth) / 3)) | (1 << ((0 * pATI->depth) / 3))); if (pATI->Chip < ATI_CHIP_264GTPRO) return; ATIMach64SetBrightnessAttribute(pATI, 32); ATIMach64SetSaturationAttribute(pATI, 16); } /* * There is a one-to-one correspondance between elements of the following array * and those of ATIMach64Attribute. */ static ATIMach64AttributeRec ATIMach64AttributeInfo[nATIMach64Attribute] = { { /* SATURATION */ 0, 23, ATIMach64SetSaturationAttribute, ATIMach64GetSaturationAttribute }, { /* BRIGHTNESS */ 0, 63, ATIMach64SetBrightnessAttribute, ATIMach64GetBrightnessAttribute }, { /* COLOUR */ 0, 23, ATIMach64SetSaturationAttribute, ATIMach64GetSaturationAttribute }, { /* COLOR */ 0, 23, ATIMach64SetSaturationAttribute, ATIMach64GetSaturationAttribute }, { /* AUTOPAINT_COLOURKEY */ 0, 1, ATIMach64SetAutoPaintAttribute, ATIMach64GetAutoPaintAttribute }, { /* AUTOPAINT_COLORKEY */ 0, 1, ATIMach64SetAutoPaintAttribute, ATIMach64GetAutoPaintAttribute }, { /* COLOURKEY */ 0, (1 << 24) - 1, ATIMach64SetColourKeyAttribute, ATIMach64GetColourKeyAttribute }, { /* COLORKEY */ 0, (1 << 24) - 1, ATIMach64SetColourKeyAttribute, ATIMach64GetColourKeyAttribute }, { /* COLOURKEY_MASK */ 0, (1 << 24) - 1, ATIMach64SetColourKeyMaskAttribute, ATIMach64GetColourKeyMaskAttribute }, { /* COLORKEY_MASK */ 0, (1 << 24) - 1, ATIMach64SetColourKeyMaskAttribute, ATIMach64GetColourKeyMaskAttribute }, { /* SET_DEFAULTS */ 0, 0, ATIMach64SetDefaultAttributes, NULL }, { /* DOUBLE_BUFFER */ 0, 1, ATIMach64SetDoubleBufferAttribute, ATIMach64GetDoubleBufferAttribute } }; /* * ATIMach64FindAttribute -- * * This function is called to locate an Xv attribute's table entry. */ static int ATIMach64FindPortAttribute ( ATIPtr pATI, Atom AttributeID ) { int iAttribute; if (pATI->Chip < ATI_CHIP_264GTPRO) iAttribute = 4; else iAttribute = 0; for (; iAttribute < nATIMach64Attribute; iAttribute++) if (AttributeID == ATIMach64AttributeInfo[iAttribute].AttributeID) return iAttribute; return -1; } /* * ATIMach64SetPortAttribute -- * * This function sets the value of a particular port's attribute. */ static int ATIMach64SetPortAttribute ( ScrnInfoPtr pScreenInfo, Atom AttributeID, INT32 Value, pointer pATI ) { INT32 Range; int iAttribute; if (((iAttribute = ATIMach64FindPortAttribute(pATI, AttributeID)) < 0) || !ATIMach64AttributeInfo[iAttribute].SetAttribute) return BadMatch; Range = ATIMach64Attribute[iAttribute].max_value - ATIMach64Attribute[iAttribute].min_value; if (Range >= 0) { /* Limit and scale the value */ Value -= ATIMach64Attribute[iAttribute].min_value; if (Value < 0) Value = 0; else if (Value > Range) Value = Range; if (Range != ATIMach64AttributeInfo[iAttribute].MaxValue) { if (ATIMach64AttributeInfo[iAttribute].MaxValue > 0) Value *= ATIMach64AttributeInfo[iAttribute].MaxValue; if (Range > 0) Value /= Range; } } (*ATIMach64AttributeInfo[iAttribute].SetAttribute)(pATI, Value); return Success; } /* * ATIMach64SetPortAttribute -- * * This function retrieves the value of a particular port's attribute. */ static int ATIMach64GetPortAttribute ( ScrnInfoPtr pScreenInfo, Atom AttributeID, INT32 *Value, pointer pATI ) { INT32 Range; int iAttribute; if (!Value || ((iAttribute = ATIMach64FindPortAttribute(pATI, AttributeID)) < 0) || !ATIMach64AttributeInfo[iAttribute].GetAttribute) return BadMatch; *Value = (*ATIMach64AttributeInfo[iAttribute].GetAttribute)(pATI); Range = ATIMach64Attribute[iAttribute].max_value - ATIMach64Attribute[iAttribute].min_value; if (Range >= 0) { if (Range != ATIMach64AttributeInfo[iAttribute].MaxValue) { /* (Un-)scale the value */ if (Range > 0) *Value *= Range; if (ATIMach64AttributeInfo[iAttribute].MaxValue > 0) *Value /= ATIMach64AttributeInfo[iAttribute].MaxValue; } *Value += ATIMach64Attribute[iAttribute].min_value; } return Success; } static pointer ATIMach64XVMemAlloc ( ScreenPtr pScreen, pointer pVideo, int size, int *offset, ATIPtr pATI ); static void ATIMach64XVMemFree ( ScreenPtr pScreen, pointer pVideo, ATIPtr pATI ); #ifdef USE_XAA /* * ATIMach64RemoveLinearCallback -- * * This is called by the framebuffer manager to release the offscreen XVideo * buffer after the video has been temporarily disabled due to its window being * iconified or completely occluded. */ static void ATIMach64RemoveLinearCallback ( FBLinearPtr pLinear ) { ATIPtr pATI = ATIPTR(xf86ScreenToScrn(pLinear->pScreen)); pATI->pXVBuffer = NULL; outf(OVERLAY_SCALE_CNTL, SCALE_EN); } #endif /* USE_XAA */ /* * ATIMach64StopVideo -- * * This is called to stop displaying a video. Note that, to prevent jittering * this doesn't actually turn off the overlay unless 'Cleanup' is TRUE, i.e. * when the video is to be actually stopped rather than temporarily disabled. */ static void ATIMach64StopVideo ( ScrnInfoPtr pScreenInfo, pointer Data, Bool Cleanup ) { ScreenPtr pScreen = pScreenInfo->pScreen; ATIPtr pATI = Data; if (pATI->ActiveSurface) return; REGION_EMPTY(pScreen, &pATI->VideoClip); #ifdef USE_XAA if (!pATI->useEXA && !Cleanup) { /* * Free offscreen buffer if/when its allocation is needed by XAA's * pixmap cache. */ FBLinearPtr linear = (FBLinearPtr)pATI->pXVBuffer; if (linear) linear->RemoveLinearCallback = ATIMach64RemoveLinearCallback; return; } #endif /* USE_XAA */ ATIMach64XVMemFree(pScreen, pATI->pXVBuffer, pATI); pATI->pXVBuffer = NULL; outf(OVERLAY_SCALE_CNTL, SCALE_EN); } /* * ATIMach64QueryBestSize -- * * Quoting XVideo docs: * * This function provides the client with a way to query what the destination * dimensions would end up being if they were to request that an area * VideoWidth by VideoHeight from the video stream be scaled to rectangle of * DrawableWidth by DrawableHeight on the screen. Since it is not expected * that all hardware will be able to get the target dimensions exactly, it is * important that the driver provide this function. */ static void ATIMach64QueryBestSize ( ScrnInfoPtr pScreenInfo, Bool Motion, short VideoWidth, short VideoHeight, short DrawableWidth, short DrawableHeight, unsigned int *Width, unsigned int *Height, pointer pATI ) { *Width = DrawableWidth; *Height = DrawableHeight; } /* * ATIMach64QueryImageAttributes -- * * Quoting XVideo docs: * * This function is called to let the driver specify how data for a particular * image of size Width by Height should be stored. Sometimes only the size and * corrected width and height are needed. In that case pitches and offsets are * NULL. The size of the memory required for the image is returned by this * function. The width and height of the requested image can be altered by the * driver to reflect format limitations (such as component sampling periods * that are larger than one). If pPitch and pOffset are not NULL, these will * be arrays with as many elements in them as there are planes in the image * format. The driver should specify the pitch (in bytes) of each scanline in * the particular plane as well as the offset to that plane (in bytes) from the * beginning of the image. */ static int ATIMach64QueryImageAttributes ( ScrnInfoPtr pScreenInfo, int ImageID, unsigned short *Width, unsigned short *Height, int *pPitch, int *pOffset ) { int Size, tmp; if (!Width || !Height) return 0; if (*Width > 2048) *Width = 2048; else *Width = (*Width + 1) & ~1; if (*Height > 2048) *Height = 2048; if (pOffset) pOffset[0] = 0; switch (ImageID) { case FOURCC_YV12: case FOURCC_I420: *Height = (*Height + 1) & ~1; Size = (*Width + 3) & ~3; if (pPitch) pPitch[0] = Size; Size *= *Height; if (pOffset) pOffset[1] = Size; tmp = ((*Width >> 1) + 3) & ~3; if (pPitch) pPitch[1] = pPitch[2] = tmp; tmp *= (*Height >> 1); Size += tmp; if (pOffset) pOffset[2] = Size; Size += tmp; break; case FOURCC_UYVY: case FOURCC_YUY2: Size = *Width << 1; if (pPitch) pPitch[0] = Size; Size *= *Height; break; default: Size = 0; break; } return Size; } /* * ATIMach64ScaleVideo -- * * This function is called to calculate overlay scaling factors. */ static void ATIMach64ScaleVideo ( ATIPtr pATI, DisplayModePtr pMode, int SrcW, int SrcH, int DstW, int DstH, CARD32 *pHScale, CARD32 *pVScale ) { int Shift; *pHScale = ATIDivide(SrcW, DstW, GetBits(pATI->NewHW.pll_vclk_cntl, PLL_ECP_DIV) + 12, 0); Shift = 12; if (pMode->Flags & V_INTERLACE) Shift++; if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { if (pMode->VDisplay < pATI->LCDVertical) { SrcH *= pMode->VDisplay; DstH *= pATI->LCDVertical; } } else { if (pMode->Flags & V_DBLSCAN) Shift--; if (pMode->VScan > 1) DstH *= pMode->VScan; } *pVScale = ATIDivide(SrcH, DstH, Shift, 0); } /* * ATIMach64ClipVideo -- * * Clip the video (both source and destination) and make various other * adjustments. */ static Bool ATIMach64ClipVideo ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, int ImageID, short SrcX, short SrcY, short SrcW, short SrcH, short DstX, short DstY, short *DstW, short *DstH, short Width, short Height, RegionPtr pClip, BoxPtr pDstBox, INT32 *SrcX1, INT32 *SrcX2, INT32 *SrcY1, INT32 *SrcY2, int *SrcLeft, int *SrcTop ) { CARD32 HScale, VScale; /* Check hardware limits */ if ((Height <= 0) || (Height > 2048) || (Width <= 0) || (Width > 768) || ((Width > 384) && (pATI->Chip < ATI_CHIP_264VTB)) || ((Width > 720) && (pATI->Chip < ATI_CHIP_264GTPRO || pATI->Chip > ATI_CHIP_264LTPRO))) return FALSE; ATIMach64ScaleVideo(pATI, pScreenInfo->currentMode, SrcW, SrcH, *DstW, *DstH, &HScale, &VScale); if (!HScale || !VScale) return FALSE; if (HScale > MaxScale) *DstW = (*DstW * HScale) / MaxScale; if (VScale > MaxScale) *DstH = (*DstH * HScale) / MaxScale; /* Clip both the source and the destination */ *SrcX1 = SrcX; *SrcX2 = SrcX + SrcW; *SrcY1 = SrcY; *SrcY2 = SrcY + SrcH; pDstBox->x1 = DstX; pDstBox->x2 = DstX + *DstW; pDstBox->y1 = DstY; pDstBox->y2 = DstY + *DstH; if (!xf86XVClipVideoHelper(pDstBox, SrcX1, SrcX2, SrcY1, SrcY2, pClip, Width, Height)) return FALSE; /* * Reset overlay scaler origin. This prevents jittering during * viewport panning or while the video is being moved or gradually * obscured/unobscured. */ pDstBox->x1 = DstX; pDstBox->y1 = DstY; /* Translate to the current viewport */ pDstBox->x1 -= pScreenInfo->frameX0; pDstBox->x2 -= pScreenInfo->frameX0; pDstBox->y1 -= pScreenInfo->frameY0; pDstBox->y2 -= pScreenInfo->frameY0; *SrcLeft = *SrcTop = 0; /* * If the overlay scaler origin ends up outside the current viewport, move * it to the viewport's top left corner. This unavoidably causes a slight * jittering in the image (even with double-buffering). */ if (pDstBox->x1 < 0) { *SrcLeft = ((-pDstBox->x1 * SrcW) / *DstW) & ~1; pDstBox->x1 = 0; } if (pDstBox->y1 < 0) { *SrcTop = (-pDstBox->y1 * SrcH) / *DstH; pDstBox->y1 = 0; switch (ImageID) { case FOURCC_YV12: case FOURCC_I420: *SrcTop = (*SrcTop + 1) & ~1; break; default: break; } } return TRUE; } #ifdef ATIMove32 /* A faster intercept */ #undef xf86XVCopyPacked #define xf86XVCopyPacked ATIMach64XVCopyPacked static void ATIMach64XVCopyPacked ( const CARD8 *pSrc, CARD8 *pDst, int SrcPitch, int DstPitch, int Height, int Width ) { Width >>= 1; while (--Height >= 0) { ATIMove32(pDst, pSrc, Width); pSrc += SrcPitch; pDst += DstPitch; } } #endif /* * ATIMach64DisplayVideo -- * * This function programmes Mach64 registers needed to display a video. */ static void ATIMach64DisplayVideo ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, BoxPtr pDstBox, int ImageID, int Offset, int Pitch, short SrcW, short SrcH, short DstW, short DstH, short Width, short Height ) { DisplayModePtr pMode = pScreenInfo->currentMode; CARD32 HScale, VScale; if (pMode->VScan > 1) { pDstBox->y1 *= pMode->VScan; pDstBox->y2 *= pMode->VScan; } if (pMode->Flags & V_DBLSCAN) { pDstBox->y1 <<= 1; pDstBox->y2 <<= 1; } /* Recalculate overlay scale factors */ ATIMach64ScaleVideo(pATI, pMode, SrcW, SrcH, DstW, DstH, &HScale, &VScale); pATI->NewHW.video_format &= ~SCALER_IN; if (ImageID == FOURCC_UYVY) pATI->NewHW.video_format |= SCALER_IN_YVYU422; else pATI->NewHW.video_format |= SCALER_IN_VYUY422; ATIMach64WaitForFIFO(pATI, 8); outq(OVERLAY_Y_X_START, OVERLAY_Y_X_END, OVERLAY_LOCK_START | SetWord(pDstBox->x1, 1) | SetWord(pDstBox->y1, 0), SetWord(pDstBox->x2 - 1, 1) | SetWord(pDstBox->y2 - 1, 0)); outf(OVERLAY_SCALE_INC, SetWord(HScale, 1) | SetWord(VScale, 0)); outf(SCALER_HEIGHT_WIDTH, SetWord(Width, 1) | SetWord(Height, 0)); outf(VIDEO_FORMAT, pATI->NewHW.video_format); if (pATI->Chip < ATI_CHIP_264VTB) { outf(BUF0_OFFSET, Offset); outf(BUF0_PITCH, Pitch); } else { outf(SCALER_BUF0_OFFSET, Offset); outf(SCALER_BUF_PITCH, Pitch); } outf(OVERLAY_SCALE_CNTL, SCALE_PIX_EXPAND | OVERLAY_EN | SCALE_EN); } /* * ATIMach64PutImage -- * * This function is called to put a video image on the screen. */ static int ATIMach64PutImage ( ScrnInfoPtr pScreenInfo, short SrcX, short SrcY, short DstX, short DstY, short SrcW, short SrcH, short DstW, short DstH, int ImageID, unsigned char *Buffer, short Width, short Height, Bool Synchronise, RegionPtr pClip, pointer Data, DrawablePtr pDraw ) { ATIPtr pATI = Data; ScreenPtr pScreen; INT32 SrcX1, SrcX2, SrcY1, SrcY2; BoxRec DstBox; int SrcPitch, SrcPitchUV, DstPitch, DstSize; int SrcTop, SrcLeft, DstWidth, DstHeight; int Top, Bottom, Left, Right, nLine, nPixel, Offset; int OffsetV, OffsetU; int XVOffset; int tmp; CARD8 *pDst; if (pATI->ActiveSurface) return Success; if (DstH < 16) return Success; if (!ATIMach64ClipVideo(pScreenInfo, pATI, ImageID, SrcX, SrcY, SrcW, SrcH, DstX, DstY, &DstW, &DstH, Width, Height, pClip, &DstBox, &SrcX1, &SrcX2, &SrcY1, &SrcY2, &SrcLeft, &SrcTop)) return Success; pScreen = pScreenInfo->pScreen; DstWidth = Width - SrcLeft; DstHeight = Height - SrcTop; /* * Allocate an offscreen buffer for the entire source, even though only a * subset of the source will be copied into it. */ DstPitch = /* bytes */ (DstWidth + DstWidth + 15) & ~15; DstSize = /* bytes */ (DstPitch * DstHeight); pATI->pXVBuffer = ATIMach64XVMemAlloc(pScreen, pATI->pXVBuffer, (pATI->DoubleBuffer + 1) * DstSize, &XVOffset, pATI); if (!pATI->pXVBuffer) { if (!pATI->DoubleBuffer) return BadAlloc; pATI->pXVBuffer = ATIMach64XVMemAlloc(pScreen, pATI->pXVBuffer, DstSize, &XVOffset, pATI); if (!pATI->pXVBuffer) return BadAlloc; xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Video image double-buffering downgraded to single-buffering\n due" " to insufficient video memory.\n"); pATI->DoubleBuffer = pATI->CurrentBuffer = 0; } else { /* Possibly switch buffers */ pATI->CurrentBuffer = pATI->DoubleBuffer - pATI->CurrentBuffer; } /* Synchronise video memory accesses */ ATIMach64Sync(pScreenInfo); Offset = XVOffset + pATI->CurrentBuffer * DstSize; pDst = pATI->pMemoryLE; pDst += Offset; switch (ImageID) { case FOURCC_YV12: case FOURCC_I420: Left = (SrcX1 >> 16) & ~1; Right = ((SrcX2 + 0x1FFFF) >> 16) & ~1; Top = (SrcY1 >> 16) & ~1; Bottom = ((SrcY2 + 0x1FFFF) >> 16) & ~1; if ((Right < Width) && ((SrcX1 & 0x1FFFF) <= (SrcX2 & 0x1FFFF))) Right += 2; if ((Bottom < Height) && ((SrcY1 & 0x1FFFF) <= (SrcY2 & 0x1FFFF))) Bottom += 2; nPixel = Right - Left; nLine = Bottom - Top; SrcPitch = (Width + 3) & ~3; OffsetV = SrcPitch * Height; SrcPitchUV = ((Width >> 1) + 3) & ~3; OffsetU = ((Height >> 1) * SrcPitchUV) + OffsetV; tmp = ((Top >> 1) * SrcPitchUV) + (Left >> 1); OffsetV += tmp; OffsetU += tmp; if (ImageID == FOURCC_I420) { tmp = OffsetV; OffsetV = OffsetU; OffsetU = tmp; } pDst += ((Top - SrcTop) * DstPitch) + ((Left - SrcLeft) << 1); xf86XVCopyYUV12ToPacked(Buffer + (Top * SrcPitch) + Left, Buffer + OffsetV, Buffer + OffsetU, pDst, SrcPitch, SrcPitchUV, DstPitch, nLine, nPixel); break; case FOURCC_UYVY: case FOURCC_YUY2: default: Left = (SrcX1 >> 16) & ~1; Right = ((SrcX2 + 0x1FFFF) >> 16) & ~1; Top = SrcY1 >> 16; Bottom = (SrcY2 + 0x0FFFF) >> 16; if ((Right < Width) && ((SrcX1 & 0x1FFFF) <= (SrcX2 & 0x1FFFF))) Right += 2; if ((Bottom < Height) && ((SrcY1 & 0x0FFFF) <= (SrcY2 & 0x0FFFF))) Bottom++; nPixel = Right - Left; nLine = Bottom - Top; SrcPitch = Width << 1; Buffer += (Top * SrcPitch) + (Left << 1); pDst += ((Top - SrcTop) * DstPitch) + ((Left - SrcLeft) << 1); xf86XVCopyPacked(Buffer, pDst, SrcPitch, DstPitch, nLine, nPixel); break; } if (!REGION_EQUAL(pScreen, &pATI->VideoClip, pClip)) { REGION_COPY(pScreen, &pATI->VideoClip, pClip); if (pATI->AutoPaint) xf86XVFillKeyHelper(pScreen, pATI->NewHW.overlay_graphics_key_clr, pClip); } ATIMach64DisplayVideo(pScreenInfo, pATI, &DstBox, ImageID, Offset, DstPitch / 2, SrcW, SrcH, DstW, DstH, DstWidth, DstHeight); return Success; } /* * ATIMach64AllocateSurface -- * * This function allocates an offscreen buffer (called a "surface") for use by * an external driver such as 'v4l'. */ static int ATIMach64AllocateSurface ( ScrnInfoPtr pScreenInfo, int ImageID, unsigned short Width, unsigned short Height, XF86SurfacePtr pSurface ) { ScreenPtr pScreen; ATIPtr pATI = ATIPTR(pScreenInfo); int XVOffset; if (pATI->ActiveSurface) return BadAlloc; if ((Height <= 0) || (Height > 2048) || (Width <= 0) || (Width > 768) || ((Width > 384) && (pATI->Chip < ATI_CHIP_264VTB)) || ((Width > 720) && (pATI->Chip < ATI_CHIP_264GTPRO || pATI->Chip > ATI_CHIP_264LTPRO))) return BadValue; Width = (Width + 1) & ~1; pATI->SurfacePitch = ((Width << 1) + 15) & ~15; pScreen = pScreenInfo->pScreen; pATI->pXVBuffer = ATIMach64XVMemAlloc(pScreen, pATI->pXVBuffer, Height * pATI->SurfacePitch, &XVOffset, pATI); if (!pATI->pXVBuffer) return BadAlloc; pATI->SurfaceOffset = XVOffset; pSurface->pScrn = pScreenInfo; pSurface->id = ImageID; pSurface->width = Width; pSurface->height = Height; pSurface->pitches = &pATI->SurfacePitch; pSurface->offsets = &pATI->SurfaceOffset; pSurface->devPrivate.ptr = pATI; /* Stop the video */ outf(OVERLAY_SCALE_CNTL, SCALE_EN); REGION_EMPTY(pScreen, &pATI->VideoClip); pATI->ActiveSurface = TRUE; return Success; } /* * ATIMach64FreeSurface -- * * This function called to free a surface's offscreen buffer. */ static int ATIMach64FreeSurface ( XF86SurfacePtr pSurface ) { ATIPtr pATI = pSurface->devPrivate.ptr; if (!pATI->ActiveSurface) return Success; outf(OVERLAY_SCALE_CNTL, SCALE_EN); ATIMach64XVMemFree(pSurface->pScrn->pScreen, pATI->pXVBuffer, pATI); pATI->pXVBuffer = NULL; pATI->ActiveSurface = FALSE; return Success; } /* * ATIMach64DisplaySurface -- * * This function is called to display a video surface. */ static int ATIMach64DisplaySurface ( XF86SurfacePtr pSurface, short SrcX, short SrcY, short DstX, short DstY, short SrcW, short SrcH, short DstW, short DstH, RegionPtr pClip ) { ATIPtr pATI = pSurface->devPrivate.ptr; ScrnInfoPtr pScreenInfo; int ImageID; short Width, Height; BoxRec DstBox; INT32 SrcX1, SrcX2, SrcY1, SrcY2; int SrcLeft, SrcTop, SrcPitch, Offset; if (!pATI->ActiveSurface) return Success; pScreenInfo = pSurface->pScrn; ImageID = pSurface->id; Width = pSurface->width; Height = pSurface->height; if (!ATIMach64ClipVideo(pScreenInfo, pATI, ImageID, SrcX, SrcY, SrcW, SrcH, DstX, DstY, &DstW, &DstH, Width, Height, pClip, &DstBox, &SrcX1, &SrcX2, &SrcY1, &SrcY2, &SrcLeft, &SrcTop)) return Success; xf86XVFillKeyHelper(pScreenInfo->pScreen, pATI->NewHW.overlay_graphics_key_clr, pClip); SrcPitch = pSurface->pitches[0]; Offset = pSurface->offsets[0] + (SrcTop * SrcPitch) + (SrcLeft << 1); ATIMach64DisplayVideo(pScreenInfo, pATI, &DstBox, ImageID, Offset, SrcPitch, SrcW, SrcH, DstW, DstH, Width, Height); return Success; } /* * ATIMach64StopSurface -- * * This function is called to stop the overlaid display of a video surface. */ static int ATIMach64StopSurface ( XF86SurfacePtr pSurface ) { ATIPtr pATI = pSurface->devPrivate.ptr; if (pATI->ActiveSurface) outf(OVERLAY_SCALE_CNTL, SCALE_EN); return Success; } /* * ATIMach64GetSurfaceAttribute -- * * Retrieve the value of an XVideo attribute. */ static int ATIMach64GetSurfaceAttribute ( ScrnInfoPtr pScreenInfo, Atom AttributeID, INT32 *Value ) { return ATIMach64GetPortAttribute(pScreenInfo, AttributeID, Value, ATIPTR(pScreenInfo)); } /* * ATIMach64SetSurfaceAttribute * * Set the value of an XVideo attribute. */ static int ATIMach64SetSurfaceAttribute ( ScrnInfoPtr pScreenInfo, Atom AttributeID, INT32 Value ) { return ATIMach64SetPortAttribute(pScreenInfo, AttributeID, Value, ATIPTR(pScreenInfo)); } /* XVideo surface registration data */ static XF86OffscreenImageRec ATIMach64Surface[] = { { &ATIMach64Image[0], /* YUY2 */ VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT, ATIMach64AllocateSurface, ATIMach64FreeSurface, ATIMach64DisplaySurface, ATIMach64StopSurface, ATIMach64GetSurfaceAttribute, ATIMach64SetSurfaceAttribute, 720, 2048, nATIMach64Attribute - 1, /* No double-buffering */ ATIMach64Attribute }, { &ATIMach64Image[1], /* UYVY */ VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT, ATIMach64AllocateSurface, ATIMach64FreeSurface, ATIMach64DisplaySurface, ATIMach64StopSurface, ATIMach64GetSurfaceAttribute, ATIMach64SetSurfaceAttribute, 720, 2048, nATIMach64Attribute - 1, /* No double-buffering */ ATIMach64Attribute } }; #define nATIMach64Surface NumberOf(ATIMach64Surface) /* * ATIMach64XVInitialiseAdaptor -- * * This function is called to make a Mach64's hardware overlay support * available as an XVideo adaptor. */ static int ATIMach64XVInitialiseAdaptor ( ScrnInfoPtr pScreenInfo, XF86VideoAdaptorPtr **pppAdaptor ) { ScreenPtr pScreen = xf86ScrnToScreen(pScreenInfo); ATIPtr pATI = ATIPTR(pScreenInfo); XF86VideoAdaptorPtr *ppAdaptor = NULL; XF86VideoAdaptorPtr pAdaptor; int Index; XF86VideoEncodingPtr enc = &(ATIMach64VideoEncoding[0]); XF86OffscreenImagePtr surf0 = &(ATIMach64Surface[0]); XF86OffscreenImagePtr surf1 = &(ATIMach64Surface[1]); if (xf86NameCmp(pScreenInfo->driverName, MACH64_DRIVER_NAME) != 0) return 0; if (pppAdaptor) *pppAdaptor = NULL; if (!pATI->Block1Base) return 0; if (!(pAdaptor = xf86XVAllocateVideoAdaptorRec(pScreenInfo))) return 0; ppAdaptor = xnfalloc(sizeof(pAdaptor)); ppAdaptor[0] = pAdaptor; pAdaptor->nPorts = 1; pAdaptor->pPortPrivates = pATI->XVPortPrivate; pATI->XVPortPrivate[0].ptr = pATI; pAdaptor->type = XvInputMask | XvImageMask | XvWindowMask; pAdaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; pAdaptor->name = "ATI Mach64 Back-end Overlay Scaler"; if (pATI->Chip < ATI_CHIP_264VTB) { enc->width = 384; } else if (pATI->Chip < ATI_CHIP_264GTPRO || pATI->Chip > ATI_CHIP_264LTPRO) { enc->width = 720; /* default */ } else { enc->width = 768; } pAdaptor->nEncodings = nATIMach64VideoEncoding; pAdaptor->pEncodings = ATIMach64VideoEncoding; pAdaptor->nFormats = nATIMach64VideoFormat; pAdaptor->pFormats = ATIMach64VideoFormat; pAdaptor->nAttributes = nATIMach64Attribute; pAdaptor->pAttributes = ATIMach64Attribute; if (pATI->Chip < ATI_CHIP_264GTPRO) { /* Older controllers don't have brightness or saturation controls */ pAdaptor->nAttributes -= 4; pAdaptor->pAttributes += 4; } pAdaptor->nImages = nATIMach64Image; pAdaptor->pImages = ATIMach64Image; pAdaptor->StopVideo = ATIMach64StopVideo; pAdaptor->SetPortAttribute = ATIMach64SetPortAttribute; pAdaptor->GetPortAttribute = ATIMach64GetPortAttribute; pAdaptor->QueryBestSize = ATIMach64QueryBestSize; pAdaptor->PutImage = ATIMach64PutImage; pAdaptor->QueryImageAttributes = ATIMach64QueryImageAttributes; REGION_NULL(pScreen, &pATI->VideoClip); pATI->ActiveSurface = FALSE; if (ATIMach64XVAtomGeneration != serverGeneration) { /* Refresh static data */ ATIMach64XVAtomGeneration = serverGeneration; Index = nATIMach64Attribute - pAdaptor->nAttributes; for (; Index < nATIMach64Attribute; Index++) ATIMach64AttributeInfo[Index].AttributeID = MAKE_ATOM(ATIMach64Attribute[Index].name); } ATIMach64SetDefaultAttributes(pATI, 0); if (pATI->Chip < ATI_CHIP_264VTB) { surf0->max_width = 384; surf1->max_width = 384; } else if (pATI->Chip < ATI_CHIP_264GTPRO || pATI->Chip > ATI_CHIP_264LTPRO) { surf0->max_width = 720; /* default */ surf1->max_width = 720; } else { surf0->max_width = 768; surf1->max_width = 768; } if (pATI->Chip < ATI_CHIP_264GTPRO) { /* No saturation nor brightness */ surf0->num_attributes -= 4; surf1->num_attributes -= 4; surf0->attributes += 4; surf1->attributes += 4; } xf86XVRegisterOffscreenImages(pScreen, ATIMach64Surface, nATIMach64Surface); if (pppAdaptor) *pppAdaptor = ppAdaptor; else { free(ppAdaptor[0]); free(ppAdaptor); } return 1; } /* * ATIXVPreInit -- * * This function is called by ATIPreInit() to set up the environment required * to support the XVideo extension. */ void ATIXVPreInit ( ATIPtr pATI ) { (void)xf86XVRegisterGenericAdaptorDriver(ATIMach64XVInitialiseAdaptor); } /* * ATIXVFreeAdaptorInfo -- * * Free XVideo adaptor information. */ static void ATIXVFreeAdaptorInfo ( XF86VideoAdaptorPtr *ppAdaptor, int nAdaptor ) { if (!ppAdaptor) return; while (nAdaptor > 0) free(ppAdaptor[--nAdaptor]); free(ppAdaptor); } /* * ATIInitializeXVideo -- * * This function is called to initialise XVideo extension support on a screen. */ Bool ATIInitializeXVideo ( ScreenPtr pScreen, ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { XF86VideoAdaptorPtr *ppAdaptor; int nAdaptor; Bool result; pScreenInfo->memPhysBase = pATI->LinearBase; pScreenInfo->fbOffset = 0; nAdaptor = xf86XVListGenericAdaptors(pScreenInfo, &ppAdaptor); result = xf86XVScreenInit(pScreen, ppAdaptor, nAdaptor); ATIXVFreeAdaptorInfo(ppAdaptor, nAdaptor); return result; } /* * ATIMach64CloseXVideo -- * * This function is called during screen termination to clean up after * initialisation of Mach64 XVideo support. */ void ATICloseXVideo ( ScreenPtr pScreen, ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { if (!pATI->Block1Base) return; ATIMach64StopVideo(pScreenInfo, pATI, TRUE); REGION_UNINIT(pScreen, &pATI->VideoClip); } /* Functions for offscreen memory management */ #ifdef USE_XAA static FBLinearPtr ATIResizeOffscreenLinear ( ScreenPtr pScreen, FBLinearPtr pLinear, int Size ) { if (Size <= 0) { xf86FreeOffscreenLinear(pLinear); return NULL; } if (pLinear) { if ((pLinear->size >= Size) || xf86ResizeOffscreenLinear(pLinear, Size)) { pLinear->MoveLinearCallback = NULL; pLinear->RemoveLinearCallback = NULL; return pLinear; } xf86FreeOffscreenLinear(pLinear); } pLinear = xf86AllocateOffscreenLinear(pScreen, Size, 16, NULL, NULL, NULL); if (!pLinear) { int maxSize; xf86QueryLargestOffscreenLinear(pScreen, &maxSize, 16, PRIORITY_EXTREME); if (maxSize < Size) return NULL; xf86PurgeUnlockedOffscreenAreas(pScreen); pLinear = xf86AllocateOffscreenLinear(pScreen, Size, 16, NULL, NULL, NULL); } return pLinear; } #endif /* USE_XAA */ static pointer ATIMach64XVMemAlloc ( ScreenPtr pScreen, pointer pVideo, int size, int *offset, ATIPtr pATI ) { #ifdef USE_EXA if (pATI->useEXA) { ExaOffscreenArea *area = (ExaOffscreenArea *)pVideo; if (area != NULL) { if (area->size >= size) { *offset = area->offset; return area; } exaOffscreenFree(pScreen, area); } area = exaOffscreenAlloc(pScreen, size, 64, TRUE, NULL, NULL); if (area != NULL) { *offset = area->offset; return area; } } #endif /* USE_EXA */ #ifdef USE_XAA if (!pATI->useEXA) { FBLinearPtr linear = (FBLinearPtr)pVideo; int cpp = pATI->AdjustDepth; /* XAA allocates in units of pixels at the screen bpp, so adjust size * appropriately. */ size = (size + cpp - 1) / cpp; linear = ATIResizeOffscreenLinear(pScreen, linear, size); if (linear != NULL) { *offset = linear->offset * cpp; return linear; } } #endif /* USE_XAA */ *offset = 0; return NULL; } static void ATIMach64XVMemFree ( ScreenPtr pScreen, pointer pVideo, ATIPtr pATI ) { #ifdef USE_EXA if (pATI->useEXA) { ExaOffscreenArea *area = (ExaOffscreenArea *)pVideo; if (area != NULL) exaOffscreenFree(pScreen, area); } #endif /* USE_EXA */ #ifdef USE_XAA if (!pATI->useEXA) { FBLinearPtr linear = (FBLinearPtr)pVideo; if (linear != NULL) ATIResizeOffscreenLinear(pScreen, linear, 0); } #endif /* USE_XAA */ } xf86-video-mach64-6.9.5/src/atimode.c0000644000175000017500000010357512270010352014013 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atichip.h" #include "atidac.h" #include "atidsp.h" #include "atimach64.h" #include "atimach64io.h" #include "atimode.h" #include "atiprint.h" #include "atirgb514.h" #include "ativga.h" #include "atiwonder.h" #include "atiwonderio.h" #ifdef TV_OUT #include "vbe.h" #endif /* TV_OUT */ #ifndef AVOID_CPIO /* * ATICopyVGAMemory -- * * This function is called to copy one or all banks of a VGA plane. */ static void ATICopyVGAMemory ( ATIPtr pATI, ATIHWPtr pATIHW, pointer *saveptr, pointer *from, pointer *to ) { unsigned int iBank; for (iBank = 0; iBank < pATIHW->nBank; iBank++) { (*pATIHW->SetBank)(pATI, iBank); (void)memcpy(*to, *from, 0x00010000U); *saveptr = (char *)(*saveptr) + 0x00010000U; } } /* * ATISwap -- * * This function saves/restores video memory contents during video mode * switches. */ static void ATISwap ( int iScreen, ATIPtr pATI, ATIHWPtr pATIHW, Bool ToFB ) { pointer save, *from, *to; unsigned int iPlane = 0, PlaneMask = 1; CARD8 seq2, seq4, gra1, gra3, gra4, gra5, gra6, gra8; /* * This is only done for non-accelerator modes. If the video state on * server entry was an accelerator mode, the application that relinquished * the console had better do the Right Thing (tm) anyway by saving and * restoring its own video memory contents. */ if (pATIHW->crtc != ATI_CRTC_VGA) return; if (ToFB) { if (!pATIHW->frame_buffer) return; from = &save; to = &pATI->pBank; } else { /* Allocate the memory */ if (!pATIHW->frame_buffer) { pATIHW->frame_buffer = (pointer)malloc(pATIHW->nBank * pATIHW->nPlane * 0x00010000U); if (!pATIHW->frame_buffer) { xf86DrvMsg(iScreen, X_WARNING, "Temporary frame buffer could not be allocated.\n"); return; } } from = &pATI->pBank; to = &save; } /* Turn off screen */ ATIVGASaveScreen(pATI, SCREEN_SAVER_ON); /* Save register values to be modified */ seq2 = GetReg(SEQX, 0x02U); seq4 = GetReg(SEQX, 0x04U); gra1 = GetReg(GRAX, 0x01U); gra3 = GetReg(GRAX, 0x03U); gra5 = GetReg(GRAX, 0x05U); gra6 = GetReg(GRAX, 0x06U); gra8 = GetReg(GRAX, 0x08U); save = pATIHW->frame_buffer; /* Temporarily normalise the mode */ if (gra1 != 0x00U) PutReg(GRAX, 0x01U, 0x00U); if (gra3 != 0x00U) PutReg(GRAX, 0x03U, 0x00U); if (gra6 != 0x05U) PutReg(GRAX, 0x06U, 0x05U); if (gra8 != 0xFFU) PutReg(GRAX, 0x08U, 0xFFU); if (seq4 & 0x08U) { /* Setup packed mode memory */ if (seq2 != 0x0FU) PutReg(SEQX, 0x02U, 0x0FU); if (seq4 != 0x0AU) PutReg(SEQX, 0x04U, 0x0AU); if (pATI->Chip < ATI_CHIP_264CT) { if (gra5 != 0x00U) PutReg(GRAX, 0x05U, 0x00U); } else { if (gra5 != 0x40U) PutReg(GRAX, 0x05U, 0x40U); } ATICopyVGAMemory(pATI, pATIHW, &save, from, to); if (seq2 != 0x0FU) PutReg(SEQX, 0x02U, seq2); if (seq4 != 0x0AU) PutReg(SEQX, 0x04U, seq4); if (pATI->Chip < ATI_CHIP_264CT) { if (gra5 != 0x00U) PutReg(GRAX, 0x05U, gra5); } else { if (gra5 != 0x40U) PutReg(GRAX, 0x05U, gra5); } } else { gra4 = GetReg(GRAX, 0x04U); /* Setup planar mode memory */ if (seq4 != 0x06U) PutReg(SEQX, 0x04U, 0x06U); if (gra5 != 0x00U) PutReg(GRAX, 0x05U, 0x00U); for (; iPlane < pATIHW->nPlane; iPlane++) { PutReg(SEQX, 0x02U, PlaneMask); PutReg(GRAX, 0x04U, iPlane); ATICopyVGAMemory(pATI, pATIHW, &save, from, to); PlaneMask <<= 1; } PutReg(SEQX, 0x02U, seq2); if (seq4 != 0x06U) PutReg(SEQX, 0x04U, seq4); PutReg(GRAX, 0x04U, gra4); if (gra5 != 0x00U) PutReg(GRAX, 0x05U, gra5); } /* Restore registers */ if (gra1 != 0x00U) PutReg(GRAX, 0x01U, gra1); if (gra3 != 0x00U) PutReg(GRAX, 0x03U, gra3); if (gra6 != 0x05U) PutReg(GRAX, 0x06U, gra6); if (gra8 != 0xFFU) PutReg(GRAX, 0x08U, gra8); /* Back to bank 0 */ (*pATIHW->SetBank)(pATI, 0); } #endif /* AVOID_CPIO */ /* * ATIModePreInit -- * * This function initialises an ATIHWRec with information common to all video * states generated by the driver. */ void ATIModePreInit ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { CARD32 lcd_index; #ifndef AVOID_CPIO if (pATI->VGAAdapter) { /* Fill in VGA data */ ATIVGAPreInit(pATI, pATIHW); /* Fill in VGA Wonder data */ if (pATI->CPIO_VGAWonder) ATIVGAWonderPreInit(pATI, pATIHW); } #endif /* AVOID_CPIO */ { /* Fill in Mach64 data */ ATIMach64PreInit(pScreenInfo, pATI, pATIHW); if (pATI->Chip >= ATI_CHIP_264CT) { /* Ensure proper VCLK source */ pATIHW->pll_vclk_cntl = ATIMach64GetPLLReg(PLL_VCLK_CNTL) | (PLL_VCLK_SRC_SEL | PLL_VCLK_RESET); /* Set provisional values for other PLL registers */ pATIHW->pll_vclk_post_div = ATIMach64GetPLLReg(PLL_VCLK_POST_DIV); pATIHW->pll_vclk0_fb_div = ATIMach64GetPLLReg(PLL_VCLK0_FB_DIV); pATIHW->pll_vclk1_fb_div = ATIMach64GetPLLReg(PLL_VCLK1_FB_DIV); pATIHW->pll_vclk2_fb_div = ATIMach64GetPLLReg(PLL_VCLK2_FB_DIV); pATIHW->pll_vclk3_fb_div = ATIMach64GetPLLReg(PLL_VCLK3_FB_DIV); pATIHW->pll_xclk_cntl = ATIMach64GetPLLReg(PLL_XCLK_CNTL); /* For now disable extended reference and feedback dividers */ if (pATI->Chip >= ATI_CHIP_264LT) pATIHW->pll_ext_vpll_cntl = ATIMach64GetPLLReg(PLL_EXT_VPLL_CNTL) & ~(PLL_EXT_VPLL_EN | PLL_EXT_VPLL_VGA_EN | PLL_EXT_VPLL_INSYNC); /* Initialise CRTC data for LCD panels */ if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) { pATIHW->lcd_gen_ctrl = inr(LCD_GEN_CTRL); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { lcd_index = inr(LCD_INDEX); pATIHW->lcd_index = lcd_index & ~(LCD_REG_INDEX | LCD_DISPLAY_DIS | LCD_SRC_SEL | LCD_CRTC2_DISPLAY_DIS); if (pATI->Chip != ATI_CHIP_264XL) pATIHW->lcd_index |= LCD_CRTC2_DISPLAY_DIS; pATIHW->config_panel = ATIMach64GetLCDReg(LCD_CONFIG_PANEL) | DONT_SHADOW_HEND; pATIHW->lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL) & ~CRTC_RW_SELECT; outr(LCD_INDEX, lcd_index); } pATIHW->lcd_gen_ctrl &= ~(HORZ_DIVBY2_EN | DIS_HOR_CRT_DIVBY2 | MCLK_PM_EN | VCLK_DAC_PM_EN | USE_SHADOWED_VEND | USE_SHADOWED_ROWCUR | SHADOW_EN | SHADOW_RW_EN); pATIHW->lcd_gen_ctrl |= DONT_SHADOW_VPAR | LOCK_8DOT; if (!pATI->OptionPanelDisplay) { /* * Use primary CRTC to drive the CRT. Turn off panel * interface. */ pATIHW->lcd_gen_ctrl &= ~LCD_ON; pATIHW->lcd_gen_ctrl |= CRT_ON; } else { /* Use primary CRTC to drive the panel */ pATIHW->lcd_gen_ctrl |= LCD_ON; /* If requested, also force CRT on */ if (pATI->OptionCRTDisplay) pATIHW->lcd_gen_ctrl |= CRT_ON; } } } else if (pATI->DAC == ATI_DAC_IBMRGB514) { ATIRGB514PreInit(pATI, pATIHW); } } /* Set RAMDAC data */ ATIDACPreInit(pScreenInfo, pATI, pATIHW); } /* * ATIModeSave -- * * This function saves the current video state. */ void ATIModeSave ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { #ifndef AVOID_CPIO int Index; /* Get back to bank 0 */ (*pATIHW->SetBank)(pATI, 0); #endif /* AVOID_CPIO */ if (pATI->Chip >= ATI_CHIP_264CT) { pATIHW->pll_vclk_cntl = ATIMach64GetPLLReg(PLL_VCLK_CNTL) | PLL_VCLK_RESET; pATIHW->pll_vclk_post_div = ATIMach64GetPLLReg(PLL_VCLK_POST_DIV); pATIHW->pll_vclk0_fb_div = ATIMach64GetPLLReg(PLL_VCLK0_FB_DIV); pATIHW->pll_vclk1_fb_div = ATIMach64GetPLLReg(PLL_VCLK1_FB_DIV); pATIHW->pll_vclk2_fb_div = ATIMach64GetPLLReg(PLL_VCLK2_FB_DIV); pATIHW->pll_vclk3_fb_div = ATIMach64GetPLLReg(PLL_VCLK3_FB_DIV); pATIHW->pll_xclk_cntl = ATIMach64GetPLLReg(PLL_XCLK_CNTL); if (pATI->Chip >= ATI_CHIP_264LT) pATIHW->pll_ext_vpll_cntl = ATIMach64GetPLLReg(PLL_EXT_VPLL_CNTL); /* Save LCD registers */ if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) { pATIHW->horz_stretching = inr(HORZ_STRETCHING); pATIHW->vert_stretching = inr(VERT_STRETCHING); pATIHW->lcd_gen_ctrl = inr(LCD_GEN_CTRL); /* Set up to save non-shadow registers */ outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl & ~SHADOW_RW_EN); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { pATIHW->lcd_index = inr(LCD_INDEX); pATIHW->config_panel = ATIMach64GetLCDReg(LCD_CONFIG_PANEL); pATIHW->lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); pATIHW->horz_stretching = ATIMach64GetLCDReg(LCD_HORZ_STRETCHING); pATIHW->vert_stretching = ATIMach64GetLCDReg(LCD_VERT_STRETCHING); pATIHW->ext_vert_stretch = ATIMach64GetLCDReg(LCD_EXT_VERT_STRETCH); /* Set up to save non-shadow registers */ ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN)); } } } #ifndef AVOID_CPIO if (pATI->VGAAdapter) { /* Save VGA data */ ATIVGASave(pATI, pATIHW); /* Save VGA Wonder data */ if (pATI->CPIO_VGAWonder) ATIVGAWonderSave(pATI, pATIHW); } #endif /* AVOID_CPIO */ { /* Save Mach64 data */ ATIMach64Save(pATI, pATIHW); if (pATI->Chip >= ATI_CHIP_264VTB) { /* Save DSP data */ ATIDSPSave(pATI, pATIHW); if (pATI->LCDPanelID >= 0) { /* Switch to shadow registers */ if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, (pATIHW->lcd_gen_ctrl & ~CRTC_RW_SELECT) | SHADOW_RW_EN); #ifndef AVOID_CPIO /* Save shadow VGA CRTC registers */ for (Index = 0; Index < NumberOf(pATIHW->shadow_vga); Index++) pATIHW->shadow_vga[Index] = GetReg(CRTX(pATI->CPIO_VGABase), Index); #endif /* AVOID_CPIO */ /* Save shadow Mach64 CRTC registers */ pATIHW->shadow_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->shadow_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->shadow_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->shadow_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); /* Restore CRTC selection and shadow state */ if (pATI->Chip == ATI_CHIP_264LT) { outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl); outr(LCD_INDEX, pATIHW->lcd_index); } } } else if (pATI->DAC == ATI_DAC_IBMRGB514) ATIRGB514Save(pATI, pATIHW); } /* Save RAMDAC state */ ATIDACSave(pATI, pATIHW); if (pATIHW != &pATI->NewHW) { pATIHW->FeedbackDivider = 0; /* Don't programme clock */ } #ifndef AVOID_CPIO /* Save video memory */ ATISwap(pScreenInfo->scrnIndex, pATI, pATIHW, FALSE); if (pATI->VGAAdapter) ATIVGASaveScreen(pATI, SCREEN_SAVER_OFF); /* Turn on screen */ #endif /* AVOID_CPIO */ } /* * ATIModeCalculate -- * * This function fills in an ATIHWRec with all register values needed to enable * a video state. It's important that this be done without modifying the * current video state. */ Bool ATIModeCalculate ( int iScreen, ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { CARD32 lcd_index; int Index, ECPClock, MaxScalerClock; /* Fill in Mach64 data */ ATIMach64Calculate(pATI, pATIHW, pMode); /* Set up LCD register values */ if (pATI->LCDPanelID >= 0) { int VDisplay = pMode->VDisplay; if (pMode->Flags & V_DBLSCAN) VDisplay <<= 1; if (pMode->VScan > 1) VDisplay *= pMode->VScan; if (pMode->Flags & V_INTERLACE) VDisplay >>= 1; /* Ensure secondary CRTC is completely disabled */ pATIHW->crtc_gen_cntl &= ~(CRTC2_EN | CRTC2_PIX_WIDTH); if (pATI->Chip == ATI_CHIP_264LT) { pATIHW->horz_stretching = inr(HORZ_STRETCHING); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { lcd_index = inr(LCD_INDEX); pATIHW->horz_stretching = ATIMach64GetLCDReg(LCD_HORZ_STRETCHING); pATIHW->ext_vert_stretch = ATIMach64GetLCDReg(LCD_EXT_VERT_STRETCH) & ~(AUTO_VERT_RATIO | VERT_STRETCH_MODE | VERT_STRETCH_RATIO3); /* * Don't use vertical blending if the mode is too wide or not * vertically stretched. */ if (pATI->OptionPanelDisplay && (pMode->HDisplay <= pATI->LCDVBlendFIFOSize) && (VDisplay < pATI->LCDVertical)) pATIHW->ext_vert_stretch |= VERT_STRETCH_MODE; outr(LCD_INDEX, lcd_index); } pATIHW->horz_stretching &= ~(HORZ_STRETCH_RATIO | HORZ_STRETCH_LOOP | AUTO_HORZ_RATIO | HORZ_STRETCH_MODE | HORZ_STRETCH_EN); if (pATI->OptionPanelDisplay && (pMode->HDisplay < pATI->LCDHorizontal)) do { /* * The horizontal blender misbehaves when HDisplay is less than a * a certain threshold (440 for a 1024-wide panel). It doesn't * stretch such modes enough. Use pixel replication instead of * blending to stretch modes that can be made to exactly fit the * panel width. The undocumented "NoLCDBlend" option allows the * pixel-replicated mode to be slightly wider or narrower than the * panel width. It also causes a mode that is exactly half as wide * as the panel to be pixel-replicated, rather than blended. */ int HDisplay = pMode->HDisplay & ~7; int nStretch = pATI->LCDHorizontal / HDisplay; int Remainder = pATI->LCDHorizontal % HDisplay; if ((!Remainder && ((nStretch > 2) || !pATI->OptionBlend)) || (((HDisplay * 16) / pATI->LCDHorizontal) < 7)) { static const char StretchLoops[] = {10, 12, 13, 15, 16}; int horz_stretch_loop = -1, BestRemainder; int Numerator = HDisplay, Denominator = pATI->LCDHorizontal; ATIReduceRatio(&Numerator, &Denominator); BestRemainder = (Numerator * 16) / Denominator; Index = NumberOf(StretchLoops); while (--Index >= 0) { Remainder = ((Denominator - Numerator) * StretchLoops[Index]) % Denominator; if (Remainder < BestRemainder) { horz_stretch_loop = Index; if (!(BestRemainder = Remainder)) break; } #if 0 /* * Enabling this code allows the pixel-replicated mode to * be slightly wider than the panel width. */ Remainder = Denominator - Remainder; if (Remainder < BestRemainder) { horz_stretch_loop = Index; BestRemainder = Remainder; } #endif } if ((horz_stretch_loop >= 0) && (!BestRemainder || !pATI->OptionBlend)) { int horz_stretch_ratio = 0, Accumulator = 0; int reuse_previous = 1; Index = StretchLoops[horz_stretch_loop]; while (--Index >= 0) { if (Accumulator > 0) horz_stretch_ratio |= reuse_previous; else Accumulator += Denominator; Accumulator -= Numerator; reuse_previous <<= 1; } pATIHW->horz_stretching |= HORZ_STRETCH_EN | SetBits(horz_stretch_loop, HORZ_STRETCH_LOOP) | SetBits(horz_stretch_ratio, HORZ_STRETCH_RATIO); break; /* Out of the do { ... } while (0) */ } } pATIHW->horz_stretching |= (HORZ_STRETCH_MODE | HORZ_STRETCH_EN) | SetBits((HDisplay * (MaxBits(HORZ_STRETCH_BLEND) + 1)) / pATI->LCDHorizontal, HORZ_STRETCH_BLEND); } while (0); if (!pATI->OptionPanelDisplay || (VDisplay >= pATI->LCDVertical)) { pATIHW->vert_stretching = 0; } else { pATIHW->vert_stretching = (VERT_STRETCH_USE0 | VERT_STRETCH_EN) | SetBits((VDisplay * (MaxBits(VERT_STRETCH_RATIO0) + 1)) / pATI->LCDVertical, VERT_STRETCH_RATIO0); } #ifndef AVOID_CPIO /* Copy non-shadow CRTC register values to the shadow set */ for (Index = 0; Index < NumberOf(pATIHW->shadow_vga); Index++) pATIHW->shadow_vga[Index] = pATIHW->crt[Index]; #endif /* AVOID_CPIO */ pATIHW->shadow_h_total_disp = pATIHW->crtc_h_total_disp; pATIHW->shadow_h_sync_strt_wid = pATIHW->crtc_h_sync_strt_wid; pATIHW->shadow_v_total_disp = pATIHW->crtc_v_total_disp; pATIHW->shadow_v_sync_strt_wid = pATIHW->crtc_v_sync_strt_wid; } /* Fill in clock data */ if (!ATIClockCalculate(iScreen, pATI, pATIHW, pMode)) return FALSE; /* Setup ECP clock divider */ if (pATI->Chip >= ATI_CHIP_264VT) { if (pATI->Chip <= ATI_CHIP_264VT3) MaxScalerClock = 80000; else if (pATI->Chip <= ATI_CHIP_264GT2C) MaxScalerClock = 100000; else if (pATI->Chip == ATI_CHIP_264GTPRO) MaxScalerClock = 125000; else if (pATI->Chip <= ATI_CHIP_MOBILITY) MaxScalerClock = 135000; else MaxScalerClock = 80000; /* Conservative */ pATIHW->pll_vclk_cntl &= ~PLL_ECP_DIV; #ifdef TV_OUT if (pATI->OptionTvOut) { /* XXX Don't do this for TVOut! */ } else #endif /* TV_OUT */ { ECPClock = pMode->SynthClock; for (Index = 0; (ECPClock > MaxScalerClock) && (Index < 2); Index++) ECPClock >>= 1; pATIHW->pll_vclk_cntl |= SetBits(Index, PLL_ECP_DIV); } } else if (pATI->DAC == ATI_DAC_IBMRGB514) { ATIRGB514Calculate(pATI, pATIHW, pMode); } return TRUE; } #ifdef TV_OUT static void ATISetVBEMode ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { if (pATIHW->crtc == ATI_CRTC_MACH64) { int vbemode, modekey; /* Find a suitable VESA VBE mode, if one exists */ modekey = (pScreenInfo->depth << 16) | (pScreenInfo->currentMode->HDisplay); switch (modekey) { case (15<<16)|(640): vbemode = 0x110; break; case (16<<16)|(640): vbemode = 0x111; break; #if 0 case (24<<16)|(640): vbemode = 0x112; break; #endif case (15<<16)|(800): vbemode = 0x113; break; case (16<<16)|(800): vbemode = 0x114; break; #if 0 case (24<<16)|(800): vbemode = 0x115; break; #endif case (15<<16)|(1024): vbemode = 0x116; break; case (16<<16)|(1024): vbemode = 0x117; break; #if 0 case (24<<16)|(1024): vbemode = 0x118; break; #endif default: xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Mode not supported for TV-Out: depth: %d HDisplay: %d\n", modekey>>16, modekey & 0xffff); return; } if (pATI->pVBE) { /* Preserve video memory contents */ vbemode |= (1<<15); if (VBESetVBEMode(pATI->pVBE, vbemode, NULL)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "VBESetMode: 0x%X (width: %d, pitch: %d, depth: %d)\n", vbemode, pScreenInfo->currentMode->HDisplay, pScreenInfo->displayWidth, pScreenInfo->depth); outr(CRTC_OFF_PITCH, SetBits(pScreenInfo->displayWidth>>3, CRTC_PITCH)); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBESetMode failed.\n"); } } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBE module not loaded.\n"); } } else { /* restore text mode with VBESetMode */ if (pATI->pVBE) { if (VBESetVBEMode(pATI->pVBE, pATI->vbemode, NULL)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Restoring VESA mode: 0x%x\n", pATI->vbemode); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBESetMode failed.\n"); } } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBE module not loaded.\n"); } } if (xf86ServerIsExiting()) { if (pATI->pVBE) vbeFree(pATI->pVBE); if (pATI->pInt10) xf86FreeInt10(pATI->pInt10); } } #endif /* TV_OUT */ /* * ATIModeSet -- * * This function sets a video mode. It writes out all video state data that * has been previously calculated or saved. */ void ATIModeSet ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, ATIHWPtr pATIHW ) { #ifndef AVOID_CPIO int Index; /* Get back to bank 0 */ (*pATIHW->SetBank)(pATI, 0); #endif /* AVOID_CPIO */ { /* Stop CRTC */ outr(CRTC_GEN_CNTL, pATIHW->crtc_gen_cntl & ~(CRTC_EXT_DISP_EN | CRTC_EN)); if (pATI->Chip >= ATI_CHIP_264CT) { ATIMach64PutPLLReg(PLL_VCLK_CNTL, pATIHW->pll_vclk_cntl); ATIMach64PutPLLReg(PLL_VCLK_POST_DIV, pATIHW->pll_vclk_post_div); ATIMach64PutPLLReg(PLL_VCLK0_FB_DIV, pATIHW->pll_vclk0_fb_div); ATIMach64PutPLLReg(PLL_VCLK1_FB_DIV, pATIHW->pll_vclk1_fb_div); ATIMach64PutPLLReg(PLL_VCLK2_FB_DIV, pATIHW->pll_vclk2_fb_div); ATIMach64PutPLLReg(PLL_VCLK3_FB_DIV, pATIHW->pll_vclk3_fb_div); ATIMach64PutPLLReg(PLL_XCLK_CNTL, pATIHW->pll_xclk_cntl); if (pATI->Chip >= ATI_CHIP_264LT) ATIMach64PutPLLReg(PLL_EXT_VPLL_CNTL, pATIHW->pll_ext_vpll_cntl); ATIMach64PutPLLReg(PLL_VCLK_CNTL, pATIHW->pll_vclk_cntl & ~PLL_VCLK_RESET); /* Load LCD registers */ if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) { /* Update non-shadow registers first */ outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl & ~SHADOW_RW_EN); /* Temporarily disable stretching */ outr(HORZ_STRETCHING, pATIHW->horz_stretching & ~(HORZ_STRETCH_MODE | HORZ_STRETCH_EN)); outr(VERT_STRETCHING, pATIHW->vert_stretching & ~(VERT_STRETCH_RATIO1 | VERT_STRETCH_RATIO2 | VERT_STRETCH_USE0 | VERT_STRETCH_EN)); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { /* Update non-shadow registers first */ ATIMach64PutLCDReg(LCD_CONFIG_PANEL, pATIHW->config_panel); ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN)); /* Temporarily disable stretching */ ATIMach64PutLCDReg(LCD_HORZ_STRETCHING, pATIHW->horz_stretching & ~(HORZ_STRETCH_MODE | HORZ_STRETCH_EN)); ATIMach64PutLCDReg(LCD_VERT_STRETCHING, pATIHW->vert_stretching & ~(VERT_STRETCH_RATIO1 | VERT_STRETCH_RATIO2 | VERT_STRETCH_USE0 | VERT_STRETCH_EN)); } } } } switch (pATIHW->crtc) { #ifndef AVOID_CPIO case ATI_CRTC_VGA: /* Start sequencer reset */ PutReg(SEQX, 0x00U, 0x00U); /* Set pixel clock */ if ((pATIHW->FeedbackDivider > 0)) ATIClockSet(pATI, pATIHW); /* Set up RAMDAC */ if (pATI->DAC == ATI_DAC_IBMRGB514) ATIRGB514Set(pATI, pATIHW); /* Load VGA Wonder */ if (pATI->CPIO_VGAWonder) ATIVGAWonderSet(pATI, pATIHW); /* Load VGA device */ ATIVGASet(pATI, pATIHW); /* Load Mach64 registers */ { /* Load MMIO registers */ if (pATI->Block0Base) ATIMach64Set(pATI, pATIHW); outr(CRTC_GEN_CNTL, pATIHW->crtc_gen_cntl); outr(CUR_CLR0, pATIHW->cur_clr0); outr(CUR_CLR1, pATIHW->cur_clr1); outr(CUR_OFFSET, pATIHW->cur_offset); outr(CUR_HORZ_VERT_POSN, pATIHW->cur_horz_vert_posn); outr(CUR_HORZ_VERT_OFF, pATIHW->cur_horz_vert_off); outr(BUS_CNTL, pATIHW->bus_cntl); outr(MEM_VGA_WP_SEL, pATIHW->mem_vga_wp_sel); outr(MEM_VGA_RP_SEL, pATIHW->mem_vga_rp_sel); outr(DAC_CNTL, pATIHW->dac_cntl); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl | GEN_GUI_EN); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl); outr(GEN_TEST_CNTL, pATIHW->gen_test_cntl | GEN_GUI_EN); outr(CONFIG_CNTL, pATIHW->config_cntl); if (pATI->Chip >= ATI_CHIP_264CT) { outr(CRTC_H_TOTAL_DISP, pATIHW->crtc_h_total_disp); outr(CRTC_H_SYNC_STRT_WID, pATIHW->crtc_h_sync_strt_wid); outr(CRTC_V_TOTAL_DISP, pATIHW->crtc_v_total_disp); outr(CRTC_V_SYNC_STRT_WID, pATIHW->crtc_v_sync_strt_wid); outr(CRTC_OFF_PITCH, pATIHW->crtc_off_pitch); if (pATI->Chip >= ATI_CHIP_264VTB) { outr(MEM_CNTL, pATIHW->mem_cntl); outr(MPP_CONFIG, pATIHW->mpp_config); outr(MPP_STROBE_SEQ, pATIHW->mpp_strobe_seq); outr(TVO_CNTL, pATIHW->tvo_cntl); } } } break; #endif /* AVOID_CPIO */ case ATI_CRTC_MACH64: /* Load Mach64 CRTC registers */ ATIMach64Set(pATI, pATIHW); #ifndef AVOID_CPIO if (pATI->VGAAdapter) { /* Oddly enough, these need to be set also, maybe others */ PutReg(SEQX, 0x02U, pATIHW->seq[2]); PutReg(SEQX, 0x04U, pATIHW->seq[4]); PutReg(GRAX, 0x06U, pATIHW->gra[6]); if (pATI->CPIO_VGAWonder) ATIModifyExtReg(pATI, 0xB6U, -1, 0x00U, pATIHW->b6); } #endif /* AVOID_CPIO */ break; default: break; } if (pATI->LCDPanelID >= 0) { /* Switch to shadow registers */ if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, (pATIHW->lcd_gen_ctrl & ~CRTC_RW_SELECT) | SHADOW_RW_EN); /* Restore shadow registers */ switch (pATIHW->crtc) { #ifndef AVOID_CPIO case ATI_CRTC_VGA: for (Index = 0; Index < NumberOf(pATIHW->shadow_vga); Index++) PutReg(CRTX(pATI->CPIO_VGABase), Index, pATIHW->shadow_vga[Index]); /* Fall through */ #endif /* AVOID_CPIO */ case ATI_CRTC_MACH64: outr(CRTC_H_TOTAL_DISP, pATIHW->shadow_h_total_disp); outr(CRTC_H_SYNC_STRT_WID, pATIHW->shadow_h_sync_strt_wid); outr(CRTC_V_TOTAL_DISP, pATIHW->shadow_v_total_disp); outr(CRTC_V_SYNC_STRT_WID, pATIHW->shadow_v_sync_strt_wid); break; default: break; } /* Restore CRTC selection & shadow state and enable stretching */ if (pATI->Chip == ATI_CHIP_264LT) { outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl); outr(HORZ_STRETCHING, pATIHW->horz_stretching); outr(VERT_STRETCHING, pATIHW->vert_stretching); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl); ATIMach64PutLCDReg(LCD_HORZ_STRETCHING, pATIHW->horz_stretching); ATIMach64PutLCDReg(LCD_VERT_STRETCHING, pATIHW->vert_stretching); ATIMach64PutLCDReg(LCD_EXT_VERT_STRETCH, pATIHW->ext_vert_stretch); outr(LCD_INDEX, pATIHW->lcd_index); } } /* * Set DSP registers. Note that, for some reason, sequencer resets clear * the DSP_CONFIG register on early integrated controllers. */ if (pATI->Chip >= ATI_CHIP_264VTB) ATIDSPSet(pATI, pATIHW); /* Load RAMDAC */ ATIDACSet(pATI, pATIHW); /* Reset hardware cursor caching */ pATI->CursorXOffset = pATI->CursorYOffset = (CARD16)(-1); #ifdef TV_OUT /* Set VBE mode for TV-Out */ if (pATI->OptionTvOut /* && pATI->tvActive */) ATISetVBEMode(pScreenInfo, pATI, pATIHW); #endif /* TV_OUT */ #ifndef AVOID_CPIO /* Restore video memory */ ATISwap(pScreenInfo->scrnIndex, pATI, pATIHW, TRUE); if (pATI->VGAAdapter) ATIVGASaveScreen(pATI, SCREEN_SAVER_OFF); /* Turn on screen */ #endif /* AVOID_CPIO */ if ((xf86GetVerbosity() > 3) && (pATIHW == &pATI->NewHW)) { xf86ErrorFVerb(4, "\n After setting mode \"%s\":\n\n", pScreenInfo->currentMode->name); ATIPrintMode(pScreenInfo->currentMode); ATIPrintRegisters(pATI); } } xf86-video-mach64-6.9.5/src/atipreinit.c0000644000175000017500000025262312521746527014563 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "ati.h" #include "atiaudio.h" #include "atibus.h" #include "atichip.h" #include "aticursor.h" #include "atidac.h" #include "atidsp.h" #include "atii2c.h" #include "atiload.h" #include "atilock.h" #include "atimach64.h" #include "atimach64accel.h" #include "atimach64io.h" #include "atimach64probe.h" #include "atimode.h" #include "atioption.h" #include "atipreinit.h" #include "atiprint.h" #include "atiprobe.h" #include "atividmem.h" #include "atiwonderio.h" #include "atixv.h" #include "atiadjust.h" #include "vbe.h" #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 #include "xf86RAC.h" #endif /* * FreeScreen handles the clean-up. */ static Bool Mach64GetRec(ScrnInfoPtr pScrn) { if (!pScrn->driverPrivate) { pScrn->driverPrivate = xnfcalloc(sizeof(ATIRec), 1); memset(pScrn->driverPrivate, 0, sizeof(ATIRec)); } return TRUE; } /* * ATIReportMemory -- * * This function reports on the amount and type of video memory found. */ static void ATIReportMemory ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, const char *MemoryTypeName ) { char Buffer[128], *Message; Message = Buffer + snprintf(Buffer, SizeOf(Buffer), "%d kB of %s detected", pATI->VideoRAM, MemoryTypeName); if (pATI->VideoRAM > pScreenInfo->videoRam) { Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message, " (using %d kB)", pScreenInfo->videoRam); } xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s.\n", Buffer); } static const int videoRamSizes[] = {512, 1024, 2*1024, 4*1024, 6*1024, 8*1024, 12*1024, 16*1024}; static const rgb defaultWeight = {0, 0, 0}; static const Gamma defaultGamma = {0.0, 0.0, 0.0}; /* * ATIPrintNoiseIfRequested -- * * This function formats debugging information on the server's stderr when * requested by the user through the server's verbosity setting. */ static void ATIPrintNoiseIfRequested ( ATIPtr pATI, CARD8 *BIOS, unsigned int BIOSSize ) { if (xf86GetVerbosity() <= 3) return; if (BIOSSize > 0) ATIPrintBIOS(BIOS, BIOSSize); xf86ErrorFVerb(4, "\n On server entry:\n"); ATIPrintRegisters(pATI); } #define BIOS_SIZE 0x00010000U /* 64kB */ #define BIOSByte(_n) ((CARD8)(BIOS[_n])) #define BIOSWord(_n) ((CARD16)(BIOS[_n] | \ (BIOS[(_n) + 1] << 8))) /* * For Mach64 adapters, pick up, from the BIOS, the type of programmable * clock generator (if any), and various information about it. */ static void ati_bios_clock ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, CARD8 *BIOS, unsigned int ClockTable, GDevPtr pGDev ) { CARD16 ClockDac; if (ClockTable > 0) { pATI->ProgrammableClock = BIOSByte(ClockTable); pATI->ClockNumberToProgramme = BIOSByte(ClockTable + 0x06U); pATI->refclk = BIOSWord(ClockTable + 0x08U); pATI->refclk *= 10000; } else { /* * Compensate for BIOS absence. Note that the reference * frequency has already been set by option processing. */ if ((pATI->DAC & ~0x0FU) == ATI_DAC_INTERNAL) { pATI->ProgrammableClock = ATI_CLOCK_INTERNAL; } else switch (pATI->DAC) { case ATI_DAC_STG1703: pATI->ProgrammableClock = ATI_CLOCK_STG1703; break; case ATI_DAC_CH8398: pATI->ProgrammableClock = ATI_CLOCK_CH8398; break; case ATI_DAC_ATT20C408: pATI->ProgrammableClock = ATI_CLOCK_ATT20C408; break; case ATI_DAC_IBMRGB514: pATI->ProgrammableClock = ATI_CLOCK_IBMRGB514; break; default: /* Provisional */ pATI->ProgrammableClock = ATI_CLOCK_ICS2595; break; } /* This should be safe for all generators except IBM's RGB514 */ pATI->ClockNumberToProgramme = 3; } pATI->ClockDescriptor = ATIClockDescriptors[ATI_CLOCK_FIXED]; if ((pATI->ProgrammableClock > ATI_CLOCK_FIXED) && (pATI->ProgrammableClock < ATI_CLOCK_MAX)) { /* * Graphics PRO TURBO 1600's are unusual in that an ICS2595 is used * to generate clocks for VGA modes, and an IBM RGB514 is used for * accelerator modes. */ if ((pATI->ProgrammableClock == ATI_CLOCK_ICS2595) && (pATI->DAC == ATI_DAC_IBMRGB514)) pATI->ProgrammableClock = ATI_CLOCK_IBMRGB514; pATI->ClockDescriptor = ATIClockDescriptors[pATI->ProgrammableClock]; } ClockDac = pATI->DAC; switch (pATI->ProgrammableClock) { case ATI_CLOCK_ICS2595: /* * Pick up reference divider (43 or 46) appropriate to the chip * revision level. */ if (ClockTable > 0) pATI->ClockDescriptor.MinM = pATI->ClockDescriptor.MaxM = BIOSWord(ClockTable + 0x0AU); else if (!xf86NameCmp(pGDev->clockchip, "ATI 18818-0")) pATI->ClockDescriptor.MinM = pATI->ClockDescriptor.MaxM = 43; else if (!xf86NameCmp(pGDev->clockchip, "ATI 18818-1")) pATI->ClockDescriptor.MinM = pATI->ClockDescriptor.MaxM = 46; else pATI->ProgrammableClock = ATI_CLOCK_UNKNOWN; break; case ATI_CLOCK_STG1703: /* This one's also a RAMDAC */ ClockDac = ATI_DAC_STG1703; break; case ATI_CLOCK_CH8398: /* This one's also a RAMDAC */ ClockDac = ATI_DAC_CH8398; break; case ATI_CLOCK_INTERNAL: /* * The reference divider has already been programmed by BIOS * initialisation. Because, there is only one reference * divider for all generated frequencies (including MCLK), it * cannot be changed without reprogramming all clocks every * time one of them needs a different reference divider. * * Besides, it's not a good idea to change the reference * divider. BIOS initialisation sets it to a value that * effectively prevents generating frequencies beyond the * graphics controller's tolerance. */ pATI->ClockDescriptor.MinM = pATI->ClockDescriptor.MaxM = ATIMach64GetPLLReg(PLL_REF_DIV); /* The DAC is also integrated */ if ((pATI->DAC & ~0x0FU) != ATI_DAC_INTERNAL) ClockDac = ATI_DAC_INTERNAL; break; case ATI_CLOCK_ATT20C408: /* This one's also a RAMDAC */ ClockDac = ATI_DAC_ATT20C408; break; case ATI_CLOCK_IBMRGB514: /* This one's also a RAMDAC */ ClockDac = ATI_DAC_IBMRGB514; pATI->ClockNumberToProgramme = 7; break; default: break; } /* * We now have up to two indications of what RAMDAC the adapter uses. * They should be the same. The following test and corresponding * action are under construction. */ if (pATI->DAC != ClockDac) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Mach64 RAMDAC probe discrepancy detected:\n" " DAC=0x%02X; ClockDac=0x%02X.\n", pATI->DAC, ClockDac); if (pATI->DAC == ATI_DAC_IBMRGB514) { pATI->ProgrammableClock = ATI_CLOCK_IBMRGB514; pATI->ClockDescriptor = ATIClockDescriptors[ATI_CLOCK_IBMRGB514]; pATI->ClockNumberToProgramme = 7; } else { pATI->DAC = ClockDac; /* For now */ } } switch (pATI->refclk / 100000) { case 143: pATI->ReferenceNumerator = 157500; pATI->ReferenceDenominator = 11; break; case 286: pATI->ReferenceNumerator = 315000; pATI->ReferenceDenominator = 11; break; default: pATI->ReferenceNumerator = pATI->refclk / 1000; pATI->ReferenceDenominator = 1; break; } } /* * Pick up multimedia information, which will be at different * displacements depending on table revision. */ static void ati_bios_mmedia ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, CARD8 *BIOS, unsigned int VideoTable, unsigned int HardwareTable ) { pATI->Audio = ATI_AUDIO_NONE; if (VideoTable > 0) { switch (BIOSByte(VideoTable - 0x02U)) { case 0x00U: pATI->Tuner = BIOSByte(VideoTable) & 0x1FU; /* * XXX The VideoTable[1] byte is known to have been * omitted in LTPro and Mobility BIOS'es. Any others? */ switch (pATI->Chip) { case ATI_CHIP_264LTPRO: case ATI_CHIP_MOBILITY: pATI->Decoder = BIOSByte(VideoTable + 0x01U) & 0x07U; pATI->Audio = BIOSByte(VideoTable + 0x02U) & 0x0FU; break; default: pATI->Decoder = BIOSByte(VideoTable + 0x02U) & 0x07U; pATI->Audio = BIOSByte(VideoTable + 0x03U) & 0x0FU; break; } break; case 0x01U: pATI->Tuner = BIOSByte(VideoTable) & 0x1FU; pATI->Audio = BIOSByte(VideoTable + 0x01U) & 0x0FU; pATI->Decoder = BIOSByte(VideoTable + 0x05U) & 0x0FU; break; default: break; } } if (HardwareTable > 0) { pATI->I2CType = BIOSByte(HardwareTable + 0x06U) & 0x0FU; } } /* * Determine panel dimensions and model. */ static void ati_bios_panel_info ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, CARD8 *BIOS, unsigned int BIOSSize, unsigned int LCDTable ) { unsigned int LCDPanelInfo = 0; char Buffer[128]; int i, j; if (LCDTable > 0) { LCDPanelInfo = BIOSWord(LCDTable + 0x0AU); if (((LCDPanelInfo + 0x1DU) > BIOSSize) || ((BIOSByte(LCDPanelInfo) != pATI->LCDPanelID) && (pATI->LCDPanelID || (BIOSByte(LCDPanelInfo) > 0x1FU) || (pATI->Chip <= ATI_CHIP_264LTPRO)))) LCDPanelInfo = 0; } if (!LCDPanelInfo) { /* * Scan BIOS for panel info table. */ for (i = 0; i <= (int)(BIOSSize - 0x1DU); i++) { /* Look for panel ID ... */ if ((BIOSByte(i) != pATI->LCDPanelID) && (pATI->LCDPanelID || (BIOSByte(i) > 0x1FU) || (pATI->Chip <= ATI_CHIP_264LTPRO))) continue; /* ... followed by 24-byte panel model name ... */ for (j = 0; j < 24; j++) { if ((CARD8)(BIOSByte(i + j + 1) - 0x20U) > 0x5FU) { i += j; goto NextBIOSByte; } } /* ... verify panel width ... */ if (pATI->LCDHorizontal && (pATI->LCDHorizontal != BIOSWord(i + 0x19U))) continue; /* ... and verify panel height */ if (pATI->LCDVertical && (pATI->LCDVertical != BIOSWord(i + 0x1BU))) continue; if (LCDPanelInfo) { /* * More than one possibility, but don't care if all * tables describe panels of the same size. */ if ((BIOSByte(LCDPanelInfo + 0x19U) == BIOSByte(i + 0x19U)) && (BIOSByte(LCDPanelInfo + 0x1AU) == BIOSByte(i + 0x1AU)) && (BIOSByte(LCDPanelInfo + 0x1BU) == BIOSByte(i + 0x1BU)) && (BIOSByte(LCDPanelInfo + 0x1CU) == BIOSByte(i + 0x1CU))) continue; LCDPanelInfo = 0; break; } LCDPanelInfo = i; NextBIOSByte: ; } } if (LCDPanelInfo > 0) { pATI->LCDPanelID = BIOSByte(LCDPanelInfo); pATI->LCDHorizontal = BIOSWord(LCDPanelInfo + 0x19U); pATI->LCDVertical = BIOSWord(LCDPanelInfo + 0x1BU); } if (LCDPanelInfo) { for (i = 0; i < 24; i++) Buffer[i] = BIOSByte(LCDPanelInfo + 1 + i); for (; --i >= 0; ) if (Buffer[i] && Buffer[i] != ' ') { Buffer[i + 1] = '\0'; xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "Panel model %s.\n", Buffer); break; } } } /* * ATIPreInit -- * * This function is only called once per screen at the start of the first * server generation. */ Bool ATIPreInit ( ScrnInfoPtr pScreenInfo, int flags ) { CARD8 BIOS[BIOS_SIZE]; unsigned int BIOSSize = 0; unsigned int ROMTable = 0, ClockTable = 0, FrequencyTable = 0; unsigned int LCDTable = 0, VideoTable = 0; unsigned int HardwareTable = 0; char Buffer[128], *Message; ATIPtr pATI; GDevPtr pGDev; EntityInfoPtr pEntity; #ifndef XSERVER_LIBPCIACCESS resPtr pResources; #endif pciVideoPtr pVideo; DisplayModePtr pMode; CARD32 IOValue; int i, j; int Numerator, Denominator; int MinX, MinY; ClockRange ATIClockRange = {NULL, 0, 80000, -1, TRUE, TRUE, 1, 1, 0}; int DefaultmaxClock = 0; int minPitch, maxPitch = 0xFFU, pitchInc, maxHeight = 0; int ApertureSize = 0x00010000U; int ModeType = M_T_BUILTIN; LookupModeFlags Strategy = LOOKUP_CLOSEST_CLOCK; int DefaultDepth; Bool PreInitSuccess = FALSE; # define pATIHW (&pATI->OldHW) #ifndef AVOID_CPIO vbeInfoPtr pVBE = NULL; pointer pVBEModule = NULL; #endif /* AVOID_CPIO */ if (pScreenInfo->numEntities != 1) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Logic error: Number of attached entities not 1.\n"); return FALSE; } if (!Mach64GetRec(pScreenInfo)) return FALSE; pATI = ATIPTR(pScreenInfo); /* Register resources */ pEntity = xf86GetEntityInfo(pScreenInfo->entityList[0]); pGDev = pEntity->device; #ifndef XSERVER_LIBPCIACCESS pResources = pEntity->resources; #endif pATI->iEntity = pEntity->index; pATI->Chip = pEntity->chipset; pVideo = xf86GetPciInfoForEntity(pATI->iEntity); free(pEntity); #ifndef XSERVER_LIBPCIACCESS if (!pResources) pResources = xf86RegisterResources(pATI->iEntity, NULL, ResShared); if (pResources) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unable to register bus resources\n"); xf86FreeResList(pResources); return FALSE; } #endif ConfiguredMonitor = NULL; (void)memset(BIOS, 0, SizeOf(BIOS)); if (!(flags & PROBE_DETECT)) { /* Set monitor */ pScreenInfo->monitor = pScreenInfo->confScreen->monitor; /* Set depth, bpp, etc. */ if ((pATI->Chip < ATI_CHIP_264CT)) { i = NoDepth24Support; /* No support for >8bpp either */ DefaultDepth = 8; } else { i = Support24bppFb | Support32bppFb; DefaultDepth = 0; } if (!xf86SetDepthBpp(pScreenInfo, DefaultDepth, 0, 0, i)) return FALSE; for (j = 0; ; j++) { static const CARD8 AllowedDepthBpp[][2] = { { 8, 8}, {15, 16}, {16, 16}, {24, 24}, {24, 32} }; if (j < NumberOf(AllowedDepthBpp)) { if (pScreenInfo->depth > AllowedDepthBpp[j][0]) continue; if (pScreenInfo->depth == AllowedDepthBpp[j][0]) { if (pScreenInfo->bitsPerPixel > AllowedDepthBpp[j][1]) continue; if (pScreenInfo->bitsPerPixel == AllowedDepthBpp[j][1]) break; } } xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Driver does not support depth %d at fbbpp %d.\n", pScreenInfo->depth, pScreenInfo->bitsPerPixel); return FALSE; } xf86PrintDepthBpp(pScreenInfo); if ((i == NoDepth24Support) && (pScreenInfo->depth > 8)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Depth %d is not supported through this adapter.\n", pScreenInfo->depth); return FALSE; } /* Pick up XF86Config options */ ATIProcessOptions(pScreenInfo, pATI); } if (!ATIMach64ProbeIO(pVideo, pATI)) return FALSE; ATIClaimBusSlot(pGDev->active, pATI); #ifndef AVOID_CPIO #ifdef TV_OUT pATI->pVBE = NULL; pATI->pInt10 = NULL; #endif /* TV_OUT */ /* * If VBE setup works, grab DDC from it */ if (!(pVBEModule = xf86LoadSubModule(pScreenInfo, "vbe"))) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unable to load vbe module.\n"); } else { if ((pVBE = VBEInit(NULL, pATI->iEntity))) ConfiguredMonitor = vbeDoEDID(pVBE, NULL); if (pVBE && !(flags & PROBE_DETECT)) { xf86Int10InfoPtr pInt10Info = pVBE->pInt10; /* Validate, then make a private copy of, the initialised BIOS */ CARD8 *pBIOS = xf86int10Addr(pInt10Info, pInt10Info->BIOSseg << 4); if ((pBIOS[0] != 0x55U) || (pBIOS[1] != 0xAAU) || !pBIOS[2]) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Unable to correctly retrieve adapter BIOS.\n"); } else { BIOSSize = pBIOS[2] << 9; if (BIOSSize > BIOS_SIZE) BIOSSize = BIOS_SIZE; (void)memcpy(BIOS, pBIOS, BIOSSize); } } } #ifndef TV_OUT /* De-activate VBE */ vbeFree(pVBE); xf86UnloadSubModule(pVBEModule); #else pATI->pVBE = pVBE; pVBE = NULL; #endif /* TV_OUT */ if (ConfiguredMonitor && !(flags & PROBE_DETECT)) { xf86PrintEDID(ConfiguredMonitor); xf86SetDDCproperties(pScreenInfo, ConfiguredMonitor); } #endif /* AVOID_CPIO */ if (flags & PROBE_DETECT) { return TRUE; } #ifndef AVOID_CPIO /* I/O bases might no longer be valid after BIOS initialisation */ { if (pATI->CPIODecoding == BLOCK_IO) pATI->CPIOBase = PCI_REGION_BASE(pVideo, 1, REGION_IO); pATI->MMIOInLinear = FALSE; /* Set MMIO address from PCI configuration space, if available */ if ((pATI->Block0Base = PCI_REGION_BASE(pVideo, 2, REGION_MEM))) { pATI->Block0Base += 0x0400U; } } #endif /* AVOID_CPIO */ #ifndef XSERVER_LIBPCIACCESS #ifdef AVOID_CPIO pScreenInfo->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_VIEWPORT | RAC_CURSOR; #else /* AVOID_CPIO */ pScreenInfo->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_VIEWPORT | RAC_CURSOR; pScreenInfo->racMemFlags = RAC_FB | RAC_CURSOR; #endif /* AVOID_CPIO */ #endif /* Finish private area initialisation */ pATI->nFIFOEntries = 16; /* For now */ /* Finish probing the adapter */ { /* * For MMIO register access, the MMIO address is computed when probing * and there are no BIOS calls. This mapping should always succeed. * * For CPIO register access, the MMIO address is computed above in the * presence of an auxiliary aperture. Otherwise, it is set to zero and * gets computed when we read the linear aperture configuration. This * mapping is either irrelevant or a no-op. */ if (!ATIMapApertures(pScreenInfo->scrnIndex, pATI)) return FALSE; #ifdef AVOID_CPIO if (!pATI->pBlock[0]) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unable to mmap() adapter registers.\n"); return FALSE; } #endif /* AVOID_CPIO */ /* * Verify register access by comparing against the CONFIG_CHIP_ID * value saved by adapter detection. */ if (pATI->config_chip_id != inr(CONFIG_CHIP_ID)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Adapter registers not mapped correctly.\n"); ATIUnmapApertures(pScreenInfo->scrnIndex, pATI); return FALSE; } pATIHW->crtc_gen_cntl = inr(CRTC_GEN_CNTL); if (!(pATIHW->crtc_gen_cntl & CRTC_EN) && (pATI->Chip >= ATI_CHIP_264CT)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Adapter has not been initialised.\n"); goto bail_locked; } #ifdef AVOID_CPIO if (!(pATIHW->crtc_gen_cntl & CRTC_EXT_DISP_EN)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Adapters found to be in VGA mode on server entry are not" " supported by the MMIO-only version of this driver.\n"); goto bail_locked; } #endif /* AVOID_CPIO */ pATIHW->mem_cntl = inr(MEM_CNTL); if (pATI->Chip < ATI_CHIP_264VTB) { IOValue = GetBits(pATIHW->mem_cntl, CTL_MEM_SIZE); pATI->VideoRAM = videoRamSizes[IOValue]; } else { pATI->nFIFOEntries = /* Don't care */ (unsigned int)(-1) >> 1; IOValue = GetBits(pATIHW->mem_cntl, CTL_MEM_SIZEB); if (IOValue < 8) pATI->VideoRAM = (IOValue + 1) * 512; else if (IOValue < 12) pATI->VideoRAM = (IOValue - 3) * 1024; else pATI->VideoRAM = (IOValue - 7) * 2048; } IOValue = inr(CONFIG_STATUS64_0); if (pATI->Chip >= ATI_CHIP_264CT) { pATI->MemoryType = GetBits(IOValue, CFG_MEM_TYPE_T); } else { pATI->MemoryType = GetBits(IOValue, CFG_MEM_TYPE); } pATI->LCDPanelID = -1; if (pATI->Chip >= ATI_CHIP_264CT) { /* Get LCD panel id */ if (pATI->Chip == ATI_CHIP_264LT) { pATI->LCDPanelID = GetBits(IOValue, CFG_PANEL_ID); pATIHW->horz_stretching = inr(HORZ_STRETCHING); pATIHW->vert_stretching = inr(VERT_STRETCHING); pATIHW->lcd_gen_ctrl = inr(LCD_GEN_CTRL); } else if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) { pATI->LCDPanelID = GetBits(IOValue, CFG_PANEL_ID); pATIHW->lcd_index = inr(LCD_INDEX); pATIHW->horz_stretching = ATIMach64GetLCDReg(LCD_HORZ_STRETCHING); pATI->LCDHorizontal = GetBits(pATIHW->horz_stretching, HORZ_PANEL_SIZE); if (pATI->LCDHorizontal) { if (pATI->LCDHorizontal == MaxBits(HORZ_PANEL_SIZE)) pATI->LCDHorizontal = 0; else pATI->LCDHorizontal = (pATI->LCDHorizontal + 1) << 3; } pATIHW->ext_vert_stretch = ATIMach64GetLCDReg(LCD_EXT_VERT_STRETCH); pATI->LCDVertical = GetBits(pATIHW->ext_vert_stretch, VERT_PANEL_SIZE); if (pATI->LCDVertical) { if (pATI->LCDVertical == MaxBits(VERT_PANEL_SIZE)) pATI->LCDVertical = 0; else pATI->LCDVertical++; } pATIHW->vert_stretching = ATIMach64GetLCDReg(LCD_VERT_STRETCHING); pATIHW->lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); outr(LCD_INDEX, pATIHW->lcd_index); } /* * Don't bother with panel support if it hasn't been previously * enabled. */ if ((pATI->LCDPanelID >= 0) && !(pATIHW->horz_stretching & HORZ_STRETCH_EN) && !(pATIHW->vert_stretching & VERT_STRETCH_EN) && !(pATIHW->lcd_gen_ctrl & LCD_ON)) { /* * At this point, if an XL or Mobility BIOS hasn't set * panel dimensions, then there is no panel. Otherwise, * keep any panel disabled to allow for modes greater than * the panel's dimensions. */ if ((pATI->Chip >= ATI_CHIP_264XL) && (!pATI->LCDHorizontal || !pATI->LCDVertical)) pATI->LCDPanelID = -1; else pATI->OptionPanelDisplay = FALSE; } } /* Get DAC type */ pATI->DAC = GetBits(inr(DAC_CNTL), DAC_TYPE); if (pATI->Chip < ATI_CHIP_264CT) { /* Factor in what the BIOS says the DAC is */ pATI->DAC = ATI_DAC(pATI->DAC, GetBits(inr(SCRATCH_REG1), BIOS_INIT_DAC_SUBTYPE)); } /* * RAMDAC types 0 & 1 for Mach64's are different than those for * Mach32's. */ if (pATI->DAC < ATI_DAC_ATI68875) pATI->DAC += ATI_DAC_INTERNAL; } { ROMTable = BIOSWord(0x48U); if ((ROMTable < 0x0002U) || (BIOSWord(ROMTable - 0x02U) < 0x0012U) || ((ROMTable + BIOSWord(ROMTable - 0x02U)) > BIOSSize)) ROMTable = 0; if (ROMTable > 0) { ClockTable = BIOSWord(ROMTable + 0x10U); if ((ClockTable + 0x20U) > BIOSSize) ClockTable = 0; if (BIOSWord(ROMTable - 0x02U) >= 0x0048U) { VideoTable = BIOSWord(ROMTable + 0x46U); if ((VideoTable < 0x08U) || (BIOSByte(VideoTable - 0x01U) < 0x08U) || (BIOSByte(VideoTable - 0x02U) > 0x01U) || ((VideoTable + BIOSByte(VideoTable - 0x01U)) > BIOSSize)) VideoTable = 0; } if (BIOSWord(ROMTable - 0x02U) >= 0x004AU) { HardwareTable = BIOSWord(ROMTable + 0x48U); if (((HardwareTable + 0x08U) > BIOSSize) || (memcmp(BIOS + HardwareTable, "$ATI", 4) != 0)) HardwareTable = 0; } } ati_bios_clock(pScreenInfo, pATI, BIOS, ClockTable, pGDev); ati_bios_mmedia(pScreenInfo, pATI, BIOS, VideoTable, HardwareTable); if (pATI->LCDPanelID >= 0) { LCDTable = BIOSWord(0x78U); if ((LCDTable + BIOSByte(LCDTable + 5)) > BIOSSize) LCDTable = 0; ati_bios_panel_info(pScreenInfo, pATI, BIOS, BIOSSize, LCDTable); } xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_INFO, 3, "BIOS Data: BIOSSize=0x%04X, ROMTable=0x%04X.\n", BIOSSize, ROMTable); xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_INFO, 3, "BIOS Data: ClockTable=0x%04X, FrequencyTable=0x%04X.\n", ClockTable, FrequencyTable); xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_INFO, 3, "BIOS Data: LCDTable=0x%04X.\n", LCDTable); xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_INFO, 3, "BIOS Data: VideoTable=0x%04X, HardwareTable=0x%04X.\n", VideoTable, HardwareTable); xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_INFO, 3, "BIOS Data: I2CType=0x%02X, Tuner=0x%02X, Decoder=0x%02X," " Audio=0x%02X.\n", pATI->I2CType, pATI->Tuner, pATI->Decoder, pATI->Audio); } ATIUnlock(pATI); /* Unlock registers */ /* Report what was found */ xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s graphics controller detected.\n", xf86TokenToString(Mach64Chipsets, pATI->Chip)); { Message = Buffer + snprintf(Buffer, SizeOf(Buffer), "Chip type %04X", pATI->ChipType); if (!(pATI->ChipType & ~(CHIP_CODE_0 | CHIP_CODE_1))) Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message, " (%c%c)", GetBits(pATI->ChipType, CHIP_CODE_1) + 0x41U, GetBits(pATI->ChipType, CHIP_CODE_0) + 0x41U); else if ((pATI->ChipType & 0x4040U) == 0x4040U) Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message, " \"%c%c\"", GetByte(pATI->ChipType, 1), GetByte(pATI->ChipType, 0)); if ((pATI->Chip >= ATI_CHIP_264CT) && (pATI->Chip != ATI_CHIP_Mach64)) Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message, ", version %d, foundry %s", pATI->ChipVersion, ATIFoundryNames[pATI->ChipFoundry]); xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s, class %d, revision 0x%02X.\n", Buffer, pATI->ChipClass, pATI->ChipRevision); } { Message = Buffer + snprintf(Buffer, SizeOf(Buffer), "%s bus interface detected", ATIBusNames[pATI->BusType]); #ifndef AVOID_CPIO { Message += snprintf(Message, Buffer + SizeOf(Buffer) - Message, "; %s I/O base is 0x%04lX", (pATI->CPIODecoding == SPARSE_IO) ? "sparse" : "block", pATI->CPIOBase); } #endif /* AVOID_CPIO */ xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s.\n", Buffer); } #ifndef XSERVER_LIBPCIACCESS #ifndef AVOID_CPIO if (pATI->CPIO_VGAWonder) xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "VGA Wonder registers at I/O port 0x%04lX.\n", pATI->CPIO_VGAWonder); #endif /* AVOID_CPIO */ #endif xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "ATI Mach64 adapter detected.\n"); if (pATI->Chip >= ATI_CHIP_264GT) xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE, "For information on using the multimedia capabilities\n\tof this" " adapter, please see http://gatos.sf.net.\n"); if ((pATI->DAC & ~0x0FU) == ATI_DAC_INTERNAL) { xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "Internal RAMDAC (subtype %d) detected.\n", pATI->DAC & 0x0FU); } else { const SymTabRec *DAC; for (DAC = ATIDACDescriptors; ; DAC++) { if (pATI->DAC == DAC->token) { xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%s RAMDAC detected.\n", DAC->name); break; } if (pATI->DAC < DAC->token) { xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_WARNING, 0, "Unknown RAMDAC type 0x%02X detected.\n", pATI->DAC); break; } } } #ifndef XSERVER_LIBPCIACCESS if (!xf86LinearVidMem()) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "A linear aperture is not available.\n"); goto bail; } #endif /* * Set colour weights. */ if (pATI->Chip < ATI_CHIP_264CT) pScreenInfo->rgbBits = 6; else pScreenInfo->rgbBits = 8; pATI->rgbBits = pScreenInfo->rgbBits; if (!xf86SetWeight(pScreenInfo, defaultWeight, defaultWeight)) goto bail; if ((pScreenInfo->depth > 8) && ((pScreenInfo->weight.red != pScreenInfo->weight.blue) || (pScreenInfo->weight.red != (CARD32)(pScreenInfo->depth / 3)) || ((CARD32)pScreenInfo->depth != (pScreenInfo->weight.red + pScreenInfo->weight.green + pScreenInfo->weight.blue)))) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Driver does not support weight %d%d%d for depth %d.\n", (int)pScreenInfo->weight.red, (int)pScreenInfo->weight.green, (int)pScreenInfo->weight.blue, pScreenInfo->depth); goto bail; } /* * Set default visual. */ if (!xf86SetDefaultVisual(pScreenInfo, -1)) goto bail; if ((pScreenInfo->depth > 8) && (((pScreenInfo->defaultVisual | DynamicClass) != DirectColor) || ((pScreenInfo->defaultVisual == DirectColor) && (pATI->DAC == ATI_DAC_INTERNAL)))) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Driver does not support default visual %s for depth %d.\n", xf86GetVisualName(pScreenInfo->defaultVisual), pScreenInfo->depth); goto bail; } /* * Set colour gamma. */ if (!xf86SetGamma(pScreenInfo, defaultGamma)) goto bail; pATI->depth = pScreenInfo->depth; pATI->bitsPerPixel = pScreenInfo->bitsPerPixel; pATI->weight = pScreenInfo->weight; pATI->XModifier = pATI->bitsPerPixel / UnitOf(pATI->bitsPerPixel); /* * Determine which CRT controller to use for video modes. */ { pATI->NewHW.crtc = ATI_CRTC_MACH64; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using Mach64 accelerator CRTC.\n"); #ifndef XSERVER_LIBPCIACCESS #ifndef AVOID_CPIO if (pATI->VGAAdapter) { /* * No need for VGA I/O resources during operating state (but they * are still decoded). */ pResources = xf86SetOperatingState(resVgaIo, pATI->iEntity, ResUnusedOpr); if (pResources) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Logic error setting operating state for VGA I/O.\n"); xf86FreeResList(pResources); } if (pATI->CPIO_VGAWonder) { pResources = xf86SetOperatingState(pATI->VGAWonderResources, pATI->iEntity, ResUnusedOpr); if (pResources) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Logic error setting operating state for" " VGAWonder I/O.\n"); xf86FreeResList(pResources); } } } #endif /* AVOID_CPIO */ #endif } /* * Decide between the CRT and the panel. */ if (pATI->LCDPanelID >= 0) { if (!pATI->OptionPanelDisplay) { xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG, "Using CRT interface and disabling digital flat panel.\n"); } else { unsigned HDisplay, VDisplay; CARD8 ClockMask, PostMask; /* * Determine porch data. This groks the mode on entry to extract * the width and position of its sync and blanking pulses, and * considers any overscan as part of the displayed area, given that * the overscan is also stretched. * * This also attempts to determine panel dimensions but cannot do * so for one that is "auto-stretched". */ if (pATI->Chip == ATI_CHIP_264LT) { pATIHW->lcd_gen_ctrl = inr(LCD_GEN_CTRL); /* Set up to read non-shadow registers */ if (pATIHW->lcd_gen_ctrl & SHADOW_RW_EN) outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl & ~SHADOW_RW_EN); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { pATIHW->lcd_index = inr(LCD_INDEX); pATIHW->config_panel = ATIMach64GetLCDReg(LCD_CONFIG_PANEL); pATIHW->lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); /* Set up to read non-shadow registers */ if (pATIHW->lcd_gen_ctrl & SHADOW_RW_EN) ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl & ~SHADOW_RW_EN); } #ifndef AVOID_CPIO if (!(pATIHW->crtc_gen_cntl & CRTC_EXT_DISP_EN)) { unsigned HBlankStart, HSyncStart, HSyncEnd, HBlankEnd, HTotal; unsigned VBlankStart, VSyncStart, VSyncEnd, VBlankEnd, VTotal; pATIHW->clock = (inb(R_GENMO) & 0x0CU) >> 2; pATIHW->crt[2] = GetReg(CRTX(pATI->CPIO_VGABase), 0x02U); pATIHW->crt[3] = GetReg(CRTX(pATI->CPIO_VGABase), 0x03U); pATIHW->crt[5] = GetReg(CRTX(pATI->CPIO_VGABase), 0x05U); pATIHW->crt[7] = GetReg(CRTX(pATI->CPIO_VGABase), 0x07U); pATIHW->crt[9] = GetReg(CRTX(pATI->CPIO_VGABase), 0x09U); pATIHW->crt[21] = GetReg(CRTX(pATI->CPIO_VGABase), 0x15U); pATIHW->crt[22] = GetReg(CRTX(pATI->CPIO_VGABase), 0x16U); pATIHW->crtc_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->crtc_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->crtc_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->crtc_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); /* Switch to shadow registers */ if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); pATIHW->shadow_vga[2] = GetReg(CRTX(pATI->CPIO_VGABase), 0x02U); pATIHW->shadow_vga[3] = GetReg(CRTX(pATI->CPIO_VGABase), 0x03U); pATIHW->shadow_vga[5] = GetReg(CRTX(pATI->CPIO_VGABase), 0x05U); pATIHW->shadow_vga[7] = GetReg(CRTX(pATI->CPIO_VGABase), 0x07U); pATIHW->shadow_vga[9] = GetReg(CRTX(pATI->CPIO_VGABase), 0x09U); pATIHW->shadow_vga[21] = GetReg(CRTX(pATI->CPIO_VGABase), 0x15U); pATIHW->shadow_vga[22] = GetReg(CRTX(pATI->CPIO_VGABase), 0x16U); pATIHW->shadow_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->shadow_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->shadow_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->shadow_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); /* * HSyncStart and HSyncEnd should equal their shadow * counterparts. Otherwise, due to a chip bug, the panel might * not sync, regardless of which register set is used to drive * the panel. There are certain combinations of register * values where the panel does in fact sync, but it remains * impossible to accurately determine the horizontal sync pulse * timing actually seen by the panel. * * Note that this hardware bug does not affect the CRT output. */ if (((pATIHW->crtc_h_sync_strt_wid ^ pATIHW->shadow_h_sync_strt_wid) & (CRTC_H_SYNC_STRT | CRTC_H_SYNC_STRT_HI | CRTC_H_SYNC_WID))) { xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_NOTICE, 0, "Invalid horizontal sync pulse timing detected in mode" " on server entry.\n"); /* Don't trust input timing */ pATI->OptionLCDSync = TRUE; ModeType = 0; } /* Merge in shadow registers as appropriate */ if (pATIHW->lcd_gen_ctrl & SHADOW_EN) { pATIHW->crt[2] = pATIHW->shadow_vga[2]; pATIHW->crt[3] = pATIHW->shadow_vga[3]; pATIHW->crt[5] = pATIHW->shadow_vga[5]; /* XXX Does this apply to VGA? If so, what about the LT? */ if ((pATI->Chip < ATI_CHIP_264LTPRO) || !(pATIHW->config_panel & DONT_SHADOW_HEND)) { pATIHW->crtc_h_total_disp &= ~CRTC_H_DISP; pATIHW->crtc_h_total_disp |= pATIHW->shadow_h_total_disp & CRTC_H_DISP; } pATIHW->crtc_h_total_disp &= ~CRTC_H_TOTAL; pATIHW->crtc_h_total_disp |= pATIHW->shadow_h_total_disp & CRTC_H_TOTAL; pATIHW->crtc_h_sync_strt_wid = pATIHW->shadow_h_sync_strt_wid; /* XXX Does this apply to VGA? */ if (pATIHW->lcd_gen_ctrl & USE_SHADOWED_VEND) { pATIHW->crtc_v_total_disp &= ~CRTC_V_DISP; pATIHW->crtc_v_total_disp |= pATIHW->shadow_v_total_disp & CRTC_V_DISP; } if (!(pATIHW->lcd_gen_ctrl & DONT_SHADOW_VPAR)) { pATIHW->crt[7] = pATIHW->shadow_vga[7]; pATIHW->crt[9] = pATIHW->shadow_vga[9]; pATIHW->crt[21] = pATIHW->shadow_vga[21]; pATIHW->crt[22] = pATIHW->shadow_vga[22]; pATIHW->crtc_v_total_disp &= ~CRTC_V_TOTAL; pATIHW->crtc_v_total_disp |= pATIHW->shadow_v_total_disp & CRTC_V_TOTAL; } } if (!(pATIHW->lcd_gen_ctrl & DONT_SHADOW_VPAR)) pATIHW->crtc_v_sync_strt_wid = pATIHW->shadow_v_sync_strt_wid; /* * Decipher input timing. This is complicated by the fact that * the full width of all timing parameters, except for the * blanking pulses, is only available through the accelerator * registers, not the VGA ones. Blanking pulse boundaries must * then be interpolated. * * Note that, in VGA mode, the accelerator's sync width fields * are actually end positions, not widths. */ HDisplay = GetBits(pATIHW->crtc_h_total_disp, CRTC_H_DISP); HSyncStart = (GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_STRT_HI) * (MaxBits(CRTC_H_SYNC_STRT) + 1)) | GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_STRT); HSyncEnd = (HSyncStart & ~MaxBits(CRTC_H_SYNC_WID)) | GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_WID); if (HSyncStart >= HSyncEnd) HSyncEnd += MaxBits(CRTC_H_SYNC_WID) + 1; HTotal = GetBits(pATIHW->crtc_h_total_disp, CRTC_H_TOTAL); HBlankStart = (HDisplay & ~0xFFU) | pATIHW->crt[2]; if (HDisplay > HBlankStart) HBlankStart += 0x0100U; HBlankEnd = (HSyncEnd & ~0x3FU) | ((pATIHW->crt[5] >> 2) & 0x20U) | (pATIHW->crt[3] & 0x1FU); if (HSyncEnd > (HBlankEnd + 1)) HBlankEnd += 0x40U; VDisplay = GetBits(pATIHW->crtc_v_total_disp, CRTC_V_DISP); VSyncStart = GetBits(pATIHW->crtc_v_sync_strt_wid, CRTC_V_SYNC_STRT); VSyncEnd = (VSyncStart & ~MaxBits(CRTC_V_SYNC_END_VGA)) | GetBits(pATIHW->crtc_v_sync_strt_wid, CRTC_V_SYNC_END_VGA); if (VSyncStart > VSyncEnd) VSyncEnd += MaxBits(CRTC_V_SYNC_END_VGA) + 1; VTotal = GetBits(pATIHW->crtc_v_total_disp, CRTC_V_TOTAL); VBlankStart = (VDisplay & ~0x03FFU) | ((pATIHW->crt[9] << 4) & 0x0200U) | ((pATIHW->crt[7] << 5) & 0x0100U) | pATIHW->crt[21]; if (VDisplay > VBlankStart) VBlankStart += 0x0400U; VBlankEnd = (VSyncEnd & ~0x00FFU) | pATIHW->crt[22]; if (VSyncEnd > (VBlankEnd + 1)) VBlankEnd += 0x0100U; pATI->LCDHBlankWidth = HBlankEnd - HBlankStart; pATI->LCDHSyncStart = HSyncStart - HBlankStart; pATI->LCDHSyncWidth = HSyncEnd - HSyncStart; pATI->LCDVBlankWidth = VBlankEnd - VBlankStart; pATI->LCDVSyncStart = VSyncStart - VBlankStart; pATI->LCDVSyncWidth = VSyncEnd - VSyncStart; HDisplay = HTotal + 5 - pATI->LCDHBlankWidth; VDisplay = VTotal + 2 - pATI->LCDVBlankWidth; } else #endif /* AVOID_CPIO */ { pATIHW->clock = inr(CLOCK_CNTL) & 0x03U; pATIHW->crtc_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->crtc_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->crtc_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->crtc_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); pATIHW->ovr_wid_left_right = inr(OVR_WID_LEFT_RIGHT); pATIHW->ovr_wid_top_bottom = inr(OVR_WID_TOP_BOTTOM); /* Switch to shadow registers */ if (pATI->Chip == ATI_CHIP_264LT) outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl | SHADOW_RW_EN); /* Oddly enough, there are no shadow overscan registers */ pATIHW->shadow_h_total_disp = inr(CRTC_H_TOTAL_DISP); pATIHW->shadow_h_sync_strt_wid = inr(CRTC_H_SYNC_STRT_WID); pATIHW->shadow_v_total_disp = inr(CRTC_V_TOTAL_DISP); pATIHW->shadow_v_sync_strt_wid = inr(CRTC_V_SYNC_STRT_WID); /* * HSyncStart and HSyncEnd should equal their shadow * counterparts. Otherwise, due to a chip bug, the panel might * not sync, regardless of which register set is used to drive * the panel. There are certain combinations of register * values where the panel does in fact sync, but it remains * impossible to accurately determine the horizontal sync pulse * timing actually seen by the panel. * * Note that this hardware bug does not affect the CRT output. */ if (((pATIHW->crtc_h_sync_strt_wid ^ pATIHW->shadow_h_sync_strt_wid) & (CRTC_H_SYNC_STRT | CRTC_H_SYNC_STRT_HI | CRTC_H_SYNC_WID))) { xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_NOTICE, 0, "Invalid horizontal sync pulse timing detected in mode" " on server entry.\n"); /* Don't trust input timing */ pATI->OptionLCDSync = TRUE; ModeType = 0; } /* Merge in shadow registers as appropriate */ if (pATIHW->lcd_gen_ctrl & SHADOW_EN) { /* XXX What about the LT? */ if ((pATI->Chip < ATI_CHIP_264LTPRO) || !(pATIHW->config_panel & DONT_SHADOW_HEND)) { pATIHW->crtc_h_total_disp &= ~CRTC_H_DISP; pATIHW->crtc_h_total_disp |= pATIHW->shadow_h_total_disp & CRTC_H_DISP; } pATIHW->crtc_h_total_disp &= ~CRTC_H_TOTAL; pATIHW->crtc_h_total_disp |= pATIHW->shadow_h_total_disp & CRTC_H_TOTAL; pATIHW->crtc_h_sync_strt_wid = pATIHW->shadow_h_sync_strt_wid; if (pATIHW->lcd_gen_ctrl & USE_SHADOWED_VEND) { pATIHW->crtc_v_total_disp &= ~CRTC_V_DISP; pATIHW->crtc_v_total_disp |= pATIHW->shadow_v_total_disp & CRTC_V_DISP; } if (!(pATIHW->lcd_gen_ctrl & DONT_SHADOW_VPAR)) { pATIHW->crtc_v_total_disp &= ~CRTC_V_TOTAL; pATIHW->crtc_v_total_disp |= pATIHW->shadow_v_total_disp & CRTC_V_TOTAL; } } if (!(pATIHW->lcd_gen_ctrl & DONT_SHADOW_VPAR)) pATIHW->crtc_v_sync_strt_wid = pATIHW->shadow_v_sync_strt_wid; /* Decipher input timing */ HDisplay = GetBits(pATIHW->crtc_h_total_disp, CRTC_H_DISP) + GetBits(pATIHW->ovr_wid_left_right, OVR_WID_LEFT) + GetBits(pATIHW->ovr_wid_left_right, OVR_WID_RIGHT); VDisplay = GetBits(pATIHW->crtc_v_total_disp, CRTC_V_DISP) + GetBits(pATIHW->ovr_wid_top_bottom, OVR_WID_TOP) + GetBits(pATIHW->ovr_wid_top_bottom, OVR_WID_BOTTOM); pATI->LCDHSyncStart = (GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_STRT_HI) * (MaxBits(CRTC_H_SYNC_STRT) + 1)) + GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_STRT) - HDisplay; pATI->LCDHSyncWidth = GetBits(pATIHW->crtc_h_sync_strt_wid, CRTC_H_SYNC_WID); pATI->LCDHBlankWidth = GetBits(pATIHW->crtc_h_total_disp, CRTC_H_TOTAL) - HDisplay; pATI->LCDVSyncStart = GetBits(pATIHW->crtc_v_sync_strt_wid, CRTC_V_SYNC_STRT) - VDisplay; pATI->LCDVSyncWidth = GetBits(pATIHW->crtc_v_sync_strt_wid, CRTC_V_SYNC_WID); pATI->LCDVBlankWidth = GetBits(pATIHW->crtc_v_total_disp, CRTC_V_TOTAL) - VDisplay; HDisplay++; VDisplay++; } /* Restore LCD registers */ if (pATI->Chip == ATI_CHIP_264LT) { outr(LCD_GEN_CTRL, pATIHW->lcd_gen_ctrl); } else /* if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) */ { ATIMach64PutLCDReg(LCD_GEN_CNTL, pATIHW->lcd_gen_ctrl); outr(LCD_INDEX, pATIHW->lcd_index); } HDisplay <<= 3; pATI->LCDHSyncStart <<= 3; pATI->LCDHSyncWidth <<= 3; pATI->LCDHBlankWidth <<= 3; /* Calculate panel dimensions implied by the input timing */ if ((pATIHW->horz_stretching & (HORZ_STRETCH_EN | AUTO_HORZ_RATIO)) == HORZ_STRETCH_EN) { if (pATIHW->horz_stretching & HORZ_STRETCH_MODE) { if (pATIHW->horz_stretching & HORZ_STRETCH_BLEND) { HDisplay = (HDisplay * (MaxBits(HORZ_STRETCH_BLEND) + 1)) / GetBits(pATIHW->horz_stretching, HORZ_STRETCH_BLEND); } } else if (((pATIHW->horz_stretching & HORZ_STRETCH_LOOP) > HORZ_STRETCH_LOOP15) || (pATIHW->horz_stretching & SetBits(1, HORZ_STRETCH_RATIO))) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Ignoring invalid horizontal stretch ratio in mode on" " server entry.\n"); } else { IOValue = GetBits(pATIHW->horz_stretching, HORZ_STRETCH_RATIO); switch (GetBits(pATIHW->horz_stretching, HORZ_STRETCH_LOOP)) { case GetBits(HORZ_STRETCH_LOOP09, HORZ_STRETCH_LOOP): i = 9; IOValue &= (1 << 9) - 1; break; case GetBits(HORZ_STRETCH_LOOP11, HORZ_STRETCH_LOOP): i = 11; IOValue &= (1 << 11) - 1; break; case GetBits(HORZ_STRETCH_LOOP12, HORZ_STRETCH_LOOP): i = 12; IOValue &= (1 << 12) - 1; break; case GetBits(HORZ_STRETCH_LOOP14, HORZ_STRETCH_LOOP): i = 14; IOValue &= (1 << 14) - 1; break; case GetBits(HORZ_STRETCH_LOOP15, HORZ_STRETCH_LOOP): default: /* Muffle compiler */ i = 15; IOValue &= (1 << 15) - 1; break; } if (IOValue) { /* Count the number of bits in IOValue */ j = (IOValue >> 1) & 0x36DBU; j = IOValue - j - ((j >> 1) & 0x36DBU); j = ((j + (j >> 3)) & 0x71C7U) % 0x3FU; HDisplay = (HDisplay * i) / j; } } } if ((pATIHW->vert_stretching & VERT_STRETCH_EN) && !(pATIHW->ext_vert_stretch & AUTO_VERT_RATIO)) { if ((pATIHW->vert_stretching & VERT_STRETCH_USE0) || (VDisplay <= 350)) IOValue = GetBits(pATIHW->vert_stretching, VERT_STRETCH_RATIO0); else if (VDisplay <= 400) IOValue = GetBits(pATIHW->vert_stretching, VERT_STRETCH_RATIO1); else if ((VDisplay <= 480) || !(pATIHW->ext_vert_stretch & VERT_STRETCH_RATIO3)) IOValue = GetBits(pATIHW->vert_stretching, VERT_STRETCH_RATIO2); else IOValue = GetBits(pATIHW->ext_vert_stretch, VERT_STRETCH_RATIO3); if (IOValue) VDisplay = (VDisplay * (MaxBits(VERT_STRETCH_RATIO0) + 1)) / IOValue; } /* Match calculated dimensions to probed dimensions */ if (!pATI->LCDHorizontal) { if ((pATIHW->horz_stretching & (HORZ_STRETCH_EN | AUTO_HORZ_RATIO)) != (HORZ_STRETCH_EN | AUTO_HORZ_RATIO)) pATI->LCDHorizontal = HDisplay; } else if (pATI->LCDHorizontal != (int)HDisplay) { if ((pATIHW->horz_stretching & (HORZ_STRETCH_EN | AUTO_HORZ_RATIO)) != (HORZ_STRETCH_EN | AUTO_HORZ_RATIO)) xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_WARNING, 4, "Inconsistent panel horizontal dimension:" " %d and %d.\n", pATI->LCDHorizontal, HDisplay); HDisplay = pATI->LCDHorizontal; } if (!pATI->LCDVertical) { if (!(pATIHW->vert_stretching & VERT_STRETCH_EN) || !(pATIHW->ext_vert_stretch & AUTO_VERT_RATIO)) pATI->LCDVertical = VDisplay; } else if (pATI->LCDVertical != (int)VDisplay) { if (!(pATIHW->vert_stretching & VERT_STRETCH_EN) || !(pATIHW->ext_vert_stretch & AUTO_VERT_RATIO)) xf86DrvMsgVerb(pScreenInfo->scrnIndex, X_WARNING, 4, "Inconsistent panel vertical dimension: %d and %d.\n", pATI->LCDVertical, VDisplay); VDisplay = pATI->LCDVertical; } if (!pATI->LCDHorizontal || !pATI->LCDVertical) { if (pATI->LCDPanelID || (pATI->Chip <= ATI_CHIP_264LTPRO)) xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unable to determine dimensions of panel (ID %d).\n", pATI->LCDPanelID); else xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unable to determine dimensions of panel.\n"); goto bail; } /* If the mode on entry wasn't stretched, adjust timings */ if (!(pATIHW->horz_stretching & HORZ_STRETCH_EN) && (pATI->LCDHorizontal > (int)HDisplay)) { HDisplay = pATI->LCDHorizontal - HDisplay; if (pATI->LCDHSyncStart >= HDisplay) pATI->LCDHSyncStart -= HDisplay; else pATI->LCDHSyncStart = 0; pATI->LCDHBlankWidth -= HDisplay; HDisplay = pATI->LCDHSyncStart + pATI->LCDHSyncWidth; if (pATI->LCDHBlankWidth < HDisplay) pATI->LCDHBlankWidth = HDisplay; } if (!(pATIHW->vert_stretching & VERT_STRETCH_EN) && (pATI->LCDVertical > (int)VDisplay)) { VDisplay = pATI->LCDVertical - VDisplay; if (pATI->LCDVSyncStart >= VDisplay) pATI->LCDVSyncStart -= VDisplay; else pATI->LCDVSyncStart = 0; pATI->LCDVBlankWidth -= VDisplay; VDisplay = pATI->LCDVSyncStart + pATI->LCDVSyncWidth; if (pATI->LCDVBlankWidth < VDisplay) pATI->LCDVBlankWidth = VDisplay; } if (pATI->LCDPanelID || (pATI->Chip <= ATI_CHIP_264LTPRO)) xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%dx%d panel (ID %d) detected.\n", pATI->LCDHorizontal, pATI->LCDVertical, pATI->LCDPanelID); else xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "%dx%d panel detected.\n", pATI->LCDHorizontal, pATI->LCDVertical); /* * Determine panel clock. This must be done after option * processing so that the adapter's reference frequency is always * available. * * Get post divider. A GCC bug has caused the following expression * to be broken down into its individual components. */ ClockMask = PLL_VCLK0_XDIV << pATIHW->clock; PostMask = PLL_VCLK0_POST_DIV << (pATIHW->clock * 2); i = GetBits(ATIMach64GetPLLReg(PLL_XCLK_CNTL), ClockMask); i *= MaxBits(PLL_VCLK0_POST_DIV) + 1; i |= GetBits(ATIMach64GetPLLReg(PLL_VCLK_POST_DIV), PostMask); /* Calculate clock of mode on entry */ Numerator = ATIMach64GetPLLReg(PLL_VCLK0_FB_DIV + pATIHW->clock) * pATI->ReferenceNumerator; Denominator = pATI->ClockDescriptor.MinM * pATI->ReferenceDenominator * pATI->ClockDescriptor.PostDividers[i]; pATI->LCDClock = ATIDivide(Numerator, Denominator, 1, 0); xf86DrvMsg(pScreenInfo->scrnIndex, X_PROBED, "Panel clock is %.3f MHz.\n", (double)(pATI->LCDClock) / 1000.0); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using digital flat panel interface%s.\n", pATI->OptionCRTDisplay ? " to display on both CRT and panel" : ""); } } /* * Finish detecting video RAM size. */ pScreenInfo->videoRam = pATI->VideoRAM; { { /* Get adapter's linear aperture configuration */ pATIHW->config_cntl = inr(CONFIG_CNTL); pATI->LinearBase = GetBits(pATIHW->config_cntl, CFG_MEM_AP_LOC) << 22; if ((pATIHW->config_cntl & CFG_MEM_AP_SIZE) != CFG_MEM_AP_SIZE) { pATI->LinearSize = GetBits(pATIHW->config_cntl, CFG_MEM_AP_SIZE) << 22; /* * Linear aperture could have been disabled (but still * assigned) by BIOS initialisation. */ if (pATI->LinearBase && !pATI->LinearSize) { if ((pATI->Chip <= ATI_CHIP_88800GXD) && (pATI->VideoRAM < 4096)) pATI->LinearSize = 4 * 1024 * 1024; else pATI->LinearSize = 8 * 1024 * 1024; } } if (pATI->LinearBase && pATI->LinearSize) { int AcceleratorVideoRAM = 0, ServerVideoRAM; #ifndef AVOID_CPIO /* * Unless specified in PCI configuration space, set MMIO * address to tail end of linear aperture. */ if (!pATI->Block0Base) { pATI->Block0Base = pATI->LinearBase + pATI->LinearSize - 0x00000400U; pATI->MMIOInLinear = TRUE; } #endif /* AVOID_CPIO */ AcceleratorVideoRAM = pATI->LinearSize >> 10; /* * Account for MMIO area at the tail end of the linear * aperture, if it is needed or if it cannot be disabled. */ if (pATI->MMIOInLinear || (pATI->Chip < ATI_CHIP_264VTB)) AcceleratorVideoRAM -= 2; ServerVideoRAM = pATI->VideoRAM; if (pATI->Cursor > ATI_CURSOR_SOFTWARE) { /* * Allocate a 1 kB cursor image area at the top of the * little-endian aperture, just before any MMIO area that * might also be there. */ if (ServerVideoRAM > AcceleratorVideoRAM) ServerVideoRAM = AcceleratorVideoRAM; ServerVideoRAM--; pATI->CursorOffset = ServerVideoRAM << 10; pATI->CursorBase = pATI->LinearBase + pATI->CursorOffset; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Storing hardware cursor image at 0x%08lX.\n", pATI->CursorBase); } { CARD32 PageSize = getpagesize() >> 10; #if X_BYTE_ORDER == X_LITTLE_ENDIAN /* * MMIO areas must be mmap()'ed separately to avoid write * combining them. Thus, they might not end up still * adjacent with the little-endian linear aperture after * mmap()'ing. So, round down the linear aperture size to * avoid an overlap. Any hardware cursor image area might * not end up being write combined, but this seems * preferable to further reducing the video memory size * advertised to the server. * * XXX Ideally this should be dealt with in the os-support * layer, i.e., it should be possible to reset a * subarea's write combining after it has been * mmap()'ed, but doing so currently causes the removal * of write combining for the entire aperture. */ if (pATI->MMIOInLinear) AcceleratorVideoRAM -= AcceleratorVideoRAM % PageSize; #else /* if X_BYTE_ORDER != X_LITTLE_ENDIAN */ /* * Big-endian apertures are 8 MB higher and don't contain * an MMIO area. */ pATI->LinearBase += 0x00800000U; AcceleratorVideoRAM = pATI->LinearSize >> 10; #endif /* X_BYTE_ORDER */ if (ServerVideoRAM > AcceleratorVideoRAM) ServerVideoRAM = AcceleratorVideoRAM; else if (AcceleratorVideoRAM > pATI->VideoRAM) AcceleratorVideoRAM = pATI->VideoRAM; PageSize--; AcceleratorVideoRAM = (AcceleratorVideoRAM + PageSize) & ~PageSize; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using %d MB linear aperture at 0x%08lX.\n", pATI->LinearSize >> 20, pATI->LinearBase); /* Only mmap what is needed */ ApertureSize = pATI->LinearSize = AcceleratorVideoRAM << 10; } if (ServerVideoRAM < pATI->VideoRAM) { pScreenInfo->videoRam = ServerVideoRAM; xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE, "Virtual resolutions will be limited to %d kB\n due to" " linear aperture size and/or placement of hardware" " cursor image area.\n", ServerVideoRAM); } } } if (!pATI->LinearBase || !pATI->LinearSize) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Linear aperture not available.\n"); goto bail; } if (pATI->Block0Base) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using Block 0 MMIO aperture at 0x%08lX.\n", pATI->Block0Base); /* Set Block1 MMIO address if supported */ if (pATI->Chip >= ATI_CHIP_264VT) { pATI->Block1Base = pATI->Block0Base - 0x00000400U; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using Block 1 MMIO aperture at 0x%08lX.\n", pATI->Block1Base); } } } #ifndef XSERVER_LIBPCIACCESS #ifndef AVOID_CPIO if (pATI->VGAAdapter) { /* * Free VGA memory aperture during operating state (but it is still * decoded). */ pResources = xf86SetOperatingState(resVgaMem, pATI->iEntity, ResUnusedOpr); if (pResources) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Logic error setting operating state for VGA memory" " aperture.\n"); xf86FreeResList(pResources); } } #endif /* AVOID_CPIO */ #endif /* * Remap apertures. Must lock and re-unlock around this in case the * remapping fails. */ ATILock(pATI); ATIUnmapApertures(pScreenInfo->scrnIndex, pATI); if (!ATIMapApertures(pScreenInfo->scrnIndex, pATI)) return FALSE; ATIUnlock(pATI); if (pATI->OptionAccel) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "MMIO write caching %sabled.\n", pATI->OptionMMIOCache ? "en" : "dis"); } { if (pATI->Chip >= ATI_CHIP_264CT) ATIReportMemory(pScreenInfo, pATI, ATIMemoryTypeNames_264xT[pATI->MemoryType]); else if (pATI->Chip == ATI_CHIP_88800CX) ATIReportMemory(pScreenInfo, pATI, ATIMemoryTypeNames_88800CX[pATI->MemoryType]); else ATIReportMemory(pScreenInfo, pATI, ATIMemoryTypeNames_Mach[pATI->MemoryType]); } /* * Finish banking setup. This needs to be fixed to not assume the mode on * entry is a VGA mode. XXX */ #ifndef AVOID_CPIO if (!pATI->VGAAdapter) { pATI->NewHW.SetBank = ATIx8800SetBank; pATI->NewHW.nPlane = 0; pATIHW->crtc = pATI->NewHW.crtc; pATIHW->SetBank = (ATIBankProcPtr)NoopDDA; } else { Bool ext_disp_en = (pATI->LockData.crtc_gen_cntl & CRTC_EXT_DISP_EN); Bool vga_ap_en = (pATI->LockData.config_cntl & CFG_MEM_VGA_AP_EN); Bool vga_color_256 = (GetReg(SEQX, 0x04U) & 0x08U); pATI->NewHW.SetBank = ATIMach64SetBankPacked; pATI->NewHW.nPlane = 1; pATIHW->crtc = ATI_CRTC_VGA; if (ext_disp_en) pATIHW->crtc = ATI_CRTC_MACH64; if ((pATIHW->crtc != ATI_CRTC_VGA) || vga_color_256) pATIHW->nPlane = 1; else pATIHW->nPlane = 4; /* VideoRAM is a multiple of 512kB and BankSize is 64kB */ pATIHW->nBank = pATI->VideoRAM / (pATIHW->nPlane * 0x40U); if ((pATIHW->crtc == ATI_CRTC_VGA) && !vga_ap_en) { pATIHW->SetBank = (ATIBankProcPtr)NoopDDA; pATIHW->nBank = 1; } else if (pATIHW->nPlane == 1) { pATIHW->SetBank = ATIMach64SetBankPacked; } else { pATIHW->SetBank = ATIMach64SetBankPlanar; } } #else /* AVOID_CPIO */ { pATIHW->crtc = pATI->NewHW.crtc; } #endif /* AVOID_CPIO */ if (pATI->OptionShadowFB) { /* Until ShadowFB becomes a true screen wrapper, if it ever does... */ if (pATI->OptionAccel) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Cannot shadow an accelerated frame buffer.\n"); pATI->OptionShadowFB = FALSE; } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Using shadow frame buffer.\n"); } } /* 264VT-B's and later have DSP registers */ if ((pATI->Chip >= ATI_CHIP_264VTB) && !ATIDSPPreInit(pScreenInfo->scrnIndex, pATI)) goto bail; /* * Determine minClock and maxClock. For adapters with supported * programmable clock generators, start with an absolute maximum. */ if (pATI->ClockDescriptor.MaxN > 0) { Numerator = pATI->ClockDescriptor.MaxN * pATI->ReferenceNumerator; Denominator = pATI->ClockDescriptor.MinM * pATI->ReferenceDenominator * pATI->ClockDescriptor.PostDividers[0]; /* * An integrated PLL behaves as though the reference frequency were * doubled. It also does not appear to care about the colour depth. */ if (pATI->ProgrammableClock == ATI_CLOCK_INTERNAL) Numerator <<= 1; ATIClockRange.maxClock = (Numerator / (Denominator * 1000)) * 1000; Numerator = pATI->ClockDescriptor.MinN * pATI->ReferenceNumerator; Denominator = pATI->ClockDescriptor.MaxM * pATI->ReferenceDenominator * pATI->ClockDescriptor.PostDividers[pATI->ClockDescriptor.NumD - 1]; if (pATI->ProgrammableClock == ATI_CLOCK_INTERNAL) Numerator <<= 1; ATIClockRange.minClock = (Numerator / (Denominator * 1000)) * 1000; if (pATI->XCLKFeedbackDivider) { /* Possibly reduce maxClock due to memory bandwidth */ Numerator = pATI->XCLKFeedbackDivider * 2 * pATI->ReferenceNumerator; Denominator = pATI->ClockDescriptor.MinM * pATI->XCLKReferenceDivider * pATI->ReferenceDenominator; { Denominator *= pATI->bitsPerPixel / 4; } i = (6 - 2) - pATI->XCLKPostDivider; i = (ATIDivide(Numerator, Denominator, i, -1) / 1000) * 1000; if (i < ATIClockRange.maxClock) ATIClockRange.maxClock = i; } } /* * Assume an internal DAC can handle whatever frequency the internal PLL * can produce (with the reference divider set by BIOS initialisation), but * default maxClock to a lower chip-specific default. */ if ((pATI->DAC & ~0x0FU) == ATI_DAC_INTERNAL) { int DacSpeed; switch (pATI->bitsPerPixel) { case 15: case 16: DacSpeed = pGDev->dacSpeeds[DAC_BPP16]; break; case 24: DacSpeed = pGDev->dacSpeeds[DAC_BPP24]; break; case 32: DacSpeed = pGDev->dacSpeeds[DAC_BPP32]; break; default: DacSpeed = 0; break; } if (!DacSpeed) DacSpeed = pGDev->dacSpeeds[DAC_BPP8]; if (DacSpeed < ATIClockRange.maxClock) { DefaultmaxClock = 135000; if (pATI->depth > 8) DefaultmaxClock = 80000; if ((pATI->Chip >= ATI_CHIP_264VTB) && (pATI->Chip != ATI_CHIP_Mach64)) { if ((pATI->Chip >= ATI_CHIP_264VT4) && (pATI->Chip != ATI_CHIP_264LTPRO)) DefaultmaxClock = 230000; else if (pATI->Chip >= ATI_CHIP_264VT3) DefaultmaxClock = 200000; else DefaultmaxClock = 170000; } if (DacSpeed > DefaultmaxClock) ATIClockRange.maxClock = DacSpeed; else if (DefaultmaxClock < ATIClockRange.maxClock) ATIClockRange.maxClock = DefaultmaxClock; } } else { switch(pATI->DAC) { case ATI_DAC_STG1700: case ATI_DAC_STG1702: case ATI_DAC_STG1703: DefaultmaxClock = 110000; break; case ATI_DAC_IBMRGB514: pATI->maxClock = 220000; { DefaultmaxClock = 220000; } break; default: #ifndef AVOID_CPIO if (pATI->CPIO_VGAWonder && (pATI->VideoRAM < 1024)) { DefaultmaxClock = (GetBits(BIOSByte(0x44U), 0x04U) * 5000) + 40000; } else #endif /* AVOID_CPIO */ { DefaultmaxClock = 80000; } break; } if (DefaultmaxClock < ATIClockRange.maxClock) ATIClockRange.maxClock = DefaultmaxClock; } /* * Determine available pixel clock frequencies. */ if ((pATI->ProgrammableClock <= ATI_CLOCK_FIXED) || (pATI->ProgrammableClock >= ATI_CLOCK_MAX)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unsupported or non-programmable clock generator.\n"); goto bail; } ATIClockPreInit(pScreenInfo, pATI); Strategy = LOOKUP_BEST_REFRESH; /* * Mode validation. */ if (pATI->Chip >= ATI_CHIP_264CT) { minPitch = 8; } else { minPitch = 16; } pitchInc = minPitch * pATI->bitsPerPixel; pScreenInfo->maxHValue = (MaxBits(CRTC_H_TOTAL) + 1) << 3; if (pATI->Chip < ATI_CHIP_264VT) { /* * ATI finally fixed accelerated doublescanning in the 264VT * and later. On 88800's, the bit is documented to exist, but * only doubles the vertical timings. On the 264CT and 264ET, * the bit is ignored. */ ATIClockRange.doubleScanAllowed = FALSE; /* CRTC_H_TOTAL is one bit narrower */ pScreenInfo->maxHValue >>= 1; } pScreenInfo->maxVValue = MaxBits(CRTC_V_TOTAL) + 1; maxPitch = minPitch * MaxBits(CRTC_PITCH); if (pATI->OptionAccel) { /* * Set engine restrictions on coordinate space. Use maxPitch for the * horizontal and maxHeight for the vertical. */ if (maxPitch > (ATIMach64MaxX / pATI->XModifier)) maxPitch = ATIMach64MaxX / pATI->XModifier; maxHeight = ATIMach64MaxY; /* * For SGRAM & WRAM adapters, the display engine limits the pitch to * multiples of 64 bytes. */ if ((pATI->Chip >= ATI_CHIP_264CT) && ((pATI->Chip >= ATI_CHIP_264VTB) || (pATI->MemoryType >= MEM_264_SGRAM))) pitchInc = pATI->XModifier * (64 * 8); } if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { /* * Given LCD modes are more tightly controlled than CRT modes, allow * the user the option of not specifying a panel's horizontal sync * and/or vertical refresh tolerances. */ Strategy |= LOOKUP_OPTIONAL_TOLERANCES; if (ModeType == M_T_BUILTIN) { /* * Add a mode to the end of the monitor's list for the panel's * native resolution. */ pMode = (DisplayModePtr)xnfcalloc(1, SizeOf(DisplayModeRec)); pMode->name = "Native panel mode"; pMode->type = M_T_BUILTIN; pMode->Clock = pATI->LCDClock; pMode->HDisplay = pATI->LCDHorizontal; pMode->VDisplay = pATI->LCDVertical; /* * These timings are bogus, but enough to survive sync tolerance * checks. */ pMode->HSyncStart = pMode->HDisplay; pMode->HSyncEnd = pMode->HSyncStart + minPitch; pMode->HTotal = pMode->HSyncEnd + minPitch; pMode->VSyncStart = pMode->VDisplay; pMode->VSyncEnd = pMode->VSyncStart + 1; pMode->VTotal = pMode->VSyncEnd + 1; pMode->CrtcHDisplay = pMode->HDisplay; pMode->CrtcHBlankStart = pMode->HDisplay; pMode->CrtcHSyncStart = pMode->HSyncStart; pMode->CrtcHSyncEnd = pMode->HSyncEnd; pMode->CrtcHBlankEnd = pMode->HTotal; pMode->CrtcHTotal = pMode->HTotal; pMode->CrtcVDisplay = pMode->VDisplay; pMode->CrtcVBlankStart = pMode->VDisplay; pMode->CrtcVSyncStart = pMode->VSyncStart; pMode->CrtcVSyncEnd = pMode->VSyncEnd; pMode->CrtcVBlankEnd = pMode->VTotal; pMode->CrtcVTotal = pMode->VTotal; if (!pScreenInfo->monitor->Modes) { pScreenInfo->monitor->Modes = pMode; } else { pScreenInfo->monitor->Last->next = pMode; pMode->prev = pScreenInfo->monitor->Last; } pScreenInfo->monitor->Last = pMode; } /* * Defeat Xconfigurator brain damage. Ignore all HorizSync and * VertRefresh specifications. For now, this does not take * SYNC_TOLERANCE into account. */ if (pScreenInfo->monitor->nHsync > 0) { double hsync = (double)pATI->LCDClock / (pATI->LCDHorizontal + pATI->LCDHBlankWidth); for (i = 0; ; i++) { if (i >= pScreenInfo->monitor->nHsync) { xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE, "Conflicting XF86Config HorizSync specification(s)" " ignored.\n"); break; } if ((hsync >= pScreenInfo->monitor->hsync[i].lo) && (hsync <= pScreenInfo->monitor->hsync[i].hi)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Extraneous XF86Config HorizSync specification(s)" " ignored.\n"); break; } } pScreenInfo->monitor->nHsync = 0; } if (pScreenInfo->monitor->nVrefresh > 0) { double vrefresh = ((double)pATI->LCDClock * 1000.0) / ((pATI->LCDHorizontal + pATI->LCDHBlankWidth) * (pATI->LCDVertical + pATI->LCDVBlankWidth)); for (i = 0; ; i++) { if (i >= pScreenInfo->monitor->nVrefresh) { xf86DrvMsg(pScreenInfo->scrnIndex, X_NOTICE, "Conflicting XF86Config VertRefresh specification(s)" " ignored.\n"); break; } if ((vrefresh >= pScreenInfo->monitor->vrefresh[i].lo) && (vrefresh <= pScreenInfo->monitor->vrefresh[i].hi)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Extraneous XF86Config VertRefresh specification(s)" " ignored.\n"); break; } } pScreenInfo->monitor->nVrefresh = 0; } } i = xf86ValidateModes(pScreenInfo, pScreenInfo->monitor->Modes, pScreenInfo->display->modes, &ATIClockRange, NULL, minPitch, maxPitch, pitchInc, 0, maxHeight, pScreenInfo->display->virtualX, pScreenInfo->display->virtualY, ApertureSize, Strategy); if (i <= 0) goto bail; /* Remove invalid modes */ xf86PruneDriverModes(pScreenInfo); /* Set current mode to the first in the list */ pScreenInfo->currentMode = pScreenInfo->modes; /* Print mode list */ xf86PrintModes(pScreenInfo); /* Set display resolution */ xf86SetDpi(pScreenInfo, 0, 0); /* Load required modules */ if (!ATILoadModules(pScreenInfo, pATI)) goto bail; pATI->displayWidth = pScreenInfo->displayWidth; /* Initialise for panning */ ATIAdjustPreInit(pATI); /* * Warn about modes that are too small, or not aligned, to scroll to the * bottom right corner of the virtual screen. */ MinX = pScreenInfo->virtualX - pATI->AdjustMaxX; MinY = pScreenInfo->virtualY - pATI->AdjustMaxY; pMode = pScreenInfo->modes; do { if ((pMode->VDisplay <= MinY) && ((pMode->VDisplay < MinY) || (pMode->HDisplay < MinX))) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Mode \"%s\" too small to scroll to bottom right corner of" " virtual resolution.\n", pMode->name); else if ((pMode->HDisplay & ~pATI->AdjustMask) / pScreenInfo->xInc) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Mode \"%s\" cannot scroll to bottom right corner of virtual" " resolution.\n Horizontal dimension not a multiple of %ld.\n", pMode->name, ~pATI->AdjustMask + 1); } while ((pMode = pMode->next) != pScreenInfo->modes); /* Initialise XVideo extension support */ ATIXVPreInit(pATI); /* Initialise CRTC code */ ATIModePreInit(pScreenInfo, pATI, &pATI->NewHW); /* Set up for I2C */ ATII2CPreInit(pScreenInfo, pATI); if (!pScreenInfo->chipset || !*pScreenInfo->chipset) pScreenInfo->chipset = "mach64"; PreInitSuccess = TRUE; bail: ATILock(pATI); bail_locked: ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize); ATIUnmapApertures(pScreenInfo->scrnIndex, pATI); return PreInitSuccess; } xf86-video-mach64-6.9.5/src/atiprint.c0000644000175000017500000005316212270010352014217 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "ati.h" #include "atichip.h" #include "atidac.h" #include "atimach64io.h" #include "atiprint.h" #include "atiwonderio.h" /* * ATIPrintBIOS -- * * Display various parts of the BIOS when the server is invoked with -verbose. */ void ATIPrintBIOS ( const CARD8 *BIOS, const unsigned int Length /* A multiple of 512 */ ) { unsigned char *Char = NULL; unsigned int Index; unsigned char Printable[17]; if (xf86GetVerbosity() <= 4) return; (void)memset(Printable, 0, SizeOf(Printable)); xf86ErrorFVerb(5, "\n BIOS image:"); for (Index = 0; Index < Length; Index++) { if (!(Index & (4U - 1U))) { if (!(Index & (16U - 1U))) { if (Printable[0]) xf86ErrorFVerb(5, " |%s|", Printable); Char = Printable; xf86ErrorFVerb(5, "\n 0x%08X: ", Index); } xf86ErrorFVerb(5, " "); } xf86ErrorFVerb(5, "%02X", BIOS[Index]); if (isprint(BIOS[Index])) *Char++ = BIOS[Index]; else *Char++ = '.'; } xf86ErrorFVerb(5, " |%s|\n", Printable); } #ifndef AVOID_CPIO /* * ATIPrintIndexedRegisters -- * * Display a set of indexed byte-size registers when the server is invoked with * -verbose. */ static void ATIPrintIndexedRegisters ( const unsigned long Port, const CARD8 StartIndex, const CARD8 EndIndex, const char *Name, const unsigned long GenS1 ) { int Index; xf86ErrorFVerb(4, "\n %s register values:", Name); for (Index = StartIndex; Index < EndIndex; Index++) { if (!(Index & (4U - 1U))) { if (!(Index & (16U - 1U))) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); xf86ErrorFVerb(4, " "); } if (Port == ATTRX) (void)inb(GenS1); /* Reset flip-flop */ xf86ErrorFVerb(4, "%02X", GetReg(Port, Index)); } if (Port == ATTRX) { (void)inb(GenS1); /* Reset flip-flop */ outb(ATTRX, 0x20U); /* Turn on PAS bit */ } xf86ErrorFVerb(4, "\n"); } #endif /* AVOID_CPIO */ /* * ATIMach64PrintRegisters -- * * Display a Mach64's main register bank when the server is invoked with * -verbose. */ static void ATIMach64PrintRegisters ( ATIPtr pATI, CARD8 *crtc, const char *Description ) { CARD32 IOValue; CARD8 dac_read, dac_mask, dac_data, dac_write; int Index, Limit; #ifndef AVOID_CPIO int Step; #endif /* AVOID_CPIO */ xf86ErrorFVerb(4, "\n Mach64 %s register values:", Description); #ifdef AVOID_CPIO if (pATI->pBlock[1]) Limit = DWORD_SELECT; else Limit = MM_IO_SELECT; for (Index = 0; Index <= Limit; Index += UnitOf(MM_IO_SELECT)) { if (!(Index & SetBits(3, MM_IO_SELECT))) xf86ErrorFVerb(4, "\n 0x%04X: ", Index); if (Index == (DAC_REGS & DWORD_SELECT)) { dac_read = in8(DAC_REGS + 3); DACDelay; dac_mask = in8(DAC_REGS + 2); DACDelay; dac_data = in8(DAC_REGS + 1); DACDelay; dac_write = in8(DAC_REGS + 0); DACDelay; xf86ErrorFVerb(4, " %02X%02X%02X%02X", dac_read, dac_mask, dac_data, dac_write); out8(DAC_REGS + 2, dac_mask); DACDelay; out8(DAC_REGS + 3, dac_read); DACDelay; } else { IOValue = inm(Index); if ((Index == (CRTC_GEN_CNTL & DWORD_SELECT)) && (IOValue & CRTC_EXT_DISP_EN)) *crtc = ATI_CRTC_MACH64; xf86ErrorFVerb(4, " %08lX", (unsigned long)IOValue); } } #else /* AVOID_CPIO */ Limit = ATIIOPort(IOPortTag(0x1FU, 0x3FU)); Step = ATIIOPort(IOPortTag(0x01U, 0x01U)) - pATI->CPIOBase; for (Index = pATI->CPIOBase; Index <= Limit; Index += Step) { if (!(((Index - pATI->CPIOBase) / Step) & 0x03U)) xf86ErrorFVerb(4, "\n 0x%04X: ", Index); if (Index == (int)ATIIOPort(DAC_REGS)) { dac_read = in8(DAC_REGS + 3); DACDelay; dac_mask = in8(DAC_REGS + 2); DACDelay; dac_data = in8(DAC_REGS + 1); DACDelay; dac_write = in8(DAC_REGS + 0); DACDelay; xf86ErrorFVerb(4, " %02X%02X%02X%02X", dac_read, dac_mask, dac_data, dac_write); out8(DAC_REGS + 2, dac_mask); DACDelay; out8(DAC_REGS + 3, dac_read); DACDelay; } else { IOValue = inl(Index); if ((Index == (int)ATIIOPort(CRTC_GEN_CNTL)) && (IOValue & CRTC_EXT_DISP_EN)) *crtc = ATI_CRTC_MACH64; xf86ErrorFVerb(4, " %08lX", (unsigned long)IOValue); } } #endif /* AVOID_CPIO */ xf86ErrorFVerb(4, "\n"); } /* * ATIMach64PrintPLLRegisters -- * * Display an integrated Mach64's PLL registers when the server is invoked with * -verbose. */ static void ATIMach64PrintPLLRegisters ( ATIPtr pATI ) { int Index, Limit; CARD8 PLLReg[MaxBits(PLL_ADDR) + 1]; for (Limit = 0; Limit < SizeOf(PLLReg); Limit++) PLLReg[Limit] = ATIMach64GetPLLReg(Limit); /* Determine how many PLL registers there really are */ while ((Limit = Limit >> 1)) for (Index = 0; Index < Limit; Index++) if (PLLReg[Index] != PLLReg[Index + Limit]) goto FoundLimit; FoundLimit: Limit <<= 1; xf86ErrorFVerb(4, "\n Mach64 PLL register values:"); for (Index = 0; Index < Limit; Index++) { if (!(Index & 3)) { if (!(Index & 15)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); xf86ErrorFVerb(4, " "); } xf86ErrorFVerb(4, "%02X", PLLReg[Index]); } xf86ErrorFVerb(4, "\n"); } /* * ATIRGB514PrintRegisters -- * * Display IBM RGB 514 registers when the server is invoked with -verbose. */ static void ATIRGB514PrintRegisters ( ATIPtr pATI ) { CARD32 crtc_gen_cntl, dac_cntl; CARD8 index_lo, index_hi, index_ctl; int Index; /* Temporarily switch to Mach64 CRTC */ crtc_gen_cntl = inr(CRTC_GEN_CNTL); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl | CRTC_EXT_DISP_EN); /* Temporarily switch to IBM RGB 514 registers */ dac_cntl = inr(DAC_CNTL); outr(DAC_CNTL, (dac_cntl & ~DAC_EXT_SEL_RS3) | DAC_EXT_SEL_RS2); index_lo = in8(M64_DAC_WRITE); index_hi = in8(M64_DAC_DATA); index_ctl = in8(M64_DAC_READ); out8(M64_DAC_WRITE, 0x00U); out8(M64_DAC_DATA, 0x00U); out8(M64_DAC_READ, 0x01U); /* Auto-increment */ xf86ErrorFVerb(4, "\n IBM RGB 514 registers:"); for (Index = 0; Index < 0x0800; Index++) { if (!(Index & 3)) { if (!(Index & 15)) { xf86ErrorFVerb(4, "\n 0x%04X: ", Index); /* Need to rewrite index every so often... */ if ((Index == 0x0100) || (Index == 0x0500)) { out8(M64_DAC_WRITE, 0x00U); out8(M64_DAC_DATA, Index >> 8); } } xf86ErrorFVerb(4, " "); } xf86ErrorFVerb(4, "%02X", in8(M64_DAC_MASK)); } /* Restore registers */ out8(M64_DAC_WRITE, index_lo); out8(M64_DAC_DATA, index_hi); out8(M64_DAC_READ, index_ctl); outr(DAC_CNTL, dac_cntl); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl); xf86ErrorFVerb(4, "\n"); } /* * ATIPrintRegisters -- * * Display various registers when the server is invoked with -verbose. */ void ATIPrintRegisters ( ATIPtr pATI ) { int Index; CARD32 lcd_index, tv_out_index, lcd_gen_ctrl; CARD8 dac_read, dac_mask, dac_write; CARD8 crtc; #ifndef AVOID_CPIO CARD8 genmo; crtc = ATI_CRTC_VGA; if (pATI->VGAAdapter) { xf86ErrorFVerb(4, "\n Miscellaneous output register value: 0x%02X.\n", genmo = inb(R_GENMO)); if (genmo & 0x01U) { if (pATI->Chip == ATI_CHIP_264LT) { lcd_gen_ctrl = inr(LCD_GEN_CTRL); outr(LCD_GEN_CTRL, lcd_gen_ctrl & ~SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(ColourIOBase), 0, 64, "Non-shadow colour CRT controller", 0); outr(LCD_GEN_CTRL, lcd_gen_ctrl | SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(ColourIOBase), 0, 64, "Shadow colour CRT controller", 0); outr(LCD_GEN_CTRL, lcd_gen_ctrl); } else if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) { lcd_index = inr(LCD_INDEX); lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN)); ATIPrintIndexedRegisters(CRTX(ColourIOBase), 0, 64, "Non-shadow colour CRT controller", 0); ATIMach64PutLCDReg(LCD_GEN_CNTL, (lcd_gen_ctrl & ~CRTC_RW_SELECT) | SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(ColourIOBase), 0, 64, "Shadow colour CRT controller", 0); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); outr(LCD_INDEX, lcd_index); } else { ATIPrintIndexedRegisters(CRTX(ColourIOBase), 0, 64, "Colour CRT controller", 0); } ATIPrintIndexedRegisters(ATTRX, 0, 32, "Attribute controller", GENS1(ColourIOBase)); } else { if (pATI->Chip == ATI_CHIP_264LT) { lcd_gen_ctrl = inr(LCD_GEN_CTRL); outr(LCD_GEN_CTRL, lcd_gen_ctrl & ~SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(MonochromeIOBase), 0, 64, "Non-shadow monochrome CRT controller", 0); outr(LCD_GEN_CTRL, lcd_gen_ctrl | SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(MonochromeIOBase), 0, 64, "Shadow monochrome CRT controller", 0); outr(LCD_GEN_CTRL, lcd_gen_ctrl); } else if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) { lcd_index = inr(LCD_INDEX); lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN)); ATIPrintIndexedRegisters(CRTX(MonochromeIOBase), 0, 64, "Non-shadow monochrome CRT controller", 0); ATIMach64PutLCDReg(LCD_GEN_CNTL, (lcd_gen_ctrl & ~CRTC_RW_SELECT) | SHADOW_RW_EN); ATIPrintIndexedRegisters(CRTX(MonochromeIOBase), 0, 64, "Shadow monochrome CRT controller", 0); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); outr(LCD_INDEX, lcd_index); } else { ATIPrintIndexedRegisters(CRTX(MonochromeIOBase), 0, 64, "Monochrome CRT controller", 0); } ATIPrintIndexedRegisters(ATTRX, 0, 32, "Attribute controller", GENS1(MonochromeIOBase)); } ATIPrintIndexedRegisters(GRAX, 0, 16, "Graphics controller", 0); ATIPrintIndexedRegisters(SEQX, 0, 8, "Sequencer", 0); if (pATI->CPIO_VGAWonder) ATIPrintIndexedRegisters(pATI->CPIO_VGAWonder, 0x80U, 0xC0U, "ATI extended VGA", 0); } #endif /* AVOID_CPIO */ if (pATI->Chip == ATI_CHIP_264LT) { lcd_gen_ctrl = inr(LCD_GEN_CTRL); outr(LCD_GEN_CTRL, lcd_gen_ctrl & ~SHADOW_RW_EN); ATIMach64PrintRegisters(pATI, &crtc, "non-shadow"); outr(LCD_GEN_CTRL, lcd_gen_ctrl | SHADOW_RW_EN); ATIMach64PrintRegisters(pATI, &crtc, "shadow"); outr(LCD_GEN_CTRL, lcd_gen_ctrl); ATIMach64PrintPLLRegisters(pATI); } else if ((pATI->Chip == ATI_CHIP_264LTPRO) || (pATI->Chip == ATI_CHIP_264XL) || (pATI->Chip == ATI_CHIP_MOBILITY)) { lcd_index = inr(LCD_INDEX); lcd_gen_ctrl = ATIMach64GetLCDReg(LCD_GEN_CNTL); ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl & ~(CRTC_RW_SELECT | SHADOW_RW_EN)); ATIMach64PrintRegisters(pATI, &crtc, "non-shadow"); ATIMach64PutLCDReg(LCD_GEN_CNTL, (lcd_gen_ctrl & ~CRTC_RW_SELECT) | SHADOW_RW_EN); ATIMach64PrintRegisters(pATI, &crtc, "shadow"); if (pATI->Chip != ATI_CHIP_264XL) { ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl | CRTC_RW_SELECT); ATIMach64PrintRegisters(pATI, &crtc, "secondary"); } ATIMach64PutLCDReg(LCD_GEN_CNTL, lcd_gen_ctrl); ATIMach64PrintPLLRegisters(pATI); xf86ErrorFVerb(4, "\n LCD register values:"); for (Index = 0; Index < 64; Index++) { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); xf86ErrorFVerb(4, " %08X", ATIMach64GetLCDReg(Index)); } outr(LCD_INDEX, lcd_index); tv_out_index = inr(TV_OUT_INDEX); xf86ErrorFVerb(4, "\n\n TV_OUT register values:"); for (Index = 0; Index < 256; Index++) { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); xf86ErrorFVerb(4, " %08X", ATIMach64GetTVReg(Index)); } outr(TV_OUT_INDEX, tv_out_index); xf86ErrorFVerb(4, "\n"); } else { #ifdef AVOID_CPIO ATIMach64PrintRegisters(pATI, &crtc, "MMIO"); #else /* AVOID_CPIO */ ATIMach64PrintRegisters(pATI, &crtc, (pATI->CPIODecoding == SPARSE_IO) ? "sparse" : "block"); #endif /* AVOID_CPIO */ if (pATI->Chip >= ATI_CHIP_264CT) ATIMach64PrintPLLRegisters(pATI); if (pATI->DAC == ATI_DAC_IBMRGB514) ATIRGB514PrintRegisters(pATI); } #ifdef AVOID_CPIO dac_read = in8(M64_DAC_READ); DACDelay; dac_write = in8(M64_DAC_WRITE); DACDelay; dac_mask = in8(M64_DAC_MASK); DACDelay; xf86ErrorFVerb(4, "\n" " DAC read index: 0x%02X\n" " DAC write index: 0x%02X\n" " DAC mask: 0x%02X\n\n" " DAC colour lookup table:", dac_read, dac_write, dac_mask); out8(M64_DAC_MASK, 0xFFU); DACDelay; out8(M64_DAC_READ, 0x00U); DACDelay; for (Index = 0; Index < 256; Index++) { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X:", Index); xf86ErrorFVerb(4, " %02X", in8(M64_DAC_DATA)); DACDelay; xf86ErrorFVerb(4, " %02X", in8(M64_DAC_DATA)); DACDelay; xf86ErrorFVerb(4, " %02X", in8(M64_DAC_DATA)); DACDelay; } out8(M64_DAC_MASK, dac_mask); DACDelay; out8(M64_DAC_READ, dac_read); DACDelay; #else /* AVOID_CPIO */ ATISetDACIOPorts(pATI, crtc); dac_read = inb(pATI->CPIO_DAC_READ); DACDelay; dac_write = inb(pATI->CPIO_DAC_WRITE); DACDelay; dac_mask = inb(pATI->CPIO_DAC_MASK); DACDelay; xf86ErrorFVerb(4, "\n" " DAC read index: 0x%02X\n" " DAC write index: 0x%02X\n" " DAC mask: 0x%02X\n\n" " DAC colour lookup table:", dac_read, dac_write, dac_mask); outb(pATI->CPIO_DAC_MASK, 0xFFU); DACDelay; outb(pATI->CPIO_DAC_READ, 0x00U); DACDelay; for (Index = 0; Index < 256; Index++) { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X:", Index); xf86ErrorFVerb(4, " %02X", inb(pATI->CPIO_DAC_DATA)); DACDelay; xf86ErrorFVerb(4, " %02X", inb(pATI->CPIO_DAC_DATA)); DACDelay; xf86ErrorFVerb(4, " %02X", inb(pATI->CPIO_DAC_DATA)); DACDelay; } outb(pATI->CPIO_DAC_MASK, dac_mask); DACDelay; outb(pATI->CPIO_DAC_READ, dac_read); DACDelay; #endif /* AVOID_CPIO */ { xf86ErrorFVerb(4, "\n\n PCI configuration register values:"); for (Index = 0; Index < 256; Index+= 4) { pciVideoPtr pVideo = pATI->PCIInfo; uint32_t data; PCI_READ_LONG(pVideo, &data, Index); if (!(Index & 15)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); xf86ErrorFVerb(4, " 0x%08X", data); } } xf86ErrorFVerb(4, "\n"); #ifndef AVOID_CPIO if (pATI->pBank) xf86ErrorFVerb(4, "\n Banked aperture at 0x%0lX.", (unsigned long)pATI->pBank); else xf86ErrorFVerb(4, "\n No banked aperture."); #endif /* AVOID_CPIO */ if (pATI->pMemory) { xf86ErrorFVerb(4, "\n Linear aperture at %p.\n", pATI->pMemory); } if (pATI->pBlock[0]) { xf86ErrorFVerb(4, " Block 0 aperture at %p.\n", pATI->pBlock[0]); if (inr(CONFIG_CHIP_ID) == pATI->config_chip_id) xf86ErrorFVerb(4, " MMIO registers are correctly mapped.\n"); else xf86ErrorFVerb(4, " MMIO mapping is in error!\n"); if (pATI->pBlock[1]) xf86ErrorFVerb(4, " Block 1 aperture at %p.\n", pATI->pBlock[1]); } else { xf86ErrorFVerb(4, " No MMIO aperture.\n"); } if (pATI->pCursorImage) xf86ErrorFVerb(4, " Hardware cursor image aperture at %p.\n", pATI->pCursorImage); else xf86ErrorFVerb(4, " No hardware cursor image aperture.\n"); xf86ErrorFVerb(4, "\n"); } /* * A table to associate mode attributes with character strings. */ static const SymTabRec ModeAttributeNames[] = { {V_PHSYNC, "+hsync"}, {V_NHSYNC, "-hsync"}, {V_PVSYNC, "+vsync"}, {V_NVSYNC, "-vsync"}, {V_PCSYNC, "+csync"}, {V_NCSYNC, "-csync"}, {V_INTERLACE, "interlace"}, {V_DBLSCAN, "doublescan"}, {V_CSYNC, "composite"}, {V_DBLCLK, "dblclk"}, {V_CLKDIV2, "clkdiv2"}, {0, NULL} }; /* * ATIPrintMode -- * * This function displays a mode's timing information. */ void ATIPrintMode ( DisplayModePtr pMode ) { const SymTabRec *pSymbol = ModeAttributeNames; int flags = pMode->Flags; double mClock, hSync, vRefresh; mClock = (double)pMode->SynthClock; if (pMode->HSync > 0.0) hSync = pMode->HSync; else hSync = mClock / pMode->HTotal; if (pMode->VRefresh > 0.0) { vRefresh = pMode->VRefresh; } else { vRefresh = (hSync * 1000.0) / pMode->VTotal; if (flags & V_INTERLACE) vRefresh *= 2.0; if (flags & V_DBLSCAN) vRefresh /= 2.0; if (pMode->VScan > 1) vRefresh /= pMode->VScan; } xf86ErrorFVerb(4, " Dot clock: %7.3f MHz\n", mClock / 1000.0); xf86ErrorFVerb(4, " Horizontal sync: %7.3f kHz\n", hSync); xf86ErrorFVerb(4, " Vertical refresh: %7.3f Hz (%s)\n", vRefresh, (flags & V_INTERLACE) ? "I" : "NI"); if ((pMode->ClockIndex >= 0) && (pMode->ClockIndex < MAXCLOCKS)) xf86ErrorFVerb(4, " Clock index: %d\n", pMode->ClockIndex); xf86ErrorFVerb(4, " Horizontal timings: %4d %4d %4d %4d\n" " Vertical timings: %4d %4d %4d %4d\n", pMode->HDisplay, pMode->HSyncStart, pMode->HSyncEnd, pMode->HTotal, pMode->VDisplay, pMode->VSyncStart, pMode->VSyncEnd, pMode->VTotal); if (flags & V_HSKEW) { flags &= ~V_HSKEW; xf86ErrorFVerb(4, " Horizontal skew: %4d\n", pMode->HSkew); } if (pMode->VScan >= 1) xf86ErrorFVerb(4, " Vertical scan: %4d\n", pMode->VScan); xf86ErrorFVerb(4, " Flags: "); for (; pSymbol->token; pSymbol++) { if (flags & pSymbol->token) { xf86ErrorFVerb(4, " %s", pSymbol->name); flags &= ~pSymbol->token; if (!flags) break; } } xf86ErrorFVerb(4, "\n"); } xf86-video-mach64-6.9.5/src/atirgb514.c0000644000175000017500000001725312270010352014070 00000000000000/* * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "aticrtc.h" #include "atimach64io.h" #include "atirgb514.h" /* * ATIRGB514PreInit -- * * This function fills in the IBM RGB 514 portion of an ATIHWRec that is common * to all video modes generated by the server. */ void ATIRGB514PreInit ( ATIPtr pATI, ATIHWPtr pATIHW ) { /* Get a work copy of IBM RGB 514 registers */ ATIRGB514Save(pATI, pATIHW); /* Miscellaneous Clock Control */ pATIHW->ibmrgb514[0x0002U] = 0x01U; /* Sync Control */ pATIHW->ibmrgb514[0x0003U] &= ~0x80U; /* Horizontal Sync Control */ pATIHW->ibmrgb514[0x0004U] = 0x00U; /* Power Management */ pATIHW->ibmrgb514[0x0005U] = 0x00U; /* DAC Operation */ pATIHW->ibmrgb514[0x0006U] &= ~0x04U; /* Palette Control */ pATIHW->ibmrgb514[0x0007U] = 0x00U; /* PLL Control */ pATIHW->ibmrgb514[0x0010U] = 0x01U; /* Cursor control */ pATIHW->ibmrgb514[0x0030U] &= ~0x03U; /* For now */ /* Border (i.e. overscan) */ pATIHW->ibmrgb514[0x0060U] = 0x00U; pATIHW->ibmrgb514[0x0061U] = 0x00U; pATIHW->ibmrgb514[0x0062U] = 0x00U; /* Miscellaneous Control */ pATIHW->ibmrgb514[0x0070U] &= ~0x20U; pATIHW->ibmrgb514[0x0071U] = 0x41U; /* See workaround in ATIRGB514Set() */ #ifndef AVOID_CPIO if (pATIHW->crtc == ATI_CRTC_VGA) { /* Pixel Format */ pATIHW->ibmrgb514[0x000AU] = 0x03U; /* Miscellaneous Control */ pATIHW->ibmrgb514[0x0070U] |= 0x40U; /* VRAM Mask */ pATIHW->ibmrgb514[0x0090U] = 0x03U; } else #endif /* AVOID_CPIO */ { /* Miscellaneous Control */ pATIHW->ibmrgb514[0x0070U] &= ~0x40U; /* VRAM Mask */ pATIHW->ibmrgb514[0x0090U] = 0x00U; pATIHW->ibmrgb514[0x0091U] = 0x00U; /* Pixel Format */ switch (pATI->depth) { case 8: pATIHW->ibmrgb514[0x000AU] = 0x03U; pATIHW->ibmrgb514[0x000BU] = 0x00U; break; case 15: pATIHW->ibmrgb514[0x000AU] = 0x04U; pATIHW->ibmrgb514[0x000CU] = 0xC4U; break; case 16: pATIHW->ibmrgb514[0x000AU] = 0x04U; pATIHW->ibmrgb514[0x000CU] = 0xC6U; break; case 24: if (pATI->bitsPerPixel == 24) { pATIHW->ibmrgb514[0x000AU] = 0x05U; pATIHW->ibmrgb514[0x000DU] = 0x01U; } else { pATIHW->ibmrgb514[0x000AU] = 0x06U; pATIHW->ibmrgb514[0x000EU] = 0x03U; } break; default: break; } } if (pATI->rgbBits == 8) pATIHW->ibmrgb514[0x0071U] |= 0x04U; } /* * ATIRGB514Save -- * * This function saves IBM RGB514 related data into an ATIHWRec. */ void ATIRGB514Save ( ATIPtr pATI, ATIHWPtr pATIHW ) { CARD32 crtc_gen_cntl, dac_cntl; CARD8 index_lo, index_hi, index_ctl; int Index; /* Temporarily switch to Mach64 CRTC */ crtc_gen_cntl = inr(CRTC_GEN_CNTL); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl | CRTC_EXT_DISP_EN); /* Temporarily switch to IBM RGB 514 registers */ dac_cntl = inr(DAC_CNTL) & ~(DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3); outr(DAC_CNTL, dac_cntl | DAC_EXT_SEL_RS2); index_lo = in8(M64_DAC_WRITE); index_hi = in8(M64_DAC_DATA); index_ctl = in8(M64_DAC_READ); out8(M64_DAC_WRITE, 0x00U); out8(M64_DAC_DATA, 0x00U); out8(M64_DAC_READ, 0x01U); /* Auto-increment */ /* Save IBM RGB 514 registers */ for (Index = 0; Index < NumberOf(pATIHW->ibmrgb514); Index++) { /* Need to rewrite the index every so often... */ if ((Index == 0x0100) || (Index == 0x0500)) { out8(M64_DAC_WRITE, 0); out8(M64_DAC_DATA, Index >> 8); } pATIHW->ibmrgb514[Index] = in8(M64_DAC_MASK); } /* Restore registers */ out8(M64_DAC_WRITE, index_lo); out8(M64_DAC_DATA, index_hi); out8(M64_DAC_READ, index_ctl); outr(DAC_CNTL, dac_cntl); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl); } /* * ATIRGB514Calculate -- * * This function fills in the IBM RGB 514 portion of an ATIHWRec that is * specific to a display mode. pATIHW->ibmrgb514 has already been * initialised by a previous call to ATIRGB514PreInit(). */ void ATIRGB514Calculate ( ATIPtr pATI, ATIHWPtr pATIHW, DisplayModePtr pMode ) { if (pATI->OptionCSync || (pMode->Flags & (V_CSYNC | V_PCSYNC))) pATIHW->ibmrgb514[0x0006U] |= 0x08U; else pATIHW->ibmrgb514[0x0006U] &= ~0x08U; if (pMode->Flags & V_INTERLACE) pATIHW->ibmrgb514[0x0071U] |= 0x20U; else pATIHW->ibmrgb514[0x0071U] &= ~0x20U; } /* * ATIRGB514Set -- * * This function is called to set an IBM RGB514's registers. */ void ATIRGB514Set ( ATIPtr pATI, ATIHWPtr pATIHW ) { CARD32 crtc_gen_cntl, dac_cntl; CARD8 index_lo, index_hi, index_ctl; int Index; /* Temporarily switch to Mach64 CRTC */ crtc_gen_cntl = inr(CRTC_GEN_CNTL); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl | CRTC_EXT_DISP_EN); /* Temporarily switch to IBM RGB 514 registers */ dac_cntl = inr(DAC_CNTL) & ~(DAC_EXT_SEL_RS2 | DAC_EXT_SEL_RS3); outr(DAC_CNTL, dac_cntl | DAC_EXT_SEL_RS2); index_lo = in8(M64_DAC_WRITE); index_hi = in8(M64_DAC_DATA); index_ctl = in8(M64_DAC_READ); out8(M64_DAC_WRITE, 0x00U); out8(M64_DAC_DATA, 0x00U); out8(M64_DAC_READ, 0x01U); /* Auto-increment */ /* Load IBM RGB 514 registers */ for (Index = 0; Index < NumberOf(pATIHW->ibmrgb514); Index++) out8(M64_DAC_MASK, pATIHW->ibmrgb514[Index]); #ifndef AVOID_CPIO /* Deal with documented anomaly */ if (pATIHW->crtc == ATI_CRTC_VGA) { /* Reset Miscellaneous Control 2 */ out8(M64_DAC_WRITE, 0x71U); out8(M64_DAC_DATA, 0x00U); out8(M64_DAC_MASK, pATIHW->ibmrgb514[0x0071U] & ~0x41U); } #endif /* AVOID_CPIO */ /* Restore registers */ out8(M64_DAC_WRITE, index_lo); out8(M64_DAC_DATA, index_hi); out8(M64_DAC_READ, index_ctl); outr(DAC_CNTL, dac_cntl); if (!(crtc_gen_cntl & CRTC_EXT_DISP_EN)) outr(CRTC_GEN_CNTL, crtc_gen_cntl); } xf86-video-mach64-6.9.5/src/atiscreen.c0000644000175000017500000004464712270010352014352 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Gareth Hughes * José Fonseca * Leif Delgass */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atibus.h" #include "atichip.h" #include "aticursor.h" #include "atidac.h" #include "atidga.h" #include "atidri.h" #include "atimach64.h" #include "atimode.h" #include "atistruct.h" #include "atiscreen.h" #include "atixv.h" #include "atimach64accel.h" #include "aticonsole.h" #ifdef XF86DRI_DEVEL #include "mach64_dri.h" #include "mach64_sarea.h" #endif #ifdef TV_OUT #include "atichip.h" #endif /* TV_OUT */ #include "shadowfb.h" #include "xf86cmap.h" #include "fb.h" #include "micmap.h" #include "mipointer.h" /* * ATIRefreshArea -- * * This function is called by the shadow frame buffer code to refresh the * hardware frame buffer. */ static void ATIRefreshArea ( ScrnInfoPtr pScreenInfo, int nBox, BoxPtr pBox ) { ATIPtr pATI = ATIPTR(pScreenInfo); pointer pSrc, pDst; int offset, w, h; while (nBox-- > 0) { w = (pBox->x2 - pBox->x1) * pATI->AdjustDepth; h = pBox->y2 - pBox->y1; offset = (pBox->y1 * pATI->FBPitch) + (pBox->x1 * pATI->AdjustDepth); pSrc = (char *)pATI->pShadow + offset; pDst = (char *)pATI->pMemory + offset; while (h-- > 0) { (void)memcpy(pDst, pSrc, w); pSrc = (char *)pSrc + pATI->FBPitch; pDst = (char *)pDst + pATI->FBPitch; } pBox++; } } /* * ATIMinBits -- * * Compute log base 2 of val. */ static int ATIMinBits ( int val ) { int bits; if (!val) return 1; for (bits = 0; val; val >>= 1, ++bits); return bits; } #ifdef USE_XAA static Bool ATIMach64SetupMemXAA_NoDRI ( ScrnInfoPtr pScreenInfo, ScreenPtr pScreen ) { ATIPtr pATI = ATIPTR(pScreenInfo); int maxScanlines = ATIMach64MaxY; int maxPixelArea, PixelArea; { /* * Note: If PixelArea exceeds the engine's maximum, the excess is * never used, even though it would be useful for such things * as XVideo buffers. */ maxPixelArea = maxScanlines * pScreenInfo->displayWidth; PixelArea = pScreenInfo->videoRam * 1024 * 8 / pATI->bitsPerPixel; if (PixelArea > maxPixelArea) PixelArea = maxPixelArea; xf86InitFBManagerArea(pScreen, PixelArea, 2); } return TRUE; } #ifdef XF86DRI_DEVEL /* * Memory layour for XAA with DRI (no local_textures): * | front | pixmaps, xv | back | depth | textures | c | * * 1024x768@16bpp with 8 MB: * | 1.5 MB | ~3.5 MB | 1.5 MB | 1.5 MB | 0 | c | * * 1024x768@32bpp with 8 MB: * | 3.0 MB | ~0.5 MB | 3.0 MB | 1.5 MB | 0 | c | * * "c" is the hw cursor which occupies 1KB */ static Bool ATIMach64SetupMemXAA ( ScrnInfoPtr pScreenInfo, ScreenPtr pScreen ) { ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; int cpp = pATI->bitsPerPixel >> 3; int widthBytes = pScreenInfo->displayWidth * cpp; int zWidthBytes = pScreenInfo->displayWidth * 2; /* always 16-bit z-buffer */ int fbSize = pScreenInfo->videoRam * 1024; int bufferSize = pScreenInfo->virtualY * widthBytes; int zBufferSize = pScreenInfo->virtualY * zWidthBytes; int offscreenBytes, total, scanlines; pATIDRIServer->fbX = 0; pATIDRIServer->fbY = 0; pATIDRIServer->frontOffset = 0; pATIDRIServer->frontPitch = pScreenInfo->displayWidth; /* Calculate memory remaining for pixcache and textures after * front, back, and depth buffers */ offscreenBytes = fbSize - ( 2 * bufferSize + zBufferSize ); if ( !pATIDRIServer->IsPCI && !pATI->OptionLocalTextures ) { /* Don't allocate a local texture heap for AGP unless requested */ pATIDRIServer->textureSize = 0; } else { int l, maxPixcache; #ifdef XvExtension int xvBytes; /* Try for enough pixmap cache for DVD and a full viewport */ xvBytes = 720*480*cpp; /* enough for single-buffered DVD */ maxPixcache = xvBytes > bufferSize ? xvBytes : bufferSize; #else /* XvExtension */ /* Try for one viewport */ maxPixcache = bufferSize; #endif /* XvExtension */ pATIDRIServer->textureSize = offscreenBytes - maxPixcache; /* If that gives us less than half the offscreen mem available for textures, split * the available mem between textures and pixmap cache */ if (pATIDRIServer->textureSize < (offscreenBytes/2)) { pATIDRIServer->textureSize = offscreenBytes/2; } if (pATIDRIServer->textureSize <= 0) pATIDRIServer->textureSize = 0; l = ATIMinBits((pATIDRIServer->textureSize-1) / MACH64_NR_TEX_REGIONS); if (l < MACH64_LOG_TEX_GRANULARITY) l = MACH64_LOG_TEX_GRANULARITY; /* Round the texture size up to the nearest whole number of * texture regions. Again, be greedy about this, don't round * down. */ pATIDRIServer->logTextureGranularity = l; pATIDRIServer->textureSize = (pATIDRIServer->textureSize >> l) << l; } total = fbSize - pATIDRIServer->textureSize; scanlines = total / widthBytes; if (scanlines > ATIMach64MaxY) scanlines = ATIMach64MaxY; /* Recalculate the texture offset and size to accomodate any * rounding to a whole number of scanlines. * FIXME: Is this actually needed? */ pATIDRIServer->textureOffset = scanlines * widthBytes; pATIDRIServer->textureSize = fbSize - pATIDRIServer->textureOffset; /* Set a minimum usable local texture heap size. This will fit * two 256x256 textures. We check this after any rounding of * the texture area. */ if (pATIDRIServer->textureSize < 256*256 * cpp * 2) { pATIDRIServer->textureOffset = 0; pATIDRIServer->textureSize = 0; scanlines = fbSize / widthBytes; if (scanlines > ATIMach64MaxY) scanlines = ATIMach64MaxY; } pATIDRIServer->depthOffset = scanlines * widthBytes - zBufferSize; pATIDRIServer->depthPitch = pScreenInfo->displayWidth; pATIDRIServer->depthY = pATIDRIServer->depthOffset/widthBytes; pATIDRIServer->depthX = (pATIDRIServer->depthOffset - (pATIDRIServer->depthY * widthBytes)) / cpp; pATIDRIServer->backOffset = pATIDRIServer->depthOffset - bufferSize; pATIDRIServer->backPitch = pScreenInfo->displayWidth; pATIDRIServer->backY = pATIDRIServer->backOffset/widthBytes; pATIDRIServer->backX = (pATIDRIServer->backOffset - (pATIDRIServer->backY * widthBytes)) / cpp; scanlines = fbSize / widthBytes; if (scanlines > ATIMach64MaxY) scanlines = ATIMach64MaxY; if ( pATIDRIServer->IsPCI && pATIDRIServer->textureSize == 0 ) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Not enough memory for local textures, disabling DRI\n"); ATIDRICloseScreen(pScreen); pATI->directRenderingEnabled = FALSE; } else { BoxRec ScreenArea; ScreenArea.x1 = 0; ScreenArea.y1 = 0; ScreenArea.x2 = pATI->displayWidth; ScreenArea.y2 = scanlines; if (!xf86InitFBManager(pScreen, &ScreenArea)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Memory manager initialization to (%d,%d) (%d,%d) failed\n", ScreenArea.x1, ScreenArea.y1, ScreenArea.x2, ScreenArea.y2); return FALSE; } else { int width, height; xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Memory manager initialized to (%d,%d) (%d,%d)\n", ScreenArea.x1, ScreenArea.y1, ScreenArea.x2, ScreenArea.y2); if (xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Largest offscreen area available: %d x %d\n", width, height); /* lines in offscreen area needed for depth buffer and textures */ pATI->depthTexLines = scanlines - pATIDRIServer->depthOffset / widthBytes; pATI->backLines = scanlines - pATIDRIServer->backOffset / widthBytes - pATI->depthTexLines; pATI->depthTexArea = NULL; pATI->backArea = NULL; } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "Unable to determine largest offscreen area available\n"); return FALSE; } } xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Will use %d kB of offscreen memory for XAA\n", (offscreenBytes - pATIDRIServer->textureSize)/1024); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Will use back buffer at offset 0x%x\n", pATIDRIServer->backOffset); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Will use depth buffer at offset 0x%x\n", pATIDRIServer->depthOffset); if (pATIDRIServer->textureSize > 0) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Will use %d kB for local textures at offset 0x%x\n", pATIDRIServer->textureSize/1024, pATIDRIServer->textureOffset); } } return TRUE; } #endif /* XF86DRI_DEVEL */ #endif /* USE_XAA */ /* * ATIScreenInit -- * * This function is called by DIX to initialise the screen. */ Bool ATIScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); pointer pFB; int VisualMask; /* Set video hardware state */ if (!ATIEnterGraphics(pScreen, pScreenInfo, pATI)) return FALSE; /* Re-initialise mi's visual list */ miClearVisualTypes(); if ((pATI->depth > 8) && (pATI->DAC == ATI_DAC_INTERNAL)) VisualMask = TrueColorMask; else VisualMask = miGetDefaultVisualMask(pATI->depth); if (!miSetVisualTypes(pATI->depth, VisualMask, pATI->rgbBits, pScreenInfo->defaultVisual)) return FALSE; if (!miSetPixmapDepths()) return FALSE; pFB = pATI->pMemory; pATI->FBPitch = PixmapBytePad(pATI->displayWidth, pATI->depth); if (pATI->OptionShadowFB) { pATI->FBBytesPerPixel = pATI->bitsPerPixel >> 3; pATI->FBPitch = PixmapBytePad(pATI->displayWidth, pATI->depth); if ((pATI->pShadow = malloc(pATI->FBPitch * pScreenInfo->virtualY))) { pFB = pATI->pShadow; } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Insufficient virtual memory for shadow frame buffer.\n"); pATI->OptionShadowFB = FALSE; } } #ifdef XF86DRI_DEVEL /* Setup DRI after visuals have been established, but before * fbScreenInit is called. fbScreenInit will eventually call the * driver's InitGLXVisuals call back. */ /* According to atiregs.h, GTPro (3D Rage Pro) is the first chip type with * 3D triangle setup (the VERTEX_* registers) */ if (pATI->Chip < ATI_CHIP_264GTPRO) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Direct rendering is not supported for ATI chips earlier than " "the ATI 3D Rage Pro.\n"); pATI->directRenderingEnabled = FALSE; } else { /* FIXME: When we move to dynamic allocation of back and depth * buffers, we will want to revisit the following check for 3 * times the virtual size (or 2.5 times for 24-bit depth) of the screen below. */ int cpp = pATI->bitsPerPixel >> 3; int maxY = pScreenInfo->videoRam * 1024 / (pATI->displayWidth * cpp); int requiredY; requiredY = pScreenInfo->virtualY * 2 /* front, back buffers */ + (pScreenInfo->virtualY * 2 / cpp); /* depth buffer (always 16-bit) */ if (!pATI->OptionAccel) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Acceleration disabled, not initializing the DRI\n"); pATI->directRenderingEnabled = FALSE; } else if ( maxY > requiredY ) { pATI->directRenderingEnabled = ATIDRIScreenInit(pScreen); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "DRI static buffer allocation failed -- " "need at least %d kB video memory\n", (pScreenInfo->displayWidth * requiredY * cpp ) / 1024); pATI->directRenderingEnabled = FALSE; } } #endif /* XF86DRI_DEVEL */ /* Initialise framebuffer layer */ switch (pATI->bitsPerPixel) { case 8: case 16: case 24: case 32: pATI->Closeable = fbScreenInit(pScreen, pFB, pScreenInfo->virtualX, pScreenInfo->virtualY, pScreenInfo->xDpi, pScreenInfo->yDpi, pATI->displayWidth, pATI->bitsPerPixel); break; default: return FALSE; } if (!pATI->Closeable) return FALSE; /* Fixup RGB ordering */ if (pATI->depth > 8) { VisualPtr pVisual = pScreen->visuals + pScreen->numVisuals; while (--pVisual >= pScreen->visuals) { if ((pVisual->class | DynamicClass) != DirectColor) continue; pVisual->offsetRed = pScreenInfo->offset.red; pVisual->offsetGreen = pScreenInfo->offset.green; pVisual->offsetBlue = pScreenInfo->offset.blue; pVisual->redMask = pScreenInfo->mask.red; pVisual->greenMask = pScreenInfo->mask.green; pVisual->blueMask = pScreenInfo->mask.blue; } } /* initialise RENDER extension */ if (!fbPictureInit(pScreen, NULL, 0) && (serverGeneration == 1)) { xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "RENDER extension initialisation failed.\n"); } xf86SetBlackWhitePixels(pScreen); #ifdef USE_XAA if (!pATI->useEXA) { /* Memory manager setup */ #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { if (!ATIMach64SetupMemXAA(pScreenInfo, pScreen)) return FALSE; } else #endif /* XF86DRI_DEVEL */ { if (!ATIMach64SetupMemXAA_NoDRI(pScreenInfo, pScreen)) return FALSE; } /* Setup acceleration */ if (pATI->OptionAccel && !ATIMach64AccelInit(pScreen)) return FALSE; } #endif /* USE_XAA */ #ifdef USE_EXA if (pATI->useEXA) { /* EXA setups both memory manager and acceleration here */ if (pATI->OptionAccel && !ATIMach64ExaInit(pScreen)) return FALSE; } #endif /* USE_EXA */ #ifndef AVOID_DGA /* Initialise DGA support */ (void)ATIDGAInit(pScreen, pScreenInfo, pATI); #endif /* AVOID_DGA */ /* Initialise backing store */ xf86SetBackingStore(pScreen); /* Initialise cursor */ if (!ATIMach64CursorInit(pScreen)) return FALSE; /* Create default colourmap */ if (!miCreateDefColormap(pScreen)) return FALSE; if (!xf86HandleColormaps(pScreen, 256, pATI->rgbBits, ATILoadPalette, NULL, CMAP_PALETTED_TRUECOLOR | CMAP_LOAD_EVEN_IF_OFFSCREEN)) return FALSE; /* Initialise shadow framebuffer */ if (pATI->OptionShadowFB && !ShadowFBInit(pScreen, ATIRefreshArea)) return FALSE; /* Initialise DPMS support */ (void)xf86DPMSInit(pScreen, ATISetDPMSMode, 0); /* Initialise XVideo support */ (void)ATIInitializeXVideo(pScreen, pScreenInfo, pATI); /* Set pScreen->SaveScreen and wrap CloseScreen vector */ pScreen->SaveScreen = ATISaveScreen; pATI->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = ATICloseScreen; if (serverGeneration == 1) xf86ShowUnusedOptions(pScreenInfo->scrnIndex, pScreenInfo->options); #ifdef TV_OUT /* Fix-up TV out after ImpacTV probe */ if (pATI->OptionTvOut && pATI->Chip < ATI_CHIP_264GTPRO) ATISwitchMode(SWITCH_MODE_ARGS(pScreenInfo, pScreenInfo->currentMode)); #endif /* TV_OUT */ #ifdef XF86DRI_DEVEL /* DRI finalization */ if (pATI->directRenderingEnabled) { /* Now that mi, fb, drm and others have done their thing, * complete the DRI setup. */ pATI->directRenderingEnabled = ATIDRIFinishScreenInit(pScreen); } if (pATI->directRenderingEnabled) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Direct rendering enabled\n"); } else { /* FIXME: Release unused offscreen mem here? */ xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Direct rendering disabled\n"); } #endif /* XF86DRI_DEVEL */ return TRUE; } /* * ATICloseScreen -- * * This function is called by DIX to close the screen. */ Bool ATICloseScreen (CLOSE_SCREEN_ARGS_DECL) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); #ifdef XF86DRI_DEVEL /* Disable direct rendering */ if (pATI->directRenderingEnabled) { ATIDRICloseScreen(pScreen); pATI->directRenderingEnabled = FALSE; } #endif /* XF86DRI_DEVEL */ ATICloseXVideo(pScreen, pScreenInfo, pATI); #ifdef USE_EXA if (pATI->pExa) { exaDriverFini(pScreen); free(pATI->pExa); pATI->pExa = NULL; } #endif #ifdef USE_XAA if (pATI->pXAAInfo) { XAADestroyInfoRec(pATI->pXAAInfo); pATI->pXAAInfo = NULL; } #endif if (pATI->pCursorInfo) { xf86DestroyCursorInfoRec(pATI->pCursorInfo); pATI->pCursorInfo = NULL; } pATI->Closeable = FALSE; ATILeaveGraphics(pScreenInfo, pATI); #ifdef USE_XAA if (!pATI->useEXA) { free(pATI->ExpansionBitmapScanlinePtr[1]); pATI->ExpansionBitmapScanlinePtr[0] = NULL; pATI->ExpansionBitmapScanlinePtr[1] = NULL; } #endif free(pATI->pShadow); pATI->pShadow = NULL; pScreenInfo->pScreen = NULL; pScreen->CloseScreen = pATI->CloseScreen; return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } xf86-video-mach64-6.9.5/src/atituner.c0000644000175000017500000001036112270010352014212 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "atituner.h" /* Temporary interface glitch */ #if 0 # include "fi12x6.h" #else typedef enum { FI12x6_TYPE_UNKNOWN = -1, FI12x6_TYPE_FI1236 = 0, FI12x6_TYPE_FI1216, FI12x6_TYPE_FI1216MF, FI12x6_TYPE_TEMIC_FN5AL, FI12x6_TYPE_MT2032, FI12x6_TYPE_MAX /* Must be last */ } FI12x6TunerType; #endif /* * TV tuner definitions. */ const SymTabRec ATITuners[] = { { FI12x6_TYPE_UNKNOWN, "No tuner" }, { FI12x6_TYPE_FI1236, "Philips FI1236 MK1 NTSC M/N North America" }, { FI12x6_TYPE_FI1236, "Philips FI1236 MK2 NTSC M/N Japan" }, { FI12x6_TYPE_FI1216, "Philips FI1216 MK2 PAL B/G" }, { FI12x6_TYPE_UNKNOWN, "Philips FI1246 MK2 PAL I" }, { FI12x6_TYPE_FI1216MF, "Philips FI1216 MF MK2 PAL B/G, SECAM L/L" }, { FI12x6_TYPE_FI1236, "Philips FI1236 MK2 NTSC M/N North America" }, { FI12x6_TYPE_UNKNOWN, "Philips FI1256 MK2 SECAM D/K" }, { FI12x6_TYPE_FI1236, "Philips FM1236 MK2 NTSC M/N North America" }, { FI12x6_TYPE_FI1216, "Philips FI1216 MK2 PAL B/G - External Tuner POD" }, { FI12x6_TYPE_UNKNOWN, "Philips FI1246 MK2 PAL I - External Tuner POD" }, { FI12x6_TYPE_FI1216MF, "Philips FI1216 MF MK2 PAL B/G, SECAM L/L - External Tuner POD" }, { FI12x6_TYPE_FI1236, "Philips FI1236 MK2 NTSC M/N North America - External Tuner POD" }, { FI12x6_TYPE_TEMIC_FN5AL, "Temic FN5AL.RF3X7595 PAL I/B/G/DK & SECAM DK" }, { FI12x6_TYPE_FI1216MF, "Philips FQ1216 ME/P" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (15)" }, { FI12x6_TYPE_UNKNOWN, "Alps TSBH5 NTSC M/N North America" }, { FI12x6_TYPE_UNKNOWN, "Alps TSC?? NTSC M/N North America" }, { FI12x6_TYPE_UNKNOWN, "Alps TSCH5 NTSC M/N North America with FM" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (19)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (20)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (21)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (22)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (23)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (24)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (25)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (26)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (27)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (28)" }, { FI12x6_TYPE_MT2032, "Microtune MT2032" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (30)" }, { FI12x6_TYPE_UNKNOWN, "Unknown type (31)" } }; xf86-video-mach64-6.9.5/src/atiutil.c0000644000175000017500000000627612270010352014044 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "atiutil.h" /* * ATIReduceRatio -- * * Reduce a fraction by factoring out the largest common divider of the * fraction's numerator and denominator. */ void ATIReduceRatio ( int *Numerator, int *Denominator ) { int Multiplier, Divider, Remainder; Multiplier = *Numerator; Divider = *Denominator; while ((Remainder = Multiplier % Divider)) { Multiplier = Divider; Divider = Remainder; } *Numerator /= Divider; *Denominator /= Divider; } /* * ATIDivide -- * * Using integer arithmetic and avoiding overflows, this function finds the * rounded integer that best approximates * * Numerator Shift * ----------- * 2 * Denominator * * using the specified rounding (floor (<0), nearest (=0) or ceiling (>0)). */ int ATIDivide ( int Numerator, int Denominator, int Shift, const int RoundingKind ) { int Rounding = 0; /* Default to floor */ #define MaxInt ((int)((unsigned int)(-1) >> 2)) ATIReduceRatio(&Numerator, &Denominator); /* Deal with left shifts but try to keep the denominator even */ if (Denominator & 1) { if (Denominator <= MaxInt) { Denominator <<= 1; Shift++; } } else while ((Shift > 0) && !(Denominator & 3)) { Denominator >>= 1; Shift--; } /* Deal with right shifts */ while (Shift < 0) { if ((Numerator & 1) && (Denominator <= MaxInt)) Denominator <<= 1; else Numerator >>= 1; Shift++; } if (!RoundingKind) /* Nearest */ Rounding = Denominator >> 1; else if (RoundingKind > 0) /* Ceiling */ Rounding = Denominator - 1; return ((Numerator / Denominator) << Shift) + ((((Numerator % Denominator) << Shift) + Rounding) / Denominator); } xf86-video-mach64-6.9.5/src/ativalid.c0000644000175000017500000001346112270010352014160 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "atichip.h" #include "atistruct.h" #include "ativalid.h" /* * ATIValidMode -- * * This checks for hardware-related limits on mode timings. */ ModeStatus ATIValidMode ( SCRN_ARG_TYPE arg, DisplayModePtr pMode, Bool Verbose, int flags ) { SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); int HBlankWidth, HAdjust, VScan, VInterlace; if (flags & MODECHECK_FINAL) { return MODE_OK; } /* * The following is done for every mode in the monitor section that * survives the common layer's basic checks. */ if (pMode->VScan <= 1) VScan = 1; else VScan = pMode->VScan; if (pMode->Flags & V_DBLSCAN) VScan <<= 1; if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0)) { if ((pMode->CrtcHDisplay > pATI->LCDHorizontal) || (pMode->CrtcVDisplay > pATI->LCDVertical)) return MODE_PANEL; if (!pATI->OptionLCDSync || (pMode->type & M_T_BUILTIN)) { if ((pMode->HDisplay > pATI->LCDHorizontal) || (pMode->VDisplay > pATI->LCDVertical)) return MODE_PANEL; return MODE_OK; } /* * Adjust effective timings for monitor checks. Here the modeline * clock is ignored. Horizontal timings are scaled by the stretch * ratio used for the displayed area. The vertical porch is scaled by * the native resolution's aspect ratio. This seems rather arbitrary, * and it is, but it does make all applicable VESA modes sync on a * panel after stretching. This has the unfortunate, but necessary, * side-effect of changing the mode's horizontal sync and vertical * refresh rates. With some exceptions, this tends to increase the * mode's horizontal sync rate, and decrease its vertical refresh rate. */ pMode->SynthClock = pATI->LCDClock; pMode->CrtcHTotal = pMode->CrtcHBlankEnd = ATIDivide(pMode->CrtcHTotal * pATI->LCDHorizontal, pMode->CrtcHDisplay, -3, 1) << 3; pMode->CrtcHSyncEnd = ATIDivide(pMode->CrtcHSyncEnd * pATI->LCDHorizontal, pMode->CrtcHDisplay, -3, 1) << 3; pMode->CrtcHSyncStart = ATIDivide(pMode->CrtcHSyncStart * pATI->LCDHorizontal, pMode->CrtcHDisplay, -3, -1) << 3; pMode->CrtcHDisplay = pMode->CrtcHBlankStart = pATI->LCDHorizontal; pMode->CrtcVTotal = pMode->CrtcVBlankEnd = ATIDivide((pMode->CrtcVTotal - pMode->CrtcVDisplay) * pATI->LCDVertical, pATI->LCDHorizontal, 0, 1) + pATI->LCDVertical; pMode->CrtcVSyncEnd = ATIDivide((pMode->CrtcVSyncEnd - pMode->CrtcVDisplay) * pATI->LCDVertical, pATI->LCDHorizontal, 0, 1) + pATI->LCDVertical; pMode->CrtcVSyncStart = ATIDivide((pMode->CrtcVSyncStart - pMode->CrtcVDisplay) * pATI->LCDVertical, pATI->LCDHorizontal, 0, -1) + pATI->LCDVertical; pMode->CrtcVDisplay = pMode->CrtcVBlankStart = pATI->LCDVertical; /* * The CRTC only stretches the mode's displayed area, not its porches. * Reverse-engineer the mode's timings back into the user specified * values so that the stretched mode is produced when the CRTC is * eventually programmed. The reverse-engineered mode is then checked * against CRTC limits below. */ pMode->Clock = pATI->LCDClock; HAdjust = pATI->LCDHorizontal - pMode->HDisplay; # define ATIReverseHorizontal(_x) \ (pMode->_x - HAdjust) pMode->HSyncStart = ATIReverseHorizontal(CrtcHSyncStart); pMode->HSyncEnd = ATIReverseHorizontal(CrtcHSyncEnd); pMode->HTotal = ATIReverseHorizontal(CrtcHTotal); VInterlace = GetBits(pMode->Flags, V_INTERLACE) + 1; # define ATIReverseVertical(_y) \ ((((pMode->_y - pATI->LCDVertical) * VInterlace) / VScan) + \ pMode->VDisplay) pMode->VSyncStart = ATIReverseVertical(CrtcVSyncStart); pMode->VSyncEnd = ATIReverseVertical(CrtcVSyncEnd); pMode->VTotal = ATIReverseVertical(CrtcVTotal); # undef ATIReverseHorizontal # undef ATIReverseVertical } HBlankWidth = (pMode->HTotal >> 3) - (pMode->HDisplay >> 3); if (!HBlankWidth) return MODE_HBLANK_NARROW; { if (VScan > 2) return MODE_NO_VSCAN; } return MODE_OK; } xf86-video-mach64-6.9.5/src/atiload.c0000644000175000017500000000566112270010352014003 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "aticursor.h" #include "atiload.h" #include "atistruct.h" /* * ATILoadModules -- * * This function loads other modules required for a screen. */ pointer ATILoadModules ( ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { pointer fbPtr = NULL; /* Load depth-specific entry points */ switch (pATI->bitsPerPixel) { case 8: case 16: case 24: case 32: fbPtr = xf86LoadSubModule(pScreenInfo, "fb"); break; default: return NULL; } if (!fbPtr) return NULL; /* Load ramdac module if needed */ if ((pATI->Cursor > ATI_CURSOR_SOFTWARE) && !xf86LoadSubModule(pScreenInfo, "ramdac")) return NULL; #ifdef USE_EXA /* Load EXA if needed */ if (pATI->useEXA && pATI->OptionAccel) { XF86ModReqInfo req; int errmaj, errmin; memset(&req, 0, sizeof(XF86ModReqInfo)); req.majorversion = 2; req.minorversion = 0; if (!LoadSubModule(pScreenInfo->module, "exa", NULL, NULL, NULL, &req, &errmaj, &errmin)) { LoaderErrorMsg(NULL, "exa", errmaj, errmin); return NULL; } } #endif #ifdef USE_XAA /* Load XAA if needed */ if (!pATI->useEXA && pATI->OptionAccel && !xf86LoadSubModule(pScreenInfo, "xaa")) { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Falling back to shadowfb\n"); pATI->OptionAccel = 0; pATI->OptionShadowFB = 1; } #endif /* Load shadow frame buffer code if needed */ if (pATI->OptionShadowFB && !xf86LoadSubModule(pScreenInfo, "shadowfb")) return NULL; return fbPtr; } xf86-video-mach64-6.9.5/src/atimisc.c0000644000175000017500000000436312270010352014015 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atimach64probe.h" #include "atimach64version.h" /* Module loader interface for subsidiary driver module */ static XF86ModuleVersionInfo ATIVersionRec = { MACH64_DRIVER_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} }; /* * ATISetup -- * * This function is called every time the module is loaded. */ static pointer ATISetup ( pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor ) { static Bool Inited = FALSE; if (!Inited) { Inited = TRUE; xf86AddDriver(&MACH64, Module, HaveDriverFuncs); } return (pointer)TRUE; } /* The following record must be called mach64ModuleData */ _X_EXPORT XF86ModuleData mach64ModuleData = { &ATIVersionRec, ATISetup, NULL }; xf86-video-mach64-6.9.5/src/atimach64probe.c0000644000175000017500000002500012270010352015163 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atimach64io.h" #include "atimach64probe.h" #include "atimach64version.h" #include "atioption.h" /* include headers corresponding to ScrnInfoPtr fields */ #include "atipreinit.h" #include "atiscreen.h" #include "aticonsole.h" #include "atiadjust.h" #include "ativalid.h" /* Chip definitions */ #define PCI_VENDOR_ATI 0x1002 #define PCI_CHIP_MACH64CT 0x4354 #define PCI_CHIP_MACH64CX 0x4358 #define PCI_CHIP_MACH64ET 0x4554 #define PCI_CHIP_MACH64GB 0x4742 #define PCI_CHIP_MACH64GD 0x4744 #define PCI_CHIP_MACH64GI 0x4749 #define PCI_CHIP_MACH64GL 0x474C #define PCI_CHIP_MACH64GM 0x474D #define PCI_CHIP_MACH64GN 0x474E #define PCI_CHIP_MACH64GO 0x474F #define PCI_CHIP_MACH64GP 0x4750 #define PCI_CHIP_MACH64GQ 0x4751 #define PCI_CHIP_MACH64GR 0x4752 #define PCI_CHIP_MACH64GS 0x4753 #define PCI_CHIP_MACH64GT 0x4754 #define PCI_CHIP_MACH64GU 0x4755 #define PCI_CHIP_MACH64GV 0x4756 #define PCI_CHIP_MACH64GW 0x4757 #define PCI_CHIP_MACH64GX 0x4758 #define PCI_CHIP_MACH64GY 0x4759 #define PCI_CHIP_MACH64GZ 0x475A #define PCI_CHIP_MACH64LB 0x4C42 #define PCI_CHIP_MACH64LD 0x4C44 #define PCI_CHIP_MACH64LG 0x4C47 #define PCI_CHIP_MACH64LI 0x4C49 #define PCI_CHIP_MACH64LM 0x4C4D #define PCI_CHIP_MACH64LN 0x4C4E #define PCI_CHIP_MACH64LP 0x4C50 #define PCI_CHIP_MACH64LQ 0x4C51 #define PCI_CHIP_MACH64LR 0x4C52 #define PCI_CHIP_MACH64LS 0x4C53 #define PCI_CHIP_MACH64VT 0x5654 #define PCI_CHIP_MACH64VU 0x5655 #define PCI_CHIP_MACH64VV 0x5656 #ifndef XSERVER_LIBPCIACCESS static Bool Mach64Probe(DriverPtr pDriver, int flags); #endif SymTabRec Mach64Chipsets[] = { {ATI_CHIP_88800GXC, "ATI 88800GX-C"}, {ATI_CHIP_88800GXD, "ATI 88800GX-D"}, {ATI_CHIP_88800GXE, "ATI 88800GX-E"}, {ATI_CHIP_88800GXF, "ATI 88800GX-F"}, {ATI_CHIP_88800GX, "ATI 88800GX"}, {ATI_CHIP_88800CX, "ATI 88800CX"}, {ATI_CHIP_264CT, "ATI 264CT"}, {ATI_CHIP_264ET, "ATI 264ET"}, {ATI_CHIP_264VT, "ATI 264VT"}, {ATI_CHIP_264VTB, "ATI 264VT-B"}, {ATI_CHIP_264GT, "ATI 3D Rage"}, {ATI_CHIP_264GTB, "ATI 3D Rage II"}, {ATI_CHIP_264VT3, "ATI 264VT3"}, {ATI_CHIP_264GTDVD, "ATI 3D Rage II+DVD"}, {ATI_CHIP_264LT, "ATI 3D Rage LT"}, {ATI_CHIP_264VT4, "ATI 264VT4"}, {ATI_CHIP_264GT2C, "ATI 3D Rage IIc"}, {ATI_CHIP_264GTPRO, "ATI 3D Rage Pro"}, {ATI_CHIP_264LTPRO, "ATI 3D Rage LT Pro"}, {ATI_CHIP_264XL, "ATI 3D Rage XL or XC"}, {ATI_CHIP_MOBILITY, "ATI 3D Rage Mobility"}, {-1, NULL } }; /* * This table maps a PCI device ID to a chipset family identifier. */ static PciChipsets Mach64PciChipsets[] = { {ATI_CHIP_88800GX, PCI_CHIP_MACH64GX, RES_SHARED_VGA}, {ATI_CHIP_88800CX, PCI_CHIP_MACH64CX, RES_SHARED_VGA}, {ATI_CHIP_264CT, PCI_CHIP_MACH64CT, RES_SHARED_VGA}, {ATI_CHIP_264ET, PCI_CHIP_MACH64ET, RES_SHARED_VGA}, {ATI_CHIP_264VT, PCI_CHIP_MACH64VT, RES_SHARED_VGA}, {ATI_CHIP_264GT, PCI_CHIP_MACH64GT, RES_SHARED_VGA}, {ATI_CHIP_264VT3, PCI_CHIP_MACH64VU, RES_SHARED_VGA}, {ATI_CHIP_264GTDVD, PCI_CHIP_MACH64GU, RES_SHARED_VGA}, {ATI_CHIP_264LT, PCI_CHIP_MACH64LG, RES_SHARED_VGA}, {ATI_CHIP_264VT4, PCI_CHIP_MACH64VV, RES_SHARED_VGA}, {ATI_CHIP_264GT2C, PCI_CHIP_MACH64GV, RES_SHARED_VGA}, {ATI_CHIP_264GT2C, PCI_CHIP_MACH64GW, RES_SHARED_VGA}, {ATI_CHIP_264GT2C, PCI_CHIP_MACH64GY, RES_SHARED_VGA}, {ATI_CHIP_264GT2C, PCI_CHIP_MACH64GZ, RES_SHARED_VGA}, {ATI_CHIP_264GTPRO, PCI_CHIP_MACH64GB, RES_SHARED_VGA}, {ATI_CHIP_264GTPRO, PCI_CHIP_MACH64GD, RES_SHARED_VGA}, {ATI_CHIP_264GTPRO, PCI_CHIP_MACH64GI, RES_SHARED_VGA}, {ATI_CHIP_264GTPRO, PCI_CHIP_MACH64GP, RES_SHARED_VGA}, {ATI_CHIP_264GTPRO, PCI_CHIP_MACH64GQ, RES_SHARED_VGA}, {ATI_CHIP_264LTPRO, PCI_CHIP_MACH64LB, RES_SHARED_VGA}, {ATI_CHIP_264LTPRO, PCI_CHIP_MACH64LD, RES_SHARED_VGA}, {ATI_CHIP_264LTPRO, PCI_CHIP_MACH64LI, RES_SHARED_VGA}, {ATI_CHIP_264LTPRO, PCI_CHIP_MACH64LP, RES_SHARED_VGA}, {ATI_CHIP_264LTPRO, PCI_CHIP_MACH64LQ, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GL, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GM, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GN, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GO, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GR, RES_SHARED_VGA}, {ATI_CHIP_264XL, PCI_CHIP_MACH64GS, RES_SHARED_VGA}, {ATI_CHIP_MOBILITY, PCI_CHIP_MACH64LM, RES_SHARED_VGA}, {ATI_CHIP_MOBILITY, PCI_CHIP_MACH64LN, RES_SHARED_VGA}, {ATI_CHIP_MOBILITY, PCI_CHIP_MACH64LR, RES_SHARED_VGA}, {ATI_CHIP_MOBILITY, PCI_CHIP_MACH64LS, RES_SHARED_VGA}, {-1, -1, RES_UNDEFINED} }; #ifdef XSERVER_LIBPCIACCESS static const struct pci_id_match mach64_device_match[] = { ATI_DEVICE_MATCH( PCI_CHIP_MACH64GX, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64CX, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64CT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64ET, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64VT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64VU, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GU, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LG, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64VV, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GV, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GW, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GY, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GZ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GB, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GP, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GQ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LB, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LP, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LQ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GL, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GM, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GN, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GO, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GR, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64GS, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LM, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LN, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LR, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_MACH64LS, 0 ), { 0, 0, 0 } }; #endif /* XSERVER_LIBPCIACCESS */ static const OptionInfoRec * Mach64AvailableOptions(int chipid, int busid) { return ATIOptionsWeak(); } /* * Mach64Identify -- * * Print the driver's list of chipset names. */ static void Mach64Identify ( int flags ) { xf86Msg(X_INFO, "%s: %s\n", MACH64_NAME, "Driver for ATI Mach64 chipsets"); } static Bool mach64_get_scrninfo(int entity_num) { ScrnInfoPtr pScrn; pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, Mach64PciChipsets, 0, 0, 0, 0, NULL); if (!pScrn) return FALSE; pScrn->driverVersion = MACH64_VERSION_CURRENT; pScrn->driverName = MACH64_DRIVER_NAME; pScrn->name = MACH64_NAME; #ifdef XSERVER_LIBPCIACCESS pScrn->Probe = NULL; #else pScrn->Probe = Mach64Probe; #endif pScrn->PreInit = ATIPreInit; pScrn->ScreenInit = ATIScreenInit; pScrn->SwitchMode = ATISwitchMode; pScrn->AdjustFrame = ATIAdjustFrame; pScrn->EnterVT = ATIEnterVT; pScrn->LeaveVT = ATILeaveVT; pScrn->FreeScreen = ATIFreeScreen; pScrn->ValidMode = ATIValidMode; return TRUE; } #ifndef XSERVER_LIBPCIACCESS /* * Mach64Probe -- * * This function is called once, at the start of the first server generation to * do a minimal probe for supported hardware. */ static Bool Mach64Probe(DriverPtr pDriver, int flags) { GDevPtr *devSections; int *usedChips; int numDevSections; int numUsed; Bool ProbeSuccess = FALSE; int i; if (xf86GetPciVideoInfo() == NULL) return FALSE; numDevSections = xf86MatchDevice(MACH64_DRIVER_NAME, &devSections); if (numDevSections <= 0) return FALSE; numUsed = xf86MatchPciInstances(MACH64_NAME, PCI_VENDOR_ATI, Mach64Chipsets, Mach64PciChipsets, devSections, numDevSections, pDriver, &usedChips); free(devSections); if (numUsed <= 0) return FALSE; if (flags & PROBE_DETECT) { ProbeSuccess = TRUE; } else { for (i = 0; i < numUsed; i++) { if (mach64_get_scrninfo(usedChips[i])) ProbeSuccess = TRUE; } } free(usedChips); return ProbeSuccess; } #else /* XSERVER_LIBPCIACCESS */ static Bool mach64_pci_probe( DriverPtr pDriver, int entity_num, struct pci_device *device, intptr_t match_data ) { return mach64_get_scrninfo(entity_num); } #endif /* XSERVER_LIBPCIACCESS */ _X_EXPORT DriverRec MACH64 = { MACH64_VERSION_CURRENT, MACH64_DRIVER_NAME, Mach64Identify, #ifdef XSERVER_LIBPCIACCESS NULL, #else Mach64Probe, #endif Mach64AvailableOptions, NULL, 0, NULL, #ifdef XSERVER_LIBPCIACCESS mach64_device_match, mach64_pci_probe #endif }; xf86-video-mach64-6.9.5/src/ativga.c0000644000175000017500000001242412270010352013634 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atistruct.h" #include "ativga.h" #include "ativgaio.h" #ifndef AVOID_CPIO /* * ATIVGAPreInit -- * * This function is called to set up VGA-related data that is common to all * video modes generated by the driver. */ void ATIVGAPreInit ( ATIPtr pATI, ATIHWPtr pATIHW ) { int Index; /* Initialise sequencer register values */ pATIHW->seq[0] = 0x03U; pATIHW->seq[2] = 0x0FU; pATIHW->seq[4] = 0x0AU; /* Initialise CRTC register values */ if (((pATI->Chip >= ATI_CHIP_264CT))) pATIHW->crt[19] = pATI->displayWidth >> 3; else pATIHW->crt[19] = pATI->displayWidth >> 4; pATIHW->crt[23] = 0xE3U; pATIHW->crt[24] = 0xFFU; /* Initialise attribute controller register values */ { for (Index = 0; Index < 16; Index++) pATIHW->attr[Index] = Index; pATIHW->attr[16] = 0x01U; pATIHW->attr[17] = 0xFFU; } pATIHW->attr[18] = 0x0FU; /* Initialise graphics controller register values */ if (pATI->Chip >= ATI_CHIP_264CT) pATIHW->gra[5] = 0x40U; if (pATI->Chip >= ATI_CHIP_264VT) pATIHW->gra[6] = 0x01U; /* 128kB aperture */ else pATIHW->gra[6] = 0x05U; /* 64kB aperture */ pATIHW->gra[7] = 0x0FU; pATIHW->gra[8] = 0xFFU; } /* * ATIVGASave -- * * This function is called to save the VGA portion of the current video state. */ void ATIVGASave ( ATIPtr pATI, ATIHWPtr pATIHW ) { int Index; /* Save miscellaneous output register */ pATIHW->genmo = inb(R_GENMO); ATISetVGAIOBase(pATI, pATIHW->genmo); /* Save sequencer registers */ for (Index = 0; Index < NumberOf(pATIHW->seq); Index++) pATIHW->seq[Index] = GetReg(SEQX, Index); /* Save CRTC registers */ for (Index = 0; Index < NumberOf(pATIHW->crt); Index++) pATIHW->crt[Index] = GetReg(CRTX(pATI->CPIO_VGABase), Index); /* Save attribute controller registers */ for (Index = 0; Index < NumberOf(pATIHW->attr); Index++) { (void)inb(GENS1(pATI->CPIO_VGABase)); /* Reset flip-flop */ pATIHW->attr[Index] = GetReg(ATTRX, Index); } /* Save graphics controller registers */ for (Index = 0; Index < NumberOf(pATIHW->gra); Index++) pATIHW->gra[Index] = GetReg(GRAX, Index); } /* * ATIVGASet -- * * This function is called to load the VGA portion of a video state. */ void ATIVGASet ( ATIPtr pATI, ATIHWPtr pATIHW ) { int Index; /* Set VGA I/O base */ ATISetVGAIOBase(pATI, pATIHW->genmo); /* Load miscellaneous output register */ outb(GENMO, pATIHW->genmo); /* Load sequencer in reverse index order; this also ends its reset */ for (Index = NumberOf(pATIHW->seq); --Index >= 0; ) PutReg(SEQX, Index, pATIHW->seq[Index]); /* Load CRTC registers */ for (Index = 0; Index < NumberOf(pATIHW->crt); Index++) PutReg(CRTX(pATI->CPIO_VGABase), Index, pATIHW->crt[Index]); /* Load attribute controller registers */ for (Index = 0; Index < NumberOf(pATIHW->attr); Index++) { (void)inb(GENS1(pATI->CPIO_VGABase)); /* Reset flip-flop & delay */ outb(ATTRX, Index); outb(ATTRX, pATIHW->attr[Index]); } /* Load graphics controller registers */ for (Index = 0; Index < NumberOf(pATIHW->gra); Index++) PutReg(GRAX, Index, pATIHW->gra[Index]); } /* * ATIVGASaveScreen -- * * This function blanks or unblanks a VGA screen. */ void ATIVGASaveScreen ( ATIPtr pATI, int Mode ) { (void)inb(GENS1(pATI->CPIO_VGABase)); /* Reset flip-flop */ switch (Mode) { case SCREEN_SAVER_OFF: case SCREEN_SAVER_FORCER: outb(ATTRX, 0x20U); /* Turn PAS on */ break; case SCREEN_SAVER_ON: case SCREEN_SAVER_CYCLE: outb(ATTRX, 0x00U); /* Turn PAS off */ break; default: break; } } #endif /* AVOID_CPIO */ xf86-video-mach64-6.9.5/src/ativgaio.c0000644000175000017500000000322712270010352014165 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atistruct.h" #include "ativgaio.h" #ifndef AVOID_CPIO /* * ATISetVGAIOBase -- * * This sets vgaIOBase according to the value of the passed value of the * miscellaneous output register. */ void ATISetVGAIOBase ( ATIPtr pATI, const CARD8 misc ) { pATI->CPIO_VGABase = (misc & 0x01U) ? ColourIOBase : MonochromeIOBase; } #endif /* AVOID_CPIO */ xf86-video-mach64-6.9.5/src/atibank.c0000644000175000017500000000540112270010352013767 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atibank.h" #include "atimach64io.h" #include "atiwonderio.h" #ifndef AVOID_CPIO /* * ATIx8800SetBank -- * * Set an ATI 28800's, 68800's or 88800's read and write bank numbers. */ void ATIx8800SetBank ( ATIPtr pATI, unsigned int iBank ) { (void)iBank; /* always called with iBank = 0 */ ATIPutExtReg(0xB2U, 0x00U); ATIModifyExtReg(pATI, 0xAEU, -1, (CARD8)(~0x0FU), 0x00U); } /* * Functions to simulate a banked VGA aperture using a Mach64's small dual * paged apertures. There are two sets of these: one for packed modes, the * other for planar modes. */ static CARD32 ATIMach64MassagePackedBankNumber ( CARD8 iBank ) { iBank <<= 1; return ((iBank + 1) << 16) | iBank; } /* * ATIMach64SetBankPacked -- * * Set read and write bank numbers for small dual paged apertures. */ void ATIMach64SetBankPacked ( ATIPtr pATI, unsigned int iBank ) { CARD32 tmp = ATIMach64MassagePackedBankNumber(iBank); outr(MEM_VGA_RP_SEL, tmp); outr(MEM_VGA_WP_SEL, tmp); } static CARD32 ATIMach64MassagePlanarBankNumber ( CARD8 iBank ) { iBank <<= 3; return ((iBank + 4) << 16) | iBank; } /* * ATIMach64SetBankPlanar -- * * Set read and write bank numbers for small dual paged apertures. */ void ATIMach64SetBankPlanar ( ATIPtr pATI, unsigned int iBank ) { CARD32 tmp = ATIMach64MassagePlanarBankNumber(iBank); outr(MEM_VGA_RP_SEL, tmp); outr(MEM_VGA_WP_SEL, tmp); } #endif /* AVOID_CPIO */ xf86-video-mach64-6.9.5/src/atiwonder.c0000644000175000017500000001345412270010352014361 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* * The ATI x8800 chips use special registers for their extended VGA features. * These registers are accessible through an index I/O port and a data I/O * port. BIOS initialisation stores the index port number in the Graphics * register bank (0x03CE), indices 0x50 and 0x51. Unfortunately, for all but * the 18800-x series of adapters, these registers are write-only (a.k.a. black * holes). On all but 88800's, the index port number can be found in the short * integer at offset 0x10 in the BIOS. For 88800's, this driver will use * 0x01CE or 0x03CE as the index port number, depending on the I/O port * decoding used. The data port number is one more than the index port number * (i.e. 0x01CF). These ports differ slightly in their I/O behaviour from the * normal VGA ones: * * write: outw(0x01CE, (data << 8) | index); (16-bit, not used) * outb(0x01CE, index); outb(0x01CF, data); (8-bit) * read: outb(0x01CE, index); data = inb(0x01CF); * * Two consecutive byte-writes to the data port will not work. Furthermore an * index written to 0x01CE is usable only once. Note also that the setting of * ATI extended registers (especially those with clock selection bits) should * be bracketed by a sequencer reset. * * The number of these extended VGA registers varies by chipset. The 18800 * series have 16, the 28800 series have 32, while 68800's and 88800's have 64. * The last 16 on each have almost identical definitions. Thus, the BIOS sets * up an indexing scheme whereby the last 16 extended VGA registers are * accessed at indices 0xB0 through 0xBF on all chipsets. */ #include "ati.h" #include "atichip.h" #include "atiwonder.h" #include "atiwonderio.h" #ifndef AVOID_CPIO /* * ATIVGAWonderPreInit -- * * This function is called to initialise the VGA Wonder part of an ATIHWRec * that is common to all modes generated by the driver. */ void ATIVGAWonderPreInit ( ATIPtr pATI, ATIHWPtr pATIHW ) { pATIHW->b3 = ATIGetExtReg(0xB3U) & 0x20U; pATIHW->b6 = 0x04U; pATIHW->b6 |= 0x01U; pATIHW->bf = ATIGetExtReg(0xBFU) & 0x5FU; pATIHW->a3 = ATIGetExtReg(0xA3U) & 0x67U; pATIHW->ab = ATIGetExtReg(0xABU) & 0xE7U; pATIHW->ae = ATIGetExtReg(0xAEU) & 0xE0U; } /* * ATIVGAWonderSave -- * * This function is called to save the VGA Wonder portion of the current video * state. */ void ATIVGAWonderSave ( ATIPtr pATI, ATIHWPtr pATIHW ) { pATIHW->b0 = ATIGetExtReg(0xB0U); pATIHW->b1 = ATIGetExtReg(0xB1U); pATIHW->b2 = ATIGetExtReg(0xB2U); pATIHW->b3 = ATIGetExtReg(0xB3U); pATIHW->b5 = ATIGetExtReg(0xB5U); pATIHW->b6 = ATIGetExtReg(0xB6U); pATIHW->b8 = ATIGetExtReg(0xB8U); pATIHW->b9 = ATIGetExtReg(0xB9U); pATIHW->ba = ATIGetExtReg(0xBAU); pATIHW->bd = ATIGetExtReg(0xBDU); { pATIHW->be = ATIGetExtReg(0xBEU); { pATIHW->bf = ATIGetExtReg(0xBFU); pATIHW->a3 = ATIGetExtReg(0xA3U); pATIHW->a6 = ATIGetExtReg(0xA6U); pATIHW->a7 = ATIGetExtReg(0xA7U); pATIHW->ab = ATIGetExtReg(0xABU); pATIHW->ac = ATIGetExtReg(0xACU); pATIHW->ad = ATIGetExtReg(0xADU); pATIHW->ae = ATIGetExtReg(0xAEU); } } } /* * ATIVGAWonderSet -- * * This function loads the VGA Wonder portion of a video state. */ void ATIVGAWonderSet ( ATIPtr pATI, ATIHWPtr pATIHW ) { { ATIModifyExtReg(pATI, 0xBEU, -1, 0x00U, pATIHW->be); { ATIModifyExtReg(pATI, 0xBFU, -1, 0x00U, pATIHW->bf); ATIModifyExtReg(pATI, 0xA3U, -1, 0x00U, pATIHW->a3); ATIModifyExtReg(pATI, 0xA6U, -1, 0x00U, pATIHW->a6); ATIModifyExtReg(pATI, 0xA7U, -1, 0x00U, pATIHW->a7); ATIModifyExtReg(pATI, 0xABU, -1, 0x00U, pATIHW->ab); ATIModifyExtReg(pATI, 0xACU, -1, 0x00U, pATIHW->ac); ATIModifyExtReg(pATI, 0xADU, -1, 0x00U, pATIHW->ad); ATIModifyExtReg(pATI, 0xAEU, -1, 0x00U, pATIHW->ae); } } ATIModifyExtReg(pATI, 0xB0U, -1, 0x00U, pATIHW->b0); ATIModifyExtReg(pATI, 0xB1U, -1, 0x00U, pATIHW->b1); ATIModifyExtReg(pATI, 0xB3U, -1, 0x00U, pATIHW->b3); ATIModifyExtReg(pATI, 0xB5U, -1, 0x00U, pATIHW->b5); ATIModifyExtReg(pATI, 0xB6U, -1, 0x00U, pATIHW->b6); ATIModifyExtReg(pATI, 0xB8U, -1, 0x00U, pATIHW->b8); ATIModifyExtReg(pATI, 0xB9U, -1, 0x00U, pATIHW->b9); ATIModifyExtReg(pATI, 0xBAU, -1, 0x00U, pATIHW->ba); ATIModifyExtReg(pATI, 0xBDU, -1, 0x00U, pATIHW->bd); } #endif /* AVOID_CPIO */ xf86-video-mach64-6.9.5/src/atiwonderio.c0000644000175000017500000000424612270010352014710 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "atichip.h" #include "atiwonderio.h" #ifndef AVOID_CPIO /* * ATIModifyExtReg -- * * This function is called to modify certain bits in an ATI extended VGA * register while preserving its other bits. The function will not write the * register if it turns out its value would not change. This helps prevent * server hangs on older adapters. */ void ATIModifyExtReg ( ATIPtr pATI, const CARD8 Index, int CurrentValue, const CARD8 CurrentMask, CARD8 NewValue ) { /* Possibly retrieve the current value */ if (CurrentValue < 0) CurrentValue = ATIGetExtReg(Index); /* Compute new value */ NewValue &= (CARD8)(~CurrentMask); NewValue |= CurrentValue & CurrentMask; /* Check if value will be changed */ if (CurrentValue == NewValue) return; ATIPutExtReg(Index, NewValue); } #endif /* AVOID_CPIO */ xf86-video-mach64-6.9.5/src/atidga.c0000644000175000017500000003350412270010352013614 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef AVOID_DGA #include #include "ati.h" #include "atichip.h" #include "atidac.h" #include "atidga.h" #include "atimode.h" #include "atistruct.h" #include "atiadjust.h" #include "dgaproc.h" /* * ATIDGAOpenFramebuffer -- * * This function returns various framebuffer attributes to a DGA client. */ static Bool ATIDGAOpenFramebuffer ( ScrnInfoPtr pScreenInfo, char **DeviceName, unsigned char **ApertureBase, int *ApertureSize, int *ApertureOffset, int *flags ) { ATIPtr pATI = ATIPTR(pScreenInfo); *DeviceName = NULL; /* No special device */ *ApertureBase = (unsigned char *)(pATI->LinearBase); *ApertureSize = pScreenInfo->videoRam * 1024; *ApertureOffset = 0; /* Always */ *flags = 0; /* Root premissions OS-dependent */ return TRUE; } static int BitsSet ( unsigned long data ) { unsigned long mask = 1; int set = 0; for (; mask; mask <<= 1) if (data & mask) set++; return set; } /* * ATIDGASetMode -- * * This function sets a graphics mode for a DGA client. */ static Bool ATIDGASetMode ( ScrnInfoPtr pScreenInfo, DGAModePtr pDGAMode ) { ATIPtr pATI = ATIPTR(pScreenInfo); DisplayModePtr pMode; int frameX0, frameY0; if (pDGAMode) { pMode = pDGAMode->mode; pATI->depth = pDGAMode->depth; pATI->bitsPerPixel = pDGAMode->bitsPerPixel; pATI->displayWidth = pDGAMode->bytesPerScanline * 8 / pATI->bitsPerPixel; pATI->weight.red = BitsSet(pDGAMode->red_mask); pATI->weight.green = BitsSet(pDGAMode->green_mask); pATI->weight.blue = BitsSet(pDGAMode->blue_mask); frameX0 = frameY0 = 0; if (!pATI->currentMode) pATI->currentMode = pScreenInfo->currentMode; } else { if (!(pMode = pATI->currentMode)) return TRUE; pATI->depth = pScreenInfo->depth; pATI->bitsPerPixel = pScreenInfo->bitsPerPixel; pATI->displayWidth = pScreenInfo->displayWidth; pATI->weight = pScreenInfo->weight; frameX0 = pScreenInfo->frameX0; frameY0 = pScreenInfo->frameY0; } pATI->XModifier = pATI->bitsPerPixel / UnitOf(pATI->bitsPerPixel); ATIAdjustPreInit(pATI); ATIModePreInit(pScreenInfo, pATI, &pATI->NewHW); if (!(*pScreenInfo->SwitchMode)(SWITCH_MODE_ARGS(pScreenInfo, pMode))) return FALSE; if (!pDGAMode) pATI->currentMode = NULL; (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, frameX0, frameY0)); return TRUE; } /* * ATIDGASetViewport -- * * This function sets the display start address for a DGA client. */ static void ATIDGASetViewport ( ScrnInfoPtr pScreenInfo, int x, int y, int flags ) { (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, x, y)); } /* * ATIDGAGetViewport -- * * This function returns the current status of prior DGA requests to set the * adapter's display start address. */ static int ATIDGAGetViewport ( ScrnInfoPtr pScreenInfo ) { return 0; /* There are never any pending requests */ } /* * ATIDGAFillRect -- * * This function calls XAA solid fill primitives to fill a rectangle. */ static void ATIDGAFillRect ( ScrnInfoPtr pScreenInfo, int x, int y, int w, int h, unsigned long colour ) { ATIPtr pATI = ATIPTR(pScreenInfo); /*FIXME : use EXA if available */ #ifdef USE_XAA XAAInfoRecPtr pXAAInfo = pATI->pXAAInfo; (*pXAAInfo->SetupForSolidFill)(pScreenInfo, (int)colour, GXcopy, (CARD32)(~0)); (*pXAAInfo->SubsequentSolidFillRect)(pScreenInfo, x, y, w, h); if (pScreenInfo->bitsPerPixel == pATI->bitsPerPixel) SET_SYNC_FLAG(pXAAInfo); #endif } /* * ATIDGABlitRect -- * * This function calls XAA screen-to-screen copy primitives to copy a * rectangle. */ static void ATIDGABlitRect ( ScrnInfoPtr pScreenInfo, int xSrc, int ySrc, int w, int h, int xDst, int yDst ) { ATIPtr pATI = ATIPTR(pScreenInfo); /*FIXME : use EXA if available */ #ifdef USE_XAA XAAInfoRecPtr pXAAInfo = pATI->pXAAInfo; int xdir = ((xSrc < xDst) && (ySrc == yDst)) ? -1 : 1; int ydir = (ySrc < yDst) ? -1 : 1; (*pXAAInfo->SetupForScreenToScreenCopy)(pScreenInfo, xdir, ydir, GXcopy, (CARD32)(~0), -1); (*pXAAInfo->SubsequentScreenToScreenCopy)(pScreenInfo, xSrc, ySrc, xDst, yDst, w, h); if (pScreenInfo->bitsPerPixel == pATI->bitsPerPixel) SET_SYNC_FLAG(pXAAInfo); #endif } /* * ATIDGABlitTransRect -- * * This function calls XAA screen-to-screen copy primitives to transparently * copy a rectangle. */ static void ATIDGABlitTransRect ( ScrnInfoPtr pScreenInfo, int xSrc, int ySrc, int w, int h, int xDst, int yDst, unsigned long colour ) { ATIPtr pATI = ATIPTR(pScreenInfo); /*FIXME : use EXA if available */ #ifdef USE_XAA XAAInfoRecPtr pXAAInfo = pATI->pXAAInfo; int xdir = ((xSrc < xDst) && (ySrc == yDst)) ? -1 : 1; int ydir = (ySrc < yDst) ? -1 : 1; pATI->XAAForceTransBlit = TRUE; (*pXAAInfo->SetupForScreenToScreenCopy)(pScreenInfo, xdir, ydir, GXcopy, (CARD32)(~0), (int)colour); pATI->XAAForceTransBlit = FALSE; (*pXAAInfo->SubsequentScreenToScreenCopy)(pScreenInfo, xSrc, ySrc, xDst, yDst, w, h); if (pScreenInfo->bitsPerPixel == pATI->bitsPerPixel) SET_SYNC_FLAG(pXAAInfo); #endif } /* * ATIDGAAddModes -- * * This function translates DisplayModeRec's into DGAModeRec's. */ static void ATIDGAAddModes ( ScrnInfoPtr pScreenInfo, ATIPtr pATI, int flags, int depth, int bitsPerPixel, int redMask, int greenMask, int blueMask, int visualClass ) { DisplayModePtr pMode = pScreenInfo->modes; DGAModePtr pDGAMode; int displayWidth = pScreenInfo->displayWidth; int videoBits = pScreenInfo->videoRam * 1024 * 8; int xViewportStep = 64 / UnitOf(bitsPerPixel); int modePitch, bitsPerScanline, maxViewportY; if (bitsPerPixel != pScreenInfo->bitsPerPixel) displayWidth = 0; while (1) { /* Weed out multiscanned modes */ if ((pMode->VScan <= 1) || ((pMode->VScan == 2) && !(pMode->Flags & V_DBLSCAN))) { /* * For code simplicity, ensure DGA mode pitch is a multiple of 64 * bytes. */ if (!(modePitch = displayWidth)) { modePitch = ((64 * 8) / UnitOf(bitsPerPixel)) - 1; modePitch = (pMode->HDisplay + modePitch) & ~modePitch; } /* Ensure the mode fits in video memory */ if ((modePitch * bitsPerPixel * pMode->VDisplay) <= videoBits) { /* Stop generating modes on out-of-memory conditions */ pDGAMode = realloc(pATI->pDGAMode, (pATI->nDGAMode + 1) * SizeOf(DGAModeRec)); if (!pDGAMode) break; pATI->pDGAMode = pDGAMode; pDGAMode += pATI->nDGAMode; pATI->nDGAMode++; (void)memset(pDGAMode, 0, SizeOf(DGAModeRec)); /* Fill in the mode structure */ pDGAMode->mode = pMode; pDGAMode->flags = flags; if (bitsPerPixel == pScreenInfo->bitsPerPixel) { pDGAMode->flags |= DGA_PIXMAP_AVAILABLE; pDGAMode->address = pATI->pMemory; #ifdef USE_XAA if (pATI->pXAAInfo) pDGAMode->flags &= ~DGA_CONCURRENT_ACCESS; #endif } if ((pMode->Flags & V_DBLSCAN) || (pMode->VScan > 1)) pDGAMode->flags |= DGA_DOUBLESCAN; if (pMode->Flags & V_INTERLACE) pDGAMode->flags |= DGA_INTERLACED; pDGAMode->byteOrder = pScreenInfo->imageByteOrder; pDGAMode->depth = depth; pDGAMode->bitsPerPixel = bitsPerPixel; pDGAMode->red_mask = redMask; pDGAMode->green_mask = greenMask; pDGAMode->blue_mask = blueMask; pDGAMode->visualClass = visualClass; pDGAMode->viewportWidth = pMode->HDisplay; pDGAMode->viewportHeight = pMode->VDisplay; pDGAMode->xViewportStep = xViewportStep; pDGAMode->yViewportStep = 1; bitsPerScanline = modePitch * bitsPerPixel; pDGAMode->bytesPerScanline = bitsPerScanline / 8; pDGAMode->imageWidth = pDGAMode->pixmapWidth = modePitch; pDGAMode->imageHeight = pDGAMode->pixmapHeight = videoBits / bitsPerScanline; pDGAMode->maxViewportX = pDGAMode->imageWidth - pDGAMode->viewportWidth; pDGAMode->maxViewportY = pDGAMode->imageHeight - pDGAMode->viewportHeight; maxViewportY = ((((pATI->AdjustMaxBase * 8) / bitsPerPixel) + xViewportStep) / modePitch) - 1; if (maxViewportY < pDGAMode->maxViewportY) pDGAMode->maxViewportY = maxViewportY; } } if ((pMode = pMode->next) == pScreenInfo->modes) { if (!displayWidth) break; displayWidth = 0; } } } /* * ATIDGAInit -- * * This function initialises the driver's support for the DGA extension. */ Bool ATIDGAInit ( ScreenPtr pScreen, ScrnInfoPtr pScreenInfo, ATIPtr pATI ) { #ifdef USE_XAA XAAInfoRecPtr pXAAInfo; #endif int flags; if (!pATI->nDGAMode) { /* Set up DGA callbacks */ pATI->ATIDGAFunctions.OpenFramebuffer = ATIDGAOpenFramebuffer; pATI->ATIDGAFunctions.SetMode = ATIDGASetMode; pATI->ATIDGAFunctions.SetViewport = ATIDGASetViewport; pATI->ATIDGAFunctions.GetViewport = ATIDGAGetViewport; flags = 0; #ifdef USE_XAA if ((pXAAInfo = pATI->pXAAInfo)) { pATI->ATIDGAFunctions.Sync = pXAAInfo->Sync; if (pXAAInfo->SetupForSolidFill && pXAAInfo->SubsequentSolidFillRect) { flags |= DGA_FILL_RECT; pATI->ATIDGAFunctions.FillRect = ATIDGAFillRect; } if (pXAAInfo->SetupForScreenToScreenCopy && pXAAInfo->SubsequentScreenToScreenCopy) { flags |= DGA_BLIT_RECT | DGA_BLIT_RECT_TRANS; pATI->ATIDGAFunctions.BlitRect = ATIDGABlitRect; pATI->ATIDGAFunctions.BlitTransRect = ATIDGABlitTransRect; } } #endif if (!flags) flags = DGA_CONCURRENT_ACCESS; ATIDGAAddModes(pScreenInfo, pATI, flags, 8, 8, 0, 0, 0, PseudoColor); if ((pATI->Chip >= ATI_CHIP_264CT)) { ATIDGAAddModes(pScreenInfo, pATI, flags, 15, 16, 0x7C00U, 0x03E0U, 0x001FU, TrueColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 16, 16, 0xF800U, 0x07E0U, 0x001FU, TrueColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 24, 24, 0x00FF0000U, 0x0000FF00U, 0x000000FFU, TrueColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 24, 32, 0x00FF0000U, 0x0000FF00U, 0x000000FFU, TrueColor); if (pATI->DAC != ATI_DAC_INTERNAL) /* Not first revision */ { ATIDGAAddModes(pScreenInfo, pATI, flags, 15, 16, 0x7C00U, 0x03E0U, 0x001FU, DirectColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 16, 16, 0xF800U, 0x07E0U, 0x001FU, DirectColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 24, 24, 0x00FF0000U, 0x0000FF00U, 0x000000FFU, DirectColor); ATIDGAAddModes(pScreenInfo, pATI, flags, 24, 32, 0x00FF0000U, 0x0000FF00U, 0x000000FFU, DirectColor); } } } return DGAInit(pScreen, &pATI->ATIDGAFunctions, pATI->pDGAMode, pATI->nDGAMode); } #endif /* AVOID_DGA */ xf86-video-mach64-6.9.5/src/atidri.c0000644000175000017500000014666312270010352013652 00000000000000/* -*- mode: c; c-basic-offset: 3 -*- */ /* * Copyright 2000 Gareth Hughes * All Rights Reserved. * * 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 (including the next * paragraph) 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 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* * Authors: * Gareth Hughes * Leif Delgass */ #include #include #include /* Driver data structures */ #include "ati.h" #include "atibus.h" #include "atidri.h" #include "atiregs.h" #include "atistruct.h" #include "atimach64io.h" #include "atimach64version.h" #include "mach64_dri.h" #include "mach64_common.h" #include "mach64_sarea.h" /* X and server generic header files */ #include "xf86.h" #include "windowstr.h" /* GLX/DRI/DRM definitions */ #define _XF86DRI_SERVER_ #include "GL/glxtokens.h" #include "sarea.h" static char ATIKernelDriverName[] = "mach64"; static char ATIClientDriverName[] = "mach64"; /* Initialize the visual configs that are supported by the hardware. * These are combined with the visual configs that the indirect * rendering core supports, and the intersection is exported to the * client. */ static Bool ATIInitVisualConfigs( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); int numConfigs = 0; __GLXvisualConfig *pConfigs = NULL; ATIConfigPrivPtr pATIConfigs = NULL; ATIConfigPrivPtr *pATIConfigPtrs = NULL; int i, accum, stencil, db; switch ( pATI->bitsPerPixel ) { case 8: /* 8bpp mode is not support */ case 15: /* FIXME */ case 24: /* FIXME */ xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] ATIInitVisualConfigs failed (%d bpp not supported). " "Disabling DRI.\n", pATI->bitsPerPixel); return FALSE; #define ATI_USE_ACCUM 1 #define ATI_USE_STENCIL 1 case 16: if ( pATI->depth != 16) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] ATIInitVisualConfigs failed (depth %d at 16 bpp not supported). " "Disabling DRI.\n", pATI->depth); return FALSE; } numConfigs = 1; if ( ATI_USE_ACCUM ) numConfigs *= 2; if ( ATI_USE_STENCIL ) numConfigs *= 2; numConfigs *= 2; /* single- and double-buffered */ pConfigs = (__GLXvisualConfig*) xnfcalloc( sizeof(__GLXvisualConfig), numConfigs ); if ( !pConfigs ) { return FALSE; } pATIConfigs = (ATIConfigPrivPtr) xnfcalloc( sizeof(ATIConfigPrivRec), numConfigs ); if ( !pATIConfigs ) { free( pConfigs ); return FALSE; } pATIConfigPtrs = (ATIConfigPrivPtr*) xnfcalloc( sizeof(ATIConfigPrivPtr), numConfigs ); if ( !pATIConfigPtrs ) { free( pConfigs ); free( pATIConfigs ); return FALSE; } i = 0; for (db = 1; db >= 0; db--) { for ( accum = 0 ; accum <= ATI_USE_ACCUM ; accum++ ) { for ( stencil = 0 ; stencil <= ATI_USE_STENCIL ; stencil++ ) { pATIConfigPtrs[i] = &pATIConfigs[i]; pConfigs[i].vid = -1; pConfigs[i].class = -1; pConfigs[i].rgba = TRUE; pConfigs[i].redSize = 5; pConfigs[i].greenSize = 6; pConfigs[i].blueSize = 5; pConfigs[i].alphaSize = 0; pConfigs[i].redMask = 0x0000F800; pConfigs[i].greenMask = 0x000007E0; pConfigs[i].blueMask = 0x0000001F; pConfigs[i].alphaMask = 0x00000000; if ( accum ) { /* Simulated in software */ pConfigs[i].accumRedSize = 16; pConfigs[i].accumGreenSize = 16; pConfigs[i].accumBlueSize = 16; pConfigs[i].accumAlphaSize = 0; } else { pConfigs[i].accumRedSize = 0; pConfigs[i].accumGreenSize = 0; pConfigs[i].accumBlueSize = 0; pConfigs[i].accumAlphaSize = 0; } pConfigs[i].doubleBuffer = db ? TRUE : FALSE; pConfigs[i].stereo = FALSE; pConfigs[i].bufferSize = 16; pConfigs[i].depthSize = 16; if ( stencil ) { /* Simulated in software */ pConfigs[i].stencilSize = 8; } else { pConfigs[i].stencilSize = 0; } pConfigs[i].auxBuffers = 0; pConfigs[i].level = 0; if ( accum || stencil ) { pConfigs[i].visualRating = GLX_SLOW_CONFIG; } else { pConfigs[i].visualRating = GLX_NONE; } pConfigs[i].transparentPixel = GLX_NONE; pConfigs[i].transparentRed = 0; pConfigs[i].transparentGreen = 0; pConfigs[i].transparentBlue = 0; pConfigs[i].transparentAlpha = 0; pConfigs[i].transparentIndex = 0; i++; } } } break; case 32: numConfigs = 1; if ( ATI_USE_ACCUM ) numConfigs *= 2; if ( ATI_USE_STENCIL ) numConfigs *= 2; numConfigs *= 2; /* single- and double-buffered */ pConfigs = (__GLXvisualConfig*) xnfcalloc( sizeof(__GLXvisualConfig), numConfigs ); if ( !pConfigs ) { return FALSE; } pATIConfigs = (ATIConfigPrivPtr) xnfcalloc( sizeof(ATIConfigPrivRec), numConfigs ); if ( !pATIConfigs ) { free( pConfigs ); return FALSE; } pATIConfigPtrs = (ATIConfigPrivPtr*) xnfcalloc( sizeof(ATIConfigPrivPtr), numConfigs ); if ( !pATIConfigPtrs ) { free( pConfigs ); free( pATIConfigs ); return FALSE; } i = 0; for (db = 1; db >= 0; db--) { for ( accum = 0 ; accum <= ATI_USE_ACCUM ; accum++ ) { for ( stencil = 0 ; stencil <= ATI_USE_STENCIL ; stencil++ ) { pATIConfigPtrs[i] = &pATIConfigs[i]; pConfigs[i].vid = -1; pConfigs[i].class = -1; pConfigs[i].rgba = TRUE; pConfigs[i].redSize = 8; pConfigs[i].greenSize = 8; pConfigs[i].blueSize = 8; pConfigs[i].alphaSize = 0; pConfigs[i].redMask = 0x00FF0000; pConfigs[i].greenMask = 0x0000FF00; pConfigs[i].blueMask = 0x000000FF; pConfigs[i].alphaMask = 0x00000000; if ( accum ) { /* Simulated in software */ pConfigs[i].accumRedSize = 16; pConfigs[i].accumGreenSize = 16; pConfigs[i].accumBlueSize = 16; pConfigs[i].accumAlphaSize = 0; } else { pConfigs[i].accumRedSize = 0; pConfigs[i].accumGreenSize = 0; pConfigs[i].accumBlueSize = 0; pConfigs[i].accumAlphaSize = 0; } pConfigs[i].doubleBuffer = db ? TRUE : FALSE; pConfigs[i].stereo = FALSE; pConfigs[i].bufferSize = 24; if ( stencil ) { /* Simulated in software */ pConfigs[i].depthSize = 16; pConfigs[i].stencilSize = 8; } else { pConfigs[i].depthSize = 16; pConfigs[i].stencilSize = 0; } pConfigs[i].auxBuffers = 0; pConfigs[i].level = 0; if ( accum || stencil ) { pConfigs[i].visualRating = GLX_SLOW_CONFIG; } else { pConfigs[i].visualRating = GLX_NONE; } pConfigs[i].transparentPixel = GLX_NONE; pConfigs[i].transparentRed = 0; pConfigs[i].transparentGreen = 0; pConfigs[i].transparentBlue = 0; pConfigs[i].transparentAlpha = 0; pConfigs[i].transparentIndex = 0; i++; } } } break; } pATI->numVisualConfigs = numConfigs; pATI->pVisualConfigs = pConfigs; pATI->pVisualConfigsPriv = pATIConfigs; GlxSetVisualConfigs( numConfigs, pConfigs, (void**)pATIConfigPtrs ); return TRUE; } /* Create the ATI-specific context information */ static Bool ATICreateContext( ScreenPtr pScreen, VisualPtr visual, drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore ) { /* Nothing yet */ return TRUE; } /* Destroy the ATI-specific context information */ static void ATIDestroyContext( ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore ) { /* Nothing yet */ } /* Called when the X server is woken up to allow the last client's * context to be saved and the X server's context to be loaded. * The client detects when it's context is not currently loaded and * then loads it itself. The X server's context is loaded in the * XAA Sync callback if NeedDRISync is set. */ static void ATIEnterServer( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); if ( pATI->directRenderingEnabled ) { ATIDRIMarkSyncInt(pScreenInfo); ATIDRIMarkSyncExt(pScreenInfo); } } /* Called when the X server goes to sleep to allow the X server's * context to be saved and the last client's context to be loaded. * The client detects when it's context is not currently loaded and * then loads it itself. The X server keeps track of it's own state. */ static void ATILeaveServer( ScreenPtr pScreen ) { /* Nothing yet */ } /* Contexts can be swapped by the X server if necessary. This callback * is currently only used to perform any functions necessary when * entering or leaving the X server, and in the future might not be * necessary. */ static void ATIDRISwapContext( ScreenPtr pScreen, DRISyncType syncType, DRIContextType oldContextType, void *oldContext, DRIContextType newContextType, void *newContext ) { if ( ( syncType == DRI_3D_SYNC ) && ( oldContextType == DRI_2D_CONTEXT ) && ( newContextType == DRI_2D_CONTEXT ) ) { /* Entering from Wakeup */ ATIEnterServer( pScreen ); } if ( ( syncType == DRI_2D_SYNC ) && ( oldContextType == DRI_NO_CONTEXT ) && ( newContextType == DRI_2D_CONTEXT ) ) { /* Exiting from Block Handler */ ATILeaveServer( pScreen ); } } #ifdef USE_XAA static void ATIDRITransitionTo2d(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); if (pATI->backArea) { xf86FreeOffscreenArea(pATI->backArea); pATI->backArea = NULL; } if (pATI->depthTexArea) { xf86FreeOffscreenArea(pATI->depthTexArea); pATI->depthTexArea = NULL; } pATI->have3DWindows = FALSE; } static void ATIDRITransitionTo3d(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); FBAreaPtr fbArea; int width, height; xf86PurgeUnlockedOffscreenAreas(pScreen); xf86QueryLargestOffscreenArea(pScreen, &width, &height, 0, 0, 0); xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Largest offscreen area available: %d x %d\n", width, height); fbArea = xf86AllocateOffscreenArea(pScreen, pScreenInfo->displayWidth, height - pATI->depthTexLines - pATI->backLines, pScreenInfo->displayWidth, NULL, NULL, NULL); if (!fbArea) xf86DrvMsg(pScreen->myNum, X_ERROR, "Unable to reserve placeholder " "offscreen area, you might experience screen corruption\n"); if (!pATI->backArea) { pATI->backArea = xf86AllocateOffscreenArea(pScreen, pScreenInfo->displayWidth, pATI->backLines, pScreenInfo->displayWidth, NULL, NULL, NULL); } if (!pATI->backArea) xf86DrvMsg(pScreen->myNum, X_ERROR, "Unable to reserve offscreen area " "for back buffer, you might experience screen corruption\n"); if (!pATI->depthTexArea) { pATI->depthTexArea = xf86AllocateOffscreenArea(pScreen, pScreenInfo->displayWidth, pATI->depthTexLines, pScreenInfo->displayWidth, NULL, NULL, NULL); } if (!pATI->depthTexArea) xf86DrvMsg(pScreen->myNum, X_ERROR, "Unable to reserve offscreen area " "for depth buffer and textures, you might experience screen corruption\n"); if (fbArea) xf86FreeOffscreenArea(fbArea); pATI->have3DWindows = TRUE; } #endif /* USE_XAA */ #ifdef USE_EXA static void ATIDRITransitionTo2d_EXA(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; exaEnableDisableFBAccess(SCREEN_ARG(pScreen), FALSE); pATI->pExa->offScreenBase = pATIDRIServer->backOffset; exaEnableDisableFBAccess(SCREEN_ARG(pScreen), TRUE); pATI->have3DWindows = FALSE; } static void ATIDRITransitionTo3d_EXA(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; exaEnableDisableFBAccess(SCREEN_ARG(pScreen), FALSE); pATI->pExa->offScreenBase = pATIDRIServer->textureOffset + pATIDRIServer->textureSize; exaEnableDisableFBAccess(SCREEN_ARG(pScreen), TRUE); pATI->have3DWindows = TRUE; } #endif /* USE_EXA */ /* Initialize the state of the back and depth buffers. */ static void ATIDRIInitBuffers( WindowPtr pWin, RegionPtr prgn, CARD32 indx ) { #ifdef USE_XAA ScreenPtr pScreen = pWin->drawable.pScreen; ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; XAAInfoRecPtr pXAAInfo = pATI->pXAAInfo; BoxPtr pbox, pboxSave; int nbox, nboxSave; int depth; depth = 0x0000ffff; if (!pXAAInfo) return; if (!pXAAInfo->SetupForSolidFill) return; /* FIXME: Only initialize the back and depth buffers for contexts that request them */ /* FIXME: Use drm clear? (see Radeon driver) */ pboxSave = pbox = REGION_RECTS(prgn); nboxSave = nbox = REGION_NUM_RECTS(prgn); (*pXAAInfo->SetupForSolidFill)(pScreenInfo, 0, GXcopy, (CARD32)(-1)); for (; nbox; nbox--, pbox++) { (*pXAAInfo->SubsequentSolidFillRect)(pScreenInfo, pbox->x1 + pATIDRIServer->fbX, pbox->y1 + pATIDRIServer->fbY, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); (*pXAAInfo->SubsequentSolidFillRect)(pScreenInfo, pbox->x1 + pATIDRIServer->backX, pbox->y1 + pATIDRIServer->backY, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); } pbox = pboxSave; nbox = nboxSave; (*pXAAInfo->SetupForSolidFill)(pScreenInfo, depth, GXcopy, (CARD32)(-1)); for (; nbox; nbox--, pbox++) (*pXAAInfo->SubsequentSolidFillRect)(pScreenInfo, pbox->x1 + pATIDRIServer->depthX, pbox->y1 + pATIDRIServer->depthY, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); ATIDRIMarkSyncInt(pScreenInfo); #endif } /* Copy the back and depth buffers when the X server moves a window. * * Note: this function was copied from the Radeon driver... * * This routine is a modified form of XAADoBitBlt with the calls to * ScreenToScreenBitBlt built in. My routine has the prgnSrc as source * instead of destination. My origin is upside down so the ydir cases * are reversed. */ static void ATIDRIMoveBuffers( WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc, CARD32 indx ) { #ifdef USE_XAA ScreenPtr pScreen = pWin->drawable.pScreen; ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); XAAInfoRecPtr pXAAInfo = pATI->pXAAInfo; int backOffsetPitch = (((pATI->pDRIServerInfo->backPitch/8) << 22) | (pATI->pDRIServerInfo->backOffset >> 3)); #if 0 int depthOffsetPitch = (((pATI->pDRIServerInfo->depthPitch/8) << 22) | (pATI->pDRIServerInfo->depthOffset >> 3)); #endif BoxPtr pboxTmp, pboxNext, pboxBase; DDXPointPtr pptTmp; int xdir, ydir; int screenwidth = pScreenInfo->virtualX; int screenheight = pScreenInfo->virtualY; BoxPtr pbox = REGION_RECTS(prgnSrc); int nbox = REGION_NUM_RECTS(prgnSrc); BoxPtr pboxNew1 = NULL; BoxPtr pboxNew2 = NULL; DDXPointPtr pptNew1 = NULL; DDXPointPtr pptNew2 = NULL; DDXPointPtr pptSrc = &ptOldOrg; int dx = pWin->drawable.x - ptOldOrg.x; int dy = pWin->drawable.y - ptOldOrg.y; if (!pXAAInfo) return; if (!pXAAInfo->SetupForScreenToScreenCopy) return; /* FIXME: Only move the back and depth buffers for contexts * that request them. */ /* If the copy will overlap in Y, reverse the order */ if (dy > 0) { ydir = -1; if (nbox > 1) { /* Keep ordering in each band, reverse order of bands */ pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec)*nbox); if (!pboxNew1) return; pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox); if (!pptNew1) { free(pboxNew1); return; } pboxBase = pboxNext = pbox+nbox-1; while (pboxBase >= pbox) { while ((pboxNext >= pbox) && (pboxBase->y1 == pboxNext->y1)) pboxNext--; pboxTmp = pboxNext+1; pptTmp = pptSrc + (pboxTmp - pbox); while (pboxTmp <= pboxBase) { *pboxNew1++ = *pboxTmp++; *pptNew1++ = *pptTmp++; } pboxBase = pboxNext; } pboxNew1 -= nbox; pbox = pboxNew1; pptNew1 -= nbox; pptSrc = pptNew1; } } else { /* No changes required */ ydir = 1; } /* If the regions will overlap in X, reverse the order */ if (dx > 0) { xdir = -1; if (nbox > 1) { /* reverse order of rects in each band */ pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec)*nbox); pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox); if (!pboxNew2 || !pptNew2) { free(pptNew2); free(pboxNew2); free(pptNew1); free(pboxNew1); return; } pboxBase = pboxNext = pbox; while (pboxBase < pbox+nbox) { while ((pboxNext < pbox+nbox) && (pboxNext->y1 == pboxBase->y1)) pboxNext++; pboxTmp = pboxNext; pptTmp = pptSrc + (pboxTmp - pbox); while (pboxTmp != pboxBase) { *pboxNew2++ = *--pboxTmp; *pptNew2++ = *--pptTmp; } pboxBase = pboxNext; } pboxNew2 -= nbox; pbox = pboxNew2; pptNew2 -= nbox; pptSrc = pptNew2; } } else { /* No changes are needed */ xdir = 1; } (*pXAAInfo->SetupForScreenToScreenCopy)(pScreenInfo, xdir, ydir, GXcopy, (CARD32)(-1), -1); for (; nbox-- ; pbox++) { int xa = pbox->x1; int ya = pbox->y1; int destx = xa + dx; int desty = ya + dy; int w = pbox->x2 - xa + 1; int h = pbox->y2 - ya + 1; if (destx < 0) xa -= destx, w += destx, destx = 0; if (desty < 0) ya -= desty, h += desty, desty = 0; if (destx + w > screenwidth) w = screenwidth - destx; if (desty + h > screenheight) h = screenheight - desty; if (w <= 0) continue; if (h <= 0) continue; ATIMach64WaitForFIFO(pATI, 2); outf(SRC_OFF_PITCH, backOffsetPitch); outf(DST_OFF_PITCH, backOffsetPitch); (*pXAAInfo->SubsequentScreenToScreenCopy)(pScreenInfo, xa, ya, destx, desty, w, h); #if 0 /* FIXME: Move depth buffers? */ ATIMach64WaitForFIFO(pATI, 2); outf(SRC_OFF_PITCH, depthOffsetPitch); outf(DST_OFF_PITCH, depthOffsetPitch); if (pATI->depthMoves) ATIScreenToScreenCopyDepth(pScreenInfo, xa, ya, destx, desty, w, h); #endif } ATIMach64WaitForFIFO(pATI, 2); outf(SRC_OFF_PITCH, pATI->NewHW.dst_off_pitch); outf(DST_OFF_PITCH, pATI->NewHW.src_off_pitch); free(pptNew2); free(pboxNew2); free(pptNew1); free(pboxNew1); ATIDRIMarkSyncInt(pScreenInfo); #endif } /* Compute log base 2 of val. */ static int Mach64MinBits(int val) { int bits; if (!val) return 1; for (bits = 0; val; val >>= 1, ++bits); return bits; } static Bool ATIDRISetBufSize( ScreenPtr pScreen, unsigned int maxSize ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; if (pATI->OptionBufferSize) { if (pATI->OptionBufferSize < 1 || pATI->OptionBufferSize > maxSize ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[drm] Illegal DMA buffers size: %d MB\n", pATI->OptionBufferSize ); return FALSE; } if (pATI->OptionBufferSize > 2) { xf86DrvMsg( pScreen->myNum, X_WARNING, "[drm] Illegal DMA buffers size: %d MB\n", pATI->OptionBufferSize ); xf86DrvMsg( pScreen->myNum, X_WARNING, "[drm] Clamping DMA buffers size to 2 MB\n"); pATIDRIServer->bufferSize = 2; } else { pATIDRIServer->bufferSize = pATI->OptionBufferSize; xf86DrvMsg( pScreen->myNum, X_CONFIG, "[drm] Using %d MB for DMA buffers\n", pATIDRIServer->bufferSize ); } } else { xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[drm] Using %d MB for DMA buffers\n", pATIDRIServer->bufferSize ); } return TRUE; } static Bool ATIDRISetAgpMode( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; unsigned long mode = drmAgpGetMode( pATI->drmFD ); /* Default mode */ unsigned int vendor = drmAgpVendorId( pATI->drmFD ); unsigned int device = drmAgpDeviceId( pATI->drmFD ); if (pATI->OptionAGPMode > 0 && pATI->OptionAGPMode <= ATI_AGP_MAX_MODE) { pATIDRIServer->agpMode = pATI->OptionAGPMode; xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using AGP %dx Mode\n", pATIDRIServer->agpMode ); } else if (pATI->OptionAGPMode > 0) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Illegal AGP Mode: %d\n", pATI->OptionAGPMode ); return FALSE; } else { /* If no mode configured, use the default mode obtained from agpgart */ if ( mode & AGP_MODE_2X ) { pATIDRIServer->agpMode = 2; } else if ( mode & AGP_MODE_1X ) { pATIDRIServer->agpMode = 1; } xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using AGP %dx Mode\n", pATIDRIServer->agpMode ); } mode &= ~AGP_MODE_MASK; switch ( pATIDRIServer->agpMode ) { case 2: mode |= AGP_MODE_2X; case 1: default: mode |= AGP_MODE_1X; } if (pATI->OptionAGPSize) { switch (pATI->OptionAGPSize) { case 128: case 64: case 32: case 16: case 8: case 4: pATIDRIServer->agpSize = pATI->OptionAGPSize; xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using %d MB AGP aperture\n", pATIDRIServer->agpSize ); break; default: xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Illegal aperture size %d MB\n", pATI->OptionAGPSize ); return FALSE; } } else { xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using %d MB AGP aperture\n", pATIDRIServer->agpSize ); } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n", mode, vendor, device, PCI_DEV_VENDOR_ID(pATI->PCIInfo), PCI_DEV_DEVICE_ID(pATI->PCIInfo) ); if ( drmAgpEnable( pATI->drmFD, mode ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] AGP not enabled\n" ); drmAgpRelease( pATI->drmFD ); return FALSE; } return TRUE; } /* Initialize the AGP state. Request memory for use in AGP space, and * initialize the Rage Pro registers to point to that memory. */ static Bool ATIDRIAgpInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; int ret; unsigned long cntl; int s, l; pATIDRIServer->agpSize = ATI_DEFAULT_AGP_SIZE; pATIDRIServer->agpMode = ATI_DEFAULT_AGP_MODE; pATIDRIServer->bufferSize = ATI_DEFAULT_BUFFER_SIZE; pATIDRIServer->ringSize = 16; /* 16 kB ring */ if ( drmAgpAcquire( pATI->drmFD ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] AGP not available\n" ); return FALSE; } if (!ATIDRISetAgpMode( pScreen )) return FALSE; pATIDRIServer->agpOffset = 0; ret = drmAgpAlloc( pATI->drmFD, pATIDRIServer->agpSize*1024*1024, 0, NULL, &pATIDRIServer->agpHandle ); if ( ret < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Out of memory (%d)\n", ret ); drmAgpRelease( pATI->drmFD ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] %d kB allocated with handle 0x%08x\n", pATIDRIServer->agpSize*1024, pATIDRIServer->agpHandle ); if ( drmAgpBind( pATI->drmFD, pATIDRIServer->agpHandle, pATIDRIServer->agpOffset) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not bind\n" ); drmAgpFree( pATI->drmFD, pATIDRIServer->agpHandle ); drmAgpRelease( pATI->drmFD ); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Using %d kB for DMA descriptor ring\n", pATIDRIServer->ringSize); if ( !ATIDRISetBufSize( pScreen, pATIDRIServer->agpSize ) ) return FALSE; pATIDRIServer->agpTexSize = pATIDRIServer->agpSize - pATIDRIServer->bufferSize; /* Reserve space for the DMA descriptor ring */ pATIDRIServer->ringStart = pATIDRIServer->agpOffset; pATIDRIServer->ringMapSize = pATIDRIServer->ringSize*1024; /* ringSize is in kB */ /* Reserve space for the vertex buffer */ pATIDRIServer->bufferStart = pATIDRIServer->ringStart + pATIDRIServer->ringMapSize; pATIDRIServer->bufferMapSize = pATIDRIServer->bufferSize*1024*1024; /* Reserve the rest for AGP textures */ pATIDRIServer->agpTexStart = pATIDRIServer->bufferStart + pATIDRIServer->bufferMapSize; s = (pATIDRIServer->agpSize*1024*1024 - pATIDRIServer->agpTexStart); l = Mach64MinBits((s-1) / MACH64_NR_TEX_REGIONS); if (l < MACH64_LOG_TEX_GRANULARITY) l = MACH64_LOG_TEX_GRANULARITY; pATIDRIServer->agpTexMapSize = (s >> l) << l; pATIDRIServer->log2AGPTexGran = l; xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Using %d kB for AGP textures\n", pATIDRIServer->agpTexMapSize/1024); /* Map DMA descriptor ring */ if ( drmAddMap( pATI->drmFD, pATIDRIServer->ringStart, pATIDRIServer->ringMapSize, DRM_AGP, DRM_RESTRICTED, &pATIDRIServer->ringHandle ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not add ring mapping\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] ring handle = 0x%08x\n", pATIDRIServer->ringHandle ); if ( drmMap( pATI->drmFD, pATIDRIServer->ringHandle, pATIDRIServer->ringMapSize, &pATIDRIServer->ringMap ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not map ring\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] Ring mapped at 0x%08lx\n", (unsigned long)pATIDRIServer->ringMap ); /* Map vertex buffers */ if ( drmAddMap( pATI->drmFD, pATIDRIServer->bufferStart, pATIDRIServer->bufferMapSize, DRM_AGP, DRM_READ_ONLY, &pATIDRIServer->bufferHandle ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not add vertex buffers mapping\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] vertex buffers handle = 0x%08x\n", pATIDRIServer->bufferHandle ); if ( drmMap( pATI->drmFD, pATIDRIServer->bufferHandle, pATIDRIServer->bufferMapSize, &pATIDRIServer->bufferMap ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Could not map vertex buffers\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[agp] Vertex buffers mapped at 0x%08lx\n", (unsigned long)pATIDRIServer->bufferMap ); /* Map AGP Textures */ if (drmAddMap(pATI->drmFD, pATIDRIServer->agpTexStart, pATIDRIServer->agpTexMapSize, DRM_AGP, 0, &pATIDRIServer->agpTexHandle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not add AGP texture region mapping\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] AGP texture region handle = 0x%08x\n", pATIDRIServer->agpTexHandle); if (drmMap(pATI->drmFD, pATIDRIServer->agpTexHandle, pATIDRIServer->agpTexMapSize, &pATIDRIServer->agpTexMap) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map AGP texture region\n"); return FALSE; } xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] AGP Texture region mapped at 0x%08lx\n", (unsigned long)pATIDRIServer->agpTexMap); /* Initialize Mach64's AGP registers */ cntl = inm( AGP_CNTL ); cntl &= ~AGP_APER_SIZE_MASK; switch ( pATIDRIServer->agpSize ) { case 256: cntl |= AGP_APER_SIZE_256MB; break; case 128: cntl |= AGP_APER_SIZE_128MB; break; case 64: cntl |= AGP_APER_SIZE_64MB; break; case 32: cntl |= AGP_APER_SIZE_32MB; break; case 16: cntl |= AGP_APER_SIZE_16MB; break; case 8: cntl |= AGP_APER_SIZE_8MB; break; case 4: cntl |= AGP_APER_SIZE_4MB; break; default: xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Illegal aperture size %d kB\n", pATIDRIServer->agpSize*1024 ); return FALSE; } /* 1 = DATA comes in clock in which TRDY sampled (default) */ /* 0 = DATA comes in clock after TRDY sampled */ cntl |= AGP_TRDY_MODE; /* 1 = generate all reads as high priority */ /* 0 = generate all reads as their default priority (default) */ /* Setting this only works for me at AGP 1x mode (LLD) */ if (pATIDRIServer->agpMode == 1) { cntl |= HIGH_PRIORITY_READ_EN; } else { cntl &= ~HIGH_PRIORITY_READ_EN; } outm( AGP_BASE, drmAgpBase(pATI->drmFD) ); outm( AGP_CNTL, cntl ); return TRUE; } static Bool ATIDRIPciInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; pATIDRIServer->bufferSize = ATI_DEFAULT_BUFFER_SIZE; pATIDRIServer->ringSize = 16; /* 16 kB ring */ if ( !ATIDRISetBufSize( pScreen, (unsigned)(-1) ) ) return FALSE; /* Set size of the DMA descriptor ring */ pATIDRIServer->ringStart = 0; pATIDRIServer->ringMapSize = pATIDRIServer->ringSize*1024; /* ringSize is in kB */ /* Set size of the vertex buffer */ pATIDRIServer->bufferStart = 0; pATIDRIServer->bufferMapSize = pATIDRIServer->bufferSize*1024*1024; /* Map DMA descriptor ring */ if ( drmAddMap( pATI->drmFD, 0, pATIDRIServer->ringMapSize, DRM_CONSISTENT, DRM_RESTRICTED, &pATIDRIServer->ringHandle ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[pci] Could not add ring mapping\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[pci] ring handle = 0x%08x\n", pATIDRIServer->ringHandle ); if ( drmMap( pATI->drmFD, pATIDRIServer->ringHandle, pATIDRIServer->ringMapSize, &pATIDRIServer->ringMap ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[pci] Could not map ring\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[pci] Ring mapped at 0x%08lx\n", (unsigned long)pATIDRIServer->ringMap ); /* Disable AGP for ForcePCIMode */ if ( pATI->BusType != ATI_BUS_PCI ) { outm( AGP_BASE, 0 ); outm( AGP_CNTL, 0 ); } return TRUE; } /* Add a map for the MMIO registers that will be accessed by any * DRI-based clients. */ static Bool ATIDRIMapInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; pATIDRIServer->regsSize = getpagesize(); if ( drmAddMap( pATI->drmFD, pATI->Block1Base, pATIDRIServer->regsSize, DRM_REGISTERS, DRM_READ_ONLY, &pATIDRIServer->regsHandle ) < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[drm] failed to map registers\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[drm] register handle = 0x%08x\n", pATIDRIServer->regsHandle ); return TRUE; } /* Initialize the kernel data structures. */ static Bool ATIDRIKernelInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; drmMach64Init info; memset( &info, 0, sizeof(drmMach64Init) ); info.func = DRM_MACH64_INIT_DMA; info.sarea_priv_offset = sizeof(XF86DRISAREARec); info.is_pci = pATIDRIServer->IsPCI; info.dma_mode = pATI->OptionDMAMode; info.fb_bpp = pATI->bitsPerPixel; info.front_offset = pATIDRIServer->frontOffset; info.front_pitch = pATIDRIServer->frontPitch; info.back_offset = pATIDRIServer->backOffset; info.back_pitch = pATIDRIServer->backPitch; info.depth_bpp = 16; info.depth_offset = pATIDRIServer->depthOffset; info.depth_pitch = pATIDRIServer->depthPitch; info.fb_offset = pATI->LinearBase; info.mmio_offset = pATIDRIServer->regsHandle; info.ring_offset = pATIDRIServer->ringHandle; info.buffers_offset = pATIDRIServer->bufferHandle; info.agp_textures_offset = pATIDRIServer->agpTexHandle; if ( drmCommandWrite( pATI->drmFD, DRM_MACH64_INIT, &info, sizeof(drmMach64Init) ) < 0 ) { return FALSE; } else { return TRUE; } } /* Add a map for the DMA buffers that will be accessed by any * DRI-based clients. */ static Bool ATIDRIAddBuffers( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; /* Initialize vertex buffers */ if ( pATIDRIServer->IsPCI ) { pATIDRIServer->numBuffers = drmAddBufs( pATI->drmFD, pATIDRIServer->bufferMapSize/MACH64_BUFFER_SIZE, MACH64_BUFFER_SIZE, DRM_PCI_BUFFER_RO, 0 ); } else { pATIDRIServer->numBuffers = drmAddBufs( pATI->drmFD, pATIDRIServer->bufferMapSize/MACH64_BUFFER_SIZE, MACH64_BUFFER_SIZE, DRM_AGP_BUFFER, pATIDRIServer->bufferStart ); } if ( pATIDRIServer->numBuffers <= 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[drm] Could not create DMA buffers list\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[drm] Added %d %d byte DMA buffers\n", pATIDRIServer->numBuffers, MACH64_BUFFER_SIZE ); return TRUE; } static Bool ATIDRIMapBuffers( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; pATIDRIServer->drmBuffers = drmMapBufs( pATI->drmFD ); if ( !pATIDRIServer->drmBuffers ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[drm] Failed to map DMA buffers list\n" ); return FALSE; } xf86DrvMsg( pScreen->myNum, X_INFO, "[drm] Mapped %d DMA buffers at 0x%08lx\n", pATIDRIServer->drmBuffers->count, (unsigned long)pATIDRIServer->drmBuffers->list->address ); return TRUE; } static Bool ATIDRIIrqInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); if ( pATI->irq <= 0 ) { pATI->irq = drmGetInterruptFromBusID(pATI->drmFD, PCI_CFG_BUS(pATI->PCIInfo), PCI_CFG_DEV(pATI->PCIInfo), PCI_CFG_FUNC(pATI->PCIInfo)); if ( pATI->irq <= 0 ) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "[drm] Couldn't find IRQ for bus id %d:%d:%d\n", PCI_CFG_BUS(pATI->PCIInfo), PCI_CFG_DEV(pATI->PCIInfo), PCI_CFG_FUNC(pATI->PCIInfo)); pATI->irq = 0; } else if ((drmCtlInstHandler(pATI->drmFD, pATI->irq)) != 0) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "[drm] Failed to initialize interrupt handler with IRQ %d\n", pATI->irq); pATI->irq = 0; } if (pATI->irq) xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "[drm] Installed interrupt handler, using IRQ %d\n", pATI->irq); else { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "[drm] Falling back to irq-free operation\n"); return FALSE; } } return TRUE; } /* Initialize the screen-specific data structures for the DRI and the * Rage Pro. This is the main entry point to the device-specific * initialization code. It calls device-independent DRI functions to * create the DRI data structures and initialize the DRI state. */ Bool ATIDRIScreenInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); DRIInfoPtr pDRIInfo; ATIDRIPtr pATIDRI; ATIDRIServerInfoPtr pATIDRIServer; drmVersionPtr version; int major, minor, patch; /* Check that the GLX, DRI, and DRM modules have been loaded by testing * for known symbols in each module. */ if ( !xf86LoaderCheckSymbol("GlxSetVisualConfigs") ) return FALSE; if ( !xf86LoaderCheckSymbol("drmAvailable") ) return FALSE; if ( !xf86LoaderCheckSymbol("DRIQueryVersion") ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] ATIDRIScreenInit failed (libdri.a too old)\n" ); return FALSE; } /* Check the DRI version */ DRIQueryVersion( &major, &minor, &patch ); if ( major != DRIINFO_MAJOR_VERSION || minor < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] ATIDRIScreenInit failed because of a version mismatch.\n" "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", major, minor, patch, DRIINFO_MAJOR_VERSION, 0 ); return FALSE; } switch ( pATI->bitsPerPixel ) { case 8: /* These modes are not supported (yet). */ case 15: case 24: xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] Direct rendering only supported in 16 and 32 bpp modes\n"); return FALSE; /* Only 16 and 32 color depths are supported currently. */ case 16: if ( pATI->depth != 16) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] Direct rendering not supported for depth %d at fbbpp 16.\n", pATI->depth ); return FALSE; } break; case 32: break; } /* Create the DRI data structure, and fill it in before calling the * DRIScreenInit(). */ pDRIInfo = DRICreateInfoRec(); if ( !pDRIInfo ) return FALSE; pATI->pDRIInfo = pDRIInfo; pDRIInfo->drmDriverName = ATIKernelDriverName; pDRIInfo->clientDriverName = ATIClientDriverName; if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { pDRIInfo->busIdString = DRICreatePCIBusID(pATI->PCIInfo); } else { pDRIInfo->busIdString = malloc( 64 ); sprintf( pDRIInfo->busIdString, "PCI:%d:%d:%d", PCI_DEV_BUS(pATI->PCIInfo), PCI_DEV_DEV(pATI->PCIInfo), PCI_DEV_FUNC(pATI->PCIInfo) ); } pDRIInfo->ddxDriverMajorVersion = MACH64_VERSION_MAJOR; pDRIInfo->ddxDriverMinorVersion = MACH64_VERSION_MINOR; pDRIInfo->ddxDriverPatchVersion = MACH64_VERSION_PATCH; pDRIInfo->frameBufferPhysicalAddress = (void *)pATI->LinearBase; pDRIInfo->frameBufferSize = pATI->LinearSize; pDRIInfo->frameBufferStride = (pScreenInfo->displayWidth * pATI->FBBytesPerPixel); pDRIInfo->ddxDrawableTableEntry = ATI_MAX_DRAWABLES; if ( SAREA_MAX_DRAWABLES < ATI_MAX_DRAWABLES ) { pDRIInfo->maxDrawableTableEntry = SAREA_MAX_DRAWABLES; } else { pDRIInfo->maxDrawableTableEntry = ATI_MAX_DRAWABLES; } /* For now the mapping works by using a fixed size defined * in the SAREA header */ if ( sizeof(XF86DRISAREARec) + sizeof(ATISAREAPrivRec) > SAREA_MAX ) { ErrorF( "[dri] Data does not fit in SAREA\n" ); return FALSE; } xf86DrvMsg( pScreenInfo->scrnIndex, X_INFO, "[drm] SAREA %u+%u: %u\n", (unsigned)sizeof(XF86DRISAREARec), (unsigned)sizeof(ATISAREAPrivRec), (unsigned)(sizeof(XF86DRISAREARec) + sizeof(ATISAREAPrivRec)) ); pDRIInfo->SAREASize = SAREA_MAX; pATIDRI = (ATIDRIPtr) xnfcalloc( sizeof(ATIDRIRec), 1 ); if ( !pATIDRI ) { DRIDestroyInfoRec( pATI->pDRIInfo ); pATI->pDRIInfo = NULL; xf86DrvMsg( pScreenInfo->scrnIndex, X_ERROR, "[dri] Failed to allocate memory for private record\n" ); return FALSE; } pATIDRIServer = (ATIDRIServerInfoPtr) xnfcalloc( sizeof(ATIDRIServerInfoRec), 1 ); if ( !pATIDRIServer ) { free( pATIDRI ); DRIDestroyInfoRec( pATI->pDRIInfo ); pATI->pDRIInfo = NULL; xf86DrvMsg( pScreenInfo->scrnIndex, X_ERROR, "[dri] Failed to allocate memory for private record\n" ); return FALSE; } pATI->pDRIServerInfo = pATIDRIServer; pDRIInfo->devPrivate = pATIDRI; pDRIInfo->devPrivateSize = sizeof(ATIDRIRec); pDRIInfo->contextSize = sizeof(ATIDRIContextRec); pDRIInfo->CreateContext = ATICreateContext; pDRIInfo->DestroyContext = ATIDestroyContext; pDRIInfo->SwapContext = ATIDRISwapContext; pDRIInfo->InitBuffers = ATIDRIInitBuffers; pDRIInfo->MoveBuffers = ATIDRIMoveBuffers; #ifdef USE_XAA if (!pATI->useEXA) { pDRIInfo->TransitionTo2d = ATIDRITransitionTo2d; pDRIInfo->TransitionTo3d = ATIDRITransitionTo3d; } #endif /* USE_XAA */ #ifdef USE_EXA if (pATI->useEXA) { pDRIInfo->TransitionTo2d = ATIDRITransitionTo2d_EXA; pDRIInfo->TransitionTo3d = ATIDRITransitionTo3d_EXA; } #endif /* USE_EXA */ pDRIInfo->bufferRequests = DRI_ALL_WINDOWS; pDRIInfo->createDummyCtx = TRUE; pDRIInfo->createDummyCtxPriv = FALSE; pATI->have3DWindows = FALSE; if ( !DRIScreenInit( pScreen, pDRIInfo, &pATI->drmFD ) ) { free( pATIDRIServer ); pATI->pDRIServerInfo = NULL; free( pDRIInfo->devPrivate ); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec( pDRIInfo ); pDRIInfo = NULL; xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] DRIScreenInit Failed\n" ); return FALSE; } /* Check the DRM lib version. drmGetLibVersion was not supported in version 1.0, so check for symbol first to avoid possible crash or hang. */ if (xf86LoaderCheckSymbol("drmGetLibVersion")) { version = drmGetLibVersion(pATI->drmFD); } else { /* drmlib version 1.0.0 didn't have the drmGetLibVersion entry point. Fake it by allocating a version record via drmGetVersion and changing it to version 1.0.0 */ version = drmGetVersion(pATI->drmFD); version->version_major = 1; version->version_minor = 0; version->version_patchlevel = 0; } if (version) { if (version->version_major != 1 || version->version_minor < 1) { /* incompatible drm library version */ xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] ATIDRIScreenInit failed because of a version mismatch.\n" "[dri] libdrm.a module version is %d.%d.%d but version 1.1.x is needed.\n" "[dri] Disabling DRI.\n", version->version_major, version->version_minor, version->version_patchlevel); drmFreeVersion(version); ATIDRICloseScreen(pScreen); return FALSE; } drmFreeVersion(version); } /* Check the mach64 DRM version */ version = drmGetVersion( pATI->drmFD ); if ( version ) { if ( version->version_major != 2 || version->version_minor < 0 ) { /* Incompatible DRM version */ xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] ATIDRIScreenInit failed because of a version mismatch.\n" "[dri] mach64.o kernel module version is %d.%d.%d, but version 2.x is needed (with 2.x >= 2.0).\n" "[dri] Disabling DRI.\n", version->version_major, version->version_minor, version->version_patchlevel ); drmFreeVersion( version ); ATIDRICloseScreen( pScreen ); return FALSE; } drmFreeVersion( version ); } switch ( pATI->OptionDMAMode ) { case MACH64_MODE_DMA_ASYNC: xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Will request asynchronous DMA mode\n"); break; case MACH64_MODE_DMA_SYNC: xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Will request synchronous DMA mode\n"); break; case MACH64_MODE_MMIO: xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Will request pseudo-DMA (MMIO) mode\n"); break; default: xf86DrvMsg(pScreen->myNum, X_WARNING, "[drm] Unknown DMA mode\n"); } pATIDRIServer->IsPCI = (pATI->BusType == ATI_BUS_PCI || pATI->OptionIsPCI) ? TRUE : FALSE; if ( pATI->BusType != ATI_BUS_PCI && pATI->OptionIsPCI ) { xf86DrvMsg(pScreen->myNum, X_CONFIG, "[dri] Forcing PCI mode\n"); } /* Initialize AGP */ if ( !pATIDRIServer->IsPCI && !ATIDRIAgpInit( pScreen ) ) { pATIDRIServer->IsPCI = TRUE; xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] AGP failed to initialize -- falling back to PCI mode.\n" ); xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Make sure you have the agpgart kernel module loaded.\n" ); } /* Initialize PCI */ if ( pATIDRIServer->IsPCI && !ATIDRIPciInit( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } if ( !ATIDRIMapInit( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } if ( !ATIInitVisualConfigs( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } xf86DrvMsg( pScreenInfo->scrnIndex, X_INFO, "[dri] Visual configs initialized\n" ); xf86DrvMsg( pScreenInfo->scrnIndex, X_INFO, "[dri] Block 0 base at 0x%08lx\n", pATI->Block0Base ); return TRUE; } /* Finish initializing the device-dependent DRI state, and call * DRIFinishScreenInit() to complete the device-independent DRI * initialization. */ Bool ATIDRIFinishScreenInit( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATISAREAPrivPtr pSAREAPriv; ATIDRIPtr pATIDRI; ATIDRIServerInfoPtr pATIDRIServer; pATI->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; /* NOTE: DRIFinishScreenInit must be called before *DRIKernelInit * because *DRIKernelInit requires that the hardware lock is held by * the X server, and the first time the hardware lock is grabbed is * in DRIFinishScreenInit. */ if ( !DRIFinishScreenInit( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } /* Initialize the DMA buffer list */ /* Need to do this before ATIDRIKernelInit so we can init the freelist */ if ( !ATIDRIAddBuffers( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } /* Initialize the kernel data structures */ if ( !ATIDRIKernelInit( pScreen ) ) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "[drm] Failed to initialize the mach64.o kernel module\n"); xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "[drm] Check the system log for more information.\n"); ATIDRICloseScreen( pScreen ); return FALSE; } if ( !ATIDRIMapBuffers( pScreen ) ) { ATIDRICloseScreen( pScreen ); return FALSE; } /* Initialize IRQ */ ATIDRIIrqInit( pScreen ); pSAREAPriv = (ATISAREAPrivPtr) DRIGetSAREAPrivate( pScreen ); memset( pSAREAPriv, 0, sizeof(*pSAREAPriv) ); pATIDRI = (ATIDRIPtr)pATI->pDRIInfo->devPrivate; pATIDRIServer = pATI->pDRIServerInfo; pATIDRI->width = pScreenInfo->virtualX; pATIDRI->height = pScreenInfo->virtualY; pATIDRI->mem = pScreenInfo->videoRam * 1024; pATIDRI->cpp = pScreenInfo->bitsPerPixel / 8; pATIDRI->IsPCI = pATIDRIServer->IsPCI; pATIDRI->AGPMode = pATIDRIServer->agpMode; pATIDRI->frontOffset = pATIDRIServer->frontOffset; pATIDRI->frontPitch = pATIDRIServer->frontPitch; pATIDRI->backOffset = pATIDRIServer->backOffset; pATIDRI->backPitch = pATIDRIServer->backPitch; pATIDRI->depthOffset = pATIDRIServer->depthOffset; pATIDRI->depthPitch = pATIDRIServer->depthPitch; pATIDRI->textureOffset = pATIDRIServer->textureOffset; pATIDRI->textureSize = pATIDRIServer->textureSize; pATIDRI->logTextureGranularity = pATIDRIServer->logTextureGranularity; pATIDRI->regs = pATIDRIServer->regsHandle; pATIDRI->regsSize = pATIDRIServer->regsSize; pATIDRI->agp = pATIDRIServer->agpTexHandle; pATIDRI->agpSize = pATIDRIServer->agpTexMapSize; pATIDRI->logAgpTextureGranularity = pATIDRIServer->log2AGPTexGran; pATIDRI->agpTextureOffset = pATIDRIServer->agpTexStart; return TRUE; } /* * This function will attempt to get the Mach64 hardware back into shape * after a resume from disc. Its an extract from ATIDRIAgpInit and ATIDRIFinishScreenInit * This also calls a new ioctl in the mach64 DRM that in its turn is * an extraction of the hardware-affecting bits from mach64_do_init_drm() * (see atidrm.c) * I am assuming here that pATI->pDRIServerInfo doesn't change * elsewhere in incomaptible ways. * How will this code react to resuming after a failed resumeor pci based dri ? */ void ATIDRIResume( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; xf86DrvMsg( pScreen->myNum, X_INFO, "[RESUME] Attempting to re-init Mach64 hardware.\n"); if (!pATIDRIServer->IsPCI) { if (!ATIDRISetAgpMode(pScreen)) return; outm( AGP_BASE, drmAgpBase(pATI->drmFD) ); } } /* The screen is being closed, so clean up any state and free any * resources used by the DRI. */ void ATIDRICloseScreen( ScreenPtr pScreen ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; drmMach64Init info; /* Stop interrupt generation and handling if used */ if ( pATI->irq > 0 ) { if ( drmCtlUninstHandler(pATI->drmFD) != 0 ) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "[drm] Error uninstalling interrupt handler for IRQ %d\n", pATI->irq); } else { xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "[drm] Uninstalled interrupt handler for IRQ %d\n", pATI->irq); } pATI->irq = 0; } /* De-allocate DMA buffers */ if ( pATIDRIServer->drmBuffers ) { drmUnmapBufs( pATIDRIServer->drmBuffers ); pATIDRIServer->drmBuffers = NULL; } /* De-allocate all kernel resources */ memset(&info, 0, sizeof(drmMach64Init)); info.func = DRM_MACH64_CLEANUP_DMA; drmCommandWrite( pATI->drmFD, DRM_MACH64_INIT, &info, sizeof(drmMach64Init) ); /* De-allocate all AGP resources */ if ( pATIDRIServer->agpTexMap ) { drmUnmap( pATIDRIServer->agpTexMap, pATIDRIServer->agpTexMapSize ); pATIDRIServer->agpTexMap = NULL; } if ( pATIDRIServer->bufferMap ) { drmUnmap( pATIDRIServer->bufferMap, pATIDRIServer->bufferMapSize ); pATIDRIServer->bufferMap = NULL; } if ( pATIDRIServer->ringMap ) { drmUnmap( pATIDRIServer->ringMap, pATIDRIServer->ringMapSize ); pATIDRIServer->ringMap = NULL; } if ( pATIDRIServer->agpHandle ) { drmAgpUnbind( pATI->drmFD, pATIDRIServer->agpHandle ); drmAgpFree( pATI->drmFD, pATIDRIServer->agpHandle ); pATIDRIServer->agpHandle = 0; drmAgpRelease( pATI->drmFD ); } /* De-allocate all PCI resources */ if ( pATIDRIServer->IsPCI && pATIDRIServer->ringHandle ) { drmRmMap( pATI->drmFD, pATIDRIServer->ringHandle ); pATIDRIServer->ringHandle = 0; } /* De-allocate all DRI resources */ DRICloseScreen( pScreen ); /* De-allocate all DRI data structures */ if ( pATI->pDRIInfo ) { if ( pATI->pDRIInfo->devPrivate ) { free( pATI->pDRIInfo->devPrivate ); pATI->pDRIInfo->devPrivate = NULL; } DRIDestroyInfoRec( pATI->pDRIInfo ); pATI->pDRIInfo = NULL; } if ( pATI->pDRIServerInfo ) { free( pATI->pDRIServerInfo ); pATI->pDRIServerInfo = NULL; } if ( pATI->pVisualConfigs ) { free( pATI->pVisualConfigs ); pATI->pVisualConfigs = NULL; } if ( pATI->pVisualConfigsPriv ) { free( pATI->pVisualConfigsPriv ); pATI->pVisualConfigsPriv = NULL; } } xf86-video-mach64-6.9.5/src/atimach64exa.c0000644000175000017500000004246112270010352014643 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ /* * Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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 (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * DRI support by: * Manuel Teira * Leif Delgass * * EXA support by: * Jakub Stachowski * George Sapountzis */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "ati.h" #include "atichip.h" #include "atidri.h" #include "atimach64accel.h" #include "atimach64io.h" #include "atipriv.h" #include "atiregs.h" #ifdef XF86DRI_DEVEL #include "mach64_dri.h" #include "mach64_sarea.h" #endif #ifdef USE_EXA extern CARD8 ATIMach64ALU[]; extern void ATIMach64ValidateClip ( ATIPtr pATI, int sc_left, int sc_right, int sc_top, int sc_bottom ); #if 0 #define MACH64_TRACE(x) \ do { \ ErrorF("Mach64(%s): ", __FUNCTION__); \ ErrorF x; \ } while(0) #else #define MACH64_TRACE(x) do { } while(0) #endif #if 0 #define MACH64_FALLBACK(x) \ do { \ ErrorF("Fallback(%s): ", __FUNCTION__); \ ErrorF x; \ return FALSE; \ } while (0) #else #define MACH64_FALLBACK(x) return FALSE #endif static void Mach64WaitMarker(ScreenPtr pScreenInfo, int Marker) { ATIMach64Sync(xf86ScreenToScrn(pScreenInfo)); } static Bool Mach64GetDatatypeBpp(PixmapPtr pPix, CARD32 *pix_width) { int bpp = pPix->drawable.bitsPerPixel; switch (bpp) { case 8: *pix_width = SetBits(PIX_WIDTH_8BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_8BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 16: *pix_width = SetBits(PIX_WIDTH_16BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_16BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 24: *pix_width = SetBits(PIX_WIDTH_8BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_8BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; case 32: *pix_width = SetBits(PIX_WIDTH_32BPP, DP_DST_PIX_WIDTH) | SetBits(PIX_WIDTH_32BPP, DP_SRC_PIX_WIDTH) | SetBits(PIX_WIDTH_1BPP, DP_HOST_PIX_WIDTH); break; default: MACH64_FALLBACK(("Unsupported bpp: %d\n", bpp)); } #if X_BYTE_ORDER == X_LITTLE_ENDIAN *pix_width |= DP_BYTE_PIX_ORDER; #endif /* X_BYTE_ORDER */ return TRUE; } static Bool Mach64GetOffsetPitch(PixmapPtr pPix, int bpp, CARD32 *pitch_offset, unsigned int offset, unsigned int pitch) { #if 0 ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pPix->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); if (pitch % pATI->pExa->pixmapPitchAlign != 0) MACH64_FALLBACK(("Bad pitch 0x%08x\n", pitch)); if (offset % pATI->pExa->pixmapOffsetAlign != 0) MACH64_FALLBACK(("Bad offset 0x%08x\n", offset)); #endif /* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */ pitch = pitch / bpp; /* bytes / 8 */ offset = offset >> 3; *pitch_offset = ((pitch << 22) | (offset << 0)); return TRUE; } static Bool Mach64GetPixmapOffsetPitch(PixmapPtr pPix, CARD32 *pitch_offset) { CARD32 pitch, offset; int bpp; bpp = pPix->drawable.bitsPerPixel; if (bpp == 24) bpp = 8; pitch = exaGetPixmapPitch(pPix); offset = exaGetPixmapOffset(pPix); return Mach64GetOffsetPitch(pPix, bpp, pitch_offset, offset, pitch); } static Bool Mach64PrepareCopy ( PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, int ydir, int alu, Pixel planemask ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pDstPixmap->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); CARD32 src_pitch_offset, dst_pitch_offset, dp_pix_width; ATIDRISync(pScreenInfo); if (!Mach64GetDatatypeBpp(pDstPixmap, &dp_pix_width)) return FALSE; if (!Mach64GetPixmapOffsetPitch(pSrcPixmap, &src_pitch_offset)) return FALSE; if (!Mach64GetPixmapOffsetPitch(pDstPixmap, &dst_pitch_offset)) return FALSE; ATIMach64WaitForFIFO(pATI, 7); outf(DP_WRITE_MASK, planemask); outf(DP_PIX_WIDTH, dp_pix_width); outf(SRC_OFF_PITCH, src_pitch_offset); outf(DST_OFF_PITCH, dst_pitch_offset); outf(DP_SRC, DP_MONO_SRC_ALLONES | SetBits(SRC_BLIT, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_MIX, SetBits(ATIMach64ALU[alu], DP_FRGD_MIX)); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); pATI->dst_cntl = 0; if (ydir > 0) pATI->dst_cntl |= DST_Y_DIR; if (xdir > 0) pATI->dst_cntl |= DST_X_DIR; if (pATI->XModifier == 1) outf(DST_CNTL, pATI->dst_cntl); else pATI->dst_cntl |= DST_24_ROT_EN; return TRUE; } static void Mach64Copy ( PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int w, int h ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pDstPixmap->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); srcX *= pATI->XModifier; dstY *= pATI->XModifier; w *= pATI->XModifier; ATIDRISync(pScreenInfo); /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, dstX, dstX + w - 1, dstY, dstY + h - 1); if (!(pATI->dst_cntl & DST_X_DIR)) { srcX += w - 1; dstX += w - 1; } if (!(pATI->dst_cntl & DST_Y_DIR)) { srcY += h - 1; dstY += h - 1; } if (pATI->XModifier != 1) outf(DST_CNTL, pATI->dst_cntl | SetBits((dstX / 4) % 6, DST_24_ROT)); ATIMach64WaitForFIFO(pATI, 4); outf(SRC_Y_X, SetWord(srcX, 1) | SetWord(srcY, 0)); outf(SRC_WIDTH1, w); outf(DST_Y_X, SetWord(dstX, 1) | SetWord(dstY, 0)); outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0)); /* * On VTB's and later, the engine will randomly not wait for a copy * operation to commit its results to video memory before starting the next * one. The probability of such occurrences increases with GUI_WB_FLUSH * (or GUI_WB_FLUSH_P) setting, bitsPerPixel and/or CRTC clock. This * would point to some kind of video memory bandwidth problem were it noti * for the fact that the problem occurs less often (but still occurs) when * copying larger rectangles. */ if ((pATI->Chip >= ATI_CHIP_264VTB) && !pATI->OptionDevel) { exaMarkSync(pScreenInfo->pScreen); /* Force sync. */ exaWaitSync(pScreenInfo->pScreen); /* Sync and notify EXA. */ } } static void Mach64DoneCopy(PixmapPtr pDstPixmap) { } static Bool Mach64PrepareSolid ( PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pPixmap->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); CARD32 dst_pitch_offset, dp_pix_width; ATIDRISync(pScreenInfo); if (!Mach64GetDatatypeBpp(pPixmap, &dp_pix_width)) return FALSE; if (!Mach64GetPixmapOffsetPitch(pPixmap, &dst_pitch_offset)) return FALSE; ATIMach64WaitForFIFO(pATI, 7); outf(DP_WRITE_MASK, planemask); outf(DP_PIX_WIDTH, dp_pix_width); outf(DST_OFF_PITCH, dst_pitch_offset); outf(DP_SRC, DP_MONO_SRC_ALLONES | SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC)); outf(DP_FRGD_CLR, fg); outf(DP_MIX, SetBits(ATIMach64ALU[alu], DP_FRGD_MIX)); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); if (pATI->XModifier == 1) outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); return TRUE; } static void Mach64Solid ( PixmapPtr pPixmap, int x1, int y1, int x2, int y2 ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pPixmap->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); int x = x1; int y = y1; int w = x2-x1; int h = y2-y1; ATIDRISync(pScreenInfo); if (pATI->XModifier != 1) { x *= pATI->XModifier; w *= pATI->XModifier; outf(DST_CNTL, SetBits((x / 4) % 6, DST_24_ROT) | (DST_X_DIR | DST_Y_DIR | DST_24_ROT_EN)); } /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, x, x + w - 1, y, y + h - 1); ATIMach64WaitForFIFO(pATI, 2); outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0)); outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0)); } static void Mach64DoneSolid(PixmapPtr pPixmap) { } #include "atimach64render.c" /* Compute log base 2 of val. */ static __inline__ int Mach64Log2(int val) { int bits; for (bits = 0; val != 0; val >>= 1, ++bits) ; return bits - 1; } /* * Memory layour for EXA with DRI (no local_textures): * | front | back | depth | textures | pixmaps, xv | c | * * 1024x768@16bpp with 8 MB: * | 1.5 MB | 1.5 MB | 1.5 MB | 0 | ~3.5 MB | c | * * 1024x768@32bpp with 8 MB: * | 3.0 MB | 3.0 MB | 1.5 MB | 0 | ~0.5 MB | c | * * "c" is the hw cursor which occupies 1KB */ static void Mach64SetupMemEXA(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); int cpp = (pScreenInfo->bitsPerPixel + 7) / 8; /* front and back buffer */ int bufferSize = pScreenInfo->virtualY * pScreenInfo->displayWidth * cpp; /* always 16-bit z-buffer */ int depthSize = pScreenInfo->virtualY * pScreenInfo->displayWidth * 2; ExaDriverPtr pExa = pATI->pExa; pExa->memoryBase = pATI->pMemory; pExa->memorySize = pScreenInfo->videoRam * 1024; pExa->offScreenBase = bufferSize; #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; Bool is_pci = pATIDRIServer->IsPCI; int textureSize = 0; int pixmapCache = 0; int next = 0; /* front buffer */ pATIDRIServer->frontOffset = 0; pATIDRIServer->frontPitch = pScreenInfo->displayWidth; next += bufferSize; /* back buffer */ pATIDRIServer->backOffset = next; pATIDRIServer->backPitch = pScreenInfo->displayWidth; next += bufferSize; /* depth buffer */ pATIDRIServer->depthOffset = next; pATIDRIServer->depthPitch = pScreenInfo->displayWidth; next += depthSize; /* ATIScreenInit does check for the this condition. */ if (next > pExa->memorySize) { xf86DrvMsg(pScreen->myNum, X_WARNING, "DRI static buffer allocation failed, disabling DRI --" "need at least %d kB video memory\n", next / 1024 ); ATIDRICloseScreen(pScreen); pATI->directRenderingEnabled = FALSE; } /* local textures */ /* Reserve approx. half of offscreen memory for local textures */ textureSize = (pExa->memorySize - next) / 2; /* In case DRI requires more offscreen memory than available, * should not happen as ATIScreenInit would have not enabled DRI */ if (textureSize < 0) textureSize = 0; /* Try for enough pixmap cache for a full viewport */ pixmapCache = (pExa->memorySize - next) - textureSize; if (pixmapCache < bufferSize) textureSize = 0; /* Don't allocate a local texture heap for AGP unless requested */ if ( !is_pci && !pATI->OptionLocalTextures ) textureSize = 0; if (textureSize > 0) { int l = Mach64Log2(textureSize / MACH64_NR_TEX_REGIONS); if (l < MACH64_LOG_TEX_GRANULARITY) l = MACH64_LOG_TEX_GRANULARITY; pATIDRIServer->logTextureGranularity = l; /* Round the texture size down to the nearest whole number of * texture regions. */ textureSize = (textureSize >> l) << l; } /* Set a minimum usable local texture heap size. This will fit * two 256x256 textures. We check this after any rounding of * the texture area. */ if (textureSize < 256*256 * cpp * 2) textureSize = 0; /* Disable DRI for PCI if cannot allocate a local texture heap */ if ( is_pci && textureSize == 0 ) { xf86DrvMsg(pScreen->myNum, X_WARNING, "Not enough memory for local textures, disabling DRI\n"); ATIDRICloseScreen(pScreen); pATI->directRenderingEnabled = FALSE; } pATIDRIServer->textureOffset = next; pATIDRIServer->textureSize = textureSize; next += textureSize; /* pExa->offScreenBase is moved to `next' when DRI gets activated */ } #endif /* XF86DRI_DEVEL */ xf86DrvMsg(pScreen->myNum, X_INFO, "EXA memory management initialized\n" "\t base : %10p\n" "\t offscreen: +%10lx\n" "\t size : +%10lx\n" "\t cursor : %10p\n", pExa->memoryBase, pExa->offScreenBase, pExa->memorySize, pATI->pCursorImage); if (TRUE || xf86GetVerbosity() > 1) { int offscreen = pExa->memorySize - pExa->offScreenBase; int viewport = bufferSize; int dvdframe = 720*480*cpp; /* enough for single-buffered DVD */ xf86DrvMsg(pScreen->myNum, X_INFO, "Will use %d kB of offscreen memory for EXA\n" "\t\t or %5.2f viewports (composite)\n" "\t\t or %5.2f dvdframes (xvideo)\n", offscreen / 1024, 1.0 * offscreen / viewport, 1.0 * offscreen / dvdframe); } #ifdef XF86DRI_DEVEL if (pATI->directRenderingEnabled) { ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; xf86DrvMsg(pScreen->myNum, X_INFO, "Will use back buffer at offset 0x%x\n", pATIDRIServer->backOffset); xf86DrvMsg(pScreen->myNum, X_INFO, "Will use depth buffer at offset 0x%x\n", pATIDRIServer->depthOffset); if (pATIDRIServer->textureSize > 0) { xf86DrvMsg(pScreen->myNum, X_INFO, "Will use %d kB for local textures at offset 0x%x\n", pATIDRIServer->textureSize/1024, pATIDRIServer->textureOffset); } } #endif /* XF86DRI_DEVEL */ pExa->pixmapOffsetAlign = 64; pExa->pixmapPitchAlign = 64; pExa->flags = EXA_OFFSCREEN_PIXMAPS; pExa->maxX = ATIMach64MaxX; pExa->maxY = ATIMach64MaxY; } Bool ATIMach64ExaInit(ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ExaDriverPtr pExa; pExa = exaDriverAlloc(); if (!pExa) return FALSE; pATI->pExa = pExa; pExa->exa_major = 2; pExa->exa_minor = 0; Mach64SetupMemEXA(pScreen); pExa->WaitMarker = Mach64WaitMarker; pExa->PrepareSolid = Mach64PrepareSolid; pExa->Solid = Mach64Solid; pExa->DoneSolid = Mach64DoneSolid; pExa->PrepareCopy = Mach64PrepareCopy; pExa->Copy = Mach64Copy; pExa->DoneCopy = Mach64DoneCopy; if (pATI->RenderAccelEnabled) { if (pATI->Chip >= ATI_CHIP_264GTPRO) { /* 3D Rage Pro does not support NPOT textures. */ pExa->flags |= EXA_OFFSCREEN_ALIGN_POT; pExa->CheckComposite = Mach64CheckComposite; pExa->PrepareComposite = Mach64PrepareComposite; pExa->Composite = Mach64Composite; pExa->DoneComposite = Mach64DoneComposite; } else { xf86DrvMsg(pScreen->myNum, X_INFO, "Render acceleration is not supported for ATI chips " "earlier than the ATI 3D Rage Pro.\n"); pATI->RenderAccelEnabled = FALSE; } } xf86DrvMsg(pScreen->myNum, X_INFO, "Render acceleration %s\n", pATI->RenderAccelEnabled ? "enabled" : "disabled"); if (!exaDriverInit(pScreen, pATI->pExa)) { free(pATI->pExa); pATI->pExa = NULL; return FALSE; } return TRUE; } #endif xf86-video-mach64-6.9.5/src/atimach64render.c0000644000175000017500000006267212270010352015353 00000000000000/* * Copyright 2006 George Sapountzis * All Rights Reserved. * * Based on the mach64 DRI and DRM drivers: * Copyright 2000 Gareth Hughes * Copyright 2002-2003 Leif Delgass * All Rights Reserved. * * Based on the ati hw/kdrive driver: * Copyright 2003 Eric Anholt, Anders Carlsson * * Based on the via hw/xfree86 driver: * Copyright 2006 Thomas Hellstrom. All Rights Reserved. * * 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 (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Authors: * George Sapountzis */ /* * Interesting cases for RENDER acceleration: * * cursor : ARGB8888 (24x24) Over * RGB565 * * glyph : A8 (9x10) Add * A8 (420x13) * glyph set : ARGB8888 (1x1 R) In * A8 (420x13) Over * RGB565 * * shadow : ARGB8888 (1x1 R) In * A8 (670x362) Over * RGB565 * translucent : RGB565 (652x344) In * A8 (1x1 R) Over * RGB565 * * In all interesting cases one of src/mask is "1x1 R". */ /* * Assumptions and limitations of mach64 RENDER acceleration: * * RENDER acceleration is supported for GTPRO and later chips using the 3D * triangle setup, i.e. the VERTEX_? registers (see the dri driver). According * to atiregs.h, SCALE_3D_CNTL and TEX_?_OFF appear in GT, thus chips as old * as GT should be capable of RENDER acceleration, using the S_?_INC, T_?_INC * registers for texture mapping (see the directfb driver). * * GTPRO added a triangle setup engine and multitexturing. However, it seems * that none of the 8bpp mach64 formats expands the 8bit value to the alpha * channel in texture mapping, RGB8 appears to expand to (I,I,I,0). This makes * GTPRO multitexturing unsuitable for emulating the IN operation. Moreover, * it seems that GT/GTPRO has a muxltiplexer instead of a blender for computing * the final alpha channel which forbids destinations with an alpha channel and * generic two-pass compositing. * * A texture unit combines the fragment color (VERTEX_?_ARGB) coming in from * triangle rasterization with the texel from the texture according to the * texture environment (TEX_LIGHT_FCN_). "1x1 R" textures may come in as frag- * ment colors, eliminating the need for multitexturing in all interesting * cases (via also uses this optimization). * * Texture registers are saved/restored and cached (see atimach64.c). TEX_CNTL * cannot be cached because it flushes the texture cache. TEX_?_OFF are also * not cached because I am not sure whether writing at some offset register * affects the value at another offset. * * Vertex registers are not saved/restored. This shouldn't be a problem though * either for DRI or VT switch because vertex registers are set and used within * a signle acceleration hook. Synchronization between the DDX and DRI is based * on calling ATIDRISync() at the beginning of each DDX acceleration hook, * which suggests the assumption that individual acceleration hooks are not * interrupted. */ #include #include /* * Helper functions copied from exa and via. */ #if 0 static void Mach64ExaCompositePictDesc(PicturePtr pict, char *string, int n) { char format[20]; char size[20]; if (!pict) { snprintf(string, n, "None"); return; } switch (pict->format) { case PICT_x8r8g8b8: snprintf(format, 20, "RGB8888 "); break; case PICT_x8b8g8r8: snprintf(format, 20, "BGR8888 "); break; case PICT_a8r8g8b8: snprintf(format, 20, "ARGB8888"); break; case PICT_a8b8g8r8: snprintf(format, 20, "ABGR8888"); break; case PICT_r5g6b5: snprintf(format, 20, "RGB565 "); break; case PICT_x1r5g5b5: snprintf(format, 20, "RGB555 "); break; case PICT_a8: snprintf(format, 20, "A8 "); break; case PICT_a1: snprintf(format, 20, "A1 "); break; default: snprintf(format, 20, "0x%x", (int)pict->format); break; } snprintf(size, 20, "%dx%d%s%s", pict->pDrawable->width, pict->pDrawable->height, pict->repeat ? " R" : "", pict->componentAlpha ? " C" : "" ); snprintf(string, n, "%-10p: fmt %s (%s)", (void *)pict->pDrawable, format, size); } static void Mach64ExaPrintComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, char *string) { char sop[20]; char srcdesc[40], maskdesc[40], dstdesc[40]; switch (op) { case PictOpSrc: sprintf(sop, "Src"); break; case PictOpOver: sprintf(sop, "Over"); break; case PictOpInReverse: sprintf(sop, "InR"); break; case PictOpOutReverse: sprintf(sop, "OutR"); break; case PictOpAdd: sprintf(sop, "Add"); break; default: sprintf(sop, "0x%x", (int)op); break; } Mach64ExaCompositePictDesc(pSrc, srcdesc, 40); Mach64ExaCompositePictDesc(pMask, maskdesc, 40); Mach64ExaCompositePictDesc(pDst, dstdesc, 40); sprintf(string, "op %s, \n" " src %s\n" " mask %s\n" " dst %s\n", sop, srcdesc, maskdesc, dstdesc); } #endif static __inline__ CARD32 viaBitExpandHelper(CARD32 component, CARD32 bits) { CARD32 tmp, mask; mask = (1 << (8 - bits)) - 1; tmp = component << (8 - bits); return ((component & 1) ? tmp | mask : tmp); } static __inline__ void Mach64PixelARGB(PixmapPtr pPixmap, CARD32 format, CARD32 *argb) { CARD32 pixel; CARD8 comp; int bits, shift; pixel = exaGetPixmapFirstPixel(pPixmap); /* exaGetRGBAFromPixel()/viaPixelARGB8888() */ switch (PICT_FORMAT_TYPE(format)) { case PICT_TYPE_A: shift = 0; bits = PICT_FORMAT_A(format); comp = (pixel >> shift) & ((1 << bits) - 1); comp = viaBitExpandHelper(comp, bits); *argb = comp << 24; break; case PICT_TYPE_ARGB: shift = 0; bits = PICT_FORMAT_B(format); comp = (pixel >> shift) & ((1 << bits) - 1); comp = viaBitExpandHelper(comp, bits); *argb = comp; shift += bits; bits = PICT_FORMAT_G(format); comp = (pixel >> shift) & ((1 << bits) - 1); comp = viaBitExpandHelper(comp, bits); *argb |= comp << 8; shift += bits; bits = PICT_FORMAT_R(format); comp = (pixel >> shift) & ((1 << bits) - 1); comp = viaBitExpandHelper(comp, bits); *argb |= comp << 16; shift += bits; bits = PICT_FORMAT_A(format); if (bits) { comp = (pixel >> shift) & ((1 << bits) - 1); comp = viaBitExpandHelper(comp, bits); } else { comp = 0xff; } *argb |= comp << 24; break; case PICT_TYPE_ABGR: break; default: break; } } /* * RENDER acceleration for mach64 */ typedef struct { Bool supported; CARD32 scale_3d_cntl; } Mach64BlendOp; static Mach64BlendOp Mach64BlendOps[] = { /* Clear */ {1, MACH64_ALPHA_BLEND_SRC_ZERO | MACH64_ALPHA_BLEND_DST_ZERO}, /* Src */ {1, MACH64_ALPHA_BLEND_SRC_ONE | MACH64_ALPHA_BLEND_DST_ZERO}, /* Dst */ {1, MACH64_ALPHA_BLEND_SRC_ZERO | MACH64_ALPHA_BLEND_DST_ONE}, /* Over */ {1, MACH64_ALPHA_BLEND_SRC_ONE | MACH64_ALPHA_BLEND_DST_INVSRCALPHA}, /* OverReverse */ {1, MACH64_ALPHA_BLEND_SRC_INVDSTALPHA | MACH64_ALPHA_BLEND_DST_ONE}, /* In */ {1, MACH64_ALPHA_BLEND_SRC_DSTALPHA | MACH64_ALPHA_BLEND_DST_ZERO}, /* InReverse */ {1, MACH64_ALPHA_BLEND_SRC_ZERO | MACH64_ALPHA_BLEND_DST_SRCALPHA}, /* Out */ {1, MACH64_ALPHA_BLEND_SRC_INVDSTALPHA | MACH64_ALPHA_BLEND_DST_ZERO}, /* OutReverse */ {1, MACH64_ALPHA_BLEND_SRC_ZERO | MACH64_ALPHA_BLEND_DST_INVSRCALPHA}, /* Atop */ {0, MACH64_ALPHA_BLEND_SRC_DSTALPHA | MACH64_ALPHA_BLEND_DST_INVSRCALPHA}, /* AtopReverse */ {0, MACH64_ALPHA_BLEND_SRC_INVDSTALPHA | MACH64_ALPHA_BLEND_DST_SRCALPHA}, /* Xor */ {1, MACH64_ALPHA_BLEND_SRC_INVDSTALPHA | MACH64_ALPHA_BLEND_DST_INVSRCALPHA}, /* Add */ {1, MACH64_ALPHA_BLEND_SRC_ONE | MACH64_ALPHA_BLEND_DST_ONE} }; #define MACH64_NR_BLEND_OPS \ (sizeof(Mach64BlendOps) / sizeof(Mach64BlendOps[0])) typedef struct { CARD32 pictFormat; CARD32 dstFormat; CARD32 texFormat; } Mach64TexFormat; static Mach64TexFormat Mach64TexFormats[] = { {PICT_a8r8g8b8, -1, MACH64_DATATYPE_ARGB8888}, {PICT_x8r8g8b8, MACH64_DATATYPE_ARGB8888, MACH64_DATATYPE_ARGB8888}, {PICT_a1r5g5b5, -1, MACH64_DATATYPE_ARGB1555}, {PICT_x1r5g5b5, MACH64_DATATYPE_ARGB1555, MACH64_DATATYPE_ARGB1555}, {PICT_r5g6b5, MACH64_DATATYPE_RGB565, MACH64_DATATYPE_RGB565 }, {PICT_a8, MACH64_DATATYPE_RGB8, MACH64_DATATYPE_RGB8 } }; #define MACH64_NR_TEX_FORMATS \ (sizeof(Mach64TexFormats) / sizeof(Mach64TexFormats[0])) #define MACH64_PICT_IS_1x1R(_pPict) \ ((_pPict) && \ (_pPict)->pDrawable->width == 1 && \ (_pPict)->pDrawable->height == 1 && \ (_pPict)->repeat) /* * CheckComposite hook helper functions. */ static __inline__ Bool Mach64GetOrder(int val, int *shift) { *shift = 0; while (val > (1 << *shift)) (*shift)++; return (val == (1 << *shift)); } static Bool Mach64CheckTexture(PicturePtr pPict) { int h,w; int l2w, l2h, level, i; if (pPict->pDrawable == NULL) return FALSE; w = pPict->pDrawable->width; h = pPict->pDrawable->height; for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) { if (Mach64TexFormats[i].pictFormat == pPict->format) break; } if (i == MACH64_NR_TEX_FORMATS) MACH64_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); /* l2w equals l2p (pitch) for all interesting cases (w >= 64) */ Mach64GetOrder(w, &l2w); Mach64GetOrder(h, &l2h); level = (l2w > l2h) ? l2w : l2h; if (level > 10) MACH64_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); return TRUE; } /* * CheckComposite acceleration hook. */ Bool Mach64CheckComposite ( int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture ) { Bool src_solid, mask_solid, mask_comp, op_comp; int i; if (op >= MACH64_NR_BLEND_OPS || !Mach64BlendOps[op].supported) return FALSE; if (!Mach64CheckTexture(pSrcPicture)) return FALSE; if (pMaskPicture && !Mach64CheckTexture(pMaskPicture)) return FALSE; /* Check destination format */ for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) { if (Mach64TexFormats[i].pictFormat == pDstPicture->format) break; } if (i == MACH64_NR_TEX_FORMATS || Mach64TexFormats[i].dstFormat == -1) MACH64_FALLBACK(("Unsupported dst format 0x%x\n", (int)pDstPicture->format)); /* Check that A8 src/dst appears only as "A8 ADD A8" */ if (pDstPicture->format == PICT_a8) { if (pMaskPicture || pSrcPicture->format != PICT_a8 || op != PictOpAdd) MACH64_FALLBACK(("A8 dst with mask or non-A8 src.\n")); } if (pDstPicture->format != PICT_a8) { if (pSrcPicture->format == PICT_a8) MACH64_FALLBACK(("A8 src with non-A8 dst.\n")); } /* Check that one of src/mask can come in as the fragment color. */ src_solid = MACH64_PICT_IS_1x1R(pSrcPicture); mask_solid = MACH64_PICT_IS_1x1R(pMaskPicture); mask_comp = pMaskPicture && pMaskPicture->componentAlpha; op_comp = op == PictOpAdd || op == PictOpInReverse || op == PictOpOutReverse; if (mask_solid && src_solid) MACH64_FALLBACK(("Bad one-pixel IN composite operation.\n")); if (pMaskPicture) { if (!mask_solid && !src_solid) MACH64_FALLBACK(("Multitexturing required.\n")); if (!mask_solid && !op_comp) MACH64_FALLBACK(("Non-solid mask.\n")); if (mask_comp && !src_solid) MACH64_FALLBACK(("Component-alpha mask.\n")); if (!mask_comp && pMaskPicture->format != PICT_a8) MACH64_FALLBACK(("Non-A8 mask.\n")); if (mask_comp && pMaskPicture->format != PICT_a8r8g8b8) MACH64_FALLBACK(("Non-ARGB mask.\n")); } return TRUE; } /* * This function setups the fragment color from a solid pixmap in the presence * of a mask. */ static __inline__ Bool Mach64PrepareMask ( Mach64ContextRegs3D *m3d, int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PixmapPtr pSrc, PixmapPtr pMask ) { Bool mask_solid, src_solid; CARD32 argb = 0; mask_solid = MACH64_PICT_IS_1x1R(pMaskPicture); src_solid = MACH64_PICT_IS_1x1R(pSrcPicture); if (mask_solid) { Mach64PixelARGB(pMask, pMaskPicture->format, &argb); argb >>= 24; argb &= 0xff; m3d->frag_mask = TRUE; m3d->frag_color = (argb << 24) | (argb << 16) | (argb << 8) | argb; return TRUE; } if (src_solid) { /* We can only handle cases where either the src color (e.g. ADD) or * the src alpha (e.g. IN_REV, OUT_REV) is used but not both. * * (ARGB8888 IN A8) OVER RGB565 is implemented as: * (ARGB8888 IN A8) ADD ((ARGB8888 IN A8) OUT_REV RGB565). */ if (op == PictOpInReverse || op == PictOpOutReverse) { Mach64PixelARGB(pSrc, pSrcPicture->format, &argb); argb >>= 24; argb &= 0xff; m3d->frag_src = TRUE; m3d->frag_color = (argb << 24) | (argb << 16) | (argb << 8) | argb; m3d->color_alpha = TRUE; return TRUE; } if (op == PictOpAdd) { Mach64PixelARGB(pSrc, pSrcPicture->format, &argb); m3d->frag_src = TRUE; m3d->frag_color = argb; return TRUE; } } return FALSE; } /* * This function setups the texturing and blending environments. It also * manipulates blend control for non-solid masks. */ static void __inline__ Mach64BlendCntl(Mach64ContextRegs3D *m3d, int op) { m3d->scale_3d_cntl |= MACH64_SCALE_PIX_EXPAND_DYNAMIC_RANGE | MACH64_SCALE_DITHER_2D_TABLE | MACH64_DITHER_INIT_RESET; m3d->scale_3d_cntl |= Mach64BlendOps[op].scale_3d_cntl; if (m3d->color_alpha) { /* A8 uses RGB8 which expands to (I,I,I,0). Thus, we use the color * channels instead of the alpha channel as the alpha factor. We also * use the color channels for ARGB8888 masks with component-alpha. */ CARD32 Ad = m3d->scale_3d_cntl & MACH64_ALPHA_BLEND_DST_MASK; /* InReverse */ if (Ad == MACH64_ALPHA_BLEND_DST_SRCALPHA) { m3d->scale_3d_cntl &= ~MACH64_ALPHA_BLEND_DST_MASK; m3d->scale_3d_cntl |= MACH64_ALPHA_BLEND_DST_SRCCOLOR; } /* OutReverse */ if (Ad == MACH64_ALPHA_BLEND_DST_INVSRCALPHA) { m3d->scale_3d_cntl &= ~MACH64_ALPHA_BLEND_DST_MASK; m3d->scale_3d_cntl |= MACH64_ALPHA_BLEND_DST_INVSRCCOLOR; } } /* Can't color mask and blend at the same time */ m3d->dp_write_mask = 0xffffffff; /* Can't fog and blend at the same time */ m3d->scale_3d_cntl |= MACH64_ALPHA_FOG_EN_ALPHA; /* Enable texture mapping mode */ m3d->scale_3d_cntl |= MACH64_SCALE_3D_FCN_TEXTURE; m3d->scale_3d_cntl |= MACH64_MIP_MAP_DISABLE; /* Setup the texture environment */ m3d->scale_3d_cntl |= MACH64_TEX_LIGHT_FCN_MODULATE; /* Initialize texture unit */ m3d->tex_cntl |= MACH64_TEX_ST_DIRECT | MACH64_TEX_SRC_LOCAL | MACH64_TEX_UNCOMPRESSED | MACH64_TEX_CACHE_FLUSH | MACH64_TEX_CACHE_SIZE_4K; } /* * This function setups the texture unit. */ static Bool Mach64PrepareTexture(PicturePtr pPict, PixmapPtr pPix) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pPix->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); Mach64ContextRegs3D *m3d = &pATI->m3d; CARD32 texFormat; int w = pPict->pDrawable->width; int h = pPict->pDrawable->height; int l2w, l2h, l2p, level, pitch, cpp, i; /* Prepare picture format */ for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) { if (Mach64TexFormats[i].pictFormat == pPict->format) break; } if (i == MACH64_NR_TEX_FORMATS) MACH64_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); texFormat = Mach64TexFormats[i].texFormat; /* Prepare picture size */ cpp = PICT_FORMAT_BPP(pPict->format) / 8; pitch = exaGetPixmapPitch(pPix) / cpp; Mach64GetOrder(w, &l2w); Mach64GetOrder(h, &l2h); Mach64GetOrder(pitch, &l2p); if (pPict->repeat && w == 1 && h == 1) l2p = 0; else if (pPict->repeat) MACH64_FALLBACK(("Repeat not supported for w,h != 1,1\n")); l2w = l2p; level = (l2w > l2h) ? l2w : l2h; m3d->tex_width = (1 << l2w); m3d->tex_height = (1 << l2h); /* Update hw state */ m3d->dp_pix_width |= SetBits(texFormat, DP_SCALE_PIX_WIDTH); m3d->tex_size_pitch = (l2w << 0) | (level << 4) | (l2h << 8); m3d->tex_offset = exaGetPixmapOffset(pPix); if (PICT_FORMAT_A(pPict->format)) m3d->scale_3d_cntl |= MACH64_TEX_MAP_AEN; switch (pPict->filter) { case PictFilterNearest: m3d->scale_3d_cntl |= MACH64_TEX_BLEND_FCN_NEAREST; break; case PictFilterBilinear: /* FIXME */ #if 0 m3d->scale_3d_cntl |= MACH64_TEX_BLEND_FCN_LINEAR; m3d->scale_3d_cntl |= MACH64_BILINEAR_TEX_EN; #endif MACH64_FALLBACK(("Bilinear filter 0x%x\n", pPict->filter)); break; default: MACH64_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } m3d->transform = pPict->transform; return TRUE; } /* * PrepareComposite acceleration hook. */ Bool Mach64PrepareComposite ( int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pDst->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); Mach64ContextRegs3D *m3d = &pATI->m3d; CARD32 dstFormat; int offset, i; ATIDRISync(pScreenInfo); /* Initialize state */ m3d->dp_mix = SetBits(MIX_SRC, DP_BKGD_MIX) | SetBits(MIX_SRC, DP_FRGD_MIX); m3d->dp_src = SetBits(SRC_SCALER_3D, DP_BKGD_SRC) | SetBits(SRC_SCALER_3D, DP_FRGD_SRC) | DP_MONO_SRC_ALLONES; Mach64GetPixmapOffsetPitch(pDst, &m3d->dst_pitch_offset); m3d->scale_3d_cntl = 0; m3d->tex_cntl = 0; m3d->frag_src = FALSE; m3d->frag_mask = FALSE; m3d->frag_color = 0xffffffff; m3d->color_alpha = FALSE; m3d->transform = NULL; /* Compute state */ if (pMaskPicture && !Mach64PrepareMask(m3d, op, pSrcPicture, pMaskPicture, pSrc, pMask)) return FALSE; Mach64BlendCntl(m3d, op); for (i = 0; i < MACH64_NR_TEX_FORMATS; i++) { if (Mach64TexFormats[i].pictFormat == pDstPicture->format) break; } if (i == MACH64_NR_TEX_FORMATS) MACH64_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); dstFormat = Mach64TexFormats[i].dstFormat; m3d->dp_pix_width = SetBits(dstFormat, DP_DST_PIX_WIDTH) | SetBits(dstFormat, DP_SRC_PIX_WIDTH) | SetBits(dstFormat, DP_HOST_PIX_WIDTH); if (!m3d->frag_src) { if (!Mach64PrepareTexture(pSrcPicture, pSrc)) return FALSE; } if (pMaskPicture && !m3d->frag_mask) { if (!Mach64PrepareTexture(pMaskPicture, pMask)) return FALSE; } offset = TEX_LEVEL(m3d->tex_size_pitch); /* Emit state */ ATIMach64WaitForFIFO(pATI, 12); outf(DP_SRC, m3d->dp_src); outf(DP_MIX, m3d->dp_mix); outf(CLR_CMP_CNTL, CLR_CMP_FN_FALSE); outf(DST_CNTL, DST_X_DIR | DST_Y_DIR); outf(DST_OFF_PITCH, m3d->dst_pitch_offset); outf(SCALE_3D_CNTL, m3d->scale_3d_cntl); outf(DP_WRITE_MASK, m3d->dp_write_mask); outf(DP_PIX_WIDTH, m3d->dp_pix_width); outf(SETUP_CNTL, 0); outf(TEX_SIZE_PITCH, m3d->tex_size_pitch); outf(TEX_CNTL, m3d->tex_cntl); outf(TEX_0_OFF + offset, m3d->tex_offset); return TRUE; } /* * Vertex format, setup and emission. */ typedef struct { float s0; /* normalized texture coords */ float t0; float x; /* quarter-pixels */ float y; CARD32 argb; /* fragment color */ } Mach64Vertex; #define VTX_SET(_v, _col, _dstX, _dstY, _srcX, _dx, _srcY, _dy) \ do { \ _v.s0 = ((float)(_srcX) + _dx) / m3d->tex_width; \ _v.t0 = ((float)(_srcY) + _dy) / m3d->tex_height; \ _v.x = ((float)(_dstX) * 4.0); \ _v.y = ((float)(_dstY) * 4.0); \ _v.argb = _col; \ } while (0) static __inline__ CARD32 FVAL(float f) { union { float f; CARD32 c; } fc; fc.f = f; return fc.c; } #define VTX_OUT(_v, n) \ do { \ float w = 1.0; \ CARD32 z = 0xffff << 15; \ CARD32 x_y = ((CARD16)_v.x << 16) | \ ((CARD16)_v.y & 0xffff); \ \ ATIMach64WaitForFIFO(pATI, 6); \ outf(VERTEX_##n##_S, FVAL(_v.s0)); \ outf(VERTEX_##n##_T, FVAL(_v.t0)); \ outf(VERTEX_##n##_W, FVAL(w)); \ \ outf(VERTEX_##n##_Z, z); \ outf(VERTEX_##n##_ARGB, _v.argb); \ outf(VERTEX_##n##_X_Y, x_y); \ } while (0) /* * Composite acceleration hook. */ void Mach64Composite ( PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h ) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pDst->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); Mach64ContextRegs3D *m3d = &pATI->m3d; Mach64Vertex v0, v1, v2, v3; float ooa; CARD32 col; PictVector v; int srcXend, srcYend; float dxy = 0.0, dwh = 0.0; ATIDRISync(pScreenInfo); /* Disable clipping if it gets in the way */ ATIMach64ValidateClip(pATI, dstX, dstX + w - 1, dstY, dstY + h - 1); /* Handle solid textures which come in as fragment color */ col = m3d->frag_color; if (m3d->frag_src) { srcX = maskX; srcY = maskY; } /* Handle transform */ srcXend = srcX + w; srcYend = srcY + h; if (m3d->transform) { v.vector[0] = IntToxFixed(srcX); v.vector[1] = IntToxFixed(srcY); v.vector[2] = xFixed1; PictureTransformPoint(m3d->transform, &v); srcX = xFixedToInt(v.vector[0]); srcY = xFixedToInt(v.vector[1]); v.vector[0] = IntToxFixed(srcXend); v.vector[1] = IntToxFixed(srcYend); v.vector[2] = xFixed1; PictureTransformPoint(m3d->transform, &v); srcXend = xFixedToInt(v.vector[0]); srcYend = xFixedToInt(v.vector[1]); #if 0 /* Bilinear needs manipulation of texture coordinates */ if (m3d->scale_3d_cntl & MACH64_BILINEAR_TEX_EN) { dxy = 0.5; dwh = -1.0; } #endif } /* Create vertices in clock-wise order */ VTX_SET(v0, col, dstX, dstY, srcX, dxy, srcY, dxy); VTX_SET(v1, col, dstX + w, dstY, srcXend, dwh, srcY, dxy); VTX_SET(v2, col, dstX + w, dstY + h, srcXend, dwh, srcYend, dwh); VTX_SET(v3, col, dstX, dstY + h, srcX, dxy, srcYend, dwh); /* Setup upper triangle (v0, v1, v3) */ VTX_OUT(v0, 1); VTX_OUT(v1, 2); VTX_OUT(v3, 3); ooa = 1.0 / (w * h); outf(ONE_OVER_AREA, FVAL(ooa)); /* Setup lower triangle (v2, v1, v3) */ VTX_OUT(v2, 1); ooa = -ooa; outf(ONE_OVER_AREA, FVAL(ooa)); } /* * DoneComposite acceleration hook. */ void Mach64DoneComposite(PixmapPtr pDst) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pDst->drawable.pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRISync(pScreenInfo); outf(SCALE_3D_CNTL, 0); } xf86-video-mach64-6.9.5/src/atiadjust.h0000644000175000017500000000264312270010352014360 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIADJUST_H___ #define ___ATIADJUST_H___ 1 #include "atipriv.h" extern void ATIAdjustPreInit(ATIPtr); extern void ATIAdjustFrame(ADJUST_FRAME_ARGS_DECL); #endif /* ___ATIADJUST_H___ */ xf86-video-mach64-6.9.5/src/atiaudio.h0000644000175000017500000000326012270010352014163 00000000000000/* * Copyright 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIAUDIO_H___ #define ___ATIAUDIO_H___ 1 /* * Audio chip definitions. */ typedef enum { ATI_AUDIO_TEA5582, ATI_AUDIO_MONO, ATI_AUDIO_TDA9850, ATI_AUDIO_CXA2020S, ATI_AUDIO_MSP3410D, ATI_AUDIO_CS4236B, ATI_AUDIO_TDA9851, ATI_AUDIO_MSP3415, ATI_AUDIO_MSP3430, ATI_AUDIO_9, ATI_AUDIO_10, ATI_AUDIO_11, ATI_AUDIO_12, ATI_AUDIO_13, ATI_AUDIO_14, ATI_AUDIO_NONE } ATIAudioType; #endif /* ___ATIAUDIO_H___ */ xf86-video-mach64-6.9.5/src/atibank.h0000644000175000017500000000332612270010352014000 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIBANK_H___ #define ___ATIBANK_H___ 1 #include "atipriv.h" #ifndef AVOID_CPIO /* * The CRT save/restore code also needs a separate banking interface that can * used before ATIScreenInit() is called. */ typedef void ATIBankProc(ATIPtr, unsigned int); typedef ATIBankProc *ATIBankProcPtr; extern ATIBankProc ATIx8800SetBank, ATIMach64SetBankPacked, ATIMach64SetBankPlanar; #endif /* AVOID_CPIO */ #endif /* ___ATIBANK_H___ */ xf86-video-mach64-6.9.5/src/atibus.h0000644000175000017500000000326612270010352013661 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIBUS_H___ #if !defined(___ATI_H___) && defined(XFree86Module) # error missing #include "ati.h" before #include "atibus.h" # undef XFree86Module #endif #define ___ATIBUS_H___ 1 #include "atipriv.h" #include "xf86str.h" /* * Definitions related to an adapter's system bus interface. */ typedef enum { ATI_BUS_PCI, ATI_BUS_AGP } ATIBusType; extern const char *ATIBusNames[]; extern int ATIClaimBusSlot(Bool, ATIPtr); #endif /* ___ATIBUS_H___ */ xf86-video-mach64-6.9.5/src/atichip.h0000644000175000017500000000670312270010352014012 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATICHIP_H___ #define ___ATICHIP_H___ 1 #include "atipriv.h" #include "atiregs.h" #include /* * Chip-related definitions. */ typedef enum { ATI_CHIP_NONE = 0, ATI_CHIP_88800GXC, /* Mach64 */ ATI_CHIP_88800GXD, /* Mach64 */ ATI_CHIP_88800GXE, /* Mach64 */ ATI_CHIP_88800GXF, /* Mach64 */ ATI_CHIP_88800GX, /* Mach64 */ ATI_CHIP_88800CX, /* Mach64 */ ATI_CHIP_264CT, /* Mach64 */ ATI_CHIP_264ET, /* Mach64 */ ATI_CHIP_264VT, /* Mach64 */ ATI_CHIP_264GT, /* Mach64 */ ATI_CHIP_264VTB, /* Mach64 */ ATI_CHIP_264GTB, /* Mach64 */ ATI_CHIP_264VT3, /* Mach64 */ ATI_CHIP_264GTDVD, /* Mach64 */ ATI_CHIP_264LT, /* Mach64 */ ATI_CHIP_264VT4, /* Mach64 */ ATI_CHIP_264GT2C, /* Mach64 */ ATI_CHIP_264GTPRO, /* Mach64 */ ATI_CHIP_264LTPRO, /* Mach64 */ ATI_CHIP_264XL, /* Mach64 */ ATI_CHIP_MOBILITY, /* Mach64 */ ATI_CHIP_Mach64, /* Last among Mach64's */ } ATIChipType; /* * Foundry codes for 264xT's. */ typedef enum { ATI_FOUNDRY_SGS, /* SGS-Thompson */ ATI_FOUNDRY_NEC, /* NEC */ ATI_FOUNDRY_KSC, /* KSC (?) */ ATI_FOUNDRY_UMC, /* United Microelectronics Corporation */ ATI_FOUNDRY_TSMC, /* Taiwan Semiconductor Manufacturing Company */ ATI_FOUNDRY_5, ATI_FOUNDRY_6, ATI_FOUNDRY_UMCA /* UMC alternate */ } ATIFoundryType; extern const char *ATIFoundryNames[]; extern void ATIMach64ChipID(ATIPtr, const CARD16); #define OldChipID(_1, _0) \ (SetBits(_0 - 'A', CHIP_CODE_0) | SetBits(_1 - 'A', CHIP_CODE_1)) #define NewChipID(_1, _0) \ (SetBits(_0, CFG_CHIP_TYPE0) | SetBits(_1, CFG_CHIP_TYPE1)) #define OldToNewChipID(_ChipID) \ (SetBits(GetBits(_ChipID, CHIP_CODE_0) + 'A', CFG_CHIP_TYPE0) | \ SetBits(GetBits(_ChipID, CHIP_CODE_1) + 'A', CFG_CHIP_TYPE1)) #define NewToOldChipID(_ChipID) \ (SetBits(GetBits(_ChipID, CFG_CHIP_TYPE0) - 'A', CHIP_CODE_0) | \ (SetBits(GetBits(_ChipID, CFG_CHIP_TYPE1) - 'A', CHIP_CODE_1)) #endif /* ___ATICHIP_H___ */ xf86-video-mach64-6.9.5/src/aticlock.h0000644000175000017500000000454312270010352014162 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATICLOCK_H___ #define ___ATICLOCK_H___ 1 #include "atipriv.h" #include "xf86str.h" /* * Definitions related to programmable clock generators. */ typedef enum { ATI_CLOCK_UNKNOWN = -1, ATI_CLOCK_FIXED = 0, /* Further described by ATIClockType */ ATI_CLOCK_ICS2595, ATI_CLOCK_STG1703, ATI_CLOCK_CH8398, ATI_CLOCK_INTERNAL, ATI_CLOCK_ATT20C408, ATI_CLOCK_IBMRGB514, ATI_CLOCK_MAX /* Must be last */ } ATIProgrammableClockType; typedef struct { CARD16 MinN, MaxN; /* Feedback divider and ... */ CARD16 NAdjust; /* ... its adjustment and ... */ CARD16 N1, N2; /* ... its restrictions */ CARD16 MinM, MaxM; /* Reference divider and ... */ CARD16 MAdjust; /* ... its adjustment */ CARD16 NumD, *PostDividers; /* Post-dividers */ const char *ClockName; } ClockRec, *ClockPtr; extern ClockRec ATIClockDescriptors[]; extern void ATIClockPreInit(ScrnInfoPtr, ATIPtr); extern Bool ATIClockCalculate(int, ATIPtr, ATIHWPtr, DisplayModePtr); extern void ATIClockSet(ATIPtr, ATIHWPtr); #endif /* ___ATICLOCK_H___ */ xf86-video-mach64-6.9.5/src/aticonsole.h0000644000175000017500000000335712270010352014533 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATICONSOLE_H___ #define ___ATICONSOLE_H___ 1 #include "atipriv.h" #include "xf86str.h" extern Bool ATISaveScreen(ScreenPtr, int); extern void ATISetDPMSMode(ScrnInfoPtr, int, int); extern Bool ATIEnterGraphics(ScreenPtr, ScrnInfoPtr, ATIPtr); extern void ATILeaveGraphics(ScrnInfoPtr, ATIPtr); extern Bool ATISwitchMode(SWITCH_MODE_ARGS_DECL); extern Bool ATIEnterVT(VT_FUNC_ARGS_DECL); extern void ATILeaveVT(VT_FUNC_ARGS_DECL); extern void ATIFreeScreen(FREE_SCREEN_ARGS_DECL); #endif /* ___ATICONSOLE_H___ */ xf86-video-mach64-6.9.5/src/aticrtc.h0000644000175000017500000000311012270010352014007 00000000000000/* * Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATICRTC_H___ #define ___ATICRTC_H___ 1 /* * CRTC related definitions. */ typedef enum { #ifndef AVOID_CPIO ATI_CRTC_VGA, /* Use VGA CRTC */ ATI_CRTC_8514, /* Use 8514/Mach8/Mach32 accelerator CRTC */ #endif /* AVOID_CPIO */ ATI_CRTC_MACH64 /* Use Mach64 accelerator CRTC */ } ATICRTCType; #endif /* ___ATICRTC_H___ */ xf86-video-mach64-6.9.5/src/aticursor.h0000644000175000017500000000323212270010352014376 00000000000000/* * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATICURSOR_H___ #define ___ATICURSOR_H___ 1 #include "atipriv.h" #include "screenint.h" /* * Cursor related definitions. */ typedef enum { ATI_CURSOR_SOFTWARE, /* Software cursor */ ATI_CURSOR_HARDWARE, /* Hardware cursor provided by CRTC */ ATI_CURSOR_DAC /* Hardware cursor provided by RAMDAC */ } ATICursorType; extern Bool ATIMach64CursorInit(ScreenPtr); #endif /* ___ATICURSOR_H___ */ xf86-video-mach64-6.9.5/src/atidac.h0000644000175000017500000000737512270010352013624 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIDAC_H___ #if !defined(___ATI_H___) && defined(XFree86Module) # error missing #include "ati.h" before #include "atidac.h" # undef XFree86Module #endif #define ___ATIDAC_H___ 1 #include "aticrtc.h" #include "atipriv.h" #include "xf86str.h" #include "colormapst.h" /* * RAMDAC-related definitions. */ #define ATI_DAC_MAX_TYPE MaxBits(DACTYPE) #define ATI_DAC_MAX_SUBTYPE MaxBits(BIOS_INIT_DAC_SUBTYPE) #define ATI_DAC(_Type, _Subtype) (((_Type) << 4) | (_Subtype)) #define ATI_DAC_ATI68830 ATI_DAC(0x0U, 0x0U) #define ATI_DAC_SC11483 ATI_DAC(0x1U, 0x0U) #define ATI_DAC_ATI68875 ATI_DAC(0x2U, 0x0U) #define ATI_DAC_TVP3026_A ATI_DAC(0x2U, 0x7U) #define ATI_DAC_GENERIC ATI_DAC(0x3U, 0x0U) #define ATI_DAC_BT481 ATI_DAC(0x4U, 0x0U) #define ATI_DAC_ATT20C491 ATI_DAC(0x4U, 0x1U) #define ATI_DAC_SC15026 ATI_DAC(0x4U, 0x2U) #define ATI_DAC_MU9C1880 ATI_DAC(0x4U, 0x3U) #define ATI_DAC_IMSG174 ATI_DAC(0x4U, 0x4U) #define ATI_DAC_ATI68860_B ATI_DAC(0x5U, 0x0U) #define ATI_DAC_ATI68860_C ATI_DAC(0x5U, 0x1U) #define ATI_DAC_TVP3026_B ATI_DAC(0x5U, 0x7U) #define ATI_DAC_STG1700 ATI_DAC(0x6U, 0x0U) #define ATI_DAC_ATT20C498 ATI_DAC(0x6U, 0x1U) #define ATI_DAC_STG1702 ATI_DAC(0x7U, 0x0U) #define ATI_DAC_SC15021 ATI_DAC(0x7U, 0x1U) #define ATI_DAC_ATT21C498 ATI_DAC(0x7U, 0x2U) #define ATI_DAC_STG1703 ATI_DAC(0x7U, 0x3U) #define ATI_DAC_CH8398 ATI_DAC(0x7U, 0x4U) #define ATI_DAC_ATT20C408 ATI_DAC(0x7U, 0x5U) #define ATI_DAC_INTERNAL ATI_DAC(0x8U, 0x0U) #define ATI_DAC_IBMRGB514 ATI_DAC(0x9U, 0x0U) #define ATI_DAC_UNKNOWN ATI_DAC((ATI_DAC_MAX_TYPE << 2) + 3, \ ATI_DAC_MAX_SUBTYPE) extern const SymTabRec ATIDACDescriptors[]; #ifdef AVOID_CPIO # define DACDelay /* Nothing */ #else /* AVOID_CPIO */ # define DACDelay \ do \ { \ (void)inb(pATI->CPIO_DAC_WAIT); \ (void)inb(pATI->CPIO_DAC_WAIT); \ } while (0) extern void ATISetDACIOPorts(ATIPtr, ATICRTCType); #endif /* AVOID_CPIO */ extern CARD8 ATIGetDACCmdReg(ATIPtr); extern void ATIDACPreInit(ScrnInfoPtr, ATIPtr, ATIHWPtr); extern void ATIDACSave(ATIPtr, ATIHWPtr); extern void ATIDACSet(ATIPtr, ATIHWPtr); extern void ATILoadPalette(ScrnInfoPtr, int, int *, LOCO *, VisualPtr); #endif /* ___ATIDAC_H___ */ xf86-video-mach64-6.9.5/src/atidga.h0000644000175000017500000000267112270010352013622 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIDGA_H___ #define ___ATIDGA_H___ 1 #ifndef AVOID_DGA #include "atipriv.h" #include "xf86str.h" extern Bool ATIDGAInit(ScreenPtr, ScrnInfoPtr, ATIPtr); #endif /* AVOID_DGA */ #endif /* ___ATIDGA_H___ */ xf86-video-mach64-6.9.5/src/atidri.h0000644000175000017500000000356512270010352013650 00000000000000/* -*- mode: c; c-basic-offset: 3 -*- */ /* * Copyright 2000 Gareth Hughes * All Rights Reserved. * * 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 (including the next * paragraph) 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 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* * Authors: * Gareth Hughes * Leif Delgass */ #ifndef __ATIDRI_H__ #define __ATIDRI_H__ 1 /* DRI driver defaults */ #define ATI_DEFAULT_AGP_SIZE 8 /* MB (must be a power of 2 and > 4MB) */ #define ATI_DEFAULT_AGP_MODE 1 #define ATI_DEFAULT_BUFFER_SIZE 2 /* MB (must be page aligned) */ #define ATI_AGP_MAX_MODE 2 /* Imported from the radeon suspend code writen by cpbotha@ieee.org * to enable suspend/resume support for the mach64 card. */ extern void ATIDRIResume(ScreenPtr pScreen); extern Bool ATIDRIScreenInit(ScreenPtr); extern Bool ATIDRIFinishScreenInit(ScreenPtr); extern void ATIDRICloseScreen(ScreenPtr); #endif /* __ATIDRI_H__ */ xf86-video-mach64-6.9.5/src/atidripriv.h0000644000175000017500000000365712270010352014553 00000000000000/* -*- mode: c; c-basic-offset: 3 -*- */ /* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, * Precision Insight, Inc., Cedar Park, Texas, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * 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 on 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 (including the * next paragraph) 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX * SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /* * Authors: * Gareth Hughes * Leif Delgass */ #ifndef __ATIDRIPRIV_H__ #define __ATIDRIPRIV_H__ 1 #include "GL/glxint.h" #include "GL/glxtokens.h" #define ATI_MAX_DRAWABLES 256 typedef struct { /* Nothing here yet */ int dummy; } ATIConfigPrivRec, *ATIConfigPrivPtr; typedef struct { /* Nothing here yet */ int dummy; } ATIDRIContextRec, *ATIDRIContextPtr; extern void GlxSetVisualConfigs(int, __GLXvisualConfig *, void **); #endif /* __ATIDRIPRIV_H__ */ xf86-video-mach64-6.9.5/src/atidsp.h0000644000175000017500000000302012270010352013642 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIDSP_H___ #define ___ATIDSP_H___ 1 #include "atipriv.h" #include "xf86str.h" extern Bool ATIDSPPreInit(int, ATIPtr); extern void ATIDSPSave(ATIPtr, ATIHWPtr); extern void ATIDSPCalculate(ATIPtr, ATIHWPtr, DisplayModePtr); extern void ATIDSPSet(ATIPtr, ATIHWPtr); #endif /* ___ATIDSP_H___ */ xf86-video-mach64-6.9.5/src/ati.h0000644000175000017500000000256712270010352013152 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATI_H___ #define ___ATI_H___ 1 #include #include "xf86Pci.h" #include "xf86.h" #include "xf86_OSproc.h" #endif /* ___ATI_H___ */ xf86-video-mach64-6.9.5/src/atii2c.h0000644000175000017500000000342012270010352013535 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATII2C_H___ #define ___ATII2C_H___ 1 #include "atipriv.h" #include "xf86str.h" #include "xf86i2c.h" typedef struct _ATII2CRec ATII2CRec, *ATII2CPtr; struct _ATII2CRec { ATIPtr pATI; void (*I2CSetBits) (ATII2CPtr, ATIPtr, CARD32); CARD32 (*I2CGetBits) (ATIPtr); CARD32 SCLDir, SCLGet, SCLSet; CARD32 SDADir, SDAGet, SDASet; CARD32 I2CCur; }; extern void ATII2CPreInit(ScrnInfoPtr, ATIPtr); extern I2CBusPtr ATICreateI2CBusRec(int, ATIPtr, char *); extern void ATII2CFreeScreen(int); #endif /* ___ATII2C_H___ */ xf86-video-mach64-6.9.5/src/atiload.h0000644000175000017500000000261512270010352014004 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATILOAD_H___ #define ___ATILOAD_H___ 1 #include "atipriv.h" #include "xf86str.h" extern pointer ATILoadModules(ScrnInfoPtr, ATIPtr); #endif /* ___ATILOAD_H___ */ xf86-video-mach64-6.9.5/src/atilock.h0000644000175000017500000000257712270010352014024 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATILOCK_H___ #define ___ATILOCK_H___ 1 #include "atipriv.h" extern void ATIUnlock(ATIPtr); extern void ATILock(ATIPtr); #endif /* ___ATILOCK_H___ */ xf86-video-mach64-6.9.5/src/atimach64accel.h0000644000175000017500000000406712270010352015142 00000000000000/* * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIMACH64ACCEL_H___ #define ___ATIMACH64ACCEL_H___ 1 #include "atipriv.h" #ifdef HAVE_XAA_H #include "xaa.h" #endif #include "exa.h" #define ATIMach64MaxX 4095 #define ATIMach64MaxY 16383 #ifdef USE_EXA extern Bool ATIMach64ExaInit(ScreenPtr); #endif #ifdef USE_XAA extern Bool ATIMach64AccelInit(ScreenPtr); #endif extern void ATIMach64Sync(ScrnInfoPtr); /* atimach64accel.c */ extern void ATIMach64ValidateClip(ATIPtr, int, int, int, int); #ifdef USE_EXA /* atimach64render.c */ extern Bool Mach64CheckComposite(int, PicturePtr, PicturePtr, PicturePtr); extern Bool Mach64PrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); extern void Mach64Composite(PixmapPtr, int, int, int, int, int, int, int, int); extern void Mach64DoneComposite(PixmapPtr); #endif #endif /* ___ATIMACH64ACCEL_H___ */ xf86-video-mach64-6.9.5/src/atimach64.h0000644000175000017500000000321412270010352014143 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIMACH64_H___ #define ___ATIMACH64_H___ 1 #include "atipriv.h" extern void ATIMach64PreInit(ScrnInfoPtr, ATIPtr, ATIHWPtr); extern void ATIMach64Save(ATIPtr, ATIHWPtr); extern void ATIMach64Calculate(ATIPtr, ATIHWPtr, DisplayModePtr); extern void ATIMach64Set(ATIPtr, ATIHWPtr); extern void ATIMach64SaveScreen(ATIPtr, int); extern void ATIMach64SetDPMSMode(ScrnInfoPtr, ATIPtr, int); #endif /* ___ATIMACH64_H___ */ xf86-video-mach64-6.9.5/src/atimach64i2c.h0000644000175000017500000000263612270010352014550 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIMACH64I2C_H___ #define ___ATIMACH64I2C_H___ 1 #include "atipriv.h" #include "xf86str.h" extern void ATIMach64I2CPreInit(ScrnInfoPtr, ATIPtr); #endif /* ___ATIMACH64I2C_H___ */ xf86-video-mach64-6.9.5/src/atimach64io.h0000644000175000017500000004317312270010352014503 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Manuel Teira * Leif Delgass */ #ifndef ___ATIMACH64IO_H___ #if !defined(___ATI_H___) && defined(XFree86Module) # error Missing #include "ati.h" before #include "atimach64io.h" # undef XFree86Module #endif #define ___ATIMACH64IO_H___ 1 #include "atiregs.h" #include "atistruct.h" #include "compiler.h" /* * A few important notes on some of the I/O statements provided: * * inl/outl 32-bit R/W through PIO space. The register is specified as the * actual PIO address. These are actually defined in compiler.h. * * inb/outb 8-bit counterparts to inl/outl. * * inm/outm 32-bit R/W through MMIO space. The register is specified as * the actual MMIO offset (with Block 1 following Block 0), which, * in this case, is equivalent to the register's IOPortTag from * atiregs.h. Can be used for those few non-FIFO'ed registers * outside of Block 0's first 256 bytes. inm() can also be used * for FIFO'ed registers if, and only if, it can be guaranteed to * not have been previously FIFO'ed (e.g. when the engine is * idle). pATI->pBlock array elements must have been previously * set up by ATIMapApertures(). * * outf 32-bit write through MMIO cache. Identical to outm() but * intended for FIFO'ed registers. There is no inf() provided. * * inr/outr 32-bit R/W through PIO or MMIO. Which one depends on the * machine architecture. The register is specified as a IOPortTag * from atiregs.h. Can only be used for registers in the first * 256 bytes of MMIO space (in Block 0). Note that all of these * registers are non-FIFO'ed. * * in8/out8 8-bit counterparts to inr/outr. * * For portability reasons, inr/outr/in8/out8 should be used in preference to * inl/outl/inb/outb to/from any register space starting with CRTC_H_TOTAL_DISP * but before DST_OFF_PITCH (in the order defined by atiregs.h). None of * inm/outm/outf should ever be used for these registers. * * outf()'s should be grouped together as much as possible, while respecting * any ordering constraints the engine might impose. Groups larger than 16 * outf()'s should be split up into two or more groups as needed (but not * necessarily wanted). The outf() groups that result should be immediately * preceeded by an ATIMach64WaitForFIFO(n) call, where "n" is the number of * outf()'s in the group with the exception that groups containing a single * outf() should not be thus preceeded. This means "n" should not be less than * 2, nor larger than 16. */ /* * Cave canem (or it WILL bite you): All Mach64 non-VGA registers are * ================================ little-endian, no matter how they are * accessed (nor by what). */ /* I/O decoding definitions */ typedef enum { SPARSE_IO, BLOCK_IO } ATIIODecodingType; #define inm(_Register) \ MMIO_IN32(pATI->pBlock[GetBits(_Register, BLOCK_SELECT)], \ (_Register) & MM_IO_SELECT) #define outm(_Register, _Value) \ MMIO_OUT32(pATI->pBlock[GetBits(_Register, BLOCK_SELECT)], \ (_Register) & MM_IO_SELECT, _Value) #ifdef AVOID_CPIO # define inr(_Register) \ MMIO_IN32(pATI->pBlock[0], (_Register) & MM_IO_SELECT) # define outr(_Register, _Value) \ MMIO_OUT32(pATI->pBlock[0], (_Register) & MM_IO_SELECT, _Value) # define in8(_Register) \ MMIO_IN8(pATI->pBlock[0], \ (_Register) & (MM_IO_SELECT | IO_BYTE_SELECT)) # define out8(_Register, _Value) \ MMIO_OUT8(pATI->pBlock[0], \ (_Register) & (MM_IO_SELECT | IO_BYTE_SELECT), _Value) /* Cause a cpp syntax error if any of these are used */ #undef inb #undef inl #undef outb #undef outl #define inb() /* Nothing */ #define inl() /* Nothing */ #define outb() /* Nothing */ #define outl() /* Nothing */ #else /* AVOID_CPIO */ # define ATIIOPort(_PortTag) \ (((pATI->CPIODecoding == SPARSE_IO) ? \ ((_PortTag) & (SPARSE_IO_SELECT | IO_BYTE_SELECT)) : \ ((_PortTag) & (BLOCK_IO_SELECT | IO_BYTE_SELECT))) | \ pATI->CPIOBase) # define inr(_Register) \ inl(ATIIOPort(_Register)) # define outr(_Register, _Value) \ outl(ATIIOPort(_Register), _Value) # define in8(_Register) \ inb(ATIIOPort(_Register)) # define out8(_Register, _Value) \ outb(ATIIOPort(_Register), _Value) #endif /* AVOID_CPIO */ extern void ATIMach64PollEngineStatus(ATIPtr); /* * MMIO cache definitions. * * Many FIFO'ed registers can be cached by the driver. Registers that qualify * for caching must not contain values that can change without driver * intervention. Thus registers that contain hardware counters, strobe lines, * etc., cannot be cached. This caching is intended to minimise FIFO use. * There is therefore not much point to enable it for non-FIFO'ed registers. * * The cache for a particular 32-bit register is enabled by coding a * CacheRegister() line for that register in the ATIMach64Set() function. The * integrity of the cache for a particular register should be verified by the * ATIMach64Sync() function. This code should be kept in register order, as * defined in atiregs.h. */ #define CacheByte(___Register) pATI->MMIOCached[CacheSlotOf(___Register) >> 3] #define CacheBit(___Register) (0x80U >> (CacheSlotOf(___Register) & 0x07U)) #define RegisterIsCached(__Register) \ (CacheByte(__Register) & CacheBit(__Register)) #define CacheSlot(__Register) pATI->MMIOCache[CacheSlotOf(__Register)] #define CacheRegister(__Register) \ CacheByte(__Register) |= CacheBit(__Register) #define UncacheRegister(__Register) \ CacheByte(__Register) &= ~CacheBit(__Register) /* This would be quite a bit slower as a function */ #define outf(_Register, _Value) \ do \ { \ CARD32 _IOValue = (_Value); \ \ if (!RegisterIsCached(_Register) || \ (_IOValue != CacheSlot(_Register))) \ { \ while (!pATI->nAvailableFIFOEntries--) \ ATIMach64PollEngineStatus(pATI); \ MMIO_OUT32(pATI->pBlock[GetBits(_Register, BLOCK_SELECT)], \ (_Register) & MM_IO_SELECT, _IOValue); \ CacheSlot(_Register) = _IOValue; \ pATI->EngineIsBusy = TRUE; \ } \ } while (0) /* * This is no longer as critical, especially for _n == 1. However, * there is still a need to ensure _n <= pATI->nFIFOEntries. */ #define ATIMach64WaitForFIFO(_pATI, _n) \ while ((_pATI)->nAvailableFIFOEntries < (_n)) \ ATIMach64PollEngineStatus(_pATI) #define ATIMach64WaitForIdle(_pATI) \ while ((_pATI)->EngineIsBusy) \ ATIMach64PollEngineStatus(_pATI) #ifdef XF86DRI_DEVEL /* * DRI Sync and Lock definitions. */ #define ATIDRIWaitForIdle(_pATI) \ do { \ ATIDRIServerInfoPtr pATIDRIServer = _pATI->pDRIServerInfo; \ int ret; \ \ if (pATIDRIServer && pATI->directRenderingEnabled) { \ /* Wait for DMA to complete */ \ ret = drmCommandNone(_pATI->drmFD, DRM_MACH64_IDLE); \ if (ret) { \ drmCommandNone(_pATI->drmFD, DRM_MACH64_RESET); \ } \ \ /* Force updating of FIFO entry counters */ \ pATI->EngineIsBusy = TRUE; \ ATIMach64PollEngineStatus(_pATI); \ } else { \ ATIMach64WaitForIdle(_pATI); \ } \ } while (0) /* * Set upon DRISwapContext and when DRI accesses the GPU engine * from within the server, see DRIInitBuffers/DRIMoveBuffers. * * Forces the EXA/XAA software paths to sync before accessing the FB memory. */ static __inline__ void ATIDRIMarkSyncInt(ScrnInfoPtr _pScrInfo) { ATIPtr _pATI=ATIPTR(_pScrInfo); #ifdef USE_EXA if (_pATI->useEXA) exaMarkSync(_pScrInfo->pScreen); #endif #ifdef USE_XAA if (!_pATI->useEXA) SET_SYNC_FLAG(_pATI->pXAAInfo); /* NeedToSync = TRUE */ #endif } /* * Set upon DRISwapContext and when the server acquires the DRI lock. * * Forces the EXA/XAA accelerated paths to sync before accessing the GPU engine. */ static __inline__ void ATIDRIMarkSyncExt(ScrnInfoPtr _pScrInfo) { ATIPtr _pATI=ATIPTR(_pScrInfo); _pATI->NeedDRISync = TRUE; } static __inline__ void ATIDRISync(ScrnInfoPtr _pScrInfo) { ATIPtr _pATI=ATIPTR(_pScrInfo); #ifdef USE_EXA if (_pATI->directRenderingEnabled && _pATI->pExa) { if (_pATI->NeedDRISync) exaWaitSync(_pScrInfo->pScreen); } #endif #ifdef USE_XAA if (_pATI->directRenderingEnabled && _pATI->pXAAInfo) { if (_pATI->NeedDRISync) (*_pATI->pXAAInfo->Sync)(_pScrInfo); } #endif } #define ATIDRILock(_pScrInfo) \ do \ { \ ATIPtr _pATI=ATIPTR(_pScrInfo); \ if (_pATI->directRenderingEnabled) \ { \ DRILock(_pScrInfo->pScreen, 0); \ ATIDRIMarkSyncExt(_pScrInfo); \ } \ } while (0) #define ATIDRIUnlock(_pScrInfo) \ do \ { \ ATIPtr _pATI=ATIPTR(_pScrInfo); \ if (_pATI->directRenderingEnabled) \ { \ DRIUnlock(_pScrInfo->pScreen); \ } \ } while (0) #else /* XF86DRI_DEVEL */ #define ATIDRIWaitForIdle(_pATI) #define ATIDRILock(_pScrInfo) #define ATIDRIUnlock(_pScrInfo) #define ATIDRISync(_pScrInfo) #endif /* XF86DRI_DEVEL */ /* * An outf() variant to write two registers such that the second register is * is always written whenever either is to be changed. */ #define outq(_Register1, _Register2, _Value1, _Value2) \ do \ { \ CARD32 _IOValue1 = (_Value1), \ _IOValue2 = (_Value2); \ \ if (!RegisterIsCached(_Register1) || \ (_IOValue1 != CacheSlot(_Register1))) \ { \ ATIMach64WaitForFIFO(pATI, 2); \ pATI->nAvailableFIFOEntries -= 2; \ MMIO_OUT32(pATI->pBlock[GetBits(_Register1, BLOCK_SELECT)], \ (_Register1) & MM_IO_SELECT, _IOValue1); \ MMIO_OUT32(pATI->pBlock[GetBits(_Register2, BLOCK_SELECT)], \ (_Register2) & MM_IO_SELECT, _IOValue2); \ CacheSlot(_Register1) = _IOValue1; \ CacheSlot(_Register2) = _IOValue2; \ pATI->EngineIsBusy = TRUE; \ } \ else if (!RegisterIsCached(_Register2) || \ (_IOValue2 != CacheSlot(_Register2))) \ { \ while (!pATI->nAvailableFIFOEntries--) \ ATIMach64PollEngineStatus(pATI); \ MMIO_OUT32(pATI->pBlock[GetBits(_Register2, BLOCK_SELECT)], \ (_Register2) & MM_IO_SELECT, _IOValue2); \ CacheSlot(_Register2) = _IOValue2; \ pATI->EngineIsBusy = TRUE; \ } \ } while (0) extern void ATIMach64AccessPLLReg(ATIPtr, const CARD8, const Bool); #define ATIMach64GetPLLReg(_Index) \ ( \ ATIMach64AccessPLLReg(pATI, _Index, FALSE), \ in8(CLOCK_CNTL + 2) \ ) #define ATIMach64PutPLLReg(_Index, _Value) \ do \ { \ ATIMach64AccessPLLReg(pATI, _Index, TRUE); \ out8(CLOCK_CNTL + 2, _Value); \ } while (0) #define ATIMach64GetLCDReg(_Index) \ ( \ out8(LCD_INDEX, SetBits(_Index, LCD_REG_INDEX)), \ inr(LCD_DATA) \ ) #define ATIMach64PutLCDReg(_Index, _Value) \ do \ { \ out8(LCD_INDEX, SetBits(_Index, LCD_REG_INDEX)); \ outr(LCD_DATA, _Value); \ } while (0) #define ATIMach64GetTVReg(_Index) \ ( \ out8(TV_OUT_INDEX, SetBits(_Index, TV_REG_INDEX)), \ inr(TV_OUT_DATA) \ ) #define ATIMach64PutTVReg(_Index, _Value) \ do \ { \ out8(TV_OUT_INDEX, SetBits(_Index, TV_REG_INDEX)); \ outr(TV_OUT_DATA, _Value); \ } while (0) /* * Block transfer definitions. */ #if defined(GCCUSESGAS) && \ (defined(i386) || defined(__i386) || defined(__i386__)) #define ATIMove32(_pDst, _pSrc, _nCount) \ do \ { \ long d0, d1, d2; \ __asm__ __volatile__ \ ( \ "cld\n\t" \ "rep ; movsl" \ : "=&c" (d0), \ "=&D" (d1), \ "=&S" (d2) \ : "0" (_nCount), \ "1" (_pDst), \ "2" (_pSrc) \ : "memory" \ ); \ } while (0) #endif /* * Return the MMIO address of register, used for HOST_DATA_X only. */ #define ATIHostDataAddr(_Register) \ ((CARD8 *)pATI->pBlock[GetBits(_Register, BLOCK_SELECT)] + \ ((_Register) & MM_IO_SELECT)) #endif /* ___ATIMACH64IO_H___ */ xf86-video-mach64-6.9.5/src/atimach64probe.h0000644000175000017500000000262512270010352015200 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIMACH64PROBE_H___ #define ___ATIMACH64PROBE_H___ 1 #include "xf86str.h" extern DriverRec MACH64; extern SymTabRec Mach64Chipsets[]; #endif /* ___ATIMACH64PROBE_H___ */ xf86-video-mach64-6.9.5/src/atimach64version.h0000644000175000017500000000450512270010352015555 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _MACH64_VERSION_H_ #define _MACH64_VERSION_H_ 1 #undef MACH64_NAME #undef MACH64_DRIVER_NAME #undef MACH64_VERSION_MAJOR #undef MACH64_VERSION_MINOR #undef MACH64_VERSION_PATCH #undef MACH64_VERSION_CURRENT #undef MACH64_VERSION_EVALUATE #undef MACH64_VERSION_STRINGIFY #undef MACH64_VERSION_NAME #define MACH64_NAME "MACH64" #define MACH64_DRIVER_NAME "mach64" #define MACH64_VERSION_MAJOR 6 #define MACH64_VERSION_MINOR 7 #define MACH64_VERSION_PATCH 0 #ifndef MACH64_VERSION_EXTRA #define MACH64_VERSION_EXTRA "" #endif #define MACH64_VERSION_CURRENT \ ((MACH64_VERSION_MAJOR << 20) | \ (MACH64_VERSION_MINOR << 10) | \ (MACH64_VERSION_PATCH)) #define MACH64_VERSION_EVALUATE(__x) #__x #define MACH64_VERSION_STRINGIFY(_x) MACH64_VERSION_EVALUATE(_x) #define MACH64_VERSION_NAME \ MACH64_VERSION_STRINGIFY(MACH64_VERSION_MAJOR) "." \ MACH64_VERSION_STRINGIFY(MACH64_VERSION_MINOR) "." \ MACH64_VERSION_STRINGIFY(MACH64_VERSION_MINOR) MACH64_VERSION_EXTRA #endif /* _MACH64_VERSION_H_ */ xf86-video-mach64-6.9.5/src/atimode.h0000644000175000017500000000311012270010352014000 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIMODE_H___ #define ___ATIMODE_H___ 1 #include "atipriv.h" #include "xf86str.h" extern void ATIModePreInit(ScrnInfoPtr, ATIPtr, ATIHWPtr); extern void ATIModeSave(ScrnInfoPtr, ATIPtr, ATIHWPtr); extern Bool ATIModeCalculate(int, ATIPtr, ATIHWPtr, DisplayModePtr); extern void ATIModeSet(ScrnInfoPtr, ATIPtr, ATIHWPtr); #endif /* ___ATIMODE_H___ */ xf86-video-mach64-6.9.5/src/atioption.h0000644000175000017500000000545312270010352014400 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Leif Delgass */ #ifndef ___ATIOPTION_H___ #define ___ATIOPTION_H___ 1 #include "xf86str.h" /* * Documented XF86Config options. */ typedef enum { ATI_OPTION_PROBE_SPARSE, ATI_OPTION_ACCEL, ATI_OPTION_CRT_DISPLAY, ATI_OPTION_CSYNC, ATI_OPTION_HWCURSOR, #ifdef XF86DRI_DEVEL ATI_OPTION_IS_PCI, ATI_OPTION_DMA_MODE, ATI_OPTION_AGP_MODE, ATI_OPTION_AGP_SIZE, ATI_OPTION_LOCAL_TEXTURES, ATI_OPTION_BUFFER_SIZE, #endif /* XF86DRI_DEVEL */ #ifdef TV_OUT ATI_OPTION_TV_OUT, ATI_OPTION_TV_STD, #endif /* TV_OUT */ ATI_OPTION_MMIO_CACHE, ATI_OPTION_TEST_MMIO_CACHE, ATI_OPTION_PANEL_DISPLAY, ATI_OPTION_REFERENCE_CLOCK, ATI_OPTION_SHADOW_FB, ATI_OPTION_SWCURSOR, ATI_OPTION_ACCELMETHOD, ATI_OPTION_RENDER_ACCEL } ATIPublicOptionType; #ifdef TV_OUT #define ATI_TV_STDS_MAX_VALID 11 #define ATI_TV_STDS_NAME_MAXLEN 9 typedef enum { ATI_TV_STD_NTSC = 0, ATI_TV_STD_PAL, ATI_TV_STD_PALM, ATI_TV_STD_PAL60, ATI_TV_STD_NTSCJ, ATI_TV_STD_PALCN, ATI_TV_STD_PALN, ATI_TV_STD_RESERVED1, /* NOT usable */ ATI_TV_STD_RESERVED2, /* NOT usable */ ATI_TV_STD_SCARTPAL, ATI_TV_STD_NONE, /* OK, means no tv standard change requested */ ATI_TV_STD_INVALID /* Invalid tv standard requested */ } ATITVStandard; extern const char * ATITVStandardNames[]; #endif /* TV_OUT */ extern const OptionInfoRec * ATIOptionsWeak(void); extern void ATIProcessOptions(ScrnInfoPtr, ATIPtr); #endif /* ___ATIOPTION_H___ */ xf86-video-mach64-6.9.5/src/atipreinit.h0000644000175000017500000000256612270010352014544 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIPREINIT_H___ #define ___ATIPREINIT_H___ 1 #include "xf86str.h" extern Bool ATIPreInit(ScrnInfoPtr, int); #endif /* ___ATIPREINIT_H___ */ xf86-video-mach64-6.9.5/src/atiprint.h0000644000175000017500000000275212270010352014223 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIPRINT_H___ #define ___ATIPRINT_H___ 1 #include "atipriv.h" #include "xf86str.h" extern void ATIPrintBIOS(const CARD8 *, const unsigned int); extern void ATIPrintRegisters(ATIPtr); extern void ATIPrintMode(DisplayModePtr); #endif /* ___ATIPRINT_H___ */ xf86-video-mach64-6.9.5/src/atipriv.h0000644000175000017500000000262512270010352014046 00000000000000/* * Copyright 1999 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIPRIV_H___ #define ___ATIPRIV_H___ 1 /* Forward pointer definitions */ typedef struct _ATIHWRec *ATIHWPtr; typedef struct _ATIRec *ATIPtr; #endif /* ___ATIPRIV_H___ */ xf86-video-mach64-6.9.5/src/atiprobe.h0000644000175000017500000000257112270010352014175 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIPROBE_H___ #define ___ATIPROBE_H___ 1 #include "xf86str.h" extern Bool ATIMach64ProbeIO(pciVideoPtr, ATIPtr); #endif /* ___ATIPROBE_H___ */ xf86-video-mach64-6.9.5/src/atiregs.h0000644000175000017500000032353212270010352014031 00000000000000/* * Copyright 1994 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * Acknowledgements: * Jake Richter, Panacea Inc., Londonderry, New Hampshire, U.S.A. * Kevin E. Martin, martin@cs.unc.edu * Tiago Gons, tiago@comosjn.hobby.nl * Rickard E. Faith, faith@cs.unc.edu * Scott Laird, lair@kimbark.uchicago.edu * * The intent here is to list all I/O ports for VGA (and its predecessors), * ATI VGA Wonder, 8514/A, ATI Mach8, ATI Mach32 and ATI Mach64 video adapters, * not just the ones in use by the ATI driver. */ #ifndef ___ATIREGS_H___ #define ___ATIREGS_H___ 1 #include "atiutil.h" /* I/O decoding definitions */ #define SPARSE_IO_BASE 0x03fcu #define SPARSE_IO_SELECT 0xfc00u #define BLOCK_IO_BASE 0xff00u #define BLOCK_IO_SELECT 0x00fcu #define MM_IO_SELECT 0x03fcu #define BLOCK_SELECT 0x0400u #define DWORD_SELECT (BLOCK_SELECT | MM_IO_SELECT) #define IO_BYTE_SELECT 0x0003u #define SPARSE_IO_PORT (SPARSE_IO_BASE | IO_BYTE_SELECT) #define BLOCK_IO_PORT (BLOCK_IO_BASE | IO_BYTE_SELECT) #define IOPortTag(_SparseIOSelect, _BlockIOSelect) \ (SetBits(_SparseIOSelect, SPARSE_IO_SELECT) | \ SetBits(_BlockIOSelect, DWORD_SELECT)) #define SparseIOTag(_IOSelect) IOPortTag(_IOSelect, 0) #define BlockIOTag(_IOSelect) IOPortTag(0, _IOSelect) /* MDA/[M]CGA/EGA/VGA I/O ports */ #define GENVS 0x0102u /* Write (and Read on uC only) */ #define R_GENLPS 0x03b9u /* Read */ #define GENHP 0x03bfu #define ATTRX 0x03c0u #define ATTRD 0x03c1u #define GENS0 0x03c2u /* Read */ #define GENMO 0x03c2u /* Write */ #define GENENB 0x03c3u /* Read */ #define SEQX 0x03c4u #define SEQD 0x03c5u #define VGA_DAC_MASK 0x03c6u #define VGA_DAC_READ 0x03c7u #define VGA_DAC_WRITE 0x03c8u #define VGA_DAC_DATA 0x03c9u #define R_GENFC 0x03cau /* Read */ /* ? 0x03cbu */ #define R_GENMO 0x03ccu /* Read */ /* ? 0x03cdu */ #define GRAX 0x03ceu #define GRAD 0x03cfu #define GENB 0x03d9u #define GENLPS 0x03dcu /* Write */ #define KCX 0x03ddu #define KCD 0x03deu #define GENENA 0x46e8u /* Write */ /* I/O port base numbers */ #define MonochromeIOBase 0x03b0u #define ColourIOBase 0x03d0u /* Other MDA/[M]CGA/EGA/VGA I/O ports */ /* ?(_IOBase) ((_IOBase) + 0x00u) */ /* CRTX synonym */ /* ?(_IOBase) ((_IOBase) + 0x01u) */ /* CRTD synonym */ /* ?(_IOBase) ((_IOBase) + 0x02u) */ /* CRTX synonym */ /* ?(_IOBase) ((_IOBase) + 0x03u) */ /* CRTD synonym */ #define CRTX(_IOBase) ((_IOBase) + 0x04u) #define CRTD(_IOBase) ((_IOBase) + 0x05u) /* ?(_IOBase) ((_IOBase) + 0x06u) */ /* ?(_IOBase) ((_IOBase) + 0x07u) */ #define GENMC(_IOBase) ((_IOBase) + 0x08u) /* ?(_IOBase) ((_IOBase) + 0x09u) */ /* R_GENLPS/GENB */ #define GENS1(_IOBase) ((_IOBase) + 0x0au) /* Read */ #define GENFC(_IOBase) ((_IOBase) + 0x0au) /* Write */ #define GENLPC(_IOBase) ((_IOBase) + 0x0bu) /* ?(_IOBase) ((_IOBase) + 0x0cu) */ /* /GENLPS */ /* ?(_IOBase) ((_IOBase) + 0x0du) */ /* /KCX */ /* ?(_IOBase) ((_IOBase) + 0x0eu) */ /* /KCD */ /* ?(_IOBase) ((_IOBase) + 0x0fu) */ /* GENHP/ */ /* 8514/A VESA approved register definitions */ #define DISP_STAT 0x02e8u /* Read */ #define SENSE 0x0001u /* Presumably belong here */ #define VBLANK 0x0002u #define HORTOG 0x0004u #define H_TOTAL 0x02e8u /* Write */ #define IBM_DAC_MASK 0x02eau #define IBM_DAC_READ 0x02ebu #define IBM_DAC_WRITE 0x02ecu #define IBM_DAC_DATA 0x02edu #define H_DISP 0x06e8u /* Write */ #define H_SYNC_STRT 0x0ae8u /* Write */ #define H_SYNC_WID 0x0ee8u /* Write */ #define HSYNCPOL_POS 0x0000u #define HSYNCPOL_NEG 0x0020u #define H_POLARITY_POS HSYNCPOL_POS /* Sigh */ #define H_POLARITY_NEG HSYNCPOL_NEG /* Sigh */ #define V_TOTAL 0x12e8u /* Write */ #define V_DISP 0x16e8u /* Write */ #define V_SYNC_STRT 0x1ae8u /* Write */ #define V_SYNC_WID 0x1ee8u /* Write */ #define VSYNCPOL_POS 0x0000u #define VSYNCPOL_NEG 0x0020u #define V_POLARITY_POS VSYNCPOL_POS /* Sigh */ #define V_POLARITY_NEG VSYNCPOL_NEG /* Sigh */ #define DISP_CNTL 0x22e8u /* Write */ #define ODDBNKENAB 0x0001u #define MEMCFG_2 0x0000u #define MEMCFG_4 0x0002u #define MEMCFG_6 0x0004u #define MEMCFG_8 0x0006u #define DBLSCAN 0x0008u #define INTERLACE 0x0010u #define DISPEN_NC 0x0000u #define DISPEN_ENAB 0x0020u #define DISPEN_DISAB 0x0040u #define R_H_TOTAL 0x26e8u /* Read */ /* ? 0x2ae8u */ /* ? 0x2ee8u */ /* ? 0x32e8u */ /* ? 0x36e8u */ /* ? 0x3ae8u */ /* ? 0x3ee8u */ #define SUBSYS_STAT 0x42e8u /* Read */ #define VBLNKFLG 0x0001u #define PICKFLAG 0x0002u #define INVALIDIO 0x0004u #define GPIDLE 0x0008u #define MONITORID_MASK 0x0070u /* MONITORID_? 0x0000u */ #define MONITORID_8507 0x0010u #define MONITORID_8514 0x0020u /* MONITORID_? 0x0030u */ /* MONITORID_? 0x0040u */ #define MONITORID_8503 0x0050u #define MONITORID_8512 0x0060u #define MONITORID_8513 0x0060u #define MONITORID_NONE 0x0070u #define _8PLANE 0x0080u #define SUBSYS_CNTL 0x42e8u /* Write */ #define RVBLNKFLG 0x0001u #define RPICKFLAG 0x0002u #define RINVALIDIO 0x0004u #define RGPIDLE 0x0008u #define IVBLNKFLG 0x0100u #define IPICKFLAG 0x0200u #define IINVALIDIO 0x0400u #define IGPIDLE 0x0800u #define CHPTEST_NC 0x0000u #define CHPTEST_NORMAL 0x1000u #define CHPTEST_ENAB 0x2000u #define GPCTRL_NC 0x0000u #define GPCTRL_ENAB 0x4000u #define GPCTRL_RESET 0x8000u #define ROM_PAGE_SEL 0x46e8u /* Write */ #define ADVFUNC_CNTL 0x4ae8u /* Write */ #define DISABPASSTHRU 0x0001u #define CLOKSEL 0x0004u /* ? 0x4ee8u */ #define EXT_CONFIG_0 0x52e8u /* C & T 82C480 */ #define EXT_CONFIG_1 0x56e8u /* C & T 82C480 */ #define EXT_CONFIG_2 0x5ae8u /* C & T 82C480 */ #define EXT_CONFIG_3 0x5ee8u /* C & T 82C480 */ /* ? 0x62e8u */ /* ? 0x66e8u */ /* ? 0x6ae8u */ /* ? 0x6ee8u */ /* ? 0x72e8u */ /* ? 0x76e8u */ /* ? 0x7ae8u */ /* ? 0x7ee8u */ #define CUR_Y 0x82e8u #define CUR_X 0x86e8u #define DESTY_AXSTP 0x8ae8u /* Write */ #define DESTX_DIASTP 0x8ee8u /* Write */ #define ERR_TERM 0x92e8u #define MAJ_AXIS_PCNT 0x96e8u /* Write */ #define GP_STAT 0x9ae8u /* Read */ #define GE_STAT 0x9ae8u /* Alias */ #define DATARDY 0x0100u #define DATA_READY DATARDY /* Alias */ #define GPBUSY 0x0200u #define CMD 0x9ae8u /* Write */ #define WRTDATA 0x0001u #define PLANAR 0x0002u #define LASTPIX 0x0004u #define LINETYPE 0x0008u #define DRAW 0x0010u #define INC_X 0x0020u #define YMAJAXIS 0x0040u #define INC_Y 0x0080u #define PCDATA 0x0100u #define _16BIT 0x0200u #define CMD_NOP 0x0000u #define CMD_OP_MSK 0xf000u #define BYTSEQ 0x1000u #define CMD_LINE 0x2000u #define CMD_RECT 0x4000u #define CMD_RECTV1 0x6000u #define CMD_RECTV2 0x8000u #define CMD_LINEAF 0xa000u #define CMD_BITBLT 0xc000u #define SHORT_STROKE 0x9ee8u /* Write */ #define SSVDRAW 0x0010u #define VECDIR_000 0x0000u #define VECDIR_045 0x0020u #define VECDIR_090 0x0040u #define VECDIR_135 0x0060u #define VECDIR_180 0x0080u #define VECDIR_225 0x00a0u #define VECDIR_270 0x00c0u #define VECDIR_315 0x00e0u #define BKGD_COLOR 0xa2e8u /* Write */ #define FRGD_COLOR 0xa6e8u /* Write */ #define WRT_MASK 0xaae8u /* Write */ #define RD_MASK 0xaee8u /* Write */ #define COLOR_CMP 0xb2e8u /* Write */ #define BKGD_MIX 0xb6e8u /* Write */ /* 0x001fu See MIX_* definitions below */ #define BSS_BKGDCOL 0x0000u #define BSS_FRGDCOL 0x0020u #define BSS_PCDATA 0x0040u #define BSS_BITBLT 0x0060u #define FRGD_MIX 0xbae8u /* Write */ /* 0x001fu See MIX_* definitions below */ #define FSS_BKGDCOL 0x0000u #define FSS_FRGDCOL 0x0020u #define FSS_PCDATA 0x0040u #define FSS_BITBLT 0x0060u #define MULTIFUNC_CNTL 0xbee8u /* Write */ #define MIN_AXIS_PCNT 0x0000u #define SCISSORS_T 0x1000u #define SCISSORS_L 0x2000u #define SCISSORS_B 0x3000u #define SCISSORS_R 0x4000u #define M32_MEM_CNTL 0x5000u #define HORCFG_4 0x0000u #define HORCFG_5 0x0001u #define HORCFG_8 0x0002u #define HORCFG_10 0x0003u #define VRTCFG_2 0x0000u #define VRTCFG_4 0x0004u #define VRTCFG_6 0x0008u #define VRTCFG_8 0x000cu #define BUFSWP 0x0010u #define PATTERN_L 0x8000u #define PATTERN_H 0x9000u #define PIX_CNTL 0xa000u #define PLANEMODE 0x0004u #define COLCMPOP_F 0x0000u #define COLCMPOP_T 0x0008u #define COLCMPOP_GE 0x0010u #define COLCMPOP_LT 0x0018u #define COLCMPOP_NE 0x0020u #define COLCMPOP_EQ 0x0028u #define COLCMPOP_LE 0x0030u #define COLCMPOP_GT 0x0038u #define MIXSEL_FRGDMIX 0x0000u #define MIXSEL_PATT 0x0040u #define MIXSEL_EXPPC 0x0080u #define MIXSEL_EXPBLT 0x00c0u /* ? 0xc2e8u */ /* ? 0xc6e8u */ /* ? 0xcae8u */ /* ? 0xcee8u */ /* ? 0xd2e8u */ /* ? 0xd6e8u */ /* ? 0xdae8u */ /* ? 0xdee8u */ #define PIX_TRANS 0xe2e8u /* ? 0xe6e8u */ /* ? 0xeae8u */ /* ? 0xeee8u */ /* ? 0xf2e8u */ /* ? 0xf6e8u */ /* ? 0xfae8u */ /* ? 0xfee8u */ /* ATI Mach8 & Mach32 register definitions */ #define OVERSCAN_COLOR_8 0x02eeu /* Write */ /* Mach32 */ #define OVERSCAN_BLUE_24 0x02efu /* Write */ /* Mach32 */ #define OVERSCAN_GREEN_24 0x06eeu /* Write */ /* Mach32 */ #define OVERSCAN_RED_24 0x06efu /* Write */ /* Mach32 */ #define CURSOR_OFFSET_LO 0x0aeeu /* Write */ /* Mach32 */ #define CURSOR_OFFSET_HI 0x0eeeu /* Write */ /* Mach32 */ #define CONFIG_STATUS_1 0x12eeu /* Read */ #define CLK_MODE 0x0001u /* Mach8 */ #define BUS_16 0x0002u /* Mach8 */ #define MC_BUS 0x0004u /* Mach8 */ #define EEPROM_ENA 0x0008u /* Mach8 */ #define DRAM_ENA 0x0010u /* Mach8 */ #define MEM_INSTALLED 0x0060u /* Mach8 */ #define ROM_ENA 0x0080u /* Mach8 */ #define ROM_PAGE_ENA 0x0100u /* Mach8 */ #define ROM_LOCATION 0xfe00u /* Mach8 */ #define _8514_ONLY 0x0001u /* Mach32 */ #define BUS_TYPE 0x000eu /* Mach32 */ #define ISA_16_BIT 0x0000u /* Mach32 */ #define EISA 0x0002u /* Mach32 */ #define MICRO_C_16_BIT 0x0004u /* Mach32 */ #define MICRO_C_8_BIT 0x0006u /* Mach32 */ #define LOCAL_386SX 0x0008u /* Mach32 */ #define LOCAL_386DX 0x000au /* Mach32 */ #define LOCAL_486 0x000cu /* Mach32 */ #define PCI 0x000eu /* Mach32 */ #define MEM_TYPE 0x0070u /* Mach32 */ #define CHIP_DIS 0x0080u /* Mach32 */ #define TST_VCTR_ENA 0x0100u /* Mach32 */ #define DACTYPE 0x0e00u /* Mach32 */ #define MC_ADR_DECODE 0x1000u /* Mach32 */ #define CARD_ID 0xe000u /* Mach32 */ #define HORZ_CURSOR_POSN 0x12eeu /* Write */ /* Mach32 */ #define CONFIG_STATUS_2 0x16eeu /* Read */ #define SHARE_CLOCK 0x0001u /* Mach8 */ #define HIRES_BOOT 0x0002u /* Mach8 */ #define EPROM_16_ENA 0x0004u /* Mach8 */ #define WRITE_PER_BIT 0x0008u /* Mach8 */ #define FLASH_ENA 0x0010u /* Mach8 */ #define SLOW_SEQ_EN 0x0001u /* Mach32 */ #define MEM_ADDR_DIS 0x0002u /* Mach32 */ #define ISA_16_ENA 0x0004u /* Mach32 */ #define KOR_TXT_MODE_ENA 0x0008u /* Mach32 */ #define LOCAL_BUS_SUPPORT 0x0030u /* Mach32 */ #define LOCAL_BUS_CONFIG_2 0x0040u /* Mach32 */ #define LOCAL_BUS_RD_DLY_ENA 0x0080u /* Mach32 */ #define LOCAL_DAC_EN 0x0100u /* Mach32 */ #define LOCAL_RDY_EN 0x0200u /* Mach32 */ #define EEPROM_ADR_SEL 0x0400u /* Mach32 */ #define GE_STRAP_SEL 0x0800u /* Mach32 */ #define VESA_RDY 0x1000u /* Mach32 */ #define Z4GB 0x2000u /* Mach32 */ #define LOC2_MDRAM 0x4000u /* Mach32 */ #define VERT_CURSOR_POSN 0x16eeu /* Write */ /* Mach32 */ #define FIFO_TEST_DATA 0x1aeeu /* Read */ /* Mach32 */ #define CURSOR_COLOR_0 0x1aeeu /* Write */ /* Mach32 */ #define CURSOR_COLOR_1 0x1aefu /* Write */ /* Mach32 */ #define HORZ_CURSOR_OFFSET 0x1eeeu /* Write */ /* Mach32 */ #define VERT_CURSOR_OFFSET 0x1eefu /* Write */ /* Mach32 */ #define PCI_CNTL 0x22eeu /* Mach32-PCI */ #define CRT_PITCH 0x26eeu /* Write */ #define CRT_OFFSET_LO 0x2aeeu /* Write */ #define CRT_OFFSET_HI 0x2eeeu /* Write */ #define LOCAL_CNTL 0x32eeu /* Mach32 */ #define FIFO_OPT 0x36eeu /* Write */ /* Mach8 */ #define MISC_OPTIONS 0x36eeu /* Mach32 */ #define W_STATE_ENA 0x0000u /* Mach32 */ #define HOST_8_ENA 0x0001u /* Mach32 */ #define MEM_SIZE_ALIAS 0x000cu /* Mach32 */ #define MEM_SIZE_512K 0x0000u /* Mach32 */ #define MEM_SIZE_1M 0x0004u /* Mach32 */ #define MEM_SIZE_2M 0x0008u /* Mach32 */ #define MEM_SIZE_4M 0x000cu /* Mach32 */ #define DISABLE_VGA 0x0010u /* Mach32 */ #define _16_BIT_IO 0x0020u /* Mach32 */ #define DISABLE_DAC 0x0040u /* Mach32 */ #define DLY_LATCH_ENA 0x0080u /* Mach32 */ #define TEST_MODE 0x0100u /* Mach32 */ #define BLK_WR_ENA 0x0400u /* Mach32 */ #define _64_DRAW_ENA 0x0800u /* Mach32 */ #define FIFO_TEST_TAG 0x3aeeu /* Read */ /* Mach32 */ #define EXT_CURSOR_COLOR_0 0x3aeeu /* Write */ /* Mach32 */ #define EXT_CURSOR_COLOR_1 0x3eeeu /* Write */ /* Mach32 */ #define MEM_BNDRY 0x42eeu /* Mach32 */ #define MEM_PAGE_BNDRY 0x000fu /* Mach32 */ #define MEM_BNDRY_ENA 0x0010u /* Mach32 */ #define SHADOW_CTL 0x46eeu /* Write */ #define CLOCK_SEL 0x4aeeu /* DISABPASSTHRU 0x0001u See ADVFUNC_CNTL */ #define VFIFO_DEPTH_1 0x0100u /* Mach32 */ #define VFIFO_DEPTH_2 0x0200u /* Mach32 */ #define VFIFO_DEPTH_3 0x0300u /* Mach32 */ #define VFIFO_DEPTH_4 0x0400u /* Mach32 */ #define VFIFO_DEPTH_5 0x0500u /* Mach32 */ #define VFIFO_DEPTH_6 0x0600u /* Mach32 */ #define VFIFO_DEPTH_7 0x0700u /* Mach32 */ #define VFIFO_DEPTH_8 0x0800u /* Mach32 */ #define VFIFO_DEPTH_9 0x0900u /* Mach32 */ #define VFIFO_DEPTH_A 0x0a00u /* Mach32 */ #define VFIFO_DEPTH_B 0x0b00u /* Mach32 */ #define VFIFO_DEPTH_C 0x0c00u /* Mach32 */ #define VFIFO_DEPTH_D 0x0d00u /* Mach32 */ #define VFIFO_DEPTH_E 0x0e00u /* Mach32 */ #define VFIFO_DEPTH_F 0x0f00u /* Mach32 */ #define COMPOSITE_SYNC 0x1000u /* ? 0x4eeeu */ #define ROM_ADDR_1 0x52eeu #define BIOS_BASE_SEGMENT 0x007fu /* Mach32 */ /* ? 0xff80u */ /* Mach32 */ #define ROM_ADDR_2 0x56eeu /* Sick ... */ #define SHADOW_SET 0x5aeeu /* Write */ #define MEM_CFG 0x5eeeu /* Mach32 */ #define MEM_APERT_SEL 0x0003u /* Mach32 */ #define MEM_APERT_PAGE 0x000cu /* Mach32 */ #define MEM_APERT_LOC 0xfff0u /* Mach32 */ #define EXT_GE_STATUS 0x62eeu /* Read */ /* Mach32 */ #define HORZ_OVERSCAN 0x62eeu /* Write */ /* Mach32 */ #define VERT_OVERSCAN 0x66eeu /* Write */ /* Mach32 */ #define MAX_WAITSTATES 0x6aeeu #define GE_OFFSET_LO 0x6eeeu /* Write */ #define BOUNDS_LEFT 0x72eeu /* Read */ #define GE_OFFSET_HI 0x72eeu /* Write */ #define BOUNDS_TOP 0x76eeu /* Read */ #define GE_PITCH 0x76eeu /* Write */ #define BOUNDS_RIGHT 0x7aeeu /* Read */ #define EXT_GE_CONFIG 0x7aeeu /* Write */ /* Mach32 */ #define MONITOR_ALIAS 0x0007u /* Mach32 */ /* MONITOR_? 0x0000u */ /* Mach32 */ #define MONITOR_8507 0x0001u /* Mach32 */ #define MONITOR_8514 0x0002u /* Mach32 */ /* MONITOR_? 0x0003u */ /* Mach32 */ /* MONITOR_? 0x0004u */ /* Mach32 */ #define MONITOR_8503 0x0005u /* Mach32 */ #define MONITOR_8512 0x0006u /* Mach32 */ #define MONITOR_8513 0x0006u /* Mach32 */ #define MONITOR_NONE 0x0007u /* Mach32 */ #define ALIAS_ENA 0x0008u /* Mach32 */ #define PIXEL_WIDTH_4 0x0000u /* Mach32 */ #define PIXEL_WIDTH_8 0x0010u /* Mach32 */ #define PIXEL_WIDTH_16 0x0020u /* Mach32 */ #define PIXEL_WIDTH_24 0x0030u /* Mach32 */ #define RGB16_555 0x0000u /* Mach32 */ #define RGB16_565 0x0040u /* Mach32 */ #define RGB16_655 0x0080u /* Mach32 */ #define RGB16_664 0x00c0u /* Mach32 */ #define MULTIPLEX_PIXELS 0x0100u /* Mach32 */ #define RGB24 0x0000u /* Mach32 */ #define RGBx24 0x0200u /* Mach32 */ #define BGR24 0x0400u /* Mach32 */ #define xBGR24 0x0600u /* Mach32 */ #define DAC_8_BIT_EN 0x4000u /* Mach32 */ #define ORDER_16BPP_565 RGB16_565 /* Mach32 */ #define BOUNDS_BOTTOM 0x7eeeu /* Read */ #define MISC_CNTL 0x7eeeu /* Write */ /* Mach32 */ #define PATT_DATA_INDEX 0x82eeu /* ? 0x86eeu */ /* ? 0x8aeeu */ #define R_EXT_GE_CONFIG 0x8eeeu /* Read */ /* Mach32 */ #define PATT_DATA 0x8eeeu /* Write */ #define R_MISC_CNTL 0x92eeu /* Read */ /* Mach32 */ #define BRES_COUNT 0x96eeu #define EXT_FIFO_STATUS 0x9aeeu /* Read */ #define LINEDRAW_INDEX 0x9aeeu /* Write */ /* ? 0x9eeeu */ #define LINEDRAW_OPT 0xa2eeu #define BOUNDS_RESET 0x0100u #define CLIP_MODE_0 0x0000u /* Clip exception disabled */ #define CLIP_MODE_1 0x0200u /* Line segments */ #define CLIP_MODE_2 0x0400u /* Polygon boundary lines */ #define CLIP_MODE_3 0x0600u /* Patterned lines */ #define DEST_X_START 0xa6eeu /* Write */ #define DEST_X_END 0xaaeeu /* Write */ #define DEST_Y_END 0xaeeeu /* Write */ #define R_H_TOTAL_DISP 0xb2eeu /* Read */ /* Mach32 */ #define SRC_X_STRT 0xb2eeu /* Write */ #define R_H_SYNC_STRT 0xb6eeu /* Read */ /* Mach32 */ #define ALU_BG_FN 0xb6eeu /* Write */ #define R_H_SYNC_WID 0xbaeeu /* Read */ /* Mach32 */ #define ALU_FG_FN 0xbaeeu /* Write */ #define SRC_X_END 0xbeeeu /* Write */ #define R_V_TOTAL 0xc2eeu /* Read */ #define SRC_Y_DIR 0xc2eeu /* Write */ #define R_V_DISP 0xc6eeu /* Read */ /* Mach32 */ #define EXT_SHORT_STROKE 0xc6eeu /* Write */ #define R_V_SYNC_STRT 0xcaeeu /* Read */ /* Mach32 */ #define SCAN_X 0xcaeeu /* Write */ #define VERT_LINE_CNTR 0xceeeu /* Read */ /* Mach32 */ #define DP_CONFIG 0xceeeu /* Write */ #define READ_WRITE 0x0001u #define DATA_WIDTH 0x0200u #define DATA_ORDER 0x1000u #define FG_COLOR_SRC_FG 0x2000u #define FG_COLOR_SRC_BLIT 0x6000u #define R_V_SYNC_WID 0xd2eeu /* Read */ #define PATT_LENGTH 0xd2eeu /* Write */ #define PATT_INDEX 0xd6eeu /* Write */ #define READ_SRC_X 0xdaeeu /* Read */ /* Mach32 */ #define EXT_SCISSOR_L 0xdaeeu /* Write */ #define READ_SRC_Y 0xdeeeu /* Read */ /* Mach32 */ #define EXT_SCISSOR_T 0xdeeeu /* Write */ #define EXT_SCISSOR_R 0xe2eeu /* Write */ #define EXT_SCISSOR_B 0xe6eeu /* Write */ /* ? 0xeaeeu */ #define DEST_COMP_FN 0xeeeeu /* Write */ #define DEST_COLOR_CMP_MASK 0xf2eeu /* Write */ /* Mach32 */ /* ? 0xf6eeu */ #define CHIP_ID 0xfaeeu /* Read */ /* Mach32 */ #define CHIP_CODE_0 0x001fu /* Mach32 */ #define CHIP_CODE_1 0x03e0u /* Mach32 */ #define CHIP_CLASS 0x0c00u /* Mach32 */ #define CHIP_REV 0xf000u /* Mach32 */ #define LINEDRAW 0xfeeeu /* Write */ /* ATI Mach64 register definitions */ #define CRTC_H_TOTAL_DISP IOPortTag(0x00u, 0x00u) #define CRTC_H_TOTAL 0x000001fful /* ? 0x0000fe00ul */ #define CRTC_H_DISP 0x01ff0000ul /* ? 0xfe000000ul */ #define CRTC_H_SYNC_STRT_WID IOPortTag(0x01u, 0x01u) #define CRTC_H_SYNC_STRT 0x000000fful #define CRTC_H_SYNC_DLY 0x00000700ul /* ? 0x00000800ul */ #define CRTC_H_SYNC_STRT_HI 0x00001000ul /* ? 0x0000e000ul */ #define CRTC_H_SYNC_WID 0x001f0000ul #define CRTC_H_SYNC_POL 0x00200000ul /* ? 0xffc00000ul */ #define CRTC_V_TOTAL_DISP IOPortTag(0x02u, 0x02u) #define CRTC_V_TOTAL 0x000007fful /* ? 0x0000f800ul */ #define CRTC_V_DISP 0x07ff0000ul /* ? 0xf8000000ul */ #define CRTC_V_SYNC_STRT_WID IOPortTag(0x03u, 0x03u) #define CRTC_V_SYNC_STRT 0x000007fful /* ? 0x0000f800ul */ #define CRTC_V_SYNC_WID 0x001f0000ul #define CRTC_V_SYNC_END_VGA 0x000f0000ul #define CRTC_V_SYNC_POL 0x00200000ul /* ? 0xffc00000ul */ #define CRTC_VLINE_CRNT_VLINE IOPortTag(0x04u, 0x04u) #define CRTC_VLINE 0x000007fful /* ? 0x0000f800ul */ #define CRTC_CRNT_VLINE 0x07ff0000ul /* ? 0xf8000000ul */ #define CRTC_OFF_PITCH IOPortTag(0x05u, 0x05u) #define CRTC_OFFSET 0x000ffffful #define CRTC_OFFSET_VGA 0x0003fffful #define CRTC_OFFSET_LOCK 0x00100000ul /* XC/XL */ /* ? 0x00200000ul */ #define CRTC_PITCH 0xffc00000ul #define CRTC_INT_CNTL IOPortTag(0x06u, 0x06u) #define CRTC_VBLANK 0x00000001ul #define CRTC_VBLANK_INT_EN 0x00000002ul #define CRTC_VBLANK_INT 0x00000004ul #define CRTC_VLINE_INT_EN 0x00000008ul #define CRTC_VLINE_INT 0x00000010ul #define CRTC_VLINE_SYNC 0x00000020ul #define CRTC_FRAME 0x00000040ul #define CRTC_SNAPSHOT_INT_EN 0x00000080ul /* GTPro */ #define CRTC_SNAPSHOT_INT 0x00000100ul /* GTPro */ #define CRTC_I2C_INT_EN 0x00000200ul /* GTPro */ #define CRTC_I2C_INT 0x00000400ul /* GTPro */ #define CRTC2_VBLANK 0x00000800ul /* LTPro */ #define CRTC2_VBLANK_INT_EN 0x00001000ul /* LTPro */ #define CRTC2_VBLANK_INT 0x00002000ul /* LTPro */ #define CRTC2_VLINE_INT_EN 0x00004000ul /* LTPro */ #define CRTC2_VLINE_INT 0x00008000ul /* LTPro */ #define CRTC_CAPBUF0_INT_EN 0x00010000ul /* VT/GT */ #define CRTC_CAPBUF0_INT 0x00020000ul /* VT/GT */ #define CRTC_CAPBUF1_INT_EN 0x00040000ul /* VT/GT */ #define CRTC_CAPBUF1_INT 0x00080000ul /* VT/GT */ #define CRTC_OVERLAY_EOF_INT_EN 0x00100000ul /* VT/GT */ #define CRTC_OVERLAY_EOF_INT 0x00200000ul /* VT/GT */ #define CRTC_ONESHOT_CAP_INT_EN 0x00400000ul /* VT/GT */ #define CRTC_ONESHOT_CAP_INT 0x00800000ul /* VT/GT */ #define CRTC_BUSMASTER_EOL_INT_EN 0x01000000ul /* VTB/GTB/LT */ #define CRTC_BUSMASTER_EOL_INT 0x02000000ul /* VTB/GTB/LT */ #define CRTC_GP_INT_EN 0x04000000ul /* VTB/GTB/LT */ #define CRTC_GP_INT 0x08000000ul /* VTB/GTB/LT */ #define CRTC2_VLINE_SYNC 0x10000000ul /* LTPro */ #define CRTC_SNAPSHOT2_INT_EN 0x20000000ul /* LTPro */ #define CRTC_SNAPSHOT2_INT 0x40000000ul /* LTPro */ #define CRTC_VBLANK_BIT2_INT 0x80000000ul /* GTPro */ #define CRTC_INT_ENS /* *** UPDATE ME *** */ \ ( \ CRTC_VBLANK_INT_EN | \ CRTC_VLINE_INT_EN | \ CRTC_SNAPSHOT_INT_EN | \ CRTC_I2C_INT_EN | \ CRTC2_VBLANK_INT_EN | \ CRTC2_VLINE_INT_EN | \ CRTC_CAPBUF0_INT_EN | \ CRTC_CAPBUF1_INT_EN | \ CRTC_OVERLAY_EOF_INT_EN | \ CRTC_ONESHOT_CAP_INT_EN | \ CRTC_BUSMASTER_EOL_INT_EN | \ CRTC_GP_INT_EN | \ CRTC_SNAPSHOT2_INT_EN | \ 0 \ ) #define CRTC_INT_ACKS /* *** UPDATE ME *** */ \ ( \ CRTC_VBLANK_INT | \ CRTC_VLINE_INT | \ CRTC_SNAPSHOT_INT | \ CRTC_I2C_INT | \ CRTC2_VBLANK_INT | \ CRTC2_VLINE_INT | \ CRTC_CAPBUF0_INT | \ CRTC_CAPBUF1_INT | \ CRTC_OVERLAY_EOF_INT | \ CRTC_ONESHOT_CAP_INT | \ CRTC_BUSMASTER_EOL_INT | \ CRTC_GP_INT | \ CRTC_SNAPSHOT2_INT | \ CRTC_VBLANK_BIT2_INT | \ 0 \ ) #define CRTC_GEN_CNTL IOPortTag(0x07u, 0x07u) #define CRTC_DBL_SCAN_EN 0x00000001ul #define CRTC_INTERLACE_EN 0x00000002ul #define CRTC_HSYNC_DIS 0x00000004ul #define CRTC_VSYNC_DIS 0x00000008ul #define CRTC_CSYNC_EN 0x00000010ul #define CRTC_PIX_BY_2_EN 0x00000020ul #define CRTC2_DBL_SCAN_EN 0x00000020ul /* LTPro */ #define CRTC_DISPLAY_DIS 0x00000040ul #define CRTC_VGA_XOVERSCAN 0x00000080ul #define CRTC_PIX_WIDTH 0x00000700ul #define CRTC_BYTE_PIX_ORDER 0x00000800ul #define CRTC_VSYNC_INT_EN 0x00001000ul /* XC/XL */ #define CRTC_VSYNC_INT 0x00002000ul /* XC/XL */ #define CRTC_FIFO_OVERFILL 0x0000c000ul /* VT/GT */ #define CRTC2_VSYNC_INT_EN 0x00004000ul /* XC/XL */ #define CRTC2_VSYNC_INT 0x00008000ul /* XC/XL */ #define CRTC_FIFO_LWM 0x000f0000ul #define CRTC_HVSYNC_IO_DRIVE 0x00010000ul /* XC/XL */ #define CRTC2_PIX_WIDTH 0x000e0000ul /* LTPro */ #define CRTC_VGA_128KAP_PAGING 0x00100000ul /* VT/GT */ #define CRTC_DISPREQ_ONLY 0x00200000ul /* VT/GT */ #define CRTC_VFC_SYNC_TRISTATE 0x00200000ul /* VTB/GTB/LT */ #define CRTC2_EN 0x00200000ul /* LTPro */ #define CRTC_LOCK_REGS 0x00400000ul /* VT/GT */ #define CRTC_SYNC_TRISTATE 0x00800000ul /* VT/GT */ #define CRTC_EXT_DISP_EN 0x01000000ul #define CRTC_EN 0x02000000ul #define CRTC_DISP_REQ_EN 0x04000000ul #define CRTC_VGA_LINEAR 0x08000000ul #define CRTC_VSYNC_FALL_EDGE 0x10000000ul #define CRTC_VGA_TEXT_132 0x20000000ul #define CRTC_CNT_EN 0x40000000ul #define CRTC_CUR_B_TEST 0x80000000ul #define CRTC_INT_ENS_X /* *** UPDATE ME *** */ \ ( \ CRTC_VSYNC_INT_EN | \ CRTC2_VSYNC_INT_EN | \ 0 \ ) #define CRTC_INT_ACKS_X /* *** UPDATE ME *** */ \ ( \ CRTC_VSYNC_INT | \ CRTC2_VSYNC_INT | \ 0 \ ) #define DSP_CONFIG BlockIOTag(0x08u) /* VTB/GTB/LT */ #define DSP_XCLKS_PER_QW 0x00003ffful /* ? 0x00004000ul */ #define DSP_FLUSH_WB 0x00008000ul #define DSP_LOOP_LATENCY 0x000f0000ul #define DSP_PRECISION 0x00700000ul /* ? 0xff800000ul */ #define DSP_ON_OFF BlockIOTag(0x09u) /* VTB/GTB/LT */ #define DSP_OFF 0x000007fful /* ? 0x0000f800ul */ #define DSP_ON 0x07ff0000ul /* ? 0xf8000000ul */ #define TIMER_CONFIG BlockIOTag(0x0au) /* VTB/GTB/LT */ #define MEM_BUF_CNTL BlockIOTag(0x0bu) /* VTB/GTB/LT */ #define Z_WB_FLUSH 0x00000007ul #define Z_WB_FLUSH_P 0x0000000ful /* GTPro */ #define VID_WB_FLUSH_P 0x000000f0ul /* GTPro */ #define VID_WB_FLUSH_MSB 0x00000100ul #define GUI_WB_FLUSH_P 0x00001f00ul /* GTPro */ #define HST_WB_FLUSH_P 0x0000e000ul /* GTPro */ #define SCL_MIN_BURST_LEN 0x001f0000ul #define SCL_THRESH 0x003f0000ul /* GTPro */ /* ? 0x00400000ul */ #define INVALIDATE_RB_CACHE 0x00800000ul #define HST_WB_FLUSH 0x03000000ul #define VID_WB_FLUSH 0x1c000000ul #define GUI_WB_FLUSH 0xe0000000ul #define SHARED_CNTL BlockIOTag(0x0cu) /* VTB/GTB/LT */ #define SHARED_MEM_CONFIG BlockIOTag(0x0du) /* VTB/GTB/LT */ #define MEM_ADDR_CONFIG BlockIOTag(0x0du) /* GTPro */ #define SHARED_CNTL_CTD BlockIOTag(0x0eu) /* CTD */ /* ? 0x00fffffful */ #define CTD_FIFO5 0x01000000ul /* ? 0xfe000000ul */ #define CRT_TRAP BlockIOTag(0x0eu) /* VTB/GTB/LT */ #define DSTN_CONTROL BlockIOTag(0x0fu) /* LT */ #define I2C_CNTL_0 BlockIOTag(0x0fu) /* GTPro */ #define I2C_CNTL_STAT 0x0000000ful #define I2C_CNTL_DONE 0x00000001ul #define I2C_CNTL_NACK 0x00000002ul #define I2C_CNTL_HALT 0x00000004ul #define I2C_CNTL_FULL 0x00000008ul /* ? 0x00000010ul */ #define I2C_CNTL_HPTR_RST 0x00000020ul /* ? 0x000000c0ul */ #define I2C_CNTL_START 0x00000100ul #define I2C_CNTL_STOP 0x00000200ul #define I2C_CNTL_GO 0x00000400ul #define I2C_CNTL_RECEIVE 0x00000800ul #define I2C_CNTL_ABORT 0x00001000ul #define I2C_CNTL_INT_EN 0x00002000ul #define I2C_CNTL_SCL 0x00004000ul #define I2C_CNTL_SDA 0x00008000ul #define I2C_CNTL_M_FACTOR 0x00ff0000ul #define I2C_CNTL_N_FACTOR 0xff000000ul #define OVR_CLR IOPortTag(0x08u, 0x10u) #define OVR_CLR_8 0x000000fful #define OVR_CLR_B 0x0000ff00ul #define OVR_CLR_G 0x00ff0000ul #define OVR_CLR_R 0xff000000ul #define OVR_WID_LEFT_RIGHT IOPortTag(0x09u, 0x11u) #define OVR_WID_LEFT 0x0000003ful /* 0x0f on > 2) #endif /* ___ATIREGS_H___ */ xf86-video-mach64-6.9.5/src/atirgb514.h0000644000175000017500000000305212270010352014065 00000000000000/* * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIRGB514_H___ #define ___ATIRGB514_H___ 1 #include "atipriv.h" #include "xf86str.h" extern void ATIRGB514PreInit(ATIPtr, ATIHWPtr); extern void ATIRGB514Save(ATIPtr, ATIHWPtr); extern void ATIRGB514Calculate(ATIPtr, ATIHWPtr, DisplayModePtr); extern void ATIRGB514Set(ATIPtr, ATIHWPtr); #endif /* ___ATIRGB514_H___ */ xf86-video-mach64-6.9.5/src/atiscreen.h0000644000175000017500000000266112270010352014345 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATISCREEN_H___ #define ___ATISCREEN_H___ 1 #include "screenint.h" extern Bool ATIScreenInit(SCREEN_INIT_ARGS_DECL); extern Bool ATICloseScreen(CLOSE_SCREEN_ARGS_DECL); #endif /* ___ATISCREEN_H___ */ xf86-video-mach64-6.9.5/src/atistruct.h0000644000175000017500000003467612270010352014425 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * * DRI support by: * Gareth Hughes * Leif Delgass */ #ifndef ___ATISTRUCT_H___ #define ___ATISTRUCT_H___ 1 #include "atibank.h" #include "aticlock.h" #include "atiregs.h" #ifdef XF86DRI_DEVEL /* * DRI support */ #define _XF86DRI_SERVER_ #include "atidripriv.h" #include "mach64_dri.h" #include "sarea.h" #include "xf86drm.h" #include "dri.h" #endif /* XF86DRI_DEVEL */ #ifdef TV_OUT #include "vbe.h" #endif /* TV_OUT */ #include "picturestr.h" #ifdef USE_EXA #include "exa.h" #endif #ifdef USE_XAA #include "xaa.h" #endif #include "xf86Cursor.h" #include "xf86Pci.h" #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 #include "xf86Resources.h" #endif #include "atipcirename.h" #include "compat-api.h" #define CacheSlotOf(____Register) ((____Register) / UnitOf(DWORD_SELECT)) /* * This is probably as good a place as any to put this note, as it applies to * the entire driver, but especially here. CARD8's are used rather than the * appropriate enum types because the latter would nearly quadruple storage * requirements (they are stored as int's). This reduces the usefulness of * enum types to their ability to declare index values. I've also elected to * forgo the strong typing capabilities of enum types. C is not terribly adept * at strong typing anyway. */ /* A structure for local data related to video modes */ typedef struct _ATIHWRec { /* Clock number for mode */ CARD8 clock; /* The CRTC used to drive the screen (VGA, 8514, Mach64) */ CARD8 crtc; /* Colour lookup table */ CARD8 lut[256 * 3]; #ifndef AVOID_CPIO /* VGA registers */ CARD8 genmo, crt[25], seq[5], gra[9], attr[21]; /* VGA Wonder registers */ CARD8 a3, a6, a7, ab, ac, ad, ae, b0, b1, b2, b3, b5, b6, b8, b9, ba, bd, be, bf; /* Shadow VGA CRTC registers */ CARD8 shadow_vga[25]; #endif /* AVOID_CPIO */ /* Generic DAC registers */ CARD8 dac_read, dac_write, dac_mask; /* IBM RGB 514 registers */ CARD8 ibmrgb514[0x0092U]; /* All that's needed for now */ /* Mach64 PLL registers */ CARD8 pll_vclk_cntl, pll_vclk_post_div, pll_vclk0_fb_div, pll_vclk1_fb_div, pll_vclk2_fb_div, pll_vclk3_fb_div, pll_xclk_cntl, pll_ext_vpll_cntl; /* Mach64 CPIO registers */ CARD32 crtc_h_total_disp, crtc_h_sync_strt_wid, crtc_v_total_disp, crtc_v_sync_strt_wid, crtc_off_pitch, crtc_gen_cntl, dsp_config, dsp_on_off, mem_buf_cntl, ovr_clr, ovr_wid_left_right, ovr_wid_top_bottom, cur_clr0, cur_clr1, cur_offset, cur_horz_vert_posn, cur_horz_vert_off, clock_cntl, bus_cntl, mem_cntl, mem_vga_wp_sel, mem_vga_rp_sel, dac_cntl, gen_test_cntl, config_cntl, mpp_config, mpp_strobe_seq, tvo_cntl; /* LCD registers */ CARD32 lcd_index, config_panel, lcd_gen_ctrl, horz_stretching, vert_stretching, ext_vert_stretch; /* Shadow Mach64 CRTC registers */ CARD32 shadow_h_total_disp, shadow_h_sync_strt_wid, shadow_v_total_disp, shadow_v_sync_strt_wid; /* Mach64 MMIO Block 0 registers and related subfields */ CARD32 dst_off_pitch; CARD16 dst_x, dst_y, dst_height; CARD32 dst_bres_err, dst_bres_inc, dst_bres_dec, dst_cntl; CARD32 src_off_pitch; CARD16 src_x, src_y, src_width1, src_height1, src_x_start, src_y_start, src_width2, src_height2; CARD32 src_cntl; CARD32 host_cntl; CARD32 pat_reg0, pat_reg1, pat_cntl; CARD16 sc_left, sc_right, sc_top, sc_bottom; CARD32 dp_bkgd_clr, dp_frgd_clr, dp_write_mask, dp_chain_mask, dp_pix_width, dp_mix, dp_src; CARD32 clr_cmp_clr, clr_cmp_msk, clr_cmp_cntl; CARD32 context_mask, context_load_cntl; CARD32 scale_3d_cntl, tex_size_pitch, tex_cntl, tex_offset; /* Mach64 MMIO Block 1 registers */ CARD32 overlay_y_x_start, overlay_y_x_end, overlay_graphics_key_clr, overlay_graphics_key_msk, overlay_key_cntl, overlay_scale_inc, overlay_scale_cntl, scaler_height_width, scaler_test, scaler_buf0_offset, scaler_buf1_offset, scaler_buf_pitch, video_format, overlay_exclusive_horz, overlay_exclusive_vert, buf0_offset, buf0_pitch, buf1_offset, buf1_pitch, scaler_colour_cntl, scaler_h_coeff0, scaler_h_coeff1, scaler_h_coeff2, scaler_h_coeff3, scaler_h_coeff4, gui_cntl, scaler_buf0_offset_u, scaler_buf0_offset_v, scaler_buf1_offset_u, scaler_buf1_offset_v; /* Clock programming data */ int FeedbackDivider, ReferenceDivider, PostDivider; #ifndef AVOID_CPIO /* This is used by ATISwap() */ pointer frame_buffer; ATIBankProcPtr SetBank; unsigned int nBank, nPlane; #endif /* AVOID_CPIO */ } ATIHWRec; #ifdef USE_EXA /* * Card engine state for communication across RENDER acceleration hooks. */ typedef struct _Mach64ContextRegs3D { CARD32 dp_mix; CARD32 dp_src; CARD32 dp_write_mask; CARD32 dp_pix_width; CARD32 dst_pitch_offset; CARD32 scale_3d_cntl; CARD32 tex_cntl; CARD32 tex_size_pitch; CARD32 tex_offset; int tex_width; /* src/mask texture width (pixels) */ int tex_height; /* src/mask texture height (pixels) */ Bool frag_src; /* solid src uses fragment color */ Bool frag_mask; /* solid mask uses fragment color */ CARD32 frag_color; /* solid src/mask color */ Bool color_alpha; /* the alpha value is contained in the color channels instead of the alpha channel */ PictTransform *transform; } Mach64ContextRegs3D; #endif /* USE_EXA */ /* * This structure defines the driver's private area. */ typedef struct _ATIRec { #ifndef AVOID_CPIO CARD8 VGAAdapter; #endif /* AVOID_CPIO */ /* * Chip-related definitions. */ CARD32 config_chip_id; CARD16 ChipType; CARD8 Chip; CARD8 ChipClass, ChipRevision, ChipRev, ChipVersion, ChipFoundry; /* * Processor I/O decoding definitions. */ CARD8 CPIODecoding; unsigned long CPIOBase; #ifndef AVOID_CPIO /* * Processor I/O port definition for VGA. */ unsigned long CPIO_VGABase; /* * Processor I/O port definitions for VGA Wonder. */ unsigned long CPIO_VGAWonder; #endif /* AVOID_CPIO */ /* * DAC-related definitions. */ #ifndef AVOID_CPIO unsigned long CPIO_DAC_MASK, CPIO_DAC_DATA, CPIO_DAC_READ, CPIO_DAC_WRITE, CPIO_DAC_WAIT; #endif /* AVOID_CPIO */ CARD16 DAC; CARD8 rgbBits; /* * Definitions related to system bus interface. */ pciVideoPtr PCIInfo; CARD8 BusType; #ifndef AVOID_CPIO #ifndef XSERVER_LIBPCIACCESS resRange VGAWonderResources[2]; #endif #endif /* AVOID_CPIO */ /* * Definitions related to video memory. */ CARD8 MemoryType; int VideoRAM; /* * BIOS-related definitions. */ CARD8 I2CType, Tuner, Decoder, Audio; /* * Definitions related to video memory apertures. */ pointer pMemory, pShadow; pointer pMemoryLE; /* Always little-endian */ unsigned long LinearBase; int LinearSize, FBPitch, FBBytesPerPixel; #ifndef AVOID_CPIO /* * Banking interface. */ pointer pBank; #endif /* AVOID_CPIO */ /* * Definitions related to MMIO register apertures. */ pointer pMMIO, pBlock[2]; unsigned long Block0Base, Block1Base; /* * XAA interface. */ Bool useEXA; #ifdef USE_EXA ExaDriverPtr pExa; #endif #ifdef USE_XAA XAAInfoRecPtr pXAAInfo; #endif int nAvailableFIFOEntries, nFIFOEntries, nHostFIFOEntries; CARD8 EngineIsBusy, EngineIsLocked, XModifier; CARD32 dst_cntl; /* For SetupFor/Subsequent communication */ CARD32 sc_left_right, sc_top_bottom; CARD16 sc_left, sc_right, sc_top, sc_bottom; /* Current scissors */ pointer pHOST_DATA; /* Current HOST_DATA_* transfer window address */ #ifdef USE_XAA CARD32 *ExpansionBitmapScanlinePtr[2]; int ExpansionBitmapWidth; #endif #ifdef USE_EXA Bool RenderAccelEnabled; Mach64ContextRegs3D m3d; #endif /* * Cursor-related definitions. */ xf86CursorInfoPtr pCursorInfo; pointer pCursorPage, pCursorImage; unsigned long CursorBase; CARD32 CursorOffset; CARD16 CursorXOffset, CursorYOffset; CARD8 Cursor; /* * MMIO cache. */ CARD32 MMIOCache[CacheSlotOf(DWORD_SELECT) + 1]; CARD8 MMIOCached[(CacheSlotOf(DWORD_SELECT) + 8) >> 3]; /* * Clock-related definitions. */ int refclk; int ClockNumberToProgramme, ReferenceNumerator, ReferenceDenominator; int ProgrammableClock, maxClock; ClockRec ClockDescriptor; /* * DSP register data. */ int XCLKFeedbackDivider, XCLKReferenceDivider, XCLKPostDivider; CARD16 XCLKMaxRASDelay, XCLKPageFaultDelay, DisplayLoopLatency, DisplayFIFODepth; /* * LCD panel data. */ int LCDPanelID, LCDClock, LCDHorizontal, LCDVertical; unsigned LCDHSyncStart, LCDHSyncWidth, LCDHBlankWidth; unsigned LCDVSyncStart, LCDVSyncWidth, LCDVBlankWidth; int LCDVBlendFIFOSize; /* * Data used by ATIAdjustFrame(). */ int AdjustDepth, AdjustMaxX, AdjustMaxY; unsigned long AdjustMask, AdjustMaxBase; /* * DGA and non-DGA common data. */ DisplayModePtr currentMode; CARD8 depth, bitsPerPixel; short int displayWidth; rgb weight; #ifndef AVOID_DGA /* * DGA-related data. */ DGAModePtr pDGAMode; DGAFunctionRec ATIDGAFunctions; int nDGAMode; /* * XAAForceTransBlit alters the behavior of 'SetupForScreenToScreenCopy', * such that ~0 is interpreted as a legitimate transparency key. */ CARD8 XAAForceTransBlit; #endif /* AVOID_DGA */ /* * XVideo-related data. */ DevUnion XVPortPrivate[1]; pointer pXVBuffer; /* USE_EXA: ExaOffscreenArea* USE_XAA: FBLinearPtr */ RegionRec VideoClip; int SurfacePitch, SurfaceOffset; CARD8 AutoPaint, DoubleBuffer, CurrentBuffer, ActiveSurface; /* * Data saved by ATIUnlock() and restored by ATILock(). */ struct { /* Mach64 registers */ CARD32 crtc_int_cntl, crtc_gen_cntl, i2c_cntl_0, hw_debug, scratch_reg3, bus_cntl, lcd_index, mem_cntl, i2c_cntl_1, dac_cntl, gen_test_cntl, mpp_config, mpp_strobe_seq, tvo_cntl; #ifndef AVOID_CPIO CARD32 config_cntl; /* VGA Wonder registers */ CARD8 a6, ab, b1, b4, b5, b6, b8, b9, be; /* VGA registers */ CARD8 crt03, crt11; /* VGA shadow registers */ CARD8 shadow_crt03, shadow_crt11; #endif /* AVOID_CPIO */ } LockData; /* Mode data */ ATIHWRec OldHW, NewHW; /* * Resource Access Control entity index. */ int iEntity; /* * Driver options. */ unsigned int OptionProbeSparse:1; /* Force probe for fixed (sparse) I/O */ unsigned int OptionAccel:1; /* Use hardware draw engine */ unsigned int OptionBIOSDisplay:1; /* Allow BIOS interference */ unsigned int OptionBlend:1; /* Force horizontal blending */ unsigned int OptionCRTDisplay:1; /* Display on both CRT & DFP */ unsigned int OptionCSync:1; /* Use composite sync */ unsigned int OptionDevel:1; /* Intentionally undocumented */ #ifdef TV_OUT CARD8 OptionTvOut; /* Enable TV out if TV is connected */ CARD8 OptionTvStd; /* Requested TV standard - see ATITVStandard enum in atioption.h */ #endif /* TV_OUT */ unsigned int OptionMMIOCache:1; /* Cache MMIO writes */ unsigned int OptionTestMMIOCache:1;/* Test MMIO cache integrity */ unsigned int OptionPanelDisplay:1; /* Prefer digital panel over CRT */ unsigned int OptionShadowFB:1; /* Use shadow frame buffer */ unsigned int OptionLCDSync:1; /* Temporary */ /* * State flags. */ CARD8 Unlocked, Mapped, Closeable; CARD8 MMIOInLinear; /* * Wrapped functions. */ CloseScreenProcPtr CloseScreen; #ifdef XF86DRI_DEVEL /* * DRI data. */ int directRenderingEnabled; DRIInfoPtr pDRIInfo; int drmFD; int irq; int numVisualConfigs; __GLXvisualConfig *pVisualConfigs; ATIConfigPrivPtr pVisualConfigsPriv; ATIDRIServerInfoPtr pDRIServerInfo; Bool NeedDRISync; Bool have3DWindows; /* offscreen memory management */ #ifdef USE_XAA int backLines; FBAreaPtr backArea; int depthTexLines; FBAreaPtr depthTexArea; #endif CARD8 OptionIsPCI; /* Force PCI mode */ CARD8 OptionDMAMode; /* async, sync, mmio */ CARD8 OptionAGPMode; /* AGP mode */ CARD8 OptionAGPSize; /* AGP size in MB */ CARD8 OptionLocalTextures; /* Use local textures + AGP textures (only valid for AGP) */ CARD8 OptionBufferSize; /* Command/dma buffer size in MB */ #endif /* XF86DRI_DEVEL */ #ifdef TV_OUT /* TV out */ vbeInfoPtr pVBE; xf86Int10InfoPtr pInt10; int vbemode; /* saved text mode */ Bool tvActive; #endif /* TV_OUT */ } ATIRec; #define ATIPTR(_p) ((ATIPtr)((_p)->driverPrivate)) #endif /* ___ATISTRUCT_H___ */ xf86-video-mach64-6.9.5/src/atituner.h0000644000175000017500000000424012270010352014216 00000000000000/* * Copyright 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATITUNER_H___ #define ___ATITUNER_H___ 1 #include "xf86str.h" /* * TV Tuner definitions. Most of these are from Philips. */ typedef enum { ATI_TUNER_NONE, ATI_TUNER_FI1236MK1NA, ATI_TUNER_FI1236MK2J, ATI_TUNER_FI1216MK2BG, ATI_TUNER_FI1246MK2I, ATI_TUNER_FI1216MFMK2, ATI_TUNER_FI1236MK2NA, ATI_TUNER_FI1256MK2DK, ATI_TUNER_FM1236MK2NA, ATI_TUNER_FI1216MK2BGEXT, ATI_TUNER_FI1246MK2IEXT, ATI_TUNER_FI1216MFMK2EXT, ATI_TUNER_FI1236MK2NAEXT, ATI_TUNER_TEMIC_FN5AL, ATI_TUNER_FQ1216MEP, ATI_TUNER_15, ATI_TUNER_ALPS_TSBH5, ATI_TUNER_ALPS_TSCXX, ATI_TUNER_ALPS_TSCH5, ATI_TUNER_19, ATI_TUNER_20, ATI_TUNER_21, ATI_TUNER_22, ATI_TUNER_23, ATI_TUNER_24, ATI_TUNER_25, ATI_TUNER_26, ATI_TUNER_27, ATI_TUNER_28, ATI_TUNER_MT2032, ATI_TUNER_30, ATI_TUNER_31 } ATITunerType; extern const SymTabRec ATITuners[]; #endif /* ___ATITUNER_H___ */ xf86-video-mach64-6.9.5/src/atiutil.h0000644000175000017500000000560512270010352014044 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIUTIL_H___ #define ___ATIUTIL_H___ 1 /* * Prevent the C standard's insistence on unsigned long sizeof's from causing * counter-intuitive results. */ #define SizeOf(_object) ((int)sizeof(_object)) #define NumberOf(_what) (SizeOf(_what) / SizeOf(_what[0])) #define __ONE_MICROSECOND__ 100 /* This'll need calibration */ #define ATIDelay(_microseconds) \ { \ unsigned int _i, _j; \ for (_i = 0; _i < _microseconds; _i++) \ for (_j = 0; _j < __ONE_MICROSECOND__; _j++) \ /* Nothing */; \ } /* * Macros to get/set a contiguous bit field. Arguments should not be * self-modifying. */ #define UnitOf(___Value) \ (((((___Value) ^ ((___Value) - 1)) + 1) >> 1) | \ ((((___Value) ^ ((___Value) - 1)) >> 1) + 1)) #define GetBits(__Value, _Mask) (((__Value) & (_Mask)) / UnitOf(_Mask)) #define SetBits(__Value, _Mask) (((__Value) * UnitOf(_Mask)) & (_Mask)) #define MaxBits(__Mask) GetBits(__Mask, __Mask) #define _ByteMask(__Byte) ((CARD8)(-1) << (8 * (__Byte))) #define GetByte(_Value, _Byte) GetBits(_Value, _ByteMask(_Byte)) #define SetByte(_Value, _Byte) SetBits(_Value, _ByteMask(_Byte)) #define _WordMask(__Word) ((CARD16)(-1) << (16 * (__Word))) #define GetWord(_Value, _Word) GetBits(_Value, _WordMask(_Word)) #define SetWord(_Value, _Word) SetBits(_Value, _WordMask(_Word)) extern void ATIReduceRatio(int *, int *); extern int ATIDivide(int, int, int, const int); #endif /* ___ATIUTIL_H___ */ xf86-video-mach64-6.9.5/src/ativalid.h0000644000175000017500000000262412270010352014164 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIVALID_H___ #define ___ATIVALID_H___ 1 #include "xf86str.h" extern ModeStatus ATIValidMode(SCRN_ARG_TYPE arg, DisplayModePtr, Bool, int); #endif /* ___ATIVALID_H___ */ xf86-video-mach64-6.9.5/src/ativga.h0000644000175000017500000000305712270010352013643 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIVGA_H___ #define ___ATIVGA_H___ 1 #include "atipriv.h" #include "xf86str.h" #ifndef AVOID_CPIO extern void ATIVGAPreInit(ATIPtr, ATIHWPtr); extern void ATIVGASave(ATIPtr, ATIHWPtr); extern void ATIVGASet(ATIPtr, ATIHWPtr); extern void ATIVGASaveScreen(ATIPtr, int); #endif /* AVOID_CPIO */ #endif /* ___ATIVGA_H___ */ xf86-video-mach64-6.9.5/src/ativgaio.h0000644000175000017500000000405312270010352014170 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIVGAIO_H___ #if !defined(___ATI_H___) && defined(XFree86Module) # error missing #include "ati.h" before #include "ativgaio.h" # undef XFree86Module #endif #define ___ATIVGAIO_H___ 1 #include "atiregs.h" #include "atipriv.h" #include "compiler.h" #ifndef AVOID_CPIO extern void ATISetVGAIOBase(ATIPtr, const CARD8); /* Odds and ends to ease reading and writting of indexed registers */ #define GetReg(_Register, _Index) \ ( \ outb(_Register, _Index), \ inb((_Register) + 1) \ ) #define PutReg(_Register, _Index, _Value) \ do \ { \ outb(_Register, _Index); \ outb((_Register) + 1, _Value); \ } while (0) #endif /* AVOID_CPIO */ #endif /* ___ATIVGAIO_H___ */ xf86-video-mach64-6.9.5/src/atividmem.h0000644000175000017500000000433212270010352014344 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIVIDMEM_H___ #define ___ATIVIDMEM_H___ 1 #include "atipriv.h" /* Memory types for 68800's and 88800GX's */ typedef enum { MEM_MACH_DRAMx4, MEM_MACH_VRAM, MEM_MACH_VRAMssr, MEM_MACH_DRAMx16, MEM_MACH_GDRAM, MEM_MACH_EVRAM, MEM_MACH_EVRAMssr, MEM_MACH_TYPE_7 } ATIMachMemoryType; extern const char *ATIMemoryTypeNames_Mach[]; /* Memory types for 88800CX's */ typedef enum { MEM_CX_DRAM, MEM_CX_EDO, MEM_CX_TYPE_2, MEM_CX_DRAM_A, MEM_CX_TYPE_4, MEM_CX_TYPE_5, MEM_CX_TYPE_6, MEM_CX_TYPE_7 } ATICXMemoryType; extern const char *ATIMemoryTypeNames_88800CX[]; /* Memory types for 264xT's */ typedef enum { MEM_264_NONE, MEM_264_DRAM, MEM_264_EDO, MEM_264_PSEUDO_EDO, MEM_264_SDRAM, MEM_264_SGRAM, MEM_264_SGRAM32, MEM_264_TYPE_7 } ATI264MemoryType; extern const char *ATIMemoryTypeNames_264xT[]; extern Bool ATIMapApertures(int, ATIPtr); extern void ATIUnmapApertures(int, ATIPtr); #endif /* ___ATIVIDMEM_H___ */ xf86-video-mach64-6.9.5/src/atiwonder.h0000644000175000017500000000303612270010352014361 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIWONDER_H___ #define ___ATIWONDER_H___ 1 #include "atipriv.h" #include "xf86str.h" #ifndef AVOID_CPIO extern void ATIVGAWonderPreInit(ATIPtr, ATIHWPtr); extern void ATIVGAWonderSave(ATIPtr, ATIHWPtr); extern void ATIVGAWonderSet(ATIPtr, ATIHWPtr); #endif /* AVOID_CPIO */ #endif /* ___ATIWONDER_H___ */ xf86-video-mach64-6.9.5/src/atiwonderio.h0000644000175000017500000000346212270010352014714 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIWONDERIO_H___ #if !defined(___ATI_H___) && defined(XFree86Module) # error missing #include "ati.h" before #include "atiwonderio.h" # undef XFree86Module #endif #define ___ATIWONDERIO_H___ 1 #include "atistruct.h" #include "ativgaio.h" #ifndef AVOID_CPIO extern void ATIModifyExtReg(ATIPtr, const CARD8, int, const CARD8, CARD8); #define ATIGetExtReg(_Index) \ GetReg(pATI->CPIO_VGAWonder, _Index) #define ATIPutExtReg(_Index, _Value) \ PutReg(pATI->CPIO_VGAWonder, _Index, _Value) #endif /* AVOID_CPIO */ #endif /* ___ATIWONDERIO_H___ */ xf86-video-mach64-6.9.5/src/atixv.h0000644000175000017500000000276212270010352013525 00000000000000/* * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef ___ATIXV_H___ #define ___ATIXV_H___ 1 #include "atipriv.h" #include "xf86str.h" extern void ATIXVPreInit(ATIPtr); extern Bool ATIInitializeXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr); extern void ATICloseXVideo(ScreenPtr, ScrnInfoPtr, ATIPtr); #endif /* ___ATIXV_H___ */ xf86-video-mach64-6.9.5/src/mach64_common.h0000644000175000017500000000757712270010352015035 00000000000000/* mach64_common.h -- common header definitions for Rage Pro 2D/3D/DRM suite * Created: Sun Dec 03 11:34:16 2000 by gareth@valinux.com * * Copyright 2000 Gareth Hughes * All Rights Reserved. * * 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 (including the next * paragraph) 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 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Author: * Gareth Hughes * Leif Delgass */ #ifndef __MACH64_COMMON_H__ #define __MACH64_COMMON_H__ 1 /* WARNING: If you change any of these defines, make sure to change * the kernel include file as well (mach64_drm.h) */ /* Driver specific DRM command indices * NOTE: these are not OS specific, but they are driver specific */ #define DRM_MACH64_INIT 0x00 #define DRM_MACH64_IDLE 0x01 #define DRM_MACH64_RESET 0x02 #define DRM_MACH64_SWAP 0x03 #define DRM_MACH64_CLEAR 0x04 #define DRM_MACH64_VERTEX 0x05 #define DRM_MACH64_BLIT 0x06 #define DRM_MACH64_FLUSH 0x07 #define DRM_MACH64_GETPARAM 0x08 /* Buffer flags for clears */ #define MACH64_FRONT 0x1 #define MACH64_BACK 0x2 #define MACH64_DEPTH 0x4 /* Primitive types for vertex buffers */ #define MACH64_PRIM_POINTS 0x00000000 #define MACH64_PRIM_LINES 0x00000001 #define MACH64_PRIM_LINE_LOOP 0x00000002 #define MACH64_PRIM_LINE_STRIP 0x00000003 #define MACH64_PRIM_TRIANGLES 0x00000004 #define MACH64_PRIM_TRIANGLE_STRIP 0x00000005 #define MACH64_PRIM_TRIANGLE_FAN 0x00000006 #define MACH64_PRIM_QUADS 0x00000007 #define MACH64_PRIM_QUAD_STRIP 0x00000008 #define MACH64_PRIM_POLYGON 0x00000009 typedef enum _drmMach64DMAMode { MACH64_MODE_DMA_ASYNC, MACH64_MODE_DMA_SYNC, MACH64_MODE_MMIO } drmMach64DMAMode; typedef struct { enum { DRM_MACH64_INIT_DMA = 0x01, DRM_MACH64_CLEANUP_DMA = 0x02 } func; unsigned long sarea_priv_offset; int is_pci; drmMach64DMAMode dma_mode; unsigned int fb_bpp; unsigned int front_offset, front_pitch; unsigned int back_offset, back_pitch; unsigned int depth_bpp; unsigned int depth_offset, depth_pitch; unsigned long fb_offset; unsigned long mmio_offset; unsigned long ring_offset; unsigned long buffers_offset; unsigned long agp_textures_offset; } drmMach64Init; typedef struct { unsigned int flags; int x, y, w, h; unsigned int clear_color; unsigned int clear_depth; } drmMach64Clear; typedef struct { int prim; void *buf; /* Address of vertex buffer */ unsigned long used; /* Number of bytes in buffer */ int discard; /* Client finished with buffer? */ } drmMach64Vertex; typedef struct { void *buf; int pitch; int offset; int format; unsigned short x, y; unsigned short width, height; } drmMach64Blit; typedef struct { int param; int *value; } drmMach64GetParam; #define MACH64_PARAM_FRAMES_QUEUED 1 #define MACH64_PARAM_IRQ_NR 2 #endif /* __MACH64_COMMON_H__ */ xf86-video-mach64-6.9.5/src/mach64_dri.h0000644000175000017500000000715612270010352014314 00000000000000/* * Copyright 2000 Gareth Hughes * All Rights Reserved. * * 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 (including the next * paragraph) 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 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* * Authors: * Gareth Hughes * Leif Delgass */ #ifndef __MACH64_DRI_H__ #define __MACH64_DRI_H__ 1 #include "xf86drm.h" typedef struct { drm_handle_t fbHandle; drm_handle_t regsHandle; drmSize regsSize; int IsPCI; drm_handle_t agpHandle; /* Handle from drmAgpAlloc */ unsigned long agpOffset; drmSize agpSize; int agpMode; /* DMA descriptor ring */ unsigned long ringStart; /* Offset into AGP space */ drm_handle_t ringHandle; /* Handle from drmAddMap */ drmSize ringMapSize; /* Size of map */ int ringSize; /* Size of ring (in kB) */ drmAddress ringMap; /* Map */ /* vertex buffer data */ unsigned long bufferStart; /* Offset into AGP space */ drm_handle_t bufferHandle; /* Handle from drmAddMap */ drmSize bufferMapSize; /* Size of map */ int bufferSize; /* Size of buffers (in MB) */ drmAddress bufferMap; /* Map */ drmBufMapPtr drmBuffers; /* Buffer map */ int numBuffers; /* Number of buffers */ /* AGP Texture data */ unsigned long agpTexStart; /* Offset into AGP space */ drm_handle_t agpTexHandle; /* Handle from drmAddMap */ drmSize agpTexMapSize; /* Size of map */ int agpTexSize; /* Size of AGP tex space (in MB) */ drmAddress agpTexMap; /* Map */ int log2AGPTexGran; int fbX; int fbY; int backX; int backY; int depthX; int depthY; int frontOffset; int frontPitch; int backOffset; int backPitch; int depthOffset; int depthPitch; int textureOffset; int textureSize; int logTextureGranularity; } ATIDRIServerInfoRec, *ATIDRIServerInfoPtr; typedef struct { int chipset; int width; int height; int mem; int cpp; int IsPCI; int AGPMode; unsigned int frontOffset; unsigned int frontPitch; unsigned int backOffset; unsigned int backPitch; unsigned int depthOffset; unsigned int depthPitch; unsigned int textureOffset; unsigned int textureSize; int logTextureGranularity; drm_handle_t regs; drmSize regsSize; drm_handle_t agp; drmSize agpSize; unsigned int agpTextureOffset; unsigned int agpTextureSize; int logAgpTextureGranularity; } ATIDRIRec, *ATIDRIPtr; #endif /* __MACH64_DRI_H__ */ xf86-video-mach64-6.9.5/src/mach64_sarea.h0000644000175000017500000001264512270010352014630 00000000000000/* * Copyright 2000 Gareth Hughes * All Rights Reserved. * * 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 (including the next * paragraph) 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 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* * Authors: * Gareth Hughes * Leif Delgass */ #ifndef __MACH64_SAREA_H__ #define __MACH64_SAREA_H__ 1 #include /* WARNING: If you change any of these defines, make sure to change the * defines in the kernel file (mach64_drm.h) */ #ifndef __MACH64_SAREA_DEFINES__ #define __MACH64_SAREA_DEFINES__ 1 /* What needs to be changed for the current vertex buffer? * GH: We're going to be pedantic about this. We want the card to do as * little as possible, so let's avoid having it fetch a whole bunch of * register values that don't change all that often, if at all. */ #define MACH64_UPLOAD_DST_OFF_PITCH 0x0001 #define MACH64_UPLOAD_Z_OFF_PITCH 0x0002 #define MACH64_UPLOAD_Z_ALPHA_CNTL 0x0004 #define MACH64_UPLOAD_SCALE_3D_CNTL 0x0008 #define MACH64_UPLOAD_DP_FOG_CLR 0x0010 #define MACH64_UPLOAD_DP_WRITE_MASK 0x0020 #define MACH64_UPLOAD_DP_PIX_WIDTH 0x0040 #define MACH64_UPLOAD_SETUP_CNTL 0x0080 #define MACH64_UPLOAD_MISC 0x0100 #define MACH64_UPLOAD_TEXTURE 0x0200 #define MACH64_UPLOAD_TEX0IMAGE 0x0400 #define MACH64_UPLOAD_TEX1IMAGE 0x0800 #define MACH64_UPLOAD_CLIPRECTS 0x1000 /* handled client-side */ #define MACH64_UPLOAD_CONTEXT 0x00ff #define MACH64_UPLOAD_ALL 0x1fff /* DMA buffer size */ #define MACH64_BUFFER_SIZE 16384 /* Max number of swaps allowed on the ring * before the client must wait */ #define MACH64_MAX_QUEUED_FRAMES 3 /* Byte offsets for host blit buffer data */ #define MACH64_HOSTDATA_BLIT_OFFSET 104 /* Keep these small for testing. */ #define MACH64_NR_SAREA_CLIPRECTS 8 #define MACH64_CARD_HEAP 0 #define MACH64_AGP_HEAP 1 #define MACH64_NR_TEX_HEAPS 2 #define MACH64_NR_TEX_REGIONS 64 #define MACH64_LOG_TEX_GRANULARITY 16 #define MACH64_TEX_MAXLEVELS 1 #define MACH64_NR_CONTEXT_REGS 15 #define MACH64_NR_TEXTURE_REGS 4 #endif /* __MACH64_SAREA_DEFINES__ */ typedef struct { /* Context state */ unsigned int dst_off_pitch; /* 0x500 */ unsigned int z_off_pitch; /* 0x548 */ /* ****** */ unsigned int z_cntl; /* 0x54c */ unsigned int alpha_tst_cntl; /* 0x550 */ unsigned int scale_3d_cntl; /* 0x5fc */ unsigned int sc_left_right; /* 0x6a8 */ unsigned int sc_top_bottom; /* 0x6b4 */ unsigned int dp_fog_clr; /* 0x6c4 */ unsigned int dp_write_mask; /* 0x6c8 */ unsigned int dp_pix_width; /* 0x6d0 */ unsigned int dp_mix; /* 0x6d4 */ /* ****** */ unsigned int dp_src; /* 0x6d8 */ /* ****** */ unsigned int clr_cmp_cntl; /* 0x708 */ /* ****** */ unsigned int gui_traj_cntl; /* 0x730 */ /* ****** */ unsigned int setup_cntl; /* 0x304 */ /* Texture state */ unsigned int tex_size_pitch; /* 0x770 */ unsigned int tex_cntl; /* 0x774 */ unsigned int secondary_tex_off; /* 0x778 */ unsigned int tex_offset; /* 0x5c0 */ } mach64_context_regs_t; typedef struct { /* The channel for communication of state information to the kernel * on firing a vertex buffer. */ mach64_context_regs_t ContextState; unsigned int dirty; unsigned int vertsize; #ifdef XF86DRI /* The current cliprects, or a subset thereof. */ drm_clip_rect_t boxes[MACH64_NR_SAREA_CLIPRECTS]; unsigned int nbox; #endif /* Counter for throttling of rendering clients. */ unsigned int frames_queued; /* Maintain an LRU of contiguous regions of texture space. If you * think you own a region of texture memory, and it has an age * different to the one you set, then you are mistaken and it has * been stolen by another client. If global texAge hasn't changed, * there is no need to walk the list. * * These regions can be used as a proxy for the fine-grained texture * information of other clients - by maintaining them in the same * lru which is used to age their own textures, clients have an * approximate lru for the whole of global texture space, and can * make informed decisions as to which areas to kick out. There is * no need to choose whether to kick out your own texture or someone * else's - simply eject them all in LRU order. */ drmTextureRegion texList[MACH64_NR_TEX_HEAPS][MACH64_NR_TEX_REGIONS+1]; unsigned int texAge[MACH64_NR_TEX_HEAPS]; int ctxOwner; /* last context to upload state */ } ATISAREAPrivRec, *ATISAREAPrivPtr; #endif /* __MACH64_SAREA_H__ */ xf86-video-mach64-6.9.5/src/atipcirename.h0000644000175000017500000001173212270010352015030 00000000000000/* * Copyright 2007 George Sapountzis * * 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 (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /** * Macros for porting drivers from legacy xfree86 PCI code to the pciaccess * library. The main purpose being to facilitate source code compatibility. */ #ifndef ATIPCIRENAME_H #define ATIPCIRENAME_H enum region_type { REGION_MEM, REGION_IO }; #ifndef XSERVER_LIBPCIACCESS /* pciVideoPtr */ #define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor) #define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->chipType) #define PCI_DEV_REVISION(_pcidev) ((_pcidev)->chipRev) #define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subsysVendor) #define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subsysCard) #define PCI_DEV_TAG(_pcidev) pciTag((_pcidev)->bus, \ (_pcidev)->device, \ (_pcidev)->func) #define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus) #define PCI_DEV_DEV(_pcidev) ((_pcidev)->device) #define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func) /* pciConfigPtr */ #define PCI_CFG_TAG(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->tag) #define PCI_CFG_BUS(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->busnum) #define PCI_CFG_DEV(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->devnum) #define PCI_CFG_FUNC(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->funcnum) /* region addr: xfree86 uses different fields for memory regions and I/O ports */ #define PCI_REGION_BASE(_pcidev, _b, _type) \ (((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] \ : (_pcidev)->ioBase[(_b)]) /* region size: xfree86 uses the log2 of the region size, * but with zero meaning no region, not size of one XXX */ #define PCI_REGION_SIZE(_pcidev, _b) \ (((_pcidev)->size[(_b)] > 0) ? (1 << (_pcidev)->size[(_b)]) : 0) /* read/write PCI configuration space */ #define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \ *(_value_ptr) = pciReadByte(PCI_CFG_TAG(_pcidev), (_offset)) #define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \ *(_value_ptr) = pciReadLong(PCI_CFG_TAG(_pcidev), (_offset)) #define PCI_WRITE_LONG(_pcidev, _value, _offset) \ pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value)) #else /* XSERVER_LIBPCIACCESS */ typedef struct pci_device *pciVideoPtr; #define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor_id) #define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->device_id) #define PCI_DEV_REVISION(_pcidev) ((_pcidev)->revision) #define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subvendor_id) #define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subdevice_id) /* pci-rework functions take a 'pci_device' parameter instead of a tag */ #define PCI_DEV_TAG(_pcidev) (_pcidev) /* PCI_DEV macros, typically used in printf's, add domain ? XXX */ #define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus) #define PCI_DEV_DEV(_pcidev) ((_pcidev)->dev) #define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func) /* pci-rework functions take a 'pci_device' parameter instead of a tag */ #define PCI_CFG_TAG(_pcidev) (_pcidev) /* PCI_CFG macros, typically used in DRI init, contain the domain */ #define PCI_CFG_BUS(_pcidev) (((_pcidev)->domain << 8) | \ (_pcidev)->bus) #define PCI_CFG_DEV(_pcidev) ((_pcidev)->dev) #define PCI_CFG_FUNC(_pcidev) ((_pcidev)->func) #define PCI_REGION_BASE(_pcidev, _b, _type) ((_pcidev)->regions[(_b)].base_addr) #define PCI_REGION_SIZE(_pcidev, _b) ((_pcidev)->regions[(_b)].size) #define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \ pci_device_cfg_read_u8((_pcidev), (_value_ptr), (_offset)) #define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \ pci_device_cfg_read_u32((_pcidev), (_value_ptr), (_offset)) #define PCI_WRITE_LONG(_pcidev, _value, _offset) \ pci_device_cfg_write_u32((_pcidev), (_value), (_offset)) #define ATI_DEVICE_MATCH(d, i) \ { PCI_VENDOR_ATI, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } #endif /* XSERVER_LIBPCIACCESS */ #endif /* ATIPCIRENAME_H */ xf86-video-mach64-6.9.5/src/compat-api.h0000644000175000017500000000707212270010352014423 00000000000000/* * Copyright 2012 Red Hat, Inc. * * 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 (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * Author: Dave Airlie */ /* this file provides API compat between server post 1.13 and pre it, it should be reused inside as many drivers as possible */ #ifndef COMPAT_API_H #define COMPAT_API_H #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR #define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] #define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p #endif #ifndef XF86_HAS_SCRN_CONV #define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] #endif #ifndef XF86_SCRN_INTERFACE #define SCRN_ARG_TYPE int #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScreenInfo = xf86Screens[(arg1)] #define SCREEN_ARG_TYPE int #define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] #define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv #define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask #define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen #define CLOSE_SCREEN_ARGS scrnIndex, pScreen #define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags #define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 #define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr pMode, int flags #define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 #define FREE_SCREEN_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS pScreenInfo->scrnIndex, 0 #define XF86_SCRN_ARG(x) ((x)->scrnIndex) #define SCREEN_ARG(x) ((x)->myNum) #else #define SCRN_ARG_TYPE ScrnInfoPtr #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScreenInfo = (arg1) #define SCREEN_ARG_TYPE ScreenPtr #define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen #define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y #define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y #define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode #define SWITCH_MODE_ARGS(arg, m) arg, m #define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS pScreenInfo #define XF86_SCRN_ARG(x) (x) #define SCREEN_ARG(x) (x) #endif #endif xf86-video-mach64-6.9.5/depcomp0000755000175000017500000005601612521746617013033 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-video-mach64-6.9.5/man/0000755000175000017500000000000012521747527012302 500000000000000xf86-video-mach64-6.9.5/man/Makefile.am0000644000175000017500000000275412270010352014242 00000000000000# # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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 (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = CLEANFILES = $(driverman_DATA) # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ xf86-video-mach64-6.9.5/man/Makefile.in0000644000175000017500000004035712521746617014277 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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 (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(drivermandir)" DATA = $(driverman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DRI_CFLAGS = @DRI_CFLAGS@ DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ 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@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ 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@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = CLEANFILES = $(driverman_DATA) # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man all: all-am .SUFFIXES: .SUFFIXES: .$(DRIVER_MAN_SUFFIX) .man $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || 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)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(drivermandir)"; 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) 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-drivermanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-drivermanDATA .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-drivermanDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-drivermanDATA .PRECIOUS: Makefile .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # 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: