summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-07-07 13:05:19 -0600
committerJordan Crouse <jordan.crouse@amd.com>2006-07-07 13:35:53 -0600
commit726d46c8da96b2a0168b39d36be32467d54a9de3 (patch)
treec1bdf5bff463b5f6f56a732cd4e663fa6750fef5
parentc3ab9f1a60afe1f5e86db1cf2635acda14fae2f5 (diff)
Update with cleanup and other fixes
Final commit of cleanup fixes prior to pushing
-rw-r--r--Makefile.in5
-rw-r--r--aclocal.m41023
-rwxr-xr-xconfig.guess712
-rwxr-xr-xconfig.sub239
-rwxr-xr-xconfigure5364
-rw-r--r--configure.ac6
-rwxr-xr-xlibtool1453
-rwxr-xr-xltmain.sh1380
-rw-r--r--man/Makefile.in3
-rw-r--r--src/Makefile.am8
-rw-r--r--src/Makefile.in21
-rw-r--r--src/amd.h11
-rw-r--r--src/amd_driver.c6
-rw-r--r--src/amd_fourcc.h54
-rw-r--r--src/amd_gx_accel.c8
-rw-r--r--src/amd_gx_driver.c321
-rw-r--r--src/build_num.h43
-rw-r--r--src/cim/cim_defs.h466
-rw-r--r--src/gfx/disp_gu3.c2603
-rw-r--r--src/gfx/durango.c4
-rw-r--r--src/gfx/gfx_disp.c332
-rw-r--r--src/gfx/gfx_init.c134
-rw-r--r--src/gfx/gfx_regs.h378
-rw-r--r--src/gfx/gfx_rtns.h3
-rw-r--r--src/gfx/gfx_type.h2
-rw-r--r--src/gfx/gfx_vid.c216
-rw-r--r--src/gfx/init_gu3.c159
-rw-r--r--src/gfx/vid_cstl.c2571
28 files changed, 6218 insertions, 11307 deletions
diff --git a/Makefile.in b/Makefile.in
index adefe89..f816225 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -55,7 +55,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog config.guess \
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
@@ -96,6 +96,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
+AMD_CFLAGS = @AMD_CFLAGS@
AMTAR = @AMTAR@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
diff --git a/aclocal.m4 b/aclocal.m4
index 733be37..b5b458f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 47 AC_PROG_LIBTOOL
+# serial 48 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -143,7 +143,7 @@ rm="rm -f"
default_ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
ltmain="$ac_aux_dir/ltmain.sh"
@@ -163,6 +163,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
@@ -182,10 +183,10 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
;;
*)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
;;
esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
@@ -218,6 +219,14 @@ AC_ARG_WITH([pic],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
+
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
@@ -225,6 +234,41 @@ _LT_AC_TAGCONFIG
])# AC_LIBTOOL_SETUP
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test "x$ltmain" = "x" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+])
+fi
+gentoo_lt_version="1.5.22"
+gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+
+*** @<:@Gentoo@:>@ sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+])
+else
+ AC_MSG_RESULT(yes)
+fi
+])# _LT_VERSION_CHECK
+
+
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
@@ -233,6 +277,9 @@ AC_DEFUN([_LT_AC_SYS_COMPILER],
# 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_AC_SYS_COMPILER
@@ -261,7 +308,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_COMPILER_BOILERPLATE
@@ -274,7 +321,7 @@ $rm conftest*
AC_DEFUN([_LT_LINKER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_LINKER_BOILERPLATE
@@ -359,8 +406,8 @@ if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
- echo_test_string="`eval $cmd`" &&
+ if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+ echo_test_string=`eval $cmd` &&
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
then
break
@@ -529,7 +576,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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
+ case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
x86_64-*linux*)
@@ -580,6 +627,22 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
CFLAGS="$SAVE_CFLAGS"
fi
;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
@@ -611,7 +674,7 @@ AC_CACHE_CHECK([$1], [$2],
# 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}? :&$lt_compiler_flag :; t' \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -622,9 +685,9 @@ AC_CACHE_CHECK([$1], [$2],
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
fi
@@ -650,13 +713,13 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
LDFLAGS="$LDFLAGS $3"
printf "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The compiler can only warn and ignore the option if not recognized
+ # The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
$2=yes
fi
@@ -725,25 +788,42 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
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 *BSD
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
fi
# And add a safety zone
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
# nice to cause kernel panics so lets avoid the loop below.
# First set a reasonable default.
lt_cv_sys_max_cmd_len=16384
- #
+ #
if test -x /sbin/sysconfig; then
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
*1*) lt_cv_sys_max_cmd_len=-1 ;;
esac
fi
;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
*)
# 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
@@ -775,7 +855,7 @@ fi
# _LT_AC_CHECK_DLFCN
-# --------------------
+# ------------------
AC_DEFUN([_LT_AC_CHECK_DLFCN],
[AC_CHECK_HEADERS(dlfcn.h)dnl
])# _LT_AC_CHECK_DLFCN
@@ -783,7 +863,7 @@ AC_DEFUN([_LT_AC_CHECK_DLFCN],
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
+# ---------------------------------------------------------------------
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
if test "$cross_compiling" = yes; then :
@@ -849,17 +929,19 @@ int main ()
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
+ else
+ puts (dlerror ());
exit (status);
}]
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
+ (./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_unknown|x*) $3 ;;
+ x$lt_dlunknown|x*) $3 ;;
esac
else :
# compilation failed
@@ -871,7 +953,7 @@ rm -fr conftest*
# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
+# ----------------------
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
if test "x$enable_dlopen" != xyes; then
@@ -942,7 +1024,7 @@ else
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
@@ -955,7 +1037,7 @@ else
])
if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
+ 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_AC_TRY_DLOPEN_SELF(
@@ -1003,7 +1085,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
# 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}? :&$lt_compiler_flag :; t' \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -1015,13 +1097,13 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
- $SED '/^$/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
fi
fi
- chmod u+w .
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
@@ -1281,7 +1363,8 @@ cygwin* | mingw* | pw32*)
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'
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
@@ -1316,6 +1399,30 @@ cygwin* | mingw* | pw32*)
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -1334,7 +1441,7 @@ darwin* | rhapsody*)
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)'
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -1372,8 +1479,22 @@ kfreebsd*-gnu)
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -1384,6 +1505,12 @@ freebsd* | dragonfly*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -1394,10 +1521,15 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ 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
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -1417,7 +1549,7 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
@@ -1457,6 +1589,18 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -1514,27 +1658,10 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -1595,8 +1722,13 @@ nto-qnx*)
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- need_version=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
@@ -1634,13 +1766,6 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- 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
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -1666,7 +1791,7 @@ sunos4*)
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -1699,6 +1824,29 @@ sysv4*MP*)
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
+ 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'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ 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'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1712,6 +1860,11 @@ uts4*)
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
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
@@ -1736,6 +1889,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
+ if test -z "$LTCFLAGS"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+ fi
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
@@ -1826,7 +1982,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN],
# AC_LIBTOOL_WIN32_DLL
# --------------------
-# declare package support for building win32 dll's
+# declare package support for building win32 DLLs
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
])# AC_LIBTOOL_WIN32_DLL
@@ -1864,7 +2020,7 @@ AC_ARG_ENABLE([shared],
# AC_DISABLE_SHARED
# -----------------
-#- set the default shared flag to --disable-shared
+# set the default shared flag to --disable-shared
AC_DEFUN([AC_DISABLE_SHARED],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)
@@ -2000,7 +2156,7 @@ dnl not every word. This closes a longstanding sh security hole.
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"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
@@ -2110,7 +2266,7 @@ AC_CACHE_VAL(lt_cv_path_LD,
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 GNU ld's only accept -v.
+ # 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 </dev/null` in
*GNU* | *'with BFD'*)
@@ -2142,7 +2298,7 @@ AC_PROG_LD_GNU
AC_DEFUN([AC_PROG_LD_GNU],
[AC_REQUIRE([AC_PROG_EGREP])dnl
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -2172,7 +2328,7 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
darwin*)
if test "$GCC" = yes; then
- reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -2256,7 +2412,7 @@ gnu*)
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
- case "$host_cpu" in
+ 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
@@ -2272,6 +2428,11 @@ hpux10.20* | hpux11*)
esac
;;
+interix3*)
+ # 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;;
@@ -2317,15 +2478,11 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+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]]'
@@ -2346,10 +2503,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
siemens)
lt_cv_deplibs_check_method=pass_all
;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
@@ -2369,36 +2529,43 @@ AC_DEFUN([AC_PROG_NM],
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/${ac_tool_prefix}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"
+ 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
;;
*)
- 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
+ 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
- esac
- fi
+ fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$lt_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
NM="$lt_cv_path_NM"
@@ -2430,13 +2597,13 @@ esac
# -----------------------------------
# sets LIBLTDL to the link flags for the libltdl convenience library and
# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
-# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
+# --enable-ltdl-convenience to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!). If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case $enable_ltdl_convenience in
@@ -2455,13 +2622,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
# -----------------------------------
# sets LIBLTDL to the link flags for the libltdl installable library and
# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!). If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
+# --enable-ltdl-install to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
@@ -2504,7 +2671,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
])# _LT_AC_LANG_CXX
# _LT_AC_PROG_CXXCPP
-# ---------------
+# ------------------
AC_DEFUN([_LT_AC_PROG_CXXCPP],
[
AC_REQUIRE([AC_PROG_CXX])
@@ -2553,7 +2720,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
# AC_LIBTOOL_RC
-# --------------
+# -------------
# enable support for Windows resource files
AC_DEFUN([AC_LIBTOOL_RC],
[AC_REQUIRE([LT_AC_PROG_RC])
@@ -2590,37 +2757,6 @@ _LT_AC_SYS_COMPILER
_LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
- case $host_os in
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
- ;;
- esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
- AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
- _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
- fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
- $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
- [],
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
AC_LIBTOOL_PROG_COMPILER_PIC($1)
AC_LIBTOOL_PROG_CC_C_O($1)
@@ -2629,9 +2765,9 @@ AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
+AC_LIBTOOL_DLOPEN_SELF
-# Report which librarie types wil actually be built
+# Report which library types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
@@ -2640,7 +2776,7 @@ 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
+case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
@@ -2690,6 +2826,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
_LT_AC_TAGVAR(module_cmds, $1)=
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
@@ -2707,7 +2844,7 @@ _LT_AC_TAGVAR(postdeps, $1)=
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
# Source file extension for C++ test sources.
-ac_ext=cc
+ac_ext=cpp
# Object file extension for compiled C++ test sources.
objext=o
@@ -2717,7 +2854,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code="int some_variable = 0;\n"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -2736,12 +2873,12 @@ 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
- unset lt_cv_prog_gnu_ld
+ $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
- unset lt_cv_path_LD
+ $as_unset lt_cv_path_LD
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -2836,6 +2973,7 @@ case $host_os in
;;
esac
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -2873,6 +3011,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
fi
+ ;;
esac
shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
@@ -2904,12 +3043,12 @@ case $host_os in
_LT_AC_SYS_LIBPATH_AIX
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
if test "$host_cpu" = ia64; then
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ _LT_AC_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_AC_SYS_LIBPATH_AIX
@@ -2918,16 +3057,26 @@ case $host_os in
# -berok will link without error, but may produce a broken library.
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
# Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
chorus*)
case $cc_basename in
*)
@@ -2937,7 +3086,6 @@ case $host_os in
esac
;;
-
cygwin* | mingw* | pw32*)
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
@@ -2947,7 +3095,7 @@ case $host_os in
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -2956,13 +3104,13 @@ case $host_os in
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $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_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
darwin* | rhapsody*)
- case "$host_os" in
+ case $host_os in
rhapsody* | darwin1.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
;;
@@ -3000,7 +3148,7 @@ case $host_os in
_LT_AC_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'
fi
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
@@ -3013,7 +3161,7 @@ case $host_os in
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
@@ -3093,33 +3241,22 @@ case $host_os in
;;
hpux10*|hpux11*)
if test $with_gnu_ld = no; then
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
;;
*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
esac
fi
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- ia64*)
+ case $host_cpu in
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
;;
*)
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -3135,9 +3272,12 @@ case $host_os in
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
aCC*)
- case "$host_cpu" in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ case $host_cpu in
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
_LT_AC_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'
@@ -3156,9 +3296,12 @@ case $host_os in
*)
if test "$GXX" = yes; then
if test $with_gnu_ld = no; then
- case "$host_cpu" in
- ia64*|hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ case $host_cpu in
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
@@ -3172,6 +3315,20 @@ case $host_os in
;;
esac
;;
+ interix3*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_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_AC_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_AC_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*)
@@ -3252,12 +3409,12 @@ case $host_os in
;;
pgCC*)
# Portland Group C++ compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_AC_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'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_AC_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'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
;;
cxx*)
# Compaq C++
@@ -3454,19 +3611,6 @@ case $host_os in
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
- sco*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
sunos4*)
case $cc_basename in
CC*)
@@ -3489,10 +3633,11 @@ case $host_os in
case $cc_basename in
CC*)
# Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
_LT_AC_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} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -3512,15 +3657,7 @@ case $host_os in
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='echo'
# Archives containing C++ object files must be created using
# "CC -xar", where "CC" is the Sun C++ compiler. This is
@@ -3566,8 +3703,59 @@ case $host_os in
;;
esac
;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_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.
+ # 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.
+ # So that behaviour is only enabled if SCOABSPATH is set to a
+ # non-empty value in the environment. Most likely only useful for
+ # creating official distributions of packages.
+ # This is a hack until libtool officially supports absolute path
+ # names for shared libraries.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
;;
tandem*)
case $cc_basename in
@@ -3604,8 +3792,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
@@ -3623,7 +3809,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
])# AC_LIBTOOL_LANG_CXX_CONFIG
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------
+# ------------------------------------
# Figure out "hidden" library dependencies from verbose
# compiler output when linking a shared library.
# Parse the compiler output and extract the necessary
@@ -3677,7 +3863,7 @@ if AC_TRY_EVAL(ac_compile); then
# The `*' in the case matches for architectures that use `case' in
# $output_verbose_cmd can trigger glob expansion during the loop
# eval without this substitution.
- output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+ output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
for p in `eval $output_verbose_link_cmd`; do
case $p in
@@ -3753,13 +3939,37 @@ fi
$rm -f confest.$objext
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix3*)
+ # 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_AC_TAGVAR(predep_objects,$1)=
+ _LT_AC_TAGVAR(postdep_objects,$1)=
+ _LT_AC_TAGVAR(postdeps,$1)=
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # 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.
+ _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ ;;
+ esac
+ ;;
+esac
+])
+
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
esac
])# AC_LIBTOOL_POSTDEP_PREDEP
# AC_LIBTOOL_LANG_F77_CONFIG
-# ------------------------
+# --------------------------
# Ensure that the configuration vars for the C compiler are
# suitably defined. Those variables are subsequently used by
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
@@ -3822,7 +4032,7 @@ 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
+case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
@@ -3843,8 +4053,6 @@ AC_MSG_CHECKING([whether to build static libraries])
test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
_LT_AC_TAGVAR(GCC, $1)="$G77"
_LT_AC_TAGVAR(LD, $1)="$LD"
@@ -3854,8 +4062,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-
AC_LIBTOOL_CONFIG($1)
@@ -3912,8 +4118,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
AC_LIBTOOL_PROG_LD_SHLIBS($1)
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
@@ -3923,7 +4127,7 @@ CC="$lt_save_CC"
# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
+# -------------------------
# Ensure that the configuration vars for the Windows resource compiler are
# suitably defined. Those variables are subsequently used by
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
@@ -3986,7 +4190,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -4155,6 +4359,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
@@ -4528,9 +4735,18 @@ irix* | nonstopux*)
osf*)
symcode='[[BCDEGQRST]]'
;;
-solaris* | sysv5*)
+solaris*)
symcode='[[BDRT]]'
;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
sysv4)
symcode='[[DFNSTU]]'
;;
@@ -4713,6 +4929,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
+ interix3*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
@@ -4721,7 +4941,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
;;
*)
@@ -4782,15 +5002,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
case $cc_basename in
CC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
if test "$host_cpu" != ia64; then
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi
;;
aCC*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- case "$host_cpu" in
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -4803,6 +5023,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
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*)
@@ -4831,7 +5055,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# Portland Group C++ compiler.
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
cxx*)
# Compaq C++
@@ -4882,15 +5106,6 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
psos*)
;;
- sco*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- *)
- ;;
- esac
- ;;
solaris*)
case $cc_basename in
CC*)
@@ -4932,7 +5147,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
- unixware*)
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
;;
vxworks*)
;;
@@ -4979,6 +5201,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
+ interix3*)
+ # 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.
@@ -4995,7 +5222,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -5042,7 +5269,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_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
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -5072,12 +5299,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgcc* | pgf77* | pgf90*)
+ pgcc* | pgf77* | pgf90* | pgf95*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
ccc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -5093,11 +5320,6 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
- ;;
-
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5115,7 +5337,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5128,6 +5350,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
fi
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
unicos*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
@@ -5160,7 +5388,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
fi
-case "$host_os" in
+case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
@@ -5169,6 +5397,16 @@ case "$host_os" in
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
;;
esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
])
@@ -5247,6 +5485,10 @@ ifelse([$1],[CXX],[
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
;;
@@ -5256,7 +5498,7 @@ ifelse([$1],[CXX],[
if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
-
+
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
@@ -5277,7 +5519,7 @@ ifelse([$1],[CXX],[
*\ 2.11.*) ;; # other 2.11 versions
*) supports_anon_versioning=yes ;;
esac
-
+
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
@@ -5331,7 +5573,7 @@ EOF
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -5340,22 +5582,38 @@ EOF
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $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_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
+ interix3*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_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_AC_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_AC_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'
+ ;;
+
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_addflag=' -fpic -Mnomain' ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
@@ -5386,7 +5644,7 @@ EOF
fi
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<EOF 1>&2
@@ -5407,6 +5665,33 @@ EOF
fi
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_AC_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
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
sunos4*)
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
@@ -5440,7 +5725,7 @@ EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5474,6 +5759,7 @@ EOF
break
fi
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -5511,6 +5797,7 @@ EOF
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
fi
+ ;;
esac
shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
@@ -5523,11 +5810,11 @@ EOF
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
+ if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
- fi
+ fi
fi
fi
@@ -5541,12 +5828,12 @@ EOF
# Determine the default libpath from the value encoded in an empty executable.
_LT_AC_SYS_LIBPATH_AIX
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
if test "$host_cpu" = ia64; then
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ _LT_AC_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_AC_SYS_LIBPATH_AIX
@@ -5555,13 +5842,11 @@ EOF
# -berok will link without error, but may produce a broken library.
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
# Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_AC_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
;;
@@ -5600,7 +5885,7 @@ EOF
;;
darwin* | rhapsody*)
- case "$host_os" in
+ case $host_os in
rhapsody* | darwin1.[[012]])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
;;
@@ -5629,7 +5914,7 @@ EOF
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
@@ -5638,7 +5923,7 @@ EOF
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
@@ -5702,47 +5987,62 @@ EOF
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
- case "$host_cpu" in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ case $host_cpu in
+ hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_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
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
@@ -5844,14 +6144,6 @@ EOF
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- sco3.2v5*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
solaris*)
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
if test "$GCC" = yes; then
@@ -5937,36 +6229,45 @@ EOF
fi
;;
- sysv4.2uw2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
+ runpath_var='LD_RUN_PATH'
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
- runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- sysv5*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_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'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ 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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
;;
uts4*)
@@ -5984,11 +6285,6 @@ EOF
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = 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
-
#
# Do we need to explicitly link libc?
#
@@ -6016,6 +6312,7 @@ x|xyes)
libobjs=conftest.$ac_objext
deplibs=
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
compiler_flags=-v
linker_flags=-v
verstring=
@@ -6602,6 +6899,50 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
]) # XORG_CHECK_MALLOC_ZERO
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
+
+AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ 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
+])
+
+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
@@ -6662,7 +7003,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.5])])
+ [AM_AUTOMAKE_VERSION([1.9.6])])
# Figure out how to run the assembler. -*- Autoconf -*-
diff --git a/config.guess b/config.guess
index 2fc3acc..d870848 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2003-06-17'
+timestamp='2006-02-27'
# 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
@@ -17,13 +18,15 @@ timestamp='2003-06-17'
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -53,7 +56,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -104,7 +107,7 @@ 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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$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 ; } ;
@@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+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)
@@ -136,11 +139,21 @@ 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
-## for Red Hat Linux
-if test -f /etc/redhat-release ; then
- VENDOR=redhat ;
-else
- VENDOR= ;
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
fi
# Note: order is significant - the case branches are not exclusive.
@@ -203,50 +216,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ 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 powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *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
@@ -284,42 +279,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit 0 ;;
+ exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit 0 ;;
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
+ exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ 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 0;;
+ 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 0;;
+ 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
@@ -327,32 +329,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
+ 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 0 ;;
+ sparc) echo sparc-icl-nx7; exit ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -361,10 +363,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ 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
@@ -376,10 +378,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ 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
@@ -390,37 +392,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -444,32 +449,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
+ $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 0 ;;
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -485,29 +491,29 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ 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 0 ;; # Note that: echo "'`uname -s`'" gives '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 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -515,7 +521,7 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -530,14 +536,18 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
+ 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 0 ;;
+ exit ;;
*:AIX:*:[45])
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
@@ -551,28 +561,28 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+ exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -634,9 +644,19 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ 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 __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -644,11 +664,11 @@ EOF
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -676,150 +696,177 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+ exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+ exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
*:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ 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 0 ;;
+ 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 0 ;;
+ exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
- exit 0 ;;
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
+ exit ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ exit ;;
+ i*:MSYS_NT-*:*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
+ exit ;;
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[345]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit 0 ;;
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
*:GNU:*:*)
+ # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit 0 ;;
+ echo cris-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-${LIBC}
+ exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -836,8 +883,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -855,15 +906,22 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-${LIBC}
+ exit ;;
ppc:Linux:*:*)
- echo powerpc-${VENDOR:-unknown}-linux-gnu
- exit 0 ;;
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
ppc64:Linux:*:*)
- echo powerpc64-${VENDOR:-unknown}-linux-gnu
- exit 0 ;;
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -875,35 +933,38 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-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-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
- exit 0 ;;
+ exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
x86_64:Linux:*:*)
- echo x86_64-${VENDOR:-unknown}-linux-gnu
- exit 0 ;;
+ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -917,20 +978,22 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
+ exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
+ exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
+ exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -946,23 +1009,33 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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 0 ;;
+ 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...
@@ -970,24 +1043,27 @@ EOF
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
+ exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+ 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
@@ -995,15 +1071,16 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ 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 0 ;;
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1021,73 +1098,73 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit 0 ;;
+ 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 i386.
echo i386-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit 0 ;;
+ exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit 0 ;;
+ exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*: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)
+ 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 0
+ && { 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 0 ;;
+ && { 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 0 ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit 0 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1095,68 +1172,72 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
+ exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ 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 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Darwin:*:*)
- case `uname -p` in
- *86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1164,22 +1245,25 @@ EOF
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1190,28 +1274,47 @@ EOF
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
+ exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
+ 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 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1243,7 +1346,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
+ printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1332,11 +1435,12 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1345,22 +1449,22 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
c34*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
c38*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
c4*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
esac
fi
@@ -1371,7 +1475,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- ftp://ftp.gnu.org/pub/gnu/config/
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/config.sub b/config.sub
index 7cee3d6..bb39419 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2003-06-18'
+timestamp='2006-02-27'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +22,15 @@ timestamp='2003-06-18'
#
# 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.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -70,7 +72,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit 0;;
+ exit ;;
* )
break ;;
@@ -118,7 +120,9 @@ esac
# 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -144,7 +148,7 @@ case $os in
-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)
+ -apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@@ -169,6 +173,10 @@ case $os in
-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/'`
@@ -185,6 +193,10 @@ case $os in
# 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/'`
@@ -228,14 +240,16 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
+ | d10v | d30v | dlx | dsp16xx | dvp \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k \
- | m32r | m68000 | m68k | m88k | mcore \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -244,31 +258,38 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
- | openrisc | or32 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | s390 | s390x \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xstormy16 | xtensa \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -276,6 +297,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -296,19 +320,19 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
- | bs2000-* \
+ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
+ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
- | m32r-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -317,34 +341,41 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
| msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | s390-* | s390x-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
+ m32c-*)
+ ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -361,6 +392,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -378,6 +412,9 @@ case $basic_machine in
amd64)
basic_machine=x86_64-pc
;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -437,12 +474,27 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-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
;;
@@ -465,6 +517,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -637,16 +693,30 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -659,6 +729,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -727,10 +800,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
- ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -738,9 +807,12 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
@@ -767,6 +839,12 @@ case $basic_machine in
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
;;
@@ -823,6 +901,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -833,6 +915,12 @@ case $basic_machine in
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
@@ -956,6 +1044,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -999,6 +1091,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1029,6 +1125,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1045,13 +1144,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1124,19 +1220,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1154,12 +1254,15 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -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|'`
;;
@@ -1172,6 +1275,9 @@ case $os in
-opened*)
os=-openedition
;;
+ -os400*)
+ os=-os400
+ ;;
-wince*)
os=-wince
;;
@@ -1193,6 +1299,9 @@ case $os in
-atheos*)
os=-atheos
;;
+ -syllable*)
+ os=-syllable
+ ;;
-386bsd)
os=-bsd
;;
@@ -1215,6 +1324,9 @@ case $os in
-sinix*)
os=-sysv4
;;
+ -tpf*)
+ os=-tpf
+ ;;
-triton*)
os=-sysv3
;;
@@ -1251,6 +1363,9 @@ case $os in
-kaos*)
os=-kaos
;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
-none)
;;
*)
@@ -1282,9 +1397,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1328,9 +1443,15 @@ case $basic_machine in
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
@@ -1463,9 +1584,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
+ -os400*)
+ vendor=ibm
+ ;;
-ptx*)
vendor=sequent
;;
+ -tpf*)
+ vendor=ibm
+ ;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
@@ -1490,7 +1617,7 @@ case $basic_machine in
esac
echo $basic_machine$os
-exit 0
+exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/configure b/configure
index 16136a2..86f5d9b 100755
--- a/configure
+++ b/configure
@@ -280,15 +280,15 @@ fi
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
- echo_test_string="`eval $cmd`" &&
+ if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+ echo_test_string=`eval $cmd` &&
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
then
break
@@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CCAS CCASFLAGS PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS moduledir I386ARCH_TRUE I386ARCH_FALSE DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CCAS CCASFLAGS PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS moduledir AMD_CFLAGS I386ARCH_TRUE I386ARCH_FALSE DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -875,13 +875,13 @@ echo X"$0" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
+if test ! -r "$srcdir/$ac_unique_file"; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
@@ -890,7 +890,7 @@ if test ! -r $srcdir/$ac_unique_file; then
{ (exit 1); exit 1; }; }
fi
fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+(cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
@@ -946,6 +946,14 @@ ac_env_FFLAGS_set=${FFLAGS+set}
ac_env_FFLAGS_value=$FFLAGS
ac_cv_env_FFLAGS_set=${FFLAGS+set}
ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_CCAS_set=${CCAS+set}
+ac_env_CCAS_value=$CCAS
+ac_cv_env_CCAS_set=${CCAS+set}
+ac_cv_env_CCAS_value=$CCAS
+ac_env_CCASFLAGS_set=${CCASFLAGS+set}
+ac_env_CCASFLAGS_value=$CCASFLAGS
+ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
+ac_cv_env_CCASFLAGS_value=$CCASFLAGS
ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
ac_env_PKG_CONFIG_value=$PKG_CONFIG
ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
@@ -1039,17 +1047,18 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
--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-dependency-tracking Speeds up one-time builds
- --enable-dependency-tracking Do not reject slow dependency extractors
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-geodegx-panel Enable support for flatpanels with the Geode GX
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1078,6 +1087,8 @@ Some influential environment variables:
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
PKG_CONFIG path to pkg-config utility
XORG_CFLAGS C compiler flags for XORG, overriding pkg-config
XORG_LIBS linker flags for XORG, overriding pkg-config
@@ -1561,7 +1572,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-am__api_version="1.7"
+am__api_version="1.9"
# 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:
@@ -1699,7 +1710,6 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
-
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1713,6 +1723,39 @@ else
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
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.
@@ -1791,7 +1834,7 @@ else
fi
rmdir .tst 2>/dev/null
- # test to see if srcdir already configured
+# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -1839,9 +1882,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
@@ -1934,6 +1974,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
@@ -3127,7 +3174,9 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- : > sub/conftst$i.h
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -3155,9 +3204,14 @@ else
grep sub/conftest.${OBJEXT-o} 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
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # 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
@@ -3213,7 +3267,7 @@ 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 && break
+ test ! -f $lt_ac_sed && continue
cat /dev/null > conftest.in
lt_ac_count=0
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -3238,10 +3292,10 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
fi
done
done
-SED=$lt_cv_path_SED
fi
+SED=$lt_cv_path_SED
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -3318,7 +3372,7 @@ else
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 GNU ld's only accept -v.
+ # 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 </dev/null` in
*GNU* | *'with BFD'*)
@@ -3352,7 +3406,7 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -3382,6 +3436,15 @@ case $reload_flag in
*) reload_flag=" $reload_flag" ;;
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
@@ -3392,36 +3455,43 @@ else
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/${ac_tool_prefix}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"
+ 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
;;
*)
- 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
+ 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
- esac
- fi
+ fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$lt_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
@@ -3468,7 +3538,7 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
+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
@@ -3491,13 +3561,13 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu)
+freebsd* | kfreebsd*-gnu | 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)/i[3-9]86 (compact )?demand paged shared library'
+ 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.*`
;;
@@ -3513,7 +3583,7 @@ gnu*)
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
- case "$host_cpu" in
+ 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
@@ -3529,6 +3599,11 @@ hpux10.20* | hpux11*)
esac
;;
+interix3*)
+ # 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;;
@@ -3541,15 +3616,6 @@ irix5* | irix6* | nonstopux*)
# This must be Linux ELF.
linux*)
- case $host_cpu in
- alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
lt_cv_deplibs_check_method=pass_all
;;
@@ -3572,12 +3638,10 @@ nto-qnx*)
;;
openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
fi
;;
@@ -3585,15 +3649,11 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+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]'
@@ -3614,10 +3674,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
siemens)
lt_cv_deplibs_check_method=pass_all
;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
@@ -3635,6 +3698,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
# 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
@@ -3670,7 +3736,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3673 "configure"' > conftest.$ac_ext
+ echo '#line 3739 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -3713,7 +3779,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
+ case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
x86_64-*linux*)
@@ -3826,6 +3892,26 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
CFLAGS="$SAVE_CFLAGS"
fi
;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
esac
@@ -4851,7 +4937,9 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- : > sub/conftst$i.h
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -4879,9 +4967,14 @@ else
grep sub/conftest.${OBJEXT-o} 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
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
@@ -4912,7 +5005,12 @@ else
fi
-ac_ext=cc
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5142,6 +5240,8 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+fi
+
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
@@ -5235,7 +5335,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5238:" \
+echo "$as_me:5338:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -5425,11 +5525,55 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- *)
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
# 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"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
new_result=`expr "X$teststring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
@@ -5475,9 +5619,6 @@ symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
# Transform an extracted symbol line into a proper C declaration
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
@@ -5499,15 +5640,31 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
+linux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDGIRSTW]'
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ fi
+ ;;
irix* | nonstopux*)
symcode='[BCDEGRST]'
;;
osf*)
symcode='[BCDEGQRST]'
;;
-solaris* | sysv5*)
+solaris*)
symcode='[BDRT]'
;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
sysv4)
symcode='[DFNSTU]'
;;
@@ -5530,8 +5687,11 @@ esac
# Try without a prefix undercore, 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.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -5693,7 +5853,7 @@ esac
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
@@ -5713,7 +5873,7 @@ rm="rm -f"
default_ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
ltmain="$ac_aux_dir/ltmain.sh"
@@ -5970,6 +6130,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
@@ -5989,15 +6150,26 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
;;
*)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
;;
esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
@@ -6023,7 +6195,7 @@ else
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"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
@@ -6085,7 +6257,7 @@ else
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"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
@@ -6153,6 +6325,67 @@ else
fi;
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5
+echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6
+if test "x$ltmain" = "x" ; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** \$ltmain is not defined, please check the patch for consistency! ***
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+gentoo_lt_version="1.5.22"
+gentoo_ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' "$ltmain"`
+if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&5
+echo "$as_me: error:
+
+*** [Gentoo] sanity check failed! ***
+*** libtool.m4 and ltmain.sh have a version mismatch! ***
+*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
+
+Please run:
+
+ libtoolize --copy --force
+
+if appropriate, please contact the maintainer of this
+package (or your distribution) for help.
+" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+
# Use C for the default configuration in the libtool script
tagname=
lt_save_CC="$CC"
@@ -6180,68 +6413,25 @@ lt_simple_link_test_code='int main(){return(0);}\n'
# 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 any special shared library compilation flags.
-#
-lt_prog_cc_shlib=
-if test "$GCC" = no; then
- case $host_os in
- sco3.2v5*)
- lt_prog_cc_shlib='-belf'
- ;;
- esac
-fi
-if test -n "$lt_prog_cc_shlib"; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
-echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
- if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then :
- else
- { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
-echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
- lt_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The compiler 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
- else
- lt_prog_compiler_static_works=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
-
-if test x"$lt_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$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
+printf "$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 conftest*
@@ -6266,18 +6456,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:6272: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6462: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6276: \$? = $ac_status" >&5
+ echo "$as_me:6466: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler_rtti_exceptions=yes
fi
fi
@@ -6338,6 +6530,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic='-fno-common'
;;
+ interix3*)
+ # 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.
@@ -6354,7 +6551,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -6380,6 +6577,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
@@ -6391,7 +6598,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
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
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -6415,12 +6622,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
linux*)
- case $CC in
+ case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
ccc*)
lt_prog_compiler_wl='-Wl,'
# All Alpha code is PIC.
@@ -6435,15 +6649,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- sco3.2v5*)
- lt_prog_compiler_pic='-Kpic'
- lt_prog_compiler_static='-dn'
- ;;
-
solaris*)
- lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
;;
sunos4*)
@@ -6452,7 +6666,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-Bstatic'
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -6465,6 +6679,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
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'
@@ -6499,18 +6724,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:6505: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6730: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6509: \$? = $ac_status" >&5
+ echo "$as_me:6734: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_pic_works=yes
fi
fi
@@ -6531,7 +6758,7 @@ else
fi
fi
-case "$host_os" in
+case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
@@ -6541,6 +6768,48 @@ case "$host_os" in
;;
esac
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_c_o+set}" = set; then
@@ -6559,23 +6828,25 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:6565: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6834: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6569: \$? = $ac_status" >&5
+ echo "$as_me:6838: \$? = $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
- if test ! -s out/conftest.err; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o=yes
fi
fi
- chmod u+w .
+ chmod u+w . 2>&5
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
@@ -6651,6 +6922,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $host_os in
cygwin* | mingw* | pw32*)
@@ -6661,6 +6942,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
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
;;
@@ -6671,6 +6956,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
@@ -6721,10 +7027,10 @@ EOF
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 '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ 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
@@ -6733,7 +7039,53 @@ EOF
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $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
+ ;;
+
+ interix3*)
+ 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'
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
else
ld_shlibs=no
fi
@@ -6749,7 +7101,7 @@ EOF
fi
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
cat <<EOF 1>&2
@@ -6770,6 +7122,33 @@ EOF
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
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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=
@@ -6777,31 +7156,6 @@ EOF
hardcode_shlibpath_var=no
;;
- linux*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds="$tmp_archive_cmds"
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
- if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- else
- archive_expsym_cmds="$tmp_archive_cmds"
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -6812,16 +7166,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
;;
esac
- if test "$ld_shlibs" = yes; then
- 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
+ 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)
@@ -6833,7 +7182,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# 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 "$link_static_flag"; then
+ 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
@@ -6867,6 +7216,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
break
fi
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -6885,7 +7235,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
link_all_deplibs=yes
if test "$GCC" = yes; then
- case $host_os in aix4.012|aix4.012.*)
+ 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`
@@ -6904,8 +7254,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
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
@@ -6913,11 +7267,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
+ if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
- fi
+ fi
fi
fi
@@ -6982,12 +7336,12 @@ rm -f conftest.err conftest.$ac_objext \
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
@@ -7047,13 +7401,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# -berok will link without error, but may produce a broken library.
no_undefined_flag=' ${wl}-bernotok'
allow_undefined_flag=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec=' '
+ whole_archive_flag_spec='$convenience'
archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # 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
;;
@@ -7066,7 +7418,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs=no
;;
- bsdi4*)
+ bsdi[45]*)
export_dynamic_flag_spec=-rdynamic
;;
@@ -7092,52 +7444,52 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
darwin* | rhapsody*)
- if test "$GXX" = yes ; then
- archive_cmds_need_lc=no
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag='-flat_namespace -undefined suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- 10.*)
- allow_undefined_flag='-undefined dynamic_lookup'
- ;;
- esac
- fi
- ;;
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
esac
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds='$CC -r ${wl}-bind_at_load -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'
- fi
- module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_need_lc=no
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec='-all_load $convenience'
+ whole_archive_flag_spec=''
link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ output_verbose_link_cmd='echo'
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
- ld_shlibs=no
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
fi
;;
@@ -7171,7 +7523,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -7194,47 +7546,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
export_dynamic_flag_spec='${wl}-E'
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*|ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ hardcode_direct=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
- case "$host_cpu" in
- hppa*64*|ia64*)
- archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
fi
if test "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- ia64*)
- hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
hardcode_shlibpath_var=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
;;
*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
hardcode_direct=yes
export_dynamic_flag_spec='${wl}-E'
@@ -7282,6 +7649,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var=no
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
@@ -7327,7 +7695,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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'
@@ -7335,21 +7703,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator=:
;;
- sco3.2v5*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
solaris*)
no_undefined_flag=' -z text'
if test "$GCC" = yes; then
+ wlarc='${wl}'
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
else
+ 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'
@@ -7358,8 +7720,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ *)
+ # The compiler driver will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
esac
link_all_deplibs=yes
;;
@@ -7416,36 +7788,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
+ runpath_var='LD_RUN_PATH'
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 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 ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 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
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
;;
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec=
+ 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
;;
uts4*)
@@ -7464,11 +7845,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
echo "${ECHO_T}$ld_shlibs" >&6
test "$ld_shlibs" = 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
-
#
# Do we need to explicitly link libc?
#
@@ -7501,6 +7877,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
libobjs=conftest.$ac_objext
deplibs=
wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
compiler_flags=-v
linker_flags=-v
verstring=
@@ -7633,7 +8010,7 @@ beos*)
shlibpath_var=LIBRARY_PATH
;;
-bsdi4*)
+bsdi[45]*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -7661,7 +8038,8 @@ cygwin* | mingw* | pw32*)
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'
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
@@ -7691,11 +8069,35 @@ cygwin* | mingw* | pw32*)
;;
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}'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -7714,7 +8116,7 @@ darwin* | rhapsody*)
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)'
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -7749,9 +8151,25 @@ kfreebsd*-gnu)
dynamic_linker='GNU ld.so'
;;
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -7762,20 +8180,31 @@ freebsd*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- freebsd3.01* | freebsdelf3.01*)
+ freebsd3.[01]* | freebsdelf3.[01]*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ 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
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -7795,7 +8224,7 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
@@ -7835,6 +8264,18 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -7892,31 +8333,10 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 7899 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -7977,8 +8397,13 @@ nto-qnx*)
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- need_version=yes
+ # 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
@@ -8016,13 +8441,6 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- 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
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -8048,7 +8466,7 @@ sunos4*)
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -8081,6 +8499,29 @@ sysv4*MP*)
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
+ 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'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ 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'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -8096,12 +8537,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$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
+
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var " || \
- test "X$hardcode_automatic"="Xyes" ; then
+ test -n "$runpath_var" || \
+ test "X$hardcode_automatic" = "Xyes" ; then
# We can hardcode non-existant directories.
if test "$hardcode_direct" != no &&
@@ -8751,7 +9197,7 @@ fi
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
@@ -8767,7 +9213,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8770 "configure"
+#line 9216 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8824,6 +9270,8 @@ int main ()
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
+ else
+ puts (dlerror ());
exit (status);
}
@@ -8833,12 +9281,12 @@ EOF
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
+ (./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_unknown|x*) lt_cv_dlopen_self=no ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
esac
else :
# compilation failed
@@ -8853,7 +9301,7 @@ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
if test "${lt_cv_dlopen_self_static+set}" = set; then
@@ -8865,7 +9313,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8868 "configure"
+#line 9316 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8922,6 +9370,8 @@ int main ()
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
+ else
+ puts (dlerror ());
exit (status);
}
@@ -8931,12 +9381,12 @@ EOF
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
+ (./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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
esac
else :
# compilation failed
@@ -8969,7 +9419,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
-# Report which librarie types wil actually be built
+# Report which library types will actually be built
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
@@ -8981,7 +9431,7 @@ 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
+case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
@@ -8994,43 +9444,6 @@ aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
- ;;
- darwin* | rhapsody*)
- if test "$GCC" = yes; then
- archive_cmds_need_lc=no
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag='-flat_namespace -undefined suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- 10.*)
- allow_undefined_flag='-undefined dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- output_verbose_link_cmd='echo'
- archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
- module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec='-all_load $convenience'
- link_all_deplibs=yes
- else
- ld_shlibs=no
- fi
;;
esac
echo "$as_me:$LINENO: result: $enable_shared" >&5
@@ -9056,7 +9469,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -9160,7 +9573,7 @@ echo "$as_me: creating $ofile" >&6;}
#
# 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -9171,11 +9584,11 @@ echo "$as_me: creating $ofile" >&6;}
SED=$lt_SED
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e s/^X//"
+Xsed="$SED -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# The names of the tagged configurations supported by this script.
available_tags=
@@ -9205,6 +9618,12 @@ fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
@@ -9216,6 +9635,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_compiler
@@ -9281,7 +9703,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
@@ -9546,6 +9968,9 @@ echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script
echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
fi
fi
+ if test -z "$LTCFLAGS"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+ fi
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
@@ -9576,7 +10001,9 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
case $tagname in
CXX)
- if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9596,6 +10023,7 @@ hardcode_libdir_flag_spec_CXX=
hardcode_libdir_flag_spec_ld_CXX=
hardcode_libdir_separator_CXX=
hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
hardcode_automatic_CXX=no
module_cmds_CXX=
module_expsym_cmds_CXX=
@@ -9613,7 +10041,7 @@ postdeps_CXX=
compiler_lib_search_path_CXX=
# Source file extension for C++ test sources.
-ac_ext=cc
+ac_ext=cpp
# Object file extension for compiled C++ test sources.
objext=o
@@ -9623,17 +10051,34 @@ objext_CXX=$objext
lt_simple_compile_test_code="int some_variable = 0;\n"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
# Allow CC to be a program name with arguments.
compiler=$CC
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$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
+printf "$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 conftest*
+
+
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
lt_save_LD=$LD
@@ -9644,18 +10089,27 @@ 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
- unset lt_cv_prog_gnu_ld
+ $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
- unset lt_cv_path_LD
+ $as_unset lt_cv_path_LD
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
compiler=$CC
compiler_CXX=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
# We don't want -fno-exception wen compiling C++ code, so set the
# no_builtin_flag separately
@@ -9726,7 +10180,7 @@ else
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 GNU ld's only accept -v.
+ # 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 </dev/null` in
*GNU* | *'with BFD'*)
@@ -9760,7 +10214,7 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -9851,6 +10305,7 @@ case $host_os in
;;
esac
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -9869,7 +10324,7 @@ case $host_os in
link_all_deplibs_CXX=yes
if test "$GXX" = yes; then
- case $host_os in aix4.012|aix4.012.*)
+ 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`
@@ -9888,8 +10343,12 @@ case $host_os in
hardcode_libdir_flag_spec_CXX='-L$libdir'
hardcode_libdir_separator_CXX=
fi
+ ;;
esac
shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
else
# not using gcc
if test "$host_cpu" = ia64; then
@@ -9967,12 +10426,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_CXX='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
@@ -10032,16 +10491,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# -berok will link without error, but may produce a broken library.
no_undefined_flag_CXX=' ${wl}-bernotok'
allow_undefined_flag_CXX=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- always_export_symbols_CXX=yes
# Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_CXX=' '
+ whole_archive_flag_spec_CXX='$convenience'
archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
chorus*)
case $cc_basename in
*)
@@ -10060,7 +10529,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
enable_shared_with_static_runtimes_CXX=yes
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -10069,70 +10538,81 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs_CXX=no
fi
;;
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX=''
+ link_all_deplibs_CXX=yes
- darwin* | rhapsody*)
- if test "$GXX" = yes; then
- archive_cmds_need_lc_CXX=no
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_CXX='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+ if test "$GXX" = yes ; then
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
- ;;
- 10.*)
- allow_undefined_flag_CXX='-undefined dynamic_lookup'
- ;;
- esac
+ archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ fi
+ module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_CXX=no
+ ;;
+ esac
fi
- ;;
- esac
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_CXX='$CC -r ${wl}-bind_at_load -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'
- fi
- module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- hardcode_direct_CXX=no
- hardcode_automatic_CXX=yes
- hardcode_shlibpath_var_CXX=unsupported
- whole_archive_flag_spec_CXX='-all_load $convenience'
- link_all_deplibs_CXX=yes
- else
- ld_shlibs_CXX=no
- fi
- ;;
+ ;;
dgux*)
case $cc_basename in
- ec++)
+ ec++*)
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- ghcx)
+ ghcx*)
# Green Hills C++ Compiler
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -10143,14 +10623,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- freebsd12*)
+ freebsd[12]*)
# C++ shared libraries reported to be fairly broken before switch to ELF
ld_shlibs_CXX=no
;;
freebsd-elf*)
archive_cmds_need_lc_CXX=no
;;
- freebsd* | kfreebsd*-gnu)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs_CXX=yes
@@ -10167,11 +10647,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# location of the library.
case $cc_basename in
- CC)
+ CC*)
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- aCC)
+ aCC*)
archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -10181,7 +10661,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
if test "$GXX" = yes; then
@@ -10195,33 +10675,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
hpux10*|hpux11*)
if test $with_gnu_ld = no; then
- case "$host_cpu" in
- hppa*64*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
- hardcode_libdir_separator_CXX=:
- ;;
- ia64*)
- hardcode_libdir_flag_spec_CXX='-L$libdir'
;;
*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_CXX=:
export_dynamic_flag_spec_CXX='${wl}-E'
;;
esac
fi
- case "$host_cpu" in
- hppa*64*)
- hardcode_direct_CXX=no
- hardcode_shlibpath_var_CXX=no
- ;;
- ia64*)
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_minus_L_CXX=yes # Not in the search PATH,
- # but as the default
- # location of the library.
;;
*)
hardcode_direct_CXX=yes
@@ -10232,14 +10701,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
case $cc_basename in
- CC)
+ CC*)
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- aCC)
- case "$host_cpu" in
- hppa*64*|ia64*)
- archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
@@ -10258,9 +10730,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes; then
if test $with_gnu_ld = no; then
- case "$host_cpu" in
- ia64*|hppa*64*)
- archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
@@ -10274,11 +10749,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
+ interix3*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
irix5* | irix6*)
case $cc_basename in
- CC)
+ CC*)
# SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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
@@ -10289,7 +10778,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
fi
@@ -10302,7 +10791,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
linux*)
case $cc_basename in
- KCC)
+ KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
@@ -10327,17 +10816,41 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
;;
- icpc)
+ icpc*)
# Intel C++
with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
archive_cmds_need_lc_CXX=no
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
- cxx)
+ pgCC*)
+ # Portland Group C++ compiler
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
# Compaq C++
archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
@@ -10368,7 +10881,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
mvs*)
case $cc_basename in
- cxx)
+ cxx*)
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
@@ -10389,9 +10902,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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::"'
;;
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+ openbsd*)
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ ;;
osf3*)
case $cc_basename in
- KCC)
+ KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
@@ -10407,14 +10936,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
;;
- RCC)
+ RCC*)
# Rational C++ 2.4.1
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- cxx)
+ cxx*)
allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
@@ -10432,7 +10961,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
@@ -10451,7 +10980,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
osf4* | osf5*)
case $cc_basename in
- KCC)
+ KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
@@ -10466,17 +10995,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# the KAI C++ compiler.
old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
;;
- RCC)
+ RCC*)
# Rational C++ 2.4.1
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- cxx)
+ cxx*)
allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $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'
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -10495,7 +11024,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
@@ -10516,27 +11045,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- sco*)
- archive_cmds_need_lc_CXX=no
- case $cc_basename in
- CC)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs_CXX=no
- ;;
- esac
- ;;
sunos4*)
case $cc_basename in
- CC)
+ CC*)
# Sun C++ 4.x
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- lcc)
+ lcc*)
# Lucid
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -10549,36 +11065,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
solaris*)
case $cc_basename in
- CC)
+ CC*)
# Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
hardcode_libdir_flag_spec_CXX='-R$libdir'
hardcode_shlibpath_var_CXX=no
case $host_os in
- solaris2.0-5 | solaris2.0-5.*) ;;
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The C++ compiler is used as linker so we must use $wl
# flag to pass the commands to the underlying system
- # linker.
+ # linker. We must also pass each convience library through
+ # to the system linker between allextract/defaultextract.
+ # The C++ compiler will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
;;
esac
link_all_deplibs_CXX=yes
- # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='echo'
# Archives containing C++ object files must be created using
# "CC -xar", where "CC" is the Sun C++ compiler. This is
@@ -10586,7 +11099,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# in the archive.
old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
;;
- gcx)
+ gcx*)
# Green Hills C++ Compiler
archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
@@ -10624,12 +11137,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ # 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.
+ # So that behaviour is only enabled if SCOABSPATH is set to a
+ # non-empty value in the environment. Most likely only useful for
+ # creating official distributions of packages.
+ # This is a hack until libtool officially supports absolute path
+ # names for shared libraries.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
;;
tandem*)
case $cc_basename in
- NCC)
+ NCC*)
# NonStop-UX NCC 3.20
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -10682,7 +11246,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
# The `*' in the case matches for architectures that use `case' in
# $output_verbose_cmd can trigger glob expansion during the loop
# eval without this substitution.
- output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+ output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
for p in `eval $output_verbose_link_cmd`; do
case $p in
@@ -10758,6 +11322,29 @@ fi
$rm -f confest.$objext
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix3*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # 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.
+ postdeps_CXX='-lCstd -lCrun'
+ ;;
+ esac
+ ;;
+esac
+
+
case " $postdeps_CXX " in
*" -lc "*) archive_cmds_need_lc_CXX=no ;;
esac
@@ -10805,6 +11392,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
# DJGPP does not support shared libraries at all
lt_prog_compiler_pic_CXX=
;;
+ interix3*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
sysv4*MP*)
if test -d /usr/nec; then
lt_prog_compiler_pic_CXX=-Kconform_pic
@@ -10813,7 +11404,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
;;
*)
@@ -10838,18 +11429,28 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
chorus*)
case $cc_basename in
- cxch68)
+ cxch68*)
# Green Hills C++ Compiler
# _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
;;
esac
;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic_CXX='-qnocommon'
+ lt_prog_compiler_wl_CXX='-Wl,'
+ ;;
+ esac
+ ;;
dgux*)
case $cc_basename in
- ec++)
+ ec++*)
lt_prog_compiler_pic_CXX='-KPIC'
;;
- ghcx)
+ ghcx*)
# Green Hills C++ Compiler
lt_prog_compiler_pic_CXX='-pic'
;;
@@ -10857,22 +11458,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- freebsd* | kfreebsd*-gnu)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
case $cc_basename in
- CC)
+ CC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
if test "$host_cpu" != ia64; then
lt_prog_compiler_pic_CXX='+Z'
fi
;;
- aCC)
+ aCC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- case "$host_cpu" in
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -10885,9 +11486,13 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
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)
+ CC*)
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_static_CXX='-non_shared'
# CC pic flag -KPIC is the default.
@@ -10898,18 +11503,24 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
linux*)
case $cc_basename in
- KCC)
+ KCC*)
# KAI C++ Compiler
lt_prog_compiler_wl_CXX='--backend -Wl,'
lt_prog_compiler_pic_CXX='-fPIC'
;;
- icpc)
+ icpc* | ecpc*)
# Intel C++
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
;;
- cxx)
+ pgCC*)
+ # Portland Group C++ compiler.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
# Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
@@ -10926,7 +11537,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
mvs*)
case $cc_basename in
- cxx)
+ cxx*)
lt_prog_compiler_pic_CXX='-W c,exportall'
;;
*)
@@ -10937,14 +11548,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
osf3* | osf4* | osf5*)
case $cc_basename in
- KCC)
+ KCC*)
lt_prog_compiler_wl_CXX='--backend -Wl,'
;;
- RCC)
+ RCC*)
# Rational C++ 2.4.1
lt_prog_compiler_pic_CXX='-pic'
;;
- cxx)
+ cxx*)
# Digital/Compaq C++
lt_prog_compiler_wl_CXX='-Wl,'
# Make sure the PIC flag is empty. It appears that all Alpha
@@ -10958,24 +11569,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
psos*)
;;
- sco*)
- case $cc_basename in
- CC)
- lt_prog_compiler_pic_CXX='-fPIC'
- ;;
- *)
- ;;
- esac
- ;;
solaris*)
case $cc_basename in
- CC)
+ CC*)
# Sun C++ 4.2, 5.x and Centerline C++
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-Bstatic'
lt_prog_compiler_wl_CXX='-Qoption ld '
;;
- gcx)
+ gcx*)
# Green Hills C++ Compiler
lt_prog_compiler_pic_CXX='-PIC'
;;
@@ -10985,12 +11587,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
sunos4*)
case $cc_basename in
- CC)
+ CC*)
# Sun C++ 4.x
lt_prog_compiler_pic_CXX='-pic'
lt_prog_compiler_static_CXX='-Bstatic'
;;
- lcc)
+ lcc*)
# Lucid
lt_prog_compiler_pic_CXX='-pic'
;;
@@ -11000,7 +11602,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
tandem*)
case $cc_basename in
- NCC)
+ NCC*)
# NonStop-UX NCC 3.20
lt_prog_compiler_pic_CXX='-KPIC'
;;
@@ -11008,7 +11610,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- unixware*)
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
;;
vxworks*)
;;
@@ -11041,18 +11650,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:11047: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11656: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11051: \$? = $ac_status" >&5
+ echo "$as_me:11660: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_pic_works_CXX=yes
fi
fi
@@ -11073,7 +11684,7 @@ else
fi
fi
-case "$host_os" in
+case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_CXX=
@@ -11083,6 +11694,48 @@ case "$host_os" in
;;
esac
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
+
+if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
@@ -11101,23 +11754,25 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:11107: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11760: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11111: \$? = $ac_status" >&5
+ echo "$as_me:11764: \$? = $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
- if test ! -s out/conftest.err; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o_CXX=yes
fi
fi
- chmod u+w .
+ chmod u+w . 2>&5
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
@@ -11172,7 +11827,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -11183,11 +11838,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
echo "${ECHO_T}$ld_shlibs_CXX" >&6
test "$ld_shlibs_CXX" = 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
-
#
# Do we need to explicitly link libc?
#
@@ -11220,6 +11870,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
libobjs=conftest.$ac_objext
deplibs=
wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
compiler_flags=-v
linker_flags=-v
verstring=
@@ -11352,7 +12003,7 @@ beos*)
shlibpath_var=LIBRARY_PATH
;;
-bsdi4*)
+bsdi[45]*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -11380,7 +12031,8 @@ cygwin* | mingw* | pw32*)
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'
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
@@ -11410,11 +12062,35 @@ cygwin* | mingw* | pw32*)
;;
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}'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -11433,7 +12109,7 @@ darwin* | rhapsody*)
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)'
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -11468,9 +12144,25 @@ kfreebsd*-gnu)
dynamic_linker='GNU ld.so'
;;
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -11481,20 +12173,31 @@ freebsd*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- freebsd3.01* | freebsdelf3.01*)
+ freebsd3.[01]* | freebsdelf3.[01]*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ 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
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -11514,7 +12217,7 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
@@ -11554,6 +12257,18 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -11611,31 +12326,10 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 11618 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -11696,8 +12390,13 @@ nto-qnx*)
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- need_version=yes
+ # 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
@@ -11735,13 +12434,6 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- 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
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -11767,7 +12459,7 @@ sunos4*)
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -11800,6 +12492,29 @@ sysv4*MP*)
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
+ 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'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ 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'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -11815,12 +12530,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$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
+
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" || \
- test -n "$runpath_var CXX" || \
- test "X$hardcode_automatic_CXX"="Xyes" ; then
+ test -n "$runpath_var_CXX" || \
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
# We can hardcode non-existant directories.
if test "$hardcode_direct_CXX" != no &&
@@ -11852,841 +12572,6 @@ elif test "$shlibpath_overrides_runpath" = yes ||
enable_fast_install=needless
fi
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- ;;
- *)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- ;;
- esac
-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*)
- 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
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shl_load;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
- lt_cv_dlopen="shl_load"
-else
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
- echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
- lt_cv_dlopen="dlopen"
-else
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_svld_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_dld_link=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-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"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
-#line 12489 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
-#line 12587 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$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
-
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
@@ -12701,7 +12586,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -12802,6 +12687,12 @@ fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
@@ -12813,6 +12704,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_compiler_CXX
@@ -12878,7 +12772,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
@@ -13155,16 +13049,42 @@ lt_simple_link_test_code=" program t\n end\n"
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
# Allow CC to be a program name with arguments.
compiler=$CC
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$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
+printf "$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 conftest*
+
+
# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
CC=${F77-"f77"}
compiler=$CC
compiler_F77=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
@@ -13177,7 +13097,7 @@ 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
+case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
@@ -13186,7 +13106,9 @@ aix3*)
fi
;;
aix4* | aix5*)
- test "$enable_shared" = yes && enable_static=no
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
;;
esac
echo "$as_me:$LINENO: result: $enable_shared" >&5
@@ -13199,8 +13121,6 @@ test "$enable_shared" = yes || enable_static=yes
echo "$as_me:$LINENO: result: $enable_static" >&5
echo "${ECHO_T}$enable_static" >&6
-test "$ld_shlibs_F77" = no && can_build_shared=no
-
GCC_F77="$G77"
LD_F77="$LD"
@@ -13247,6 +13167,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_F77='-fno-common'
;;
+ interix3*)
+ # 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.
@@ -13263,7 +13188,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -13289,6 +13214,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
fi
;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic_F77='-qnocommon'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ esac
+ ;;
mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
@@ -13300,7 +13235,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_wl_F77='-Wl,'
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -13324,12 +13259,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
linux*)
- case $CC in
+ case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_F77='-Wl,'
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-static'
;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-fpic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
ccc*)
lt_prog_compiler_wl_F77='-Wl,'
# All Alpha code is PIC.
@@ -13344,15 +13286,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_F77='-non_shared'
;;
- sco3.2v5*)
- lt_prog_compiler_pic_F77='-Kpic'
- lt_prog_compiler_static_F77='-dn'
- ;;
-
solaris*)
- lt_prog_compiler_wl_F77='-Wl,'
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl_F77='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl_F77='-Wl,';;
+ esac
;;
sunos4*)
@@ -13361,7 +13303,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_F77='-Bstatic'
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
lt_prog_compiler_wl_F77='-Wl,'
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
@@ -13374,6 +13316,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
fi
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_can_build_shared_F77=no
+ ;;
+
uts4*)
lt_prog_compiler_pic_F77='-pic'
lt_prog_compiler_static_F77='-Bstatic'
@@ -13408,18 +13361,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:13414: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13367: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13418: \$? = $ac_status" >&5
+ echo "$as_me:13371: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_pic_works_F77=yes
fi
fi
@@ -13440,7 +13395,7 @@ else
fi
fi
-case "$host_os" in
+case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_F77=
@@ -13450,6 +13405,48 @@ case "$host_os" in
;;
esac
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works_F77=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works_F77=yes
+ fi
+ else
+ lt_prog_compiler_static_works_F77=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
+
+if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+ :
+else
+ lt_prog_compiler_static_F77=
+fi
+
+
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
@@ -13468,23 +13465,25 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:13474: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13471: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13478: \$? = $ac_status" >&5
+ echo "$as_me:13475: \$? = $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
- if test ! -s out/conftest.err; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o_F77=yes
fi
fi
- chmod u+w .
+ chmod u+w . 2>&5
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
@@ -13560,6 +13559,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $host_os in
cygwin* | mingw* | pw32*)
@@ -13570,6 +13579,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
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
;;
@@ -13580,6 +13593,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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_F77='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
@@ -13630,10 +13664,10 @@ EOF
allow_undefined_flag_F77=unsupported
always_export_symbols_F77=no
enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ archive_cmds_F77='$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_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -13642,9 +13676,55 @@ EOF
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $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
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ interix3*)
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_F77='${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_F77='$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_F77='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'
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test $supports_anon_versioning = yes; then
+ archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ $echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs_F77=no
fi
;;
@@ -13658,7 +13738,7 @@ EOF
fi
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs_F77=no
cat <<EOF 1>&2
@@ -13679,6 +13759,33 @@ EOF
fi
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs_F77=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
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+ esac
+ ;;
+
sunos4*)
archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
@@ -13686,31 +13793,6 @@ EOF
hardcode_shlibpath_var_F77=no
;;
- linux*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds_F77="$tmp_archive_cmds"
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
- if test $supports_anon_versioning = yes; then
- archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- else
- archive_expsym_cmds_F77="$tmp_archive_cmds"
- fi
- else
- ld_shlibs_F77=no
- fi
- ;;
-
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -13721,16 +13803,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
;;
esac
- if test "$ld_shlibs_F77" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_F77=
- fi
+ if test "$ld_shlibs_F77" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec_F77=
+ export_dynamic_flag_spec_F77=
+ whole_archive_flag_spec_F77=
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
@@ -13742,7 +13819,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L_F77=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
+ 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_F77=unsupported
@@ -13776,6 +13853,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
break
fi
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -13794,7 +13872,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
link_all_deplibs_F77=yes
if test "$GCC" = yes; then
- case $host_os in aix4.012|aix4.012.*)
+ 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`
@@ -13813,8 +13891,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
hardcode_libdir_flag_spec_F77='-L$libdir'
hardcode_libdir_separator_F77=
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
@@ -13822,11 +13904,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
+ if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
- fi
+ fi
fi
fi
@@ -13881,12 +13963,12 @@ rm -f conftest.err conftest.$ac_objext \
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag_F77="-z nodefs"
- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
@@ -13936,13 +14018,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# -berok will link without error, but may produce a broken library.
no_undefined_flag_F77=' ${wl}-bernotok'
allow_undefined_flag_F77=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- always_export_symbols_F77=yes
# Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_F77=' '
+ whole_archive_flag_spec_F77='$convenience'
archive_cmds_need_lc_F77=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds_F77="\$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
;;
@@ -13955,7 +14035,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_F77=no
;;
- bsdi4*)
+ bsdi[45]*)
export_dynamic_flag_spec_F77=-rdynamic
;;
@@ -13976,57 +14056,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
old_archive_From_new_cmds_F77='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
+ fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_F77=yes
;;
darwin* | rhapsody*)
- if test "$GXX" = yes ; then
- archive_cmds_need_lc_F77=no
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_F77='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_F77='-flat_namespace -undefined suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_F77='-flat_namespace -undefined suppress'
- ;;
- 10.*)
- allow_undefined_flag_F77='-undefined dynamic_lookup'
- ;;
- esac
- fi
- ;;
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
esac
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_F77='$CC -r ${wl}-bind_at_load -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'
- fi
- module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_need_lc_F77=no
hardcode_direct_F77=no
hardcode_automatic_F77=yes
hardcode_shlibpath_var_F77=unsupported
- whole_archive_flag_spec_F77='-all_load $convenience'
+ whole_archive_flag_spec_F77=''
link_all_deplibs_F77=yes
+ if test "$GCC" = yes ; then
+ output_verbose_link_cmd='echo'
+ archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
- ld_shlibs_F77=no
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_F77=no
+ ;;
+ esac
fi
;;
@@ -14060,7 +14140,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_F77='-R$libdir'
hardcode_direct_F77=yes
@@ -14083,47 +14163,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
export_dynamic_flag_spec_F77='${wl}-E'
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*|ia64*)
+ archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+
+ hardcode_direct_F77=yes
+ export_dynamic_flag_spec_F77='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
- case "$host_cpu" in
- hppa*64*|ia64*)
- archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds_F77='$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
- case "$host_cpu" in
- hppa*64*)
- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_libdir_flag_spec_ld_F77='+b $libdir'
- hardcode_libdir_separator_F77=:
hardcode_direct_F77=no
hardcode_shlibpath_var_F77=no
;;
- ia64*)
- hardcode_libdir_flag_spec_F77='-L$libdir'
- hardcode_direct_F77=no
- hardcode_shlibpath_var_F77=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_F77=yes
- ;;
*)
- hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_F77=:
hardcode_direct_F77=yes
export_dynamic_flag_spec_F77='${wl}-E'
@@ -14171,6 +14266,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var_F77=no
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
export_dynamic_flag_spec_F77='${wl}-E'
else
@@ -14216,7 +14312,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
allow_undefined_flag_F77=' -expect_unresolved \*'
archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir'
@@ -14224,21 +14320,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_F77=:
;;
- sco3.2v5*)
- archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_F77=no
- export_dynamic_flag_spec_F77='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
solaris*)
no_undefined_flag_F77=' -z text'
if test "$GCC" = yes; then
+ wlarc='${wl}'
archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
else
+ wlarc=''
archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds_F77='$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'
@@ -14247,8 +14337,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var_F77=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ *)
+ # The compiler driver will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
esac
link_all_deplibs_F77=yes
;;
@@ -14305,36 +14405,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4.2uw2*)
- archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_F77=yes
- hardcode_minus_L_F77=no
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ no_undefined_flag_F77='${wl}-z,text'
+ archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
+ runpath_var='LD_RUN_PATH'
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
- no_undefined_flag_F77='${wl}-z ${wl}text'
if test "$GCC" = yes; then
- archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var_F77=no
;;
- sysv5*)
- no_undefined_flag_F77=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds_F77='$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'
- hardcode_libdir_flag_spec_F77=
+ 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_F77='${wl}-z,text'
+ allow_undefined_flag_F77='${wl}-z,nodefs'
+ archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
+ hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator_F77=':'
+ link_all_deplibs_F77=yes
+ export_dynamic_flag_spec_F77='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
;;
uts4*)
@@ -14353,11 +14462,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
echo "${ECHO_T}$ld_shlibs_F77" >&6
test "$ld_shlibs_F77" = 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
-
#
# Do we need to explicitly link libc?
#
@@ -14390,6 +14494,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
libobjs=conftest.$ac_objext
deplibs=
wl=$lt_prog_compiler_wl_F77
+ pic_flag=$lt_prog_compiler_pic_F77
compiler_flags=-v
linker_flags=-v
verstring=
@@ -14522,7 +14627,7 @@ beos*)
shlibpath_var=LIBRARY_PATH
;;
-bsdi4*)
+bsdi[45]*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14550,7 +14655,8 @@ cygwin* | mingw* | pw32*)
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'
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
@@ -14580,11 +14686,35 @@ cygwin* | mingw* | pw32*)
;;
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}'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -14603,7 +14733,7 @@ darwin* | rhapsody*)
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)'
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -14638,9 +14768,25 @@ kfreebsd*-gnu)
dynamic_linker='GNU ld.so'
;;
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -14651,20 +14797,31 @@ freebsd*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- freebsd3.01* | freebsdelf3.01*)
+ freebsd3.[01]* | freebsdelf3.[01]*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ 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
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -14684,7 +14841,7 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
@@ -14724,6 +14881,18 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -14781,31 +14950,10 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 14788 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -14866,8 +15014,13 @@ nto-qnx*)
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- need_version=yes
+ # 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
@@ -14905,13 +15058,6 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- 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
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -14937,7 +15083,7 @@ sunos4*)
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -14970,6 +15116,29 @@ sysv4*MP*)
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
+ 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'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ 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'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -14985,12 +15154,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$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
+
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
hardcode_action_F77=
if test -n "$hardcode_libdir_flag_spec_F77" || \
- test -n "$runpath_var F77" || \
- test "X$hardcode_automatic_F77"="Xyes" ; then
+ test -n "$runpath_var_F77" || \
+ test "X$hardcode_automatic_F77" = "Xyes" ; then
# We can hardcode non-existant directories.
if test "$hardcode_direct_F77" != no &&
@@ -15022,36 +15196,6 @@ elif test "$shlibpath_overrides_runpath" = yes ||
enable_fast_install=needless
fi
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- ;;
- *)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- ;;
- esac
-fi
-
-
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
@@ -15066,7 +15210,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -15167,6 +15311,12 @@ fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
@@ -15178,6 +15328,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_compiler_F77
@@ -15243,7 +15396,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
@@ -15481,26 +15634,55 @@ objext_GCJ=$objext
lt_simple_compile_test_code="class foo {}\n"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
# Allow CC to be a program name with arguments.
compiler=$CC
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$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
+printf "$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 conftest*
+
+
# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
CC=${GCJ-"gcj"}
compiler=$CC
compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
# GCJ did not exist at the time GCC didn't implicitly link libc in.
archive_cmds_need_lc_GCJ=no
+old_archive_cmds_GCJ=$old_archive_cmds
+
lt_prog_compiler_no_builtin_flag_GCJ=
@@ -15523,18 +15705,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:15529: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15711: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15533: \$? = $ac_status" >&5
+ echo "$as_me:15715: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler_rtti_exceptions=yes
fi
fi
@@ -15595,6 +15779,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_pic_GCJ='-fno-common'
;;
+ interix3*)
+ # 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.
@@ -15611,7 +15800,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -15637,6 +15826,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
fi
;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic_GCJ='-qnocommon'
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ ;;
+ esac
+ ;;
mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
@@ -15648,7 +15847,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_wl_GCJ='-Wl,'
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
- case "$host_cpu" in
+ case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
@@ -15672,12 +15871,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
linux*)
- case $CC in
+ case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl_GCJ='-Wl,'
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-static'
;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_pic_GCJ='-fpic'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
ccc*)
lt_prog_compiler_wl_GCJ='-Wl,'
# All Alpha code is PIC.
@@ -15692,15 +15898,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-non_shared'
;;
- sco3.2v5*)
- lt_prog_compiler_pic_GCJ='-Kpic'
- lt_prog_compiler_static_GCJ='-dn'
- ;;
-
solaris*)
- lt_prog_compiler_wl_GCJ='-Wl,'
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl_GCJ='-Wl,';;
+ esac
;;
sunos4*)
@@ -15709,7 +15915,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-Bstatic'
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.2uw2* | sysv4.3*)
lt_prog_compiler_wl_GCJ='-Wl,'
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -15722,6 +15928,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
fi
;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_can_build_shared_GCJ=no
+ ;;
+
uts4*)
lt_prog_compiler_pic_GCJ='-pic'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -15756,18 +15973,20 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:15762: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15979: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15766: \$? = $ac_status" >&5
+ echo "$as_me:15983: \$? = $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
- if test ! -s conftest.err; then
+ # So say no if there are warnings other than the usual output.
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_pic_works_GCJ=yes
fi
fi
@@ -15788,7 +16007,7 @@ else
fi
fi
-case "$host_os" in
+case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_GCJ=
@@ -15798,6 +16017,48 @@ case "$host_os" in
;;
esac
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works_GCJ=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works_GCJ=yes
+ fi
+ else
+ lt_prog_compiler_static_works_GCJ=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+ :
+else
+ lt_prog_compiler_static_GCJ=
+fi
+
+
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
@@ -15816,23 +16077,25 @@ else
# 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}? :&$lt_compiler_flag :; t' \
+ -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:15822: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16083: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15826: \$? = $ac_status" >&5
+ echo "$as_me:16087: \$? = $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
- if test ! -s out/conftest.err; then
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o_GCJ=yes
fi
fi
- chmod u+w .
+ chmod u+w . 2>&5
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
@@ -15908,6 +16171,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $host_os in
cygwin* | mingw* | pw32*)
@@ -15918,6 +16191,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
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
;;
@@ -15928,6 +16205,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# 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_GCJ='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
@@ -15978,10 +16276,10 @@ EOF
allow_undefined_flag_GCJ=unsupported
always_export_symbols_GCJ=no
enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ archive_cmds_GCJ='$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_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -15990,9 +16288,55 @@ EOF
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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ $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
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ interix3*)
+ hardcode_direct_GCJ=no
+ hardcode_shlibpath_var_GCJ=no
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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'
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test $supports_anon_versioning = yes; then
+ archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ $echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs_GCJ=no
fi
;;
@@ -16006,7 +16350,7 @@ EOF
fi
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs_GCJ=no
cat <<EOF 1>&2
@@ -16027,6 +16371,33 @@ EOF
fi
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs_GCJ=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
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+ esac
+ ;;
+
sunos4*)
archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
@@ -16034,31 +16405,6 @@ EOF
hardcode_shlibpath_var_GCJ=no
;;
- linux*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_cmds_GCJ="$tmp_archive_cmds"
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
- if test $supports_anon_versioning = yes; then
- archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- else
- archive_expsym_cmds_GCJ="$tmp_archive_cmds"
- fi
- else
- ld_shlibs_GCJ=no
- fi
- ;;
-
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -16069,16 +16415,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
;;
esac
- if test "$ld_shlibs_GCJ" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec_GCJ=
- fi
+ if test "$ld_shlibs_GCJ" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec_GCJ=
+ export_dynamic_flag_spec_GCJ=
+ whole_archive_flag_spec_GCJ=
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
@@ -16090,7 +16431,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L_GCJ=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
+ 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_GCJ=unsupported
@@ -16124,6 +16465,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
break
fi
done
+ ;;
esac
exp_sym_flag='-bexport'
@@ -16142,7 +16484,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
link_all_deplibs_GCJ=yes
if test "$GCC" = yes; then
- case $host_os in aix4.012|aix4.012.*)
+ 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`
@@ -16161,8 +16503,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
hardcode_libdir_flag_spec_GCJ='-L$libdir'
hardcode_libdir_separator_GCJ=
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
@@ -16170,11 +16516,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
+ if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
- fi
+ fi
fi
fi
@@ -16239,12 +16585,12 @@ rm -f conftest.err conftest.$ac_objext \
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag_GCJ="-z nodefs"
- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
@@ -16304,13 +16650,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# -berok will link without error, but may produce a broken library.
no_undefined_flag_GCJ=' ${wl}-bernotok'
allow_undefined_flag_GCJ=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- always_export_symbols_GCJ=yes
# Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec_GCJ=' '
+ whole_archive_flag_spec_GCJ='$convenience'
archive_cmds_need_lc_GCJ=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds_GCJ="\$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
;;
@@ -16323,7 +16667,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_GCJ=no
;;
- bsdi4*)
+ bsdi[45]*)
export_dynamic_flag_spec_GCJ=-rdynamic
;;
@@ -16344,57 +16688,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
old_archive_From_new_cmds_GCJ='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
+ fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_GCJ=yes
;;
darwin* | rhapsody*)
- if test "$GXX" = yes ; then
- archive_cmds_need_lc_GCJ=no
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag_GCJ='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[012])
- allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
- ;;
- 10.*)
- allow_undefined_flag_GCJ='-undefined dynamic_lookup'
- ;;
- esac
- fi
- ;;
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
esac
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -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'
- fi
- module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_cmds_need_lc_GCJ=no
hardcode_direct_GCJ=no
hardcode_automatic_GCJ=yes
hardcode_shlibpath_var_GCJ=unsupported
- whole_archive_flag_spec_GCJ='-all_load $convenience'
+ whole_archive_flag_spec_GCJ=''
link_all_deplibs_GCJ=yes
+ if test "$GCC" = yes ; then
+ output_verbose_link_cmd='echo'
+ archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
- ld_shlibs_GCJ=no
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_GCJ=no
+ ;;
+ esac
fi
;;
@@ -16428,7 +16772,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec_GCJ='-R$libdir'
hardcode_direct_GCJ=yes
@@ -16451,47 +16795,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
export_dynamic_flag_spec_GCJ='${wl}-E'
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*|ia64*)
+ archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+
+ hardcode_direct_GCJ=yes
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_GCJ=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
+ ia64*)
+ archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
*)
archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
- case "$host_cpu" in
- hppa*64*|ia64*)
- archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds_GCJ='$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
- case "$host_cpu" in
- hppa*64*)
- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
- hardcode_libdir_separator_GCJ=:
hardcode_direct_GCJ=no
hardcode_shlibpath_var_GCJ=no
;;
- ia64*)
- hardcode_libdir_flag_spec_GCJ='-L$libdir'
- hardcode_direct_GCJ=no
- hardcode_shlibpath_var_GCJ=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L_GCJ=yes
- ;;
*)
- hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator_GCJ=:
hardcode_direct_GCJ=yes
export_dynamic_flag_spec_GCJ='${wl}-E'
@@ -16539,6 +16898,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var_GCJ=no
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
export_dynamic_flag_spec_GCJ='${wl}-E'
else
@@ -16584,7 +16944,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
allow_undefined_flag_GCJ=' -expect_unresolved \*'
archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir'
@@ -16592,21 +16952,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_GCJ=:
;;
- sco3.2v5*)
- archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var_GCJ=no
- export_dynamic_flag_spec_GCJ='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
solaris*)
no_undefined_flag_GCJ=' -z text'
if test "$GCC" = yes; then
+ wlarc='${wl}'
archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
else
+ wlarc=''
archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds_GCJ='$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'
@@ -16615,8 +16969,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_shlibpath_var_GCJ=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ *)
+ # The compiler driver will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
esac
link_all_deplibs_GCJ=yes
;;
@@ -16673,36 +17037,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4.2uw2*)
- archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct_GCJ=yes
- hardcode_minus_L_GCJ=no
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ no_undefined_flag_GCJ='${wl}-z,text'
+ archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
+ runpath_var='LD_RUN_PATH'
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
- no_undefined_flag_GCJ='${wl}-z ${wl}text'
if test "$GCC" = yes; then
- archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var_GCJ=no
;;
- sysv5*)
- no_undefined_flag_GCJ=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds_GCJ='$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'
- hardcode_libdir_flag_spec_GCJ=
+ 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_GCJ='${wl}-z,text'
+ allow_undefined_flag_GCJ='${wl}-z,nodefs'
+ archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
+ hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator_GCJ=':'
+ link_all_deplibs_GCJ=yes
+ export_dynamic_flag_spec_GCJ='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
;;
uts4*)
@@ -16721,11 +17094,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
echo "${ECHO_T}$ld_shlibs_GCJ" >&6
test "$ld_shlibs_GCJ" = 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
-
#
# Do we need to explicitly link libc?
#
@@ -16758,6 +17126,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
libobjs=conftest.$ac_objext
deplibs=
wl=$lt_prog_compiler_wl_GCJ
+ pic_flag=$lt_prog_compiler_pic_GCJ
compiler_flags=-v
linker_flags=-v
verstring=
@@ -16890,7 +17259,7 @@ beos*)
shlibpath_var=LIBRARY_PATH
;;
-bsdi4*)
+bsdi[45]*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -16918,7 +17287,8 @@ cygwin* | mingw* | pw32*)
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'
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
@@ -16948,11 +17318,35 @@ cygwin* | mingw* | pw32*)
;;
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}'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
;;
+ linux*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ $archive_expsym_cmds="$archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
@@ -16971,7 +17365,7 @@ darwin* | rhapsody*)
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)'
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
@@ -17006,9 +17400,25 @@ kfreebsd*-gnu)
dynamic_linker='GNU ld.so'
;;
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -17019,20 +17429,31 @@ freebsd*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- freebsd3.01* | freebsdelf3.01*)
+ freebsd3.[01]* | freebsdelf3.[01]*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
- *) # from 3.2 on
+ 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
;;
+ freebsd*) # from 4.6 on
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
esac
;;
@@ -17052,7 +17473,7 @@ hpux9* | hpux10* | hpux11*)
version_type=sunos
need_lib_prefix=no
need_version=no
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
@@ -17092,6 +17513,18 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
+interix3*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
@@ -17149,31 +17582,10 @@ linux*)
# before this can be enabled.
hardcode_into_libs=yes
- # find out which ABI we are using
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*|powerpc64*)
- echo '#line 17156 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- esac
-
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -17234,8 +17646,13 @@ nto-qnx*)
openbsd*)
version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- need_version=yes
+ # 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
@@ -17273,13 +17690,6 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
-sco3.2v5*)
- version_type=osf
- 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
- ;;
-
solaris*)
version_type=linux
need_lib_prefix=no
@@ -17305,7 +17715,7 @@ sunos4*)
need_version=yes
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -17338,6 +17748,29 @@ sysv4*MP*)
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
+ 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'
+ shlibpath_overrides_runpath=no
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ shlibpath_overrides_runpath=yes
+ 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'
+ ;;
+
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -17353,12 +17786,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$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
+
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
hardcode_action_GCJ=
if test -n "$hardcode_libdir_flag_spec_GCJ" || \
- test -n "$runpath_var GCJ" || \
- test "X$hardcode_automatic_GCJ"="Xyes" ; then
+ test -n "$runpath_var_GCJ" || \
+ test "X$hardcode_automatic_GCJ" = "Xyes" ; then
# We can hardcode non-existant directories.
if test "$hardcode_direct_GCJ" != no &&
@@ -17390,841 +17828,6 @@ elif test "$shlibpath_overrides_runpath" = yes ||
enable_fast_install=needless
fi
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}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"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- ;;
- *)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- ;;
- esac
-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*)
- 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
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shl_load;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
- lt_cv_dlopen="shl_load"
-else
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_shl_load=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
- echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
- lt_cv_dlopen="dlopen"
-else
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dl_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_svld_dlopen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dld_dld_link=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-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"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
-#line 18027 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
-#line 18125 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$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
-
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
@@ -18239,7 +17842,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -18340,6 +17943,12 @@ fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
@@ -18351,6 +17960,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_compiler_GCJ
@@ -18416,7 +18028,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
@@ -18660,15 +18272,42 @@ lt_simple_link_test_code="$lt_simple_compile_test_code"
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
# Allow CC to be a program name with arguments.
compiler=$CC
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$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
+printf "$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 conftest*
+
+
# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
CC=${RC-"windres"}
compiler=$CC
compiler_RC=$CC
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
lt_cv_prog_compiler_c_o_RC=yes
# The else clause should only fire when bootstrapping the
@@ -18684,7 +18323,7 @@ if test -f "$ltmain"; then
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
@@ -18785,6 +18424,12 @@ fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
@@ -18796,6 +18441,9 @@ AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
# A language-specific compiler.
CC=$lt_compiler_RC
@@ -18861,7 +18509,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
@@ -19906,7 +19554,9 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- : > sub/conftst$i.h
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -19934,9 +19584,14 @@ else
grep sub/conftest.${OBJEXT-o} 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
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # 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
@@ -19969,9 +19624,9 @@ fi
# By default we simply use the C compiler to build assembly code.
-: ${CCAS='$(CC)'}
-# Set ASFLAGS if not already set.
-: ${CCASFLAGS='$(CFLAGS)'}
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
@@ -19987,6 +19642,12 @@ else
moduledir="$libdir/xorg/modules"
fi;
+# Check whether --enable-geodegx-panel or --disable-geodegx-panel was given.
+if test "${enable_geodegx_panel+set}" = set; then
+ enableval="$enable_geodegx_panel"
+ AMD_CFLAGS="-DPNL_SUP $AMD_CFLAGS"
+fi;
+
# Checks for extensions
SAVE_CFLAGS="$CFLAGS"
@@ -20691,6 +20352,7 @@ fi
+
is386=false
case $host_cpu in
@@ -21724,14 +21386,17 @@ s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
-s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
@@ -21785,6 +21450,7 @@ s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@XORG_CFLAGS@,$XORG_CFLAGS,;t t
s,@XORG_LIBS@,$XORG_LIBS,;t t
s,@moduledir@,$moduledir,;t t
+s,@AMD_CFLAGS@,$AMD_CFLAGS,;t t
s,@I386ARCH_TRUE@,$I386ARCH_TRUE,;t t
s,@I386ARCH_FALSE@,$I386ARCH_FALSE,;t t
s,@DRIVER_NAME@,$DRIVER_NAME,;t t
@@ -22424,27 +22090,21 @@ echo X"$mf" |
else
continue
fi
- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # 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 -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
diff --git a/configure.ac b/configure.ac
index ecd2c23..b6c9734 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,11 @@ AC_ARG_WITH(xorg-module-dir,
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
+AC_ARG_ENABLE(geodegx-panel,
+ AC_HELP_STRING([--enable-geodegx-panel],
+ [Enable support for flatpanels with the Geode GX]),
+ [ AMD_CFLAGS="-DPNL_SUP $AMD_CFLAGS" ])
+
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -66,6 +71,7 @@ AC_HEADER_STDC
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])
+AC_SUBST([AMD_CFLAGS])
is386=false
diff --git a/libtool b/libtool
index f47312c..5f6049e 100755
--- a/libtool
+++ b/libtool
@@ -22,7 +22,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,11 +33,11 @@
SED="/usr/bin/sed"
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="/usr/bin/sed -e s/^X//"
+Xsed="/usr/bin/sed -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# The names of the tagged configurations supported by this script.
available_tags=" CXX F77"
@@ -67,6 +67,12 @@ fast_install=yes
# The host system.
host_alias=
host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
# An echo program that does not interpret backslashes.
echo="echo"
@@ -78,6 +84,9 @@ AR_FLAGS="cru"
# A C compiler.
LTCC="gcc"
+# LTCC compiler flags.
+LTCFLAGS="-g -O2"
+
# A language-specific compiler.
CC="gcc"
@@ -143,7 +152,7 @@ max_cmd_len=32768
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks="no"
# Do we need the lib prefix for modules?
@@ -192,7 +201,7 @@ soname_spec="\${libname}\${release}\${shared_ext}\$major"
# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
# Create an old-style archive from a shared archive.
@@ -204,9 +213,9 @@ old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
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 -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+ cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
+ \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
+ \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
postinstall_cmds=""
postuninstall_cmds=""
@@ -257,7 +266,7 @@ finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
finish_eval=""
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
@@ -310,7 +319,7 @@ hardcode_automatic=no
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
-variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown
@@ -319,7 +328,7 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../ /lib/i686-pc-linux-gnu/3.3.6/ /lib/ /usr/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib # ld.so.conf autogenerated by env-update; make all changes to # contents of /etc/env.d directory /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -344,7 +353,7 @@ include_expsyms=""
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -360,7 +369,7 @@ include_expsyms=""
#
# 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -376,8 +385,8 @@ basename="s,^.*/,,g"
# function.
progpath="$0"
-# RH: define SED for historic ltconfig's generated by Libtool 1.3
-[ -z "$SED" ] && SED=sed
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
@@ -389,9 +398,21 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.6
-TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+# 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
+# Same for EGREP, and just to be sure, do LTCC as well
+if test "X$EGREP" = X ; then
+ EGREP=egrep
+fi
+if test "X$LTCC" = X ; then
+ LTCC=${CC-gcc}
+fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -429,14 +450,15 @@ rm="rm -f"
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
# test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
- SP2NL="tr '\100' '\n'"
- NL2SP="tr '\r\n' '\100\100'"
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ SP2NL='tr \040 \012'
+ NL2SP='tr \015\012 \040\040'
;;
- *) # Assume ASCII based system
- SP2NL="tr '\040' '\012'"
- NL2SP="tr '\015\012' '\040\040'"
+ *) # EBCDIC based system
+ SP2NL='tr \100 \n'
+ NL2SP='tr \r\n \100\100'
;;
esac
@@ -453,8 +475,9 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
-: ${IFS="
-"}
+lt_nl='
+'
+IFS=" $lt_nl"
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
@@ -471,20 +494,84 @@ run=
show="$echo"
show_help=
execute_dlfiles=
+duplicate_deps=no
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+if test -z "$max_cmd_len"; then
+ i=0
+ testring="ABCD"
+ new_result=
+
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ max_cmd_len="$new_result" &&
+ test "$i" != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring="$testring$testring"
+ done
+ testring=
+ # 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.
+ max_cmd_len=`expr $max_cmd_len \/ 2`
+fi
+
#####################################
# Shell function definitions:
# This seems to be the best place for them
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $mkdir "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || {
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+ exit $EXIT_FAILURE
+ }
+ fi
+
+ $echo "X$my_tmpdir" | $Xsed
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
-func_win32_libid () {
+func_win32_libid ()
+{
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
@@ -495,12 +582,11 @@ func_win32_libid () {
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
+ $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*)
@@ -524,7 +610,8 @@ func_win32_libid () {
# 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 () {
+func_infer_tag ()
+{
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
@@ -556,7 +643,21 @@ func_infer_tag () {
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -581,12 +682,116 @@ func_infer_tag () {
esac
fi
}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+
+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+ exit $EXIT_FAILURE
+ fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+ my_status=""
+
+ $show "${rm}r $my_gentop"
+ $run ${rm}r "$my_gentop"
+ $show "$mkdir $my_gentop"
+ $run $mkdir "$my_gentop"
+ my_status=$?
+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+ exit $my_status
+ fi
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+ my_xdir="$my_gentop/$my_xlib"
+
+ $show "${rm}r $my_xdir"
+ $run ${rm}r "$my_xdir"
+ $show "$mkdir $my_xdir"
+ $run $mkdir "$my_xdir"
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $exit_status
+ fi
+ case $host in
+ *-darwin*)
+ $show "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ if test -z "$run"; then
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ $show "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ lipo -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ ${rm}r unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd "$darwin_orig_dir"
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ fi # $run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+ func_extract_archives_result="$my_oldobjs"
+}
# End of Shell function definitions
#####################################
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
+disable_libs=no
+
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -651,10 +856,10 @@ do
--version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo
- $echo "Copyright (C) 2003 Free Software Foundation, Inc."
+ $echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- exit $EXIT_SUCCESS
+ exit $?
;;
--config)
@@ -663,7 +868,7 @@ do
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
- exit $EXIT_SUCCESS
+ exit $?
;;
--debug)
@@ -688,7 +893,7 @@ do
else
$echo "disable static libraries"
fi
- exit $EXIT_SUCCESS
+ exit $?
;;
--finish) mode="finish" ;;
@@ -703,7 +908,11 @@ do
preserve_args="$preserve_args $arg"
;;
- --tag) prevopt="--tag" prev=tag ;;
+ --tag)
+ prevopt="--tag"
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
@@ -735,6 +944,18 @@ if test -n "$prevopt"; then
exit $EXIT_FAILURE
fi
+case $disable_libs in
+no)
+ ;;
+shared)
+ build_libtool_libs=no
+ build_old_libs=yes
+ ;;
+static)
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+ ;;
+esac
+
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
@@ -745,7 +966,7 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
- $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
@@ -811,7 +1032,7 @@ if test -z "$show_help"; then
for arg
do
- case "$arg_mode" in
+ case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
lastarg="$arg"
@@ -893,7 +1114,10 @@ if test -z "$show_help"; then
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
+ # in scan sets, and some SunOS ksh mistreat backslash-escaping
+ # in scan sets (worked around with variable expansion),
+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets
+ # at all, so we specify them separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
@@ -967,6 +1191,14 @@ if test -z "$show_help"; then
esac
done
+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+ case $qlibobj in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qlibobj="\"$qlibobj\"" ;;
+ esac
+ test "X$libobj" != "X$qlibobj" \
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -1019,7 +1251,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -1039,12 +1271,17 @@ compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
- $echo $srcfile > "$lockfile"
+ $echo "$srcfile" > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+ case $qsrcfile in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qsrcfile="\"$qsrcfile\"" ;;
+ esac
$run $rm "$libobj" "${libobj}T"
@@ -1066,18 +1303,18 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile"
fi
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $exit_status
fi
fi
@@ -1149,9 +1386,9 @@ EOF
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile"
else
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@@ -1280,6 +1517,7 @@ EOF
no_install=no
objs=
non_pic_objects=
+ notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -1308,14 +1546,15 @@ EOF
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=yes
else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=built
fi
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -1490,6 +1729,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1573,6 +1817,13 @@ EOF
prev=
continue
;;
+ darwin_framework|darwin_framework_skip)
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ prev=
+ continue
+ ;;
*)
eval "$prev=\"\$arg\""
prev=
@@ -1631,6 +1882,18 @@ EOF
continue
;;
+ -framework|-arch|-isysroot)
+ case " $CC " in
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
+ prev=darwin_framework_skip ;;
+ *) compiler_flags="$compiler_flags $arg"
+ prev=darwin_framework ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ continue
+ ;;
+
-inst-prefix-dir)
prev=inst_prefix
continue
@@ -1657,7 +1920,8 @@ EOF
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
+ absdir="$dir"
+ notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
@@ -1671,10 +1935,15 @@ EOF
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1683,15 +1952,15 @@ EOF
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@@ -1699,10 +1968,19 @@ EOF
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -1712,8 +1990,20 @@ EOF
continue
;;
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ -model)
+ compile_command="$compile_command $arg"
+ compiler_flags="$compiler_flags $arg"
+ finalize_command="$finalize_command $arg"
+ prev=xcompiler
+ continue
+ ;;
+
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- deplibs="$deplibs $arg"
+ compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
continue
;;
@@ -1722,13 +2012,19 @@ EOF
continue
;;
- # gcc -m* arguments should be passed to the linker via $compiler_flags
- # in order to pass architecture information to the linker
- # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
- # but this is not reliable with gcc because gcc may use -mfoo to
- # select a different linker, different libraries, etc, while
- # -Wl,-mfoo simply passes -mfoo to the linker.
- -m*)
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m* pass through architecture-specific compiler args for GCC
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -pg pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+ -t[45]*|-txscale*|@*)
+
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
@@ -1739,9 +2035,7 @@ EOF
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
+ compiler_flags="$compiler_flags $arg"
continue
;;
@@ -1979,6 +2273,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -2084,9 +2383,9 @@ EOF
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $exit_status
fi
fi
@@ -2149,7 +2448,6 @@ EOF
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 link"
@@ -2201,7 +2499,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
- deplibs="$deplib $deplibs"
+ compiler_flags="$compiler_flags $deplib"
fi
continue
;;
@@ -2210,10 +2508,6 @@ EOF
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $std_shrext .so .a; do
@@ -2324,7 +2618,22 @@ EOF
fi
case $linkmode in
lib)
- if test "$deplibs_check_method" != pass_all; then
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ if eval $echo \"$deplib\" 2>/dev/null \
+ | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when"
@@ -2374,7 +2683,7 @@ EOF
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
@@ -2398,6 +2707,8 @@ EOF
# it will not redefine variables installed, or shouldnotlink
installed=yes
shouldnotlink=no
+ avoidtemprpath=
+
# Read the .la file
case $lib in
@@ -2496,11 +2807,19 @@ EOF
dir="$libdir"
absdir="$libdir"
fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
@@ -2573,12 +2892,12 @@ EOF
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
- if test -n "$shlibpath_var"; then
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
+ *) temp_rpath="$temp_rpath $absdir" ;;
esac
fi
@@ -2615,8 +2934,12 @@ EOF
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 "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
@@ -2729,11 +3052,15 @@ EOF
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null |
+ $EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
@@ -2764,7 +3091,7 @@ EOF
add_dir="-L$dir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
- case "$libdir" in
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2837,7 +3164,7 @@ EOF
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
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2898,8 +3225,6 @@ EOF
fi
fi
else
- convenience="$convenience $dir/$old_library"
- old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
@@ -3017,12 +3342,12 @@ EOF
*) continue ;;
esac
case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$deplibs $path" ;;
+ *" $depdepl "*) ;;
+ *) deplibs="$depdepl $deplibs" ;;
esac
done
fi # link_all_deplibs != no
@@ -3287,27 +3612,27 @@ EOF
# Check that each of the things are valid numbers.
case $current in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $revision in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $age in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@@ -3333,7 +3658,7 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
;;
freebsd-aout)
@@ -3486,9 +3811,9 @@ EOF
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
done
if test -n "$xrpath"; then
@@ -3539,9 +3864,14 @@ EOF
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-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.
@@ -3585,11 +3915,11 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC -o conftest conftest.c $deplibs
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" -ne "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3626,11 +3956,11 @@ EOF
# Error occurred in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC -o conftest conftest.c $i
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
@@ -3678,7 +4008,7 @@ EOF
set dummy $deplibs_check_method
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3712,6 +4042,13 @@ EOF
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
+ # It is ok to link against an archive when
+ # building a shared library.
+ if $AR -t $potlib > /dev/null 2>&1; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$file_magic_regex" > /dev/null; then
@@ -3747,7 +4084,7 @@ EOF
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3877,6 +4214,35 @@ EOF
deplibs=$newdeplibs
fi
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3960,6 +4326,7 @@ EOF
fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
@@ -3988,6 +4355,9 @@ EOF
# The command line is too long to execute in one step.
$show "using reloadable object file for export list..."
skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
fi
done
IFS="$save_ifs"
@@ -4021,67 +4391,13 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
fi
fi
-
+
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
@@ -4111,7 +4427,8 @@ EOF
fi
fi
- if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ if test "X$skipped_export" != "X:" &&
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
:
else
@@ -4130,6 +4447,7 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
+ output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and
# initialize k to one.
@@ -4139,13 +4457,13 @@ EOF
delfiles=
last_robj=
k=1
- output=$output_objdir/$save_output-${k}.$objext
+ output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*"` &&
+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; }; then
objlist="$objlist $obj"
else
@@ -4159,9 +4477,9 @@ EOF
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
- last_robj=$output_objdir/$save_output-${k}.$objext
+ last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1`
- output=$output_objdir/$save_output-${k}.$objext
+ output=$output_objdir/$output_la-${k}.$objext
objlist=$obj
len=1
fi
@@ -4181,13 +4499,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
- # Set up a command to remove the reloadale object files
+ # Set up a command to remove the reloadable object files
# after they are used.
i=0
while test "$i" -lt "$k"
do
i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
@@ -4235,13 +4553,30 @@ EOF
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ fi
+ fi
+
exit $EXIT_SUCCESS
fi
@@ -4319,64 +4654,10 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
@@ -4477,6 +4758,35 @@ EOF
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -4521,10 +4831,15 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -4638,13 +4953,25 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$output.exp"
+ export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
else
- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
fi
fi
@@ -4695,7 +5022,26 @@ extern \"C\" {
#endif
/* The mapping between symbol names and symbols. */
+"
+
+ case $host in
+ *cygwin* | *mingw* )
+ $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs */
+struct {
+"
+ ;;
+ * )
+ $echo >> "$output_objdir/$dlsyms" "\
const struct {
+"
+ ;;
+ esac
+
+
+ $echo >> "$output_objdir/$dlsyms" "\
const char *name;
lt_ptr address;
}
@@ -4742,16 +5088,29 @@ static const void *lt_preloaded_setup() {
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/${outputname}.def" ; then
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ else
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4776,7 +5135,7 @@ static const void *lt_preloaded_setup() {
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- status=$?
+ exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
@@ -4784,7 +5143,7 @@ static const void *lt_preloaded_setup() {
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $status
+ exit $exit_status
fi
if test -n "$shlibpath_var"; then
@@ -4924,10 +5283,12 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${output}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@@ -4952,6 +5313,9 @@ EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@@ -4962,15 +5326,19 @@ EOF
#endif
#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
#endif
#ifndef DIR_SEPARATOR_2
@@ -4980,17 +5348,32 @@ EOF
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@@ -5000,29 +5383,51 @@ main (int argc, char *argv[])
char **newargz;
int i;
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
EOF
- cat >> $cwrappersource <<EOF
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
+ ;;
+ esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
+ return 127;
}
void *
@@ -5042,48 +5447,148 @@ xstrdup (const char *string)
;
}
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
+}
+
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
}
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
{
- size_t size;
- char *p;
+ 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;
- assert(path != NULL);
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
- /* Is it qualified already? */
+ 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)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
+ }
#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
- /* prepend the current directory */
- /* doesn't handle '~' */
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
+ 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 *
@@ -5127,16 +5632,16 @@ lt_fatal (const char *message, ...)
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -5157,7 +5662,7 @@ sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
@@ -5281,18 +5786,23 @@ else
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
- exec \$progdir\\\\\$program \${1+\"\$@\"}
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
;;
*)
$echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
;;
esac
@@ -5302,7 +5812,7 @@ else
fi
else
# The program doesn't exist.
- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit $EXIT_FAILURE
@@ -5334,71 +5844,73 @@ fi\
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- # Add in members from convenience archives.
- for xlib in $addlibs; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "copying selected object files to avoid basename conflicts..."
+
+ if test -z "$gentop"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+ exit $exit_status
+ fi
+ fi
+
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ counter=`expr $counter + 1`
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ $run ln "$obj" "$gentop/$newobj" ||
+ $run cp "$obj" "$gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@@ -5412,20 +5924,7 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
- # GNU ar 2.10+ was changed to match POSIX; thus no paths are
- # encoded into archives. This makes 'ar r' malfunction in
- # this piecewise linking case whenever conflicting object
- # names appear in distinct ar calls; check, warn and compensate.
- if (for obj in $save_oldobjs
- do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
- $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
- AR_FLAGS=cq
- fi
+
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
@@ -5436,7 +5935,7 @@ fi\
oldobjs="$objlist $obj"
objlist="$objlist $obj"
eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*"` &&
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; then
:
else
@@ -5519,9 +6018,53 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5573,6 +6116,10 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5633,11 +6180,11 @@ relink_command=\"$relink_command\""
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ $echo "X$nonopt" | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5646,14 +6193,14 @@ relink_command=\"$relink_command\""
shift
else
install_prog=
- arg="$nonopt"
+ arg=$nonopt
fi
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5671,28 +6218,31 @@ relink_command=\"$relink_command\""
do
if test -n "$dest"; then
files="$files $dest"
- dest="$arg"
+ dest=$arg
continue
fi
case $arg in
-d) isdir=yes ;;
- -f) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o) prev=$arg ;;
-s)
stripme=" -s"
continue
;;
- -*) ;;
-
+ -*)
+ ;;
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
prev=
else
- dest="$arg"
+ dest=$arg
continue
fi
;;
@@ -5701,7 +6251,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5870,11 +6420,14 @@ relink_command=\"$relink_command\""
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
for linkname
do
if test "$linkname" != "$realname"; then
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
fi
done
fi
@@ -5887,7 +6440,16 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
fi
@@ -5981,17 +6543,15 @@ relink_command=\"$relink_command\""
notinst_deplibs=
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
# Check the variables that should have been set.
@@ -6019,34 +6579,21 @@ relink_command=\"$relink_command\""
done
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
+ tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
@@ -6070,7 +6617,7 @@ relink_command=\"$relink_command\""
fi
# remove .exe since cygwin /usr/bin/install will append another
- # one anyways
+ # one anyway
case $install_prog,$host in
*/usr/bin/install*,*cygwin*)
case $file:$destfile in
@@ -6170,7 +6717,7 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
@@ -6203,7 +6750,7 @@ relink_command=\"$relink_command\""
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
@@ -6420,9 +6967,17 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test "$mode" = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
@@ -6455,7 +7010,8 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
@@ -6740,7 +7296,7 @@ esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
-exit $EXIT_SUCCESS
+exit $?
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
@@ -6754,12 +7310,11 @@ exit $EXIT_SUCCESS
# 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
+disable_libs=shared
# ### 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`
+disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
@@ -6791,6 +7346,12 @@ fast_install=yes
# The host system.
host_alias=
host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
# An echo program that does not interpret backslashes.
echo="echo"
@@ -6802,6 +7363,9 @@ AR_FLAGS="cru"
# A C compiler.
LTCC="gcc"
+# LTCC compiler flags.
+LTCFLAGS="-g -O2"
+
# A language-specific compiler.
CC="g++"
@@ -6867,7 +7431,7 @@ max_cmd_len=32768
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks="no"
# Do we need the lib prefix for modules?
@@ -6916,7 +7480,7 @@ soname_spec="\${libname}\${release}\${shared_ext}\$major"
# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
# Create an old-style archive from a shared archive.
@@ -6978,7 +7542,7 @@ finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
finish_eval=""
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
@@ -7023,7 +7587,7 @@ hardcode_minus_L=no
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
-hardcode_shlibpath_var=
+hardcode_shlibpath_var=unsupported
# Set to yes if building a shared library automatically hardcodes DIR into the library
# and all subsequent libraries and executables linked against it.
@@ -7040,7 +7604,7 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../ /lib/i686-pc-linux-gnu/3.3.6/ /lib/ /usr/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib # ld.so.conf autogenerated by env-update; make all changes to # contents of /etc/env.d directory /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -7087,6 +7651,12 @@ fast_install=yes
# The host system.
host_alias=
host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
# An echo program that does not interpret backslashes.
echo="echo"
@@ -7098,6 +7668,9 @@ AR_FLAGS="cru"
# A C compiler.
LTCC="gcc"
+# LTCC compiler flags.
+LTCFLAGS="-g -O2"
+
# A language-specific compiler.
CC="g77"
@@ -7163,7 +7736,7 @@ max_cmd_len=32768
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
-# Must we lock files when doing compilation ?
+# Must we lock files when doing compilation?
need_locks="no"
# Do we need the lib prefix for modules?
@@ -7212,7 +7785,7 @@ soname_spec="\${libname}\${release}\${shared_ext}\$major"
# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
-old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
# Create an old-style archive from a shared archive.
@@ -7224,9 +7797,9 @@ old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
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 -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+ cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
+ \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
+ \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
postinstall_cmds=""
postuninstall_cmds=""
@@ -7277,7 +7850,7 @@ finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
finish_eval=""
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
@@ -7339,7 +7912,7 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/lib/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../i686-pc-linux-gnu/3.3.6/ /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../ /lib/i686-pc-linux-gnu/3.3.6/ /lib/ /usr/lib/i686-pc-linux-gnu/3.3.6/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib # ld.so.conf autogenerated by env-update; make all changes to # contents of /etc/env.d directory /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib //usr//lib/opengl/nvidia/lib /usr/i686-pc-linux-gnu/lib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.6 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5 /usr/lib/nspr /usr/lib/nss /usr/lib /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/native_threads/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/classic/ /opt/blackdown-jdk-1.4.2.02/jre/lib/i386/server/ /usr/qt/3/lib /usr/games/lib /usr/lib/libstdc++-v3/ "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
diff --git a/ltmain.sh b/ltmain.sh
index 23f82e3..8f7a6ac 100755
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -17,7 +17,7 @@
#
# 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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,8 +33,8 @@ basename="s,^.*/,,g"
# function.
progpath="$0"
-# RH: define SED for historic ltconfig's generated by Libtool 1.3
-[ -z "$SED" ] && SED=sed
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
@@ -46,9 +46,21 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.6
-TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+# 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
+# Same for EGREP, and just to be sure, do LTCC as well
+if test "X$EGREP" = X ; then
+ EGREP=egrep
+fi
+if test "X$LTCC" = X ; then
+ LTCC=${CC-gcc}
+fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -86,14 +98,15 @@ rm="rm -f"
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
# test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
- SP2NL="tr '\100' '\n'"
- NL2SP="tr '\r\n' '\100\100'"
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ SP2NL='tr \040 \012'
+ NL2SP='tr \015\012 \040\040'
;;
- *) # Assume ASCII based system
- SP2NL="tr '\040' '\012'"
- NL2SP="tr '\015\012' '\040\040'"
+ *) # EBCDIC based system
+ SP2NL='tr \100 \n'
+ NL2SP='tr \r\n \100\100'
;;
esac
@@ -110,8 +123,9 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
-: ${IFS="
-"}
+lt_nl='
+'
+IFS=" $lt_nl"
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
@@ -128,20 +142,84 @@ run=
show="$echo"
show_help=
execute_dlfiles=
+duplicate_deps=no
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+if test -z "$max_cmd_len"; then
+ i=0
+ testring="ABCD"
+ new_result=
+
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ max_cmd_len="$new_result" &&
+ test "$i" != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring="$testring$testring"
+ done
+ testring=
+ # 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.
+ max_cmd_len=`expr $max_cmd_len \/ 2`
+fi
+
#####################################
# Shell function definitions:
# This seems to be the best place for them
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $mkdir "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || {
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+ exit $EXIT_FAILURE
+ }
+ fi
+
+ $echo "X$my_tmpdir" | $Xsed
+}
+
+
# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
-func_win32_libid () {
+func_win32_libid ()
+{
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
@@ -152,12 +230,11 @@ func_win32_libid () {
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
- if test "X$win32_nmres" = "Ximport" ; then
- win32_libid_type="x86 archive import"
- else
- win32_libid_type="x86 archive static"
- fi
+ $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*)
@@ -181,7 +258,8 @@ func_win32_libid () {
# 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 () {
+func_infer_tag ()
+{
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
@@ -213,7 +291,21 @@ func_infer_tag () {
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -238,12 +330,116 @@ func_infer_tag () {
esac
fi
}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+
+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+ exit $EXIT_FAILURE
+ fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+ my_status=""
+
+ $show "${rm}r $my_gentop"
+ $run ${rm}r "$my_gentop"
+ $show "$mkdir $my_gentop"
+ $run $mkdir "$my_gentop"
+ my_status=$?
+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+ exit $my_status
+ fi
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+ my_xdir="$my_gentop/$my_xlib"
+
+ $show "${rm}r $my_xdir"
+ $run ${rm}r "$my_xdir"
+ $show "$mkdir $my_xdir"
+ $run $mkdir "$my_xdir"
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $exit_status
+ fi
+ case $host in
+ *-darwin*)
+ $show "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ if test -z "$run"; then
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ $show "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ lipo -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ ${rm}r unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd "$darwin_orig_dir"
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ fi # $run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+ func_extract_archives_result="$my_oldobjs"
+}
# End of Shell function definitions
#####################################
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
+disable_libs=no
+
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
@@ -308,10 +504,10 @@ do
--version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo
- $echo "Copyright (C) 2003 Free Software Foundation, Inc."
+ $echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- exit $EXIT_SUCCESS
+ exit $?
;;
--config)
@@ -320,7 +516,7 @@ do
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
- exit $EXIT_SUCCESS
+ exit $?
;;
--debug)
@@ -345,7 +541,7 @@ do
else
$echo "disable static libraries"
fi
- exit $EXIT_SUCCESS
+ exit $?
;;
--finish) mode="finish" ;;
@@ -360,7 +556,11 @@ do
preserve_args="$preserve_args $arg"
;;
- --tag) prevopt="--tag" prev=tag ;;
+ --tag)
+ prevopt="--tag"
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
@@ -392,6 +592,18 @@ if test -n "$prevopt"; then
exit $EXIT_FAILURE
fi
+case $disable_libs in
+no)
+ ;;
+shared)
+ build_libtool_libs=no
+ build_old_libs=yes
+ ;;
+static)
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+ ;;
+esac
+
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
@@ -402,7 +614,7 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
- $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
@@ -468,7 +680,7 @@ if test -z "$show_help"; then
for arg
do
- case "$arg_mode" in
+ case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
lastarg="$arg"
@@ -550,7 +762,10 @@ if test -z "$show_help"; then
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
+ # in scan sets, and some SunOS ksh mistreat backslash-escaping
+ # in scan sets (worked around with variable expansion),
+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets
+ # at all, so we specify them separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
@@ -624,6 +839,14 @@ if test -z "$show_help"; then
esac
done
+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+ case $qlibobj in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qlibobj="\"$qlibobj\"" ;;
+ esac
+ test "X$libobj" != "X$qlibobj" \
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -676,7 +899,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -696,12 +919,17 @@ compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
- $echo $srcfile > "$lockfile"
+ $echo "$srcfile" > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+ case $qsrcfile in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qsrcfile="\"$qsrcfile\"" ;;
+ esac
$run $rm "$libobj" "${libobj}T"
@@ -723,18 +951,18 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile"
fi
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $exit_status
fi
fi
@@ -806,9 +1034,9 @@ EOF
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile"
else
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@@ -937,6 +1165,7 @@ EOF
no_install=no
objs=
non_pic_objects=
+ notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
@@ -965,14 +1194,15 @@ EOF
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=yes
else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
+ prefer_static_libs=built
fi
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -1147,6 +1377,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1230,6 +1465,13 @@ EOF
prev=
continue
;;
+ darwin_framework|darwin_framework_skip)
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ prev=
+ continue
+ ;;
*)
eval "$prev=\"\$arg\""
prev=
@@ -1288,6 +1530,18 @@ EOF
continue
;;
+ -framework|-arch|-isysroot)
+ case " $CC " in
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
+ prev=darwin_framework_skip ;;
+ *) compiler_flags="$compiler_flags $arg"
+ prev=darwin_framework ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ continue
+ ;;
+
-inst-prefix-dir)
prev=inst_prefix
continue
@@ -1314,7 +1568,8 @@ EOF
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit $EXIT_FAILURE
+ absdir="$dir"
+ notinst_path="$notinst_path $dir"
fi
dir="$absdir"
;;
@@ -1328,10 +1583,15 @@ EOF
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1340,15 +1600,15 @@ EOF
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@@ -1356,10 +1616,19 @@ EOF
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -1369,8 +1638,20 @@ EOF
continue
;;
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ -model)
+ compile_command="$compile_command $arg"
+ compiler_flags="$compiler_flags $arg"
+ finalize_command="$finalize_command $arg"
+ prev=xcompiler
+ continue
+ ;;
+
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- deplibs="$deplibs $arg"
+ compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
continue
;;
@@ -1379,13 +1660,19 @@ EOF
continue
;;
- # gcc -m* arguments should be passed to the linker via $compiler_flags
- # in order to pass architecture information to the linker
- # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
- # but this is not reliable with gcc because gcc may use -mfoo to
- # select a different linker, different libraries, etc, while
- # -Wl,-mfoo simply passes -mfoo to the linker.
- -m*)
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m* pass through architecture-specific compiler args for GCC
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -pg pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+ -t[45]*|-txscale*|@*)
+
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
@@ -1396,9 +1683,7 @@ EOF
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- if test "$with_gcc" = "yes" ; then
- compiler_flags="$compiler_flags $arg"
- fi
+ compiler_flags="$compiler_flags $arg"
continue
;;
@@ -1636,6 +1921,11 @@ EOF
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
@@ -1741,9 +2031,9 @@ EOF
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- status=$?
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
- exit $status
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $exit_status
fi
fi
@@ -1806,7 +2096,6 @@ EOF
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 link"
@@ -1858,7 +2147,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
- deplibs="$deplib $deplibs"
+ compiler_flags="$compiler_flags $deplib"
fi
continue
;;
@@ -1867,10 +2156,6 @@ EOF
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $std_shrext .so .a; do
@@ -1981,7 +2266,22 @@ EOF
fi
case $linkmode in
lib)
- if test "$deplibs_check_method" != pass_all; then
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ if eval $echo \"$deplib\" 2>/dev/null \
+ | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
$echo
$echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when"
@@ -2031,7 +2331,7 @@ EOF
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
exit $EXIT_FAILURE
fi
@@ -2055,6 +2355,8 @@ EOF
# it will not redefine variables installed, or shouldnotlink
installed=yes
shouldnotlink=no
+ avoidtemprpath=
+
# Read the .la file
case $lib in
@@ -2153,11 +2455,19 @@ EOF
dir="$libdir"
absdir="$libdir"
fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
@@ -2230,12 +2540,12 @@ EOF
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
- if test -n "$shlibpath_var"; then
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
+ *) temp_rpath="$temp_rpath $absdir" ;;
esac
fi
@@ -2272,8 +2582,12 @@ EOF
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 "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
@@ -2386,11 +2700,15 @@ EOF
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null |
+ $EGREP ": [^:]* bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
@@ -2421,7 +2739,7 @@ EOF
add_dir="-L$dir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
- case "$libdir" in
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2494,7 +2812,7 @@ EOF
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
+ case $libdir in
[\\/]*)
add_dir="$add_dir -L$inst_prefix_dir$libdir"
;;
@@ -2555,8 +2873,6 @@ EOF
fi
fi
else
- convenience="$convenience $dir/$old_library"
- old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
@@ -2674,12 +2990,12 @@ EOF
*) continue ;;
esac
case " $deplibs " in
- *" $depdepl "*) ;;
- *) deplibs="$depdepl $deplibs" ;;
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$deplibs $path" ;;
+ *" $depdepl "*) ;;
+ *) deplibs="$depdepl $deplibs" ;;
esac
done
fi # link_all_deplibs != no
@@ -2944,27 +3260,27 @@ EOF
# Check that each of the things are valid numbers.
case $current in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $revision in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $age in
- [0-9]*) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@@ -2990,7 +3306,7 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
;;
freebsd-aout)
@@ -3143,9 +3459,9 @@ EOF
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
done
if test -n "$xrpath"; then
@@ -3196,9 +3512,14 @@ EOF
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-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.
@@ -3242,11 +3563,11 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC -o conftest conftest.c $deplibs
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" -ne "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3283,11 +3604,11 @@ EOF
# Error occurred in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC -o conftest conftest.c $i
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
@@ -3335,7 +3656,7 @@ EOF
set dummy $deplibs_check_method
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3369,6 +3690,13 @@ EOF
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
+ # It is ok to link against an archive when
+ # building a shared library.
+ if $AR -t $potlib > /dev/null 2>&1; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$file_magic_regex" > /dev/null; then
@@ -3404,7 +3732,7 @@ EOF
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ name=`expr $a_deplib : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
@@ -3534,6 +3862,35 @@ EOF
deplibs=$newdeplibs
fi
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
@@ -3617,6 +3974,7 @@ EOF
fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
@@ -3645,6 +4003,9 @@ EOF
# The command line is too long to execute in one step.
$show "using reloadable object file for export list..."
skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
fi
done
IFS="$save_ifs"
@@ -3678,67 +4039,13 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
fi
fi
-
+
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
@@ -3768,7 +4075,8 @@ EOF
fi
fi
- if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ if test "X$skipped_export" != "X:" &&
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
:
else
@@ -3787,6 +4095,7 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
+ output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and
# initialize k to one.
@@ -3796,13 +4105,13 @@ EOF
delfiles=
last_robj=
k=1
- output=$output_objdir/$save_output-${k}.$objext
+ output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
if test "X$objlist" = X ||
- { len=`expr "X$test_cmds" : ".*"` &&
+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; }; then
objlist="$objlist $obj"
else
@@ -3816,9 +4125,9 @@ EOF
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
- last_robj=$output_objdir/$save_output-${k}.$objext
+ last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1`
- output=$output_objdir/$save_output-${k}.$objext
+ output=$output_objdir/$output_la-${k}.$objext
objlist=$obj
len=1
fi
@@ -3838,13 +4147,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
- # Set up a command to remove the reloadale object files
+ # Set up a command to remove the reloadable object files
# after they are used.
i=0
while test "$i" -lt "$k"
do
i=`expr $i + 1`
- delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
@@ -3892,13 +4201,30 @@ EOF
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ fi
+ fi
+
exit $EXIT_SUCCESS
fi
@@ -3976,64 +4302,10 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
@@ -4134,6 +4406,35 @@ EOF
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -4178,10 +4479,15 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -4295,13 +4601,25 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$output.exp"
+ export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
else
- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* )
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
fi
fi
@@ -4352,7 +4670,26 @@ extern \"C\" {
#endif
/* The mapping between symbol names and symbols. */
+"
+
+ case $host in
+ *cygwin* | *mingw* )
+ $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs */
+struct {
+"
+ ;;
+ * )
+ $echo >> "$output_objdir/$dlsyms" "\
const struct {
+"
+ ;;
+ esac
+
+
+ $echo >> "$output_objdir/$dlsyms" "\
const char *name;
lt_ptr address;
}
@@ -4399,16 +4736,29 @@ static const void *lt_preloaded_setup() {
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/${outputname}.def" ; then
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ else
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ esac
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4433,7 +4783,7 @@ static const void *lt_preloaded_setup() {
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- status=$?
+ exit_status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
@@ -4441,7 +4791,7 @@ static const void *lt_preloaded_setup() {
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $status
+ exit $exit_status
fi
if test -n "$shlibpath_var"; then
@@ -4581,10 +4931,12 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
- cwrappersource=`$echo ${objdir}/lt-${output}.c`
- cwrapper=`$echo ${output}.exe`
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@@ -4609,6 +4961,9 @@ EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
@@ -4619,15 +4974,19 @@ EOF
#endif
#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
#endif
#ifndef DIR_SEPARATOR_2
@@ -4637,17 +4996,32 @@ EOF
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
@@ -4657,29 +5031,51 @@ main (int argc, char *argv[])
char **newargz;
int i;
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = "$SHELL";
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = fnqualify(argv[0]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
EOF
- cat >> $cwrappersource <<EOF
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
+ ;;
+ esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
+ return 127;
}
void *
@@ -4699,48 +5095,148 @@ xstrdup (const char *string)
;
}
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
+}
+
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
}
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
{
- size_t size;
- char *p;
+ 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;
- assert(path != NULL);
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
- /* Is it qualified already? */
+ 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)
- if (isalpha (path[0]) && path[1] == ':')
- return xstrdup (path);
+ }
#endif
- if (IS_DIR_SEPARATOR (path[0]))
- return xstrdup (path);
- /* prepend the current directory */
- /* doesn't handle '~' */
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
- p = XMALLOC(char, size);
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
- return p;
+ 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 *
@@ -4784,16 +5280,16 @@ lt_fatal (const char *message, ...)
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -4814,7 +5310,7 @@ sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
@@ -4938,18 +5434,23 @@ else
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
- exec \$progdir\\\\\$program \${1+\"\$@\"}
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
;;
*)
$echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
;;
esac
@@ -4959,7 +5460,7 @@ else
fi
else
# The program doesn't exist.
- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit $EXIT_FAILURE
@@ -4991,71 +5492,73 @@ fi\
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test "$status" -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- # Add in members from convenience archives.
- for xlib in $addlibs; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test "$status" -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- # We will extract separately just the conflicting names and we will no
- # longer touch any unique names. It is faster to leave these extract
- # automatically by $AR in one run.
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
- do
- i=1
- while test "$i" -le "$count"
- do
- # Put our $i before any first dot (extension)
- # Never overwrite any file
- name_to="$name"
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
- do
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
- done
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
- i=`expr $i + 1`
- done
- done
- fi
-
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "copying selected object files to avoid basename conflicts..."
+
+ if test -z "$gentop"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
+ exit_status=$?
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+ exit $exit_status
+ fi
+ fi
+
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ counter=`expr $counter + 1`
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ $run ln "$obj" "$gentop/$newobj" ||
+ $run cp "$obj" "$gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@@ -5069,20 +5572,7 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
- # GNU ar 2.10+ was changed to match POSIX; thus no paths are
- # encoded into archives. This makes 'ar r' malfunction in
- # this piecewise linking case whenever conflicting object
- # names appear in distinct ar calls; check, warn and compensate.
- if (for obj in $save_oldobjs
- do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
- $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
- AR_FLAGS=cq
- fi
+
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
@@ -5093,7 +5583,7 @@ fi\
oldobjs="$objlist $obj"
objlist="$objlist $obj"
eval test_cmds=\"$old_archive_cmds\"
- if len=`expr "X$test_cmds" : ".*"` &&
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
test "$len" -le "$max_cmd_len"; then
:
else
@@ -5176,9 +5666,53 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5230,6 +5764,10 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -5290,11 +5828,11 @@ relink_command=\"$relink_command\""
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ $echo "X$nonopt" | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5303,14 +5841,14 @@ relink_command=\"$relink_command\""
shift
else
install_prog=
- arg="$nonopt"
+ arg=$nonopt
fi
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5328,28 +5866,31 @@ relink_command=\"$relink_command\""
do
if test -n "$dest"; then
files="$files $dest"
- dest="$arg"
+ dest=$arg
continue
fi
case $arg in
-d) isdir=yes ;;
- -f) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o) prev=$arg ;;
-s)
stripme=" -s"
continue
;;
- -*) ;;
-
+ -*)
+ ;;
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
prev=
else
- dest="$arg"
+ dest=$arg
continue
fi
;;
@@ -5358,7 +5899,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5527,11 +6068,14 @@ relink_command=\"$relink_command\""
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
for linkname
do
if test "$linkname" != "$realname"; then
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
fi
done
fi
@@ -5544,7 +6088,16 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
eval cmd=\"$cmd\"
$show "$cmd"
- $run eval "$cmd" || exit $?
+ $run eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+ fi
+
+ exit $lt_exit
+ }
done
IFS="$save_ifs"
fi
@@ -5638,17 +6191,15 @@ relink_command=\"$relink_command\""
notinst_deplibs=
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
# Check the variables that should have been set.
@@ -5676,34 +6227,21 @@ relink_command=\"$relink_command\""
done
relink_command=
- # To insure that "foo" is sourced, and not "foo.exe",
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
- # which disallows the automatic-append-.exe behavior.
- case $build in
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
- *) wrapperdot=${wrapper} ;;
- esac
+ # Note that it is not necessary on cygwin/mingw to append a dot to
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
+ # `FILE.' does not work on cygwin managed mounts.
+ #
# If there is no directory component, then add one.
- case $file in
- */* | *\\*) . ${wrapperdot} ;;
- *) . ./${wrapperdot} ;;
+ case $wrapper in
+ */* | *\\*) . ${wrapper} ;;
+ *) . ./${wrapper} ;;
esac
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- save_umask=`umask`
- umask 0077
- if $mkdir "$tmpdir"; then
- umask $save_umask
- else
- umask $save_umask
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
+ tmpdir=`func_mktempdir`
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
@@ -5727,7 +6265,7 @@ relink_command=\"$relink_command\""
fi
# remove .exe since cygwin /usr/bin/install will append another
- # one anyways
+ # one anyway
case $install_prog,$host in
*/usr/bin/install*,*cygwin*)
case $file:$destfile in
@@ -5827,7 +6365,7 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
@@ -5860,7 +6398,7 @@ relink_command=\"$relink_command\""
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "----------------------------------------------------------------------"
+ $echo "X----------------------------------------------------------------------" | $Xsed
exit $EXIT_SUCCESS
;;
@@ -6077,9 +6615,17 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test "$mode" = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
@@ -6112,7 +6658,8 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
@@ -6397,7 +6944,7 @@ esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
-exit $EXIT_SUCCESS
+exit $?
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
@@ -6411,12 +6958,11 @@ exit $EXIT_SUCCESS
# 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
+disable_libs=shared
# ### 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`
+disable_libs=static
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
diff --git a/man/Makefile.in b/man/Makefile.in
index dc8584b..c8c2038 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -89,6 +89,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
+AMD_CFLAGS = @AMD_CFLAGS@
AMTAR = @AMTAR@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
diff --git a/src/Makefile.am b/src/Makefile.am
index 1b337ba..c3d3433 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,9 +27,12 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) \
-I$(top_srcdir)/src/cim -I$(top_srcdir)/src/gfx \
-I$(top_srcdir)/src/panel -I$(top_srcdir)/linux_v26
+# -DPNL_SUP is now provided by AMD_CFLAGS
+#
AM_CFLAGS = @XORG_CFLAGS@ \
-DHAVE_GX -DHAVE_LX -DAMD_V4L2_VIDEO -DOPT_ACCEL \
- -DPNL_SUP -DLINUX_2_6
+ -DLINUX_2_6 @AMD_CFLAGS@
+
AM_CCASFLAGS = @XORG_CFLAGS@
amd_drv_la_LTLIBRARIES = amd_drv.la
amd_drv_la_LDFLAGS = -module -avoid-version
@@ -74,7 +77,6 @@ EXTRA_DIST = \
\
gfx/disp_gu1.c \
gfx/disp_gu2.c \
- gfx/disp_gu3.c \
gfx/durango.c \
gfx/gfx_dcdr.c \
gfx/gfx_defs.h \
@@ -97,7 +99,6 @@ EXTRA_DIST = \
gfx/i2c_gpio.c \
gfx/init_gu1.c \
gfx/init_gu2.c \
- gfx/init_gu3.c \
gfx/msr_rdcl.c \
gfx/release.txt \
gfx/rndr_gu1.c \
@@ -109,7 +110,6 @@ EXTRA_DIST = \
gfx/vga_gu1.c \
gfx/vid_1200.c \
gfx/vid_5530.c \
- gfx/vid_cstl.c \
gfx/vid_rdcl.c \
gfx/vip_1200.c \
\
diff --git a/src/Makefile.in b/src/Makefile.in
index 8f86f3b..43fcba9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -34,8 +34,6 @@
# 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.
-SOURCES = $(amd_drv_la_SOURCES) $(ztv_drv_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -89,7 +87,6 @@ amd_drv_la_OBJECTS = $(am_amd_drv_la_OBJECTS)
ztv_drv_la_LIBADD =
am_ztv_drv_la_OBJECTS = z4l.lo
ztv_drv_la_OBJECTS = $(am_ztv_drv_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -110,6 +107,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
+AMD_CFLAGS = @AMD_CFLAGS@
AMTAR = @AMTAR@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
@@ -232,11 +230,16 @@ target_alias = @target_alias@
# -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.
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/src/cim -I$(top_srcdir)/src/gfx \
+ -I$(top_srcdir)/src/panel -I$(top_srcdir)/linux_v26
+
+
+# -DPNL_SUP is now provided by AMD_CFLAGS
+#
AM_CFLAGS = @XORG_CFLAGS@ \
- -I$(top_srcdir)/src/cim -I$(top_srcdir)/src/gfx \
- -I$(top_srcdir)/src/panel -I$(top_srcdir)/src/linux_v26 \
-DHAVE_GX -DHAVE_LX -DAMD_V4L2_VIDEO -DOPT_ACCEL \
- -DPNL_SUP -DLINUX_2_6
+ -DLINUX_2_6 @AMD_CFLAGS@
AM_CCASFLAGS = @XORG_CFLAGS@
amd_drv_la_LTLIBRARIES = amd_drv.la
@@ -263,7 +266,6 @@ amd_drv_la_SOURCES = \
cimarron.c
EXTRA_DIST = \
- cim/cimarron.c \
cim/cim_defs.h \
cim/cim_df.c \
cim/cim_filter.c \
@@ -282,7 +284,6 @@ EXTRA_DIST = \
\
gfx/disp_gu1.c \
gfx/disp_gu2.c \
- gfx/disp_gu3.c \
gfx/durango.c \
gfx/gfx_dcdr.c \
gfx/gfx_defs.h \
@@ -305,7 +306,6 @@ EXTRA_DIST = \
gfx/i2c_gpio.c \
gfx/init_gu1.c \
gfx/init_gu2.c \
- gfx/init_gu3.c \
gfx/msr_rdcl.c \
gfx/release.txt \
gfx/rndr_gu1.c \
@@ -317,7 +317,6 @@ EXTRA_DIST = \
gfx/vga_gu1.c \
gfx/vid_1200.c \
gfx/vid_5530.c \
- gfx/vid_cstl.c \
gfx/vid_rdcl.c \
gfx/vip_1200.c \
\
diff --git a/src/amd.h b/src/amd.h
index 346c02e..be51d83 100644
--- a/src/amd.h
+++ b/src/amd.h
@@ -24,11 +24,6 @@
* software without specific prior written permission.
*/
-/*
- * File Contents: This file contains the data structures Geode driver.
- *
- * Project: Geode Xfree Frame buffer device driver.
- */
#ifndef _AMD_GEODE_H_
#define _AMD_GEODE_H_
@@ -40,12 +35,15 @@
#include "xaa.h"
#include "exa.h"
#include "xf86Cursor.h"
+
#include "vgaHW.h"
#include "xf86int10.h"
+
#include "xf86xv.h"
#define CFB 0
#define INT10_SUPPORT 1
+
/* Existing Processor Models */
#define GX1 0x1
#define GX2 0x10
@@ -269,6 +267,7 @@ typedef struct
Bool HWCursor;
Bool NoAccel;
Bool CustomMode;
+ Bool useVGA;
unsigned long VideoKey;
Bool TVSupport;
@@ -478,6 +477,8 @@ enum
GX_OPTION_OSM_IMG_BUFS,
GX_OPTION_OSM_CLR_BUFS,
GX_OPTION_CUSTOM_MODE,
+ GX_OPTION_FBSIZE,
+ GX_OPTION_NOVGA,
GX_OPTION_DONT_PROGRAM
}
GX_GeodeOpts;
diff --git a/src/amd_driver.c b/src/amd_driver.c
index 20f1729..1ecb52c 100644
--- a/src/amd_driver.c
+++ b/src/amd_driver.c
@@ -205,6 +205,8 @@ OptionInfoRec GX_GeodeOptions[] = {
{GX_OPTION_OSM_IMG_BUFS, "OSMImageBuffers", OPTV_INTEGER, {0}, FALSE},
{GX_OPTION_OSM_CLR_BUFS, "OSMColorExpBuffers", OPTV_INTEGER, {0}, FALSE},
{GX_OPTION_CUSTOM_MODE, "CustomMode", OPTV_BOOLEAN, {0}, FALSE},
+ {GX_OPTION_FBSIZE, "FBSize", OPTV_INTEGER, {0}, FALSE },
+ {GX_OPTION_NOVGA, "NoVGA", OPTV_BOOLEAN, {0}, FALSE },
{-1, NULL, OPTV_NONE, {0}, FALSE}
};
#endif
@@ -297,12 +299,14 @@ const char *amdShadowSymbols[] = {
static MODULESETUPPROTO(AmdSetup);
+#define XORG_VERSION_CURRENT (((7) * 10000000) + ((1) * 100000) + ((0) * 1000) + 0)
+
static XF86ModuleVersionInfo AmdVersionRec = {
"amd",
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
GET_MODULE_MAJOR_VERSION(AMD_VERSION_CURRENT),
GET_MODULE_MINOR_VERSION(AMD_VERSION_CURRENT),
(GET_MODULE_PATCHLEVEL(AMD_VERSION_CURRENT) >> 8) * 100 +
diff --git a/src/amd_fourcc.h b/src/amd_fourcc.h
index eef5a76..2fe6f9e 100644
--- a/src/amd_fourcc.h
+++ b/src/amd_fourcc.h
@@ -1,44 +1,32 @@
-/*
- * $Workfile: amd_fourcc.h $
- * $Revision: #2 $
- * $Author: raymondd $
+/* Xfree video macro definitions.
*
- * File Contents: This file consists of main Xfree video macro definitions.
- *
- * Project: Geode Xfree Frame buffer device driver.
- *
- */
-
-/* <LIC_AMD_STD>
* Copyright (c) 2003-2005 Advanced Micro Devices, 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
+ *
+ * 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
+ *
+ * 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
- * 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
+ *
+ * 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.
- *
+ *
* Neither the name of the Advanced Micro Devices, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
- * </LIC_AMD_STD> */
-/* <CTL_AMD_STD>
- * </CTL_AMD_STD> */
-/* <DOC_AMD_STD>
- * </DOC_AMD_STD> */
+ */
+#ifndef AMD_FOURCC_H_
+#define AMD_FOURCC_H_
#define FOURCC_Y2YU 0x55593259
#define XVIMAGE_Y2YU \
{ \
@@ -98,3 +86,5 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
XvTopToBottom \
}
+
+#endif
diff --git a/src/amd_gx_accel.c b/src/amd_gx_accel.c
index 5f6337e..50666e6 100644
--- a/src/amd_gx_accel.c
+++ b/src/amd_gx_accel.c
@@ -2062,11 +2062,9 @@ GXAccelInit(ScreenPtr pScrn)
if (pExa && pGeode->useEXA) {
xf86DrvMsg(pScrni->scrnIndex, X_INFO, "Init EXA\n");
- if (exaGetVersion() < EXA_MAKE_VERSION(0, 2, 0)) {
- xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "EXA version is too old "
- "(got 0x%3x, need >= 0x020)\n", exaGetVersion());
- return FALSE;
- }
+
+ pExa->exa_major = EXA_VERSION_MAJOR;
+ pExa->exa_minor = EXA_VERSION_MINOR;
/* Sync */
pExa->WaitMarker = amd_gx_exa_WaitMarker;
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 419c15f..58e3c64 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -128,7 +128,6 @@ extern void GXInitVideo(ScreenPtr pScrn);
extern Bool GXDGAInit(ScreenPtr pScrn);
extern void GXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src);
-unsigned char *XpressROMPtr;
unsigned long fb;
/* Existing Processor Models */
@@ -260,10 +259,9 @@ static Bool
GXSaveScreen(ScreenPtr pScrn, int mode)
{
ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum];
+ GeodePtr pGeode = GEODEPTR(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXSaveScreen!\n"));
-
- if (!pScrni->vtSema)
+ if (pGeode->useVGA && !pScrni->vtSema)
return vgaHWSaveScreen(pScrn, mode);
return TRUE;
}
@@ -477,70 +475,52 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
if (!(pGeode = GXGetRec(pScrni)))
return FALSE;
- /* This is the general case */
- for (i = 0; i < pScrni->numEntities; i++) {
+ if (pScrni->numEntities != 1)
+ return FALSE;
+
pGeode->pEnt = xf86GetEntityInfo(pScrni->entityList[i]);
if (pGeode->pEnt->resources)
return FALSE;
pGeode->Chipset = pGeode->pEnt->chipset;
pScrni->chipset = (char *)xf86TokenToString(GeodeChipsets,
pGeode->pEnt->chipset);
- }
- ddc = GXProbeDDC(pScrni, pGeode->pEnt->index);
- if (flags & PROBE_DETECT) {
- ConfiguredMonitor = ddc;
+
+ DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR, "PROBEDDC\n"));
+
+ /* Note that we can't do this without VGA */
+
+ if (flags & PROBE_DETECT != 0) {
+ ConfiguredMonitor = GXProbeDDC(pScrni, pGeode->pEnt->index);
return TRUE;
}
- pGeode->FBVGAActive = 0; /* KFB will Knock of VGA */
-#if INT10_SUPPORT
- if (!xf86LoadSubModule(pScrni, "int10"))
- return FALSE;
- xf86LoaderReqSymLists(amdInt10Symbols, NULL);
-#endif
+ /* Hardware detection */
- /* If the vgahw module would be needed it would be loaded here */
- if (!xf86LoadSubModule(pScrni, "vgahw")) {
- return FALSE;
- }
- xf86LoaderReqSymLists(amdVgahwSymbols, NULL);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(1)!\n"));
- /* Do the durango hardware detection */
pGeode->cpu_version = gfx_detect_cpu();
- /* find the base chipset core. Currently there can be only one
- * chip active at any time.
- */
-/* pGeode->DetectedChipSet = GX1; */
- if ((pGeode->cpu_version & 0xFF) == GFX_CPU_REDCLOUD)
- pGeode->DetectedChipSet = GX;
- DEBUGMSG(1, (0, X_INFO, "Detected BaseChip (%d)\n",
- pGeode->DetectedChipSet));
- {
+ if ((pGeode->cpu_version & 0xFF) == GFX_CPU_REDCLOUD) {
Q_WORD msrValue;
+ pGeode->DetectedChipSet = GX;
+
+ /* See if this a CRT or TFT part */
- /* GX : Can have CRT or TFT only */
gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msrValue);
pGeode->DetectedChipSet =
((msrValue.low & RCDF_CONFIG_FMT_MASK) ==
RCDF_CONFIG_FMT_FP) ? GX_TFT : GX_CRT;
- DEBUGMSG(1, (0, X_INFO, "Gx2 for %s\n",
- ((pGeode->DetectedChipSet == GX_TFT) ? "TFT" : "CRT")));
+
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(1.1)!\n"));
+
pGeode->vid_version = gfx_detect_video();
pGeode->FBLinearAddr = gfx_get_frame_buffer_base();
- pGeode->FBAvail = gfx_get_frame_buffer_size();
/* update the max clock from the one system suports */
GeodeClockRange->maxClock = gfx_get_max_supported_pixel_clock();
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(1.5)!\n"));
- /* SET DURANGO REGISTER POINTERS
- * * The method of mapping from a physical address to a linear address
- * * is operating system independent. Set variables to linear address.
- */
+
+ /* Set Durango register pointers */
+
if (pGeode->DetectedChipSet & GX) {
pGeode->cpu_reg_size = 0x4000;
pGeode->gp_reg_size = 0x4000;
@@ -550,29 +530,20 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->vid_reg_size = 0x1000;
}
- if (!GXMapMem(pScrni))
- return FALSE;
-
- /* check if VGA is active */
- /* This routine saves the current VGA state in Durango VGA structure */
- /* check if VGA is active */
- pGeode->FBVGAActive = gu2_get_vga_active();
- DEBUGMSG(1, (0, X_PROBED, "VGA = %d\n", pGeode->FBVGAActive));
+ pGeode->FBVGAActive = 0;
/* Fill in the monitor field */
pScrni->monitor = pScrni->confScreen->monitor;
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(2)!\n"));
+
SupportFlags = Support24bppFb | Support32bppFb;
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(2)!\n"));
- /* Determine depth, bpp, etc. */
+
if (!xf86SetDepthBpp(pScrni, 8, 8, 8, SupportFlags)) {
return FALSE;
} else {
if (!((pScrni->depth == 8) ||
(pScrni->depth == 16) ||
(pScrni->depth == 24) || (pScrni->depth == 32))) {
- /* Depth not supported */
DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR,
"Given depth (%d bpp) is not supported by this driver\n",
pScrni->depth));
@@ -584,12 +555,12 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
* * because xf86SetWeight references it.
*/
if (pScrni->depth > 8) {
- /* The defaults are OK for us */
+
rgb BitsPerComponent = { 0, 0, 0 };
rgb BitMask = { 0, 0, 0 };
if (pScrni->depth > 16) {
- /* we are operating in 24 bpp, Readcloud */
+
BitsPerComponent.red = 8;
BitsPerComponent.green = 8;
BitsPerComponent.blue = 8;
@@ -607,14 +578,9 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
xf86PrintDepthBpp(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(3)!\n"));
-
if (!xf86SetDefaultVisual(pScrni, -1))
return FALSE;
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(4)!\n"));
-
- /* The new cmap layer needs this to be initialized */
if (pScrni->depth > 1) {
Gamma zeros = { 0.0, 0.0, 0.0 };
@@ -622,34 +588,60 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
return FALSE;
}
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(5)!\n"));
/* We use a programmable clock */
pScrni->progClock = TRUE;
- /*Collect all of the relevant option flags
- * *(fill in pScrni->options)
- */
xf86CollectOptions(pScrni, NULL);
- /*Process the options */
- xf86ProcessOptions(pScrni->scrnIndex, pScrni->options, GeodeOptions);
+ xf86ProcessOptions(pScrni->scrnIndex, pScrni->options,
+ GeodeOptions);
+
+ pGeode->useVGA = TRUE;
+
+ if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOVGA, FALSE))
+ pGeode->useVGA = FALSE;
+
+ xf86DrvMsg(pScrni->scrnIndex, X_DEFAULT,
+ "useVGA=%d\n", pGeode->useVGA);
+
+ if (pGeode->useVGA) {
#if INT10_SUPPORT
+ if (!xf86LoadSubModule(pScrni, "int10"))
+ return FALSE;
+ xf86LoaderReqSymLists(amdInt10Symbols, NULL);
+
pVesa = pGeode->vesa;
- /* Initialize Vesa record */
- if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) {
- xf86DrvMsg(0, X_ERROR, "Int10 initialization failed.\n");
- return (FALSE);
- }
+ if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL)
+ DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR,
+ "Unable to initialize INT10 support\n"));
+ return FALSE;
#endif
+ if (!xf86LoadSubModule(pScrni, "vgahw"))
+ return FALSE;
+
+ xf86LoaderReqSymLists(amdVgahwSymbols, NULL);
+
+ pGeode->FBVGAActive = gu2_get_vga_active();
+ pGeode->FBAvail = gfx_get_frame_buffer_size();
+ }
+ else {
+ if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_FBSIZE,
+ &(pGeode->FBAvail)))
+ pGeode->FBAvail = 0x800000;
+ }
+
+ if (!GXMapMem(pScrni))
+ return FALSE;
+
/*Set the bits per RGB for 8bpp mode */
- if (pScrni->depth == 8) {
- /* Default to 8 */
+
+ if (pScrni->depth == 8)
pScrni->rgbBits = 8;
- }
+
from = X_DEFAULT;
/*
@@ -657,8 +649,8 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
* *option, with the default set above.
*/
pGeode->HWCursor = TRUE;
- if (xf86GetOptValBool(GeodeOptions, GX_OPTION_HW_CURSOR,
- &pGeode->HWCursor)) {
+
+ if (xf86GetOptValBool(GeodeOptions, GX_OPTION_HW_CURSOR, &pGeode->HWCursor)) {
from = X_CONFIG;
}
/* For compatibility, accept this too (as an override) */
@@ -666,31 +658,23 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
from = X_CONFIG;
pGeode->HWCursor = FALSE;
}
- DEBUGMSG(1, (pScrni->scrnIndex, from, "Using %s cursor\n",
- pGeode->HWCursor ? "HW" : "SW"));
pGeode->Compression = TRUE;
if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOCOMPRESSION, FALSE)) {
pGeode->Compression = FALSE;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG, "NoCompression\n"));
}
pGeode->NoAccel = FALSE;
if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOACCEL, FALSE)) {
pGeode->NoAccel = TRUE;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG, "Acceleration \
- disabled\n"));
}
if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_IMG_BUFS,
&(pGeode->NoOfImgBuffers)))
pGeode->NoOfImgBuffers = DEFAULT_IMG_LINE_BUFS;
- /* default # of buffers */
if (pGeode->NoOfImgBuffers <= 0)
pGeode->NoOfImgBuffers = 0;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "NoOfImgBuffers = %d\n", pGeode->NoOfImgBuffers));
if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_CLR_BUFS,
&(pGeode->NoOfColorExpandLines)))
@@ -699,8 +683,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
if (pGeode->NoOfColorExpandLines <= 0)
pGeode->NoOfColorExpandLines = 0;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "NoOfColorExpandLines = %d\n", pGeode->NoOfColorExpandLines));
if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_EXA_SCRATCH_BFRSZ,
&(pGeode->exaBfrSz)))
@@ -708,22 +690,22 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
if (pGeode->exaBfrSz <= 0)
pGeode->exaBfrSz = 0;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "exaBfrSz = 0x%08lx\n", pGeode->exaBfrSz));
- pGeode->Panel = FALSE;
- if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_FLATPANEL, FALSE)) {
- DEBUGMSG(0, (pScrni->scrnIndex, X_CONFIG, "FlatPanel Selected\n"));
- pGeode->Panel = TRUE;
- }
+
pGeode->CustomMode = FALSE;
if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_CUSTOM_MODE, FALSE)) {
pGeode->CustomMode = TRUE;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG, "Custom mode enabled\n"));
}
- /* Force the Panel on if on a GX TFT part, no crt support */
+ pGeode->Panel = FALSE;
+
+ if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_FLATPANEL, FALSE)) {
+ pGeode->Panel = TRUE;
+ }
+
+ /* Force the Panel on if on a GX TFT part, no CRT support anyway */
+
if (pGeode->DetectedChipSet == GX_TFT) {
pGeode->Panel = TRUE;
}
@@ -732,32 +714,23 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
if ((pGeode->DetectedChipSet == GX_CRT) && (pGeode->Panel))
pGeode->Panel = FALSE;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Quering FP Bios %d\n", pGeode->Panel));
/* if FP not supported in BIOS, then turn off user option */
- if (pGeode->Panel) {
- /* check if bios supports FP */
+ /* NOTE * NOTE * NOTE - this probably won't work for OLPC! */
+
#if defined(PNL_SUP)
+ if (pGeode->Panel) {
pGeode->Panel = Pnl_IsPanelEnabledInBIOS();
+
+ if (pGeode->Panel) {
Pnl_GetPanelInfoFromBIOS(&pGeode->FPBX, &pGeode->FPBY,
&pGeode->FPBB, &pGeode->FPBF);
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "FP Bios Params %d %d %d %d\n",
- pGeode->FPBX, pGeode->FPBY, pGeode->FPBB, pGeode->FPBF));
-
-#endif /* PNL_SUP */
+ Pnl_PowerUp();
}
- /* if panel not selected and Panel can be supported.
- * Power down the panel.
- */
-#if defined(PNL_SUP)
- if (!pGeode->Panel) {
+ else
Pnl_PowerDown();
- } else {
- Pnl_PowerUp();
}
-#endif /* PNL_SUP */
+#endif
pGeode->useEXA = FALSE;
from = X_DEFAULT;
@@ -783,26 +756,18 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_SHADOW_FB, FALSE)) {
pGeode->ShadowFB = TRUE;
pGeode->NoAccel = TRUE;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Using \"Shadow Framebuffer\"\n"));
}
pGeode->Rotate = 0;
if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_ROTATE))) {
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG, "Rotating - %s\n", s));
- if (!xf86NameCmp(s, "CW")) {
+
+ if (!xf86NameCmp(s, "CW"))
pGeode->Rotate = 1;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Rotating screen clockwise\n"));
- } else if (!xf86NameCmp(s, "INVERT")) {
+ else if (!xf86NameCmp(s, "INVERT"))
pGeode->Rotate = 2;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Rotating screen inverted\n"));
- } else if (!xf86NameCmp(s, "CCW")) {
+ else if (!xf86NameCmp(s, "CCW"))
pGeode->Rotate = 3;
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Rotating screen counter clockwise\n"));
- }
+
if (pGeode->Rotate == 0) {
DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
@@ -813,10 +778,15 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
}
}
+ if (pGeode->Rotate == 1)
+ xf86DrvMsg(pScrni->scrnIndex, X_CONFIG, "Rotating screen clockwise\n");
+ else if (pGeode->Rotate == 2)
+ xf86DrvMsg(pScrni->scrnIndex, X_CONFIG, "Rotating screen 180 degrees\n");
+ else if (pGeode->Rotate == 3)
+ xf86DrvMsg(pScrni->scrnIndex, X_CONFIG, "Rotating screen 180 counter clockwise\n");
+
if (pGeode->Rotate != 0) {
- DEBUGMSG(1, (pScrni->scrnIndex, X_CONFIG,
- "Option \"Rotate\" disables acceleration and enables shadow"
- "\n"));
+ xf86DrvMsg(pScrni->scrnIndex, X_CONFIG, "Option 'Rotate' will disable acceleration and enable shadow\n");
pGeode->NoAccel = TRUE;
pGeode->ShadowFB = TRUE;
}
@@ -828,26 +798,15 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
* * GeodeProbe(), but check it just in case.
*/
if (pScrni->chipset == NULL) {
- DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR,
- "ChipID 0x%04X is not recognised\n", pGeode->Chipset));
+ Xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "ChipID 0x%04X is not recognised\n", pGeode->Chipset);
return FALSE;
}
if (pGeode->Chipset < 0) {
- DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR,
- "Chipset \"%s\" is not recognised\n", pScrni->chipset));
+ Xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "Chipset %s is not recognised\n", pScrni->chipset);
return FALSE;
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(6)!\n"));
-
- /*
- * * Init the screen with some values
- */
- DEBUGMSG(1, (pScrni->scrnIndex, from,
- "Video I/O registers at 0x%08lX\n",
- (unsigned long)VGAHW_GET_IOBASE()));
-
if (pScrni->memPhysBase == 0) {
from = X_PROBED;
pScrni->memPhysBase = gfx_get_frame_buffer_base();
@@ -855,10 +814,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
pScrni->fbOffset = 0;
- DEBUGMSG(1, (pScrni->scrnIndex, from,
- "Linear framebuffer at 0x%08lX\n",
- (unsigned long)pScrni->memPhysBase));
-
if (pGeode->pEnt->device->videoRam == 0) {
from = X_PROBED;
pScrni->videoRam = pGeode->FBAvail / 1024;
@@ -867,11 +822,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
from = X_CONFIG;
}
- DEBUGMSG(1, (pScrni->scrnIndex, from,
- "VideoRam: %ld kByte\n", (unsigned long)pScrni->videoRam));
-
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(7)!\n"));
-
/*
* * xf86ValidateModes will check that the mode HTotal and VTotal values
* * don't exceed the chipset's limit if pScrni->maxHValue adn
@@ -918,30 +868,22 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
pScrni->display->virtualX,
pScrni->display->virtualY, pGeode->FBAvail, LOOKUP_BEST_REFRESH);
- DEBUGMSG(1, (pScrni->scrnIndex, from,
- "xf86ValidateModes: %d %d %d\n",
- pScrni->virtualX, pScrni->virtualY, pScrni->displayWidth));
if (i == -1) {
+ Xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n");
GXFreeRec(pScrni);
return FALSE;
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(8)!\n"));
-
/* Prune the modes marked as invalid */
xf86PruneDriverModes(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(9)!\n"));
if (i == 0 || pScrni->modes == NULL) {
- DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR, "No valid modes found\n"));
+ Xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n");
GXFreeRec(pScrni);
return FALSE;
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(10)!\n"));
-
xf86SetCrtcForModes(pScrni, 0);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(11)!\n"));
/* Set the current mode to the first in the list */
pScrni->currentMode = pScrni->modes;
@@ -949,11 +891,9 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
/* Print the list of modes being used */
xf86PrintModes(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(13)!\n"));
/* Set the display resolution */
xf86SetDpi(pScrni, 0, 0);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(14)!\n"));
/* Load bpp-specific modules */
mod = NULL;
@@ -995,7 +935,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
xf86LoaderReqSymLists(amdFbSymbols, NULL);
#endif
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(15)!\n"));
+
if (pGeode->NoAccel == FALSE) {
const char *module = "xaa";
const char **symbols = &amdXaaSymbols[0];
@@ -1013,7 +953,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
xf86LoaderReqSymLists(symbols, NULL);
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(16)!\n"));
+
if (pGeode->HWCursor == TRUE) {
if (!xf86LoadSubModule(pScrni, "ramdac")) {
GXFreeRec(pScrni);
@@ -1022,7 +962,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
xf86LoaderReqSymLists(amdRamdacSymbols, NULL);
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(17)!\n"));
+
/* Load shadowfb if needed */
if (pGeode->ShadowFB) {
if (!xf86LoadSubModule(pScrni, "shadowfb")) {
@@ -1033,7 +973,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
xf86LoaderReqSymLists(amdShadowSymbols, NULL);
}
- DEBUGMSG(1, (0, X_INFO, "GXPreInit(18)!\n"));
if (xf86RegisterResources(pGeode->pEnt->index, NULL, ResExclusive)) {
DEBUGMSG(1, (pScrni->scrnIndex, X_ERROR,
"xf86RegisterResources() found resource conflicts\n"));
@@ -1042,7 +981,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
}
GXUnmapMem(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXPreInit ... done successfully!\n"));
return TRUE;
}
@@ -1065,8 +1003,7 @@ GXRestore(ScrnInfoPtr pScrni)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXRestore!\n"));
- if (pGeode->FBVGAActive) {
+ if (pGeode->useVGA && pGeode->FBVGAActive) {
vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
vgaHWProtect(pScrni, TRUE);
@@ -1326,7 +1263,11 @@ GXSetMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
GXLoadCursorImage(pScrni, NULL);
GFX(set_cursor_position(pGeode->CursorStartOffset, 0, 0, 0, 0));
GFX(set_cursor_enable(1));
- }
+ } else {
+ DEBUGMSG(1,(0, X_INFO, "GXRestore ... "));
+ GXRestore(pScrni);
+ DEBUGMSG(1,(0, X_INFO, "done.\n"));
+ }
DEBUGMSG(1, (0, X_INFO, "done.\n"));
/* Reenable the hardware cursor after the mode switch */
@@ -1377,10 +1318,11 @@ static Bool
GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
- vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
gfx_wait_until_idle();
+ DEBUGMSG(1, (0, X_INFO, "GXEnterGraphics(1)!\n"));
+
/* Save CRT State */
pGeode->FBgfxdisplaytiming.dwDotClock = gfx_get_clock_frequency();
pGeode->FBgfxdisplaytiming.wPitch = gfx_get_display_pitch();
@@ -1401,8 +1343,13 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni)
/* Save Display offset */
pGeode->FBDisplayOffset = gfx_get_display_offset();
- pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040);
- DEBUGMSG(1, (0, X_INFO, "FBBIOSMode %d\n", pGeode->FBBIOSMode));
+
+ DEBUGMSG(1, (0, X_INFO, "GXEnterGraphics(2)!\n"));
+
+ if (pGeode->useVGA) {
+ vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
+ pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040);
+ }
/* Save the current Compression state */
pGeode->FBCompressionEnable = gfx_get_compression_enable();
@@ -1415,11 +1362,12 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni)
#if defined(PNL_SUP)
/* Save the Panel state */
+ DEBUGMSG(1, (0, X_INFO, "GXEnterGraphics(3)!\n"));
Pnl_SavePanelState();
#endif
/* only if comming from VGA */
- if (pGeode->FBVGAActive) {
+ if (pGeode->useVGA && pGeode->FBVGAActive) {
unsigned short sequencer;
vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
@@ -1460,6 +1408,7 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni)
}
gx_enable_dac_power(pScrni);
+ DEBUGMSG(1, (0, X_INFO, "GXEnterGraphics(4)!\n"));
return TRUE;
}
@@ -1538,15 +1487,14 @@ GXLeaveGraphics(ScrnInfoPtr pScrni)
/* Restore Cursor */
gfx_set_cursor_position(pGeode->FBCursorOffset, 0, 0, 0, 0);
- DEBUGMSG(1, (0, X_INFO, "FBVGAActive %d\n", pGeode->FBVGAActive));
-
- /* For the moment, always do an int 10 */
-
+ if (pGeode->useVGA) {
pGeode->vesa->pInt->num = 0x10;
pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode;
pGeode->vesa->pInt->bx = 0;
xf86ExecX86int10(pGeode->vesa->pInt);
gfx_delay_milliseconds(3);
+ }
+
GXRestore(pScrni);
gx_enable_dac_power(pScrni);
@@ -1740,18 +1688,16 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv)
ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum];
Bool Inited = FALSE;
- DEBUGMSG(1, (0, X_INFO, "GXScreenInit!\n"));
- /* Get driver private */
pGeode = GXGetRec(pScrni);
- DEBUGMSG(1, (0, X_INFO, "GXScreenInit(0)!\n"));
- /*Allocate a vgaHWRec */
+ if (pGeode->useVGA) {
if (!vgaHWGetHWRec(pScrni))
return FALSE;
if (!vgaHWMapMem(pScrni))
return FALSE;
vgaHWGetIOBase(VGAHWPTR(pScrni));
+ }
if (!GXMapMem(pScrni))
return FALSE;
@@ -2510,14 +2456,10 @@ GXMapMem(ScrnInfoPtr pScrni)
return (FALSE);
}
- /* Map the XpressROM ptr to read what platform are we on */
- XpressROMPtr = (unsigned char *)xf86MapVidMem(pScrni->scrnIndex,
- VIDMEM_FRAMEBUFFER, 0xF0000, 0x10000);
-
- DEBUGMSG(1, (0, X_NONE, "adapter info %lx %lx %lx %p, %p\n",
+ DEBUGMSG(1, (0, X_NONE, "adapter info %lx %lx %lx %p\n",
pGeode->cpu_version,
pGeode->vid_version,
- pGeode->FBAvail, pGeode->FBBase, XpressROMPtr));
+ pGeode->FBAvail, pGeode->FBBase));
return TRUE;
}
@@ -2539,7 +2481,6 @@ GXUnmapMem(ScrnInfoPtr pScrni)
}
xf86UnMapVidMem(pScrni->scrnIndex, gfx_virt_vidptr, pGeode->vid_reg_size);
xf86UnMapVidMem(pScrni->scrnIndex, gfx_virt_fbptr, pGeode->FBAvail);
- xf86UnMapVidMem(pScrni->scrnIndex, XpressROMPtr, 0x10000);
return TRUE;
}
diff --git a/src/build_num.h b/src/build_num.h
index 7de8679..0620eb2 100644
--- a/src/build_num.h
+++ b/src/build_num.h
@@ -1,35 +1,30 @@
#ifndef BUILD_NUM_H
#define BUILD_NUM_H
-/* <LIC_AMD_STD>
- * Copyright (c) 2003-2005 Advanced Micro Devices, 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
+/* Copyright (c) 2003-2005 Advanced Micro Devices, 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 shall be included in
+ *
+ * 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
- * 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
+ *
+ * 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.
- *
+ *
* Neither the name of the Advanced Micro Devices, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
- * </LIC_AMD_STD> */
-/* <CTL_AMD_STD>
- * </CTL_AMD_STD> */
-/* <DOC_AMD_STD>
- * </DOC_AMD_STD> */
+ */
#ifdef AMD_BUILDNUM_DEFINED
#error "Caution: You have muliple version files in your path. Please correct this."
@@ -39,7 +34,7 @@
/* Define the following for your driver */
-#define _NAME "AMD Linux Xorg LX/GX display driver"
+#define _NAME "AMD Xorg LX/GX display driver"
#define _MAJOR 04
#define _MINOR 00
diff --git a/src/cim/cim_defs.h b/src/cim/cim_defs.h
index 638ba8e..176bdb4 100644
--- a/src/cim/cim_defs.h
+++ b/src/cim/cim_defs.h
@@ -1,16 +1,32 @@
- /*
- * <LIC_AMD_STD>
- * Copyright (C) 2005 Advanced Micro Devices, Inc. All Rights Reserved.
- * </LIC_AMD_STD>
- *
- * <CTL_AMD_STD>
- * </CTL_AMD_STD>
- *
- * <DOC_AMD_STD>
- * Cimarron hardware access macros.
- * </DOC_AMD_STD>
- *
- */
+/*
+ * Copyright (c) 2006 Advanced Micro Devices, 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 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.
+ *
+ * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ */
+
+/*
+ * Cimarron hardware access macros.
+ */
#ifndef _cim_defs_h
#define _cim_defs_h
@@ -100,17 +116,18 @@
* Read the contents of a 64 bit MSR into a data structure
*-----------------------------------------------------------------*/
-#define MSR_READ(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long msr_add = (unsigned long)(msr_reg) | (unsigned long)(device_add); \
- unsigned long data_high, data_low; \
- _asm { mov ecx, msr_add } \
- _asm { rdmsr } \
- _asm { mov data_high, edx } \
- _asm { mov data_low, eax } \
- \
- ((Q_WORD *)(data64_ptr))->high = data_high; \
- ((Q_WORD *)(data64_ptr))->low = data_low; \
+#define MSR_READ(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long msr_add = (unsigned long)(msr_reg) | \
+ (unsigned long)(device_add); \
+ unsigned long data_high, data_low; \
+ _asm { mov ecx, msr_add } \
+ _asm { rdmsr } \
+ _asm { mov data_high, edx } \
+ _asm { mov data_low, eax } \
+ \
+ ((Q_WORD *)(data64_ptr))->high = data_high; \
+ ((Q_WORD *)(data64_ptr))->low = data_low; \
}
/*-----------------------------------------------------------------
@@ -118,18 +135,19 @@
* Write the contents of a 64 bit data structure to a MSR.
*-----------------------------------------------------------------*/
-#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long msr_add = (unsigned long)(msr_reg) | (unsigned long)(device_add); \
- unsigned long data_high, data_low; \
- \
- data_high = ((Q_WORD *)(data64_ptr))->high; \
- data_low = ((Q_WORD *)(data64_ptr))->low; \
- \
- _asm { mov ecx, msr_add } \
- _asm { mov edx, data_high } \
- _asm { mov eax, data_low } \
- _asm { wrmsr } \
+#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long msr_add = (unsigned long)(msr_reg) | \
+ (unsigned long)(device_add); \
+ unsigned long data_high, data_low; \
+ \
+ data_high = ((Q_WORD *)(data64_ptr))->high; \
+ data_low = ((Q_WORD *)(data64_ptr))->low; \
+ \
+ _asm { mov ecx, msr_add } \
+ _asm { mov edx, data_high } \
+ _asm { mov eax, data_low } \
+ _asm { wrmsr } \
}
#elif CIMARRON_MSR_VSA_IO
@@ -139,23 +157,24 @@
* Read the contents of a 64 bit MSR into a data structure
*-----------------------------------------------------------------*/
-#define MSR_READ(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long msr_add = (unsigned long)(msr_reg) | (unsigned long)(device_add); \
- unsigned long data_high, data_low; \
- \
- _asm { mov dx, 0x0AC1C } \
- _asm { mov eax, 0x0FC530007 } \
- _asm { out dx, eax } \
- \
- _asm { add dl, 2 } \
- _asm { mov ecx, msr_add } \
- _asm { in ax, dx } \
- _asm { mov data_high, edx } \
- _asm { mov data_low, eax } \
- \
- ((Q_WORD *)(data64_ptr))->high = data_high; \
- ((Q_WORD *)(data64_ptr))->low = data_low; \
+#define MSR_READ(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long msr_add = (unsigned long)(msr_reg) | \
+ (unsigned long)(device_add); \
+ unsigned long data_high, data_low; \
+ \
+ _asm { mov dx, 0x0AC1C } \
+ _asm { mov eax, 0x0FC530007 } \
+ _asm { out dx, eax } \
+ \
+ _asm { add dl, 2 } \
+ _asm { mov ecx, msr_add } \
+ _asm { in ax, dx } \
+ _asm { mov data_high, edx } \
+ _asm { mov data_low, eax } \
+ \
+ ((Q_WORD *)(data64_ptr))->high = data_high; \
+ ((Q_WORD *)(data64_ptr))->low = data_low; \
}
/*-----------------------------------------------------------------
@@ -163,26 +182,27 @@
* Write the contents of a 64 bit data structure to a MSR.
*-----------------------------------------------------------------*/
-#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long msr_add = (unsigned long)(msr_reg) | (unsigned long)(device_add); \
- unsigned long data_high, data_low; \
- \
- data_high = ((Q_WORD *)(data64_ptr))->high; \
- data_low = ((Q_WORD *)(data64_ptr))->low; \
- \
- _asm { mov dx, 0x0AC1C } \
- _asm { mov eax, 0x0FC530007 } \
- _asm { out dx, eax } \
- \
- _asm { add dl, 2 } \
- _asm { mov ecx, msr_add } \
- _asm { mov ebx, data_high } \
- _asm { mov eax, data_low } \
- \
- _asm { mov esi, 0 } \
- _asm { mov edi, 0 } \
- _asm { out dx, ax } \
+#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long msr_add = (unsigned long)(msr_reg) | \
+ (unsigned long)(device_add); \
+ unsigned long data_high, data_low; \
+ \
+ data_high = ((Q_WORD *)(data64_ptr))->high; \
+ data_low = ((Q_WORD *)(data64_ptr))->low; \
+ \
+ _asm { mov dx, 0x0AC1C } \
+ _asm { mov eax, 0x0FC530007 } \
+ _asm { out dx, eax } \
+ \
+ _asm { add dl, 2 } \
+ _asm { mov ecx, msr_add } \
+ _asm { mov ebx, data_high } \
+ _asm { mov eax, data_low } \
+ \
+ _asm { mov esi, 0 } \
+ _asm { mov edi, 0 } \
+ _asm { out dx, ax } \
}
#elif CIMARRON_MSR_ABSTRACTED_ASM
@@ -235,15 +255,15 @@
* Read the contents of a 64 bit MSR into a data structure
*-----------------------------------------------------------------*/
-#define MSR_READ(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long addr, val1, val2; \
- \
- addr = device_add | msr_reg; \
- rdmsr (addr, val1, val2); \
- \
- ((Q_WORD *)(data64_ptr))->high = val2; \
- ((Q_WORD *)(data64_ptr))->low = val1; \
+#define MSR_READ(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long addr, val1, val2; \
+ \
+ addr = device_add | msr_reg; \
+ rdmsr (addr, val1, val2); \
+ \
+ ((Q_WORD *)(data64_ptr))->high = val2; \
+ ((Q_WORD *)(data64_ptr))->low = val1; \
}
/*-----------------------------------------------------------------
@@ -251,15 +271,15 @@
* Read the contents of a 64 bit data structure to a MSR.
*-----------------------------------------------------------------*/
-#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
-{ \
- unsigned long addr, val1, val2; \
- \
- val2 = ((Q_WORD *)(data64_ptr))->high; \
- val1 = ((Q_WORD *)(data64_ptr))->low; \
- \
- addr = (device_add & 0xFFFF0000) | (unsigned long)msr_reg; \
- wrmsr(addr, val1, val2); \
+#define MSR_WRITE(msr_reg, device_add, data64_ptr) \
+{ \
+ unsigned long addr, val1, val2; \
+ \
+ val2 = ((Q_WORD *)(data64_ptr))->high; \
+ val1 = ((Q_WORD *)(data64_ptr))->low; \
+ \
+ addr = (device_add & 0xFFFF0000) | (unsigned long)msr_reg; \
+ wrmsr(addr, val1, val2); \
}
#endif
@@ -350,13 +370,14 @@
* Write a series of DWORDs to the current command buffer offset
*-----------------------------------------------------------------*/
-#define WRITE_COMMAND_STRING32(offset, dataptr, dataoffset, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
- unsigned long byte_off = 0; \
- for (i = 0; i < dword_count; i++, byte_off += 4) \
- WRITE_COMMAND32 ((offset) + byte_off, *((unsigned long *)(tempdata + byte_off))); \
+#define WRITE_COMMAND_STRING32(offset, dataptr, dataoffset, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
+ unsigned long byte_off = 0; \
+ for (i = 0; i < dword_count; i++, byte_off += 4) \
+ WRITE_COMMAND32 ((offset) + byte_off, \
+ *((unsigned long *)(tempdata + byte_off))); \
}
/*-----------------------------------------------------------------
@@ -364,13 +385,14 @@
* Write a series of DWORDS to video memory.
*-----------------------------------------------------------------*/
-#define WRITE_FB_STRING32(offset, dataptr, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempdata = (unsigned long)dataptr; \
- unsigned long byte_off = 0; \
- for (i = 0; i < dword_count; i++, byte_off += 4) \
- WRITE_FB32 ((offset) + byte_off, *((unsigned long *)(tempdata + byte_off))); \
+#define WRITE_FB_STRING32(offset, dataptr, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempdata = (unsigned long)dataptr; \
+ unsigned long byte_off = 0; \
+ for (i = 0; i < dword_count; i++, byte_off += 4) \
+ WRITE_FB32 ((offset) + byte_off, \
+ *((unsigned long *)(tempdata + byte_off))); \
}
/*-----------------------------------------------------------------
@@ -378,12 +400,12 @@
* Write a constant DWORD to multiple video memory addresses
*-----------------------------------------------------------------*/
-#define WRITE_FB_CONSTANT(offset, value, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempoffset = offset; \
- for (i = 0; i < dword_count; i++, tempoffset += 4) \
- WRITE_FB32 (tempoffset, value); \
+#define WRITE_FB_CONSTANT(offset, value, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempoffset = offset; \
+ for (i = 0; i < dword_count; i++, tempoffset += 4) \
+ WRITE_FB32 (tempoffset, value); \
}
/*-----------------------------------------------------------------
@@ -391,13 +413,14 @@
* Write a series of DWORDs to the GP host source register
*-----------------------------------------------------------------*/
-#define WRITE_HOST_SOURCE_STRING32(dataptr, dataoffset, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
- unsigned long byte_off = 0; \
- for (i = 0; i < dword_count; i++, byte_off += 4) \
- WRITE_GP32 (byte_off + GP3_HST_SRC_RANGE, *((unsigned long *)(tempdata + byte_off))); \
+#define WRITE_HOST_SOURCE_STRING32(dataptr, dataoffset, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
+ unsigned long byte_off = 0; \
+ for (i = 0; i < dword_count; i++, byte_off += 4) \
+ WRITE_GP32 (byte_off + GP3_HST_SRC_RANGE, \
+ *((unsigned long *)(tempdata + byte_off))); \
}
#elif CIMARRON_OPTIMIZE_ABSTRACTED_ASM
@@ -428,13 +451,14 @@
* Write a series of DWORDS to video memory.
*-----------------------------------------------------------------*/
-#define WRITE_FB_STRING32(offset, dataptr, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempdata = (unsigned long)dataptr; \
- unsigned long byte_off = 0; \
- for (i = 0; i < dword_count; i++, byte_off += 4) \
- WRITE_FB32 ((offset) + byte_off, *((unsigned long *)(tempdata + byte_off))); \
+#define WRITE_FB_STRING32(offset, dataptr, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempdata = (unsigned long)dataptr; \
+ unsigned long byte_off = 0; \
+ for (i = 0; i < dword_count; i++, byte_off += 4) \
+ WRITE_FB32 ((offset) + byte_off, \
+ *((unsigned long *)(tempdata + byte_off))); \
}
/*-----------------------------------------------------------------
@@ -442,12 +466,12 @@
* Write a constant DWORD to multiple video memory addresses
*-----------------------------------------------------------------*/
-#define WRITE_FB_CONSTANT(offset, value, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempoffset = offset; \
- for (i = 0; i < dword_count; i++, tempoffset += 4) \
- WRITE_FB32 (tempoffset, value); \
+#define WRITE_FB_CONSTANT(offset, value, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempoffset = offset; \
+ for (i = 0; i < dword_count; i++, tempoffset += 4) \
+ WRITE_FB32 (tempoffset, value); \
}
/*-----------------------------------------------------------------
@@ -455,13 +479,14 @@
* Write a series of DWORDs to the GP host source register
*-----------------------------------------------------------------*/
-#define WRITE_HOST_SOURCE_STRING32(dataptr, dataoffset, dword_count) \
-{ \
- unsigned long i; \
- unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
- unsigned long byte_off = 0; \
- for (i = 0; i < dword_count; i++, byte_off += 4) \
- WRITE_GP32 (byte_off + GP3_HST_SRC_RANGE, *((unsigned long *)(tempdata + byte_off))); \
+#define WRITE_HOST_SOURCE_STRING32(dataptr, dataoffset, dword_count) \
+{ \
+ unsigned long i; \
+ unsigned long tempdata = (unsigned long)dataptr + (dataoffset); \
+ unsigned long byte_off = 0; \
+ for (i = 0; i < dword_count; i++, byte_off += 4) \
+ WRITE_GP32 (byte_off + GP3_HST_SRC_RANGE, \
+ *((unsigned long *)(tempdata + byte_off))); \
}
#endif
@@ -486,21 +511,22 @@
* Write a series of bytes to the host source register
*-----------------------------------------------------------------*/
-#define WRITE_HOST_SOURCE_STRING8(dataptr, dataoffset, byte_count) \
-{ \
- unsigned long temp1 = (unsigned long)dataptr + (dataoffset); \
- unsigned long temp2 = 0; \
- unsigned long shift = 0; \
- unsigned long counter; \
- if (byte_count) \
- { \
- for (counter = 0; counter < byte_count; counter++) \
- { \
- temp2 |= ((unsigned long)(*((unsigned char *)(temp1 + counter)))) << shift; \
- shift += 8; \
- } \
- WRITE_GP32 (GP3_HST_SRC, temp2); \
- } \
+#define WRITE_HOST_SOURCE_STRING8(dataptr, dataoffset, byte_count) \
+{ \
+ unsigned long temp1 = (unsigned long)dataptr + (dataoffset); \
+ unsigned long temp2 = 0; \
+ unsigned long shift = 0; \
+ unsigned long counter; \
+ if (byte_count) \
+ { \
+ for (counter = 0; counter < byte_count; counter++) \
+ { \
+ temp2 |= ((unsigned long)(*((unsigned char *) \
+ (temp1 + counter)))) << shift; \
+ shift += 8; \
+ } \
+ WRITE_GP32 (GP3_HST_SRC, temp2); \
+ } \
}
/*-----------------------------------------*/
@@ -528,15 +554,11 @@
*-------------------------------------------*/
#define OUTD(port, data) cim_outd(port, data)
-void cim_outd (unsigned short port, unsigned long data)
+void
+cim_outd(unsigned short port, unsigned long data)
{
- _asm {
- pushf
- mov eax, data
- mov dx, port
- out dx, eax
- popf
- }
+ _asm {
+ pushf mov eax, data mov dx, port out dx, eax popf}
}
/*-------------------------------------------
@@ -545,17 +567,14 @@ void cim_outd (unsigned short port, unsigned long data)
*-------------------------------------------*/
#define IND(port) cim_ind(port)
-unsigned long cim_ind (unsigned short port)
+unsigned long
+cim_ind(unsigned short port)
{
- unsigned long data;
- _asm {
- pushf
- mov dx, port
- in eax, dx
- mov data, eax
- popf
- }
- return data;
+ unsigned long data;
+
+ _asm {
+ pushf mov dx, port in eax, dx mov data, eax popf}
+ return data;
}
/*-------------------------------------------
@@ -564,15 +583,11 @@ unsigned long cim_ind (unsigned short port)
*-------------------------------------------*/
#define OUTW(port, data) cim_outw(port, data)
-void cim_outw (unsigned short port, unsigned short data)
+void
+cim_outw(unsigned short port, unsigned short data)
{
- _asm {
- pushf
- mov ax, data
- mov dx, port
- out dx, ax
- popf
- }
+ _asm {
+ pushf mov ax, data mov dx, port out dx, ax popf}
}
/*-------------------------------------------
@@ -581,17 +596,14 @@ void cim_outw (unsigned short port, unsigned short data)
*-------------------------------------------*/
#define INW(port) cim_inw(port)
-unsigned short cim_inw (unsigned short port)
+unsigned short
+cim_inw(unsigned short port)
{
- unsigned short data;
- _asm {
- pushf
- mov dx, port
- in ax, dx
- mov data, ax
- popf
- }
- return data;
+ unsigned short data;
+
+ _asm {
+ pushf mov dx, port in ax, dx mov data, ax popf}
+ return data;
}
/*-------------------------------------------
@@ -600,15 +612,11 @@ unsigned short cim_inw (unsigned short port)
*-------------------------------------------*/
#define OUTB(port, data) cim_outb(port, data)
-void cim_outb (unsigned short port, unsigned char data)
+void
+cim_outb(unsigned short port, unsigned char data)
{
- _asm {
- pushf
- mov al, data
- mov dx, port
- out dx, al
- popf
- }
+ _asm {
+ pushf mov al, data mov dx, port out dx, al popf}
}
/*-------------------------------------------
@@ -617,17 +625,14 @@ void cim_outb (unsigned short port, unsigned char data)
*-------------------------------------------*/
#define INB(port) cim_inb(port)
-unsigned char cim_inb (unsigned short port)
+unsigned char
+cim_inb(unsigned short port)
{
- unsigned char data;
- _asm {
- pushf
- mov dx, port
- in al, dx
- mov data, al
- popf
- }
- return data;
+ unsigned char data;
+
+ _asm {
+ pushf mov dx, port in al, dx mov data, al popf}
+ return data;
}
#elif CIMARRON_IO_ABSTRACTED_ASM
@@ -638,10 +643,11 @@ unsigned char cim_inb (unsigned short port)
*-------------------------------------------*/
#define OUTD(port, data) cim_outd(port, data)
-void cim_outd (unsigned short port, unsigned long data);
-void cim_outd (unsigned short port, unsigned long data)
+void cim_outd(unsigned short port, unsigned long data);
+void
+cim_outd(unsigned short port, unsigned long data)
{
- __asm__ __volatile__ ("outl %0,%w1" : : "a" (data), "Nd" (port));
+ __asm__ __volatile__("outl %0,%w1"::"a"(data), "Nd"(port));
}
/*-------------------------------------------
@@ -650,11 +656,12 @@ void cim_outd (unsigned short port, unsigned long data)
*-------------------------------------------*/
#define IND(port) cim_ind(port)
-unsigned long cim_ind (unsigned short port);
-unsigned long cim_ind (unsigned short port)
+unsigned long cim_ind(unsigned short port);
+unsigned long
+cim_ind(unsigned short port)
{
- unsigned long value;
- __asm__ __volatile__ ("inl %w1,%0" : "=a" (value) : "Nd" (port) );
+ unsigned long value;
+ __asm__ __volatile__("inl %w1,%0":"=a"(value):"Nd"(port));
return value;
}
@@ -665,10 +672,11 @@ unsigned long cim_ind (unsigned short port)
*-------------------------------------------*/
#define OUTW(port, data) cim_outw(port, data)
-void cim_outw (unsigned short port, unsigned short data);
-void cim_outw (unsigned short port, unsigned short data)
+void cim_outw(unsigned short port, unsigned short data);
+void
+cim_outw(unsigned short port, unsigned short data)
{
- __asm__ volatile ("out %0,%1" : : "a" (data),"d" (port));
+ __asm__ volatile ("out %0,%1"::"a" (data), "d"(port));
}
/*-------------------------------------------
@@ -677,11 +685,13 @@ void cim_outw (unsigned short port, unsigned short data)
*-------------------------------------------*/
#define INW(port) cim_inw(port)
-unsigned short cim_inw (unsigned short port);
-unsigned short cim_inw (unsigned short port)
+unsigned short cim_inw(unsigned short port);
+unsigned short
+cim_inw(unsigned short port)
{
- unsigned short value;
- __asm__ volatile ("in %1,%0" : "=a" (value) : "d" (port));
+ unsigned short value;
+ __asm__ volatile ("in %1,%0":"=a" (value):"d"(port));
+
return value;
}
@@ -692,12 +702,13 @@ unsigned short cim_inw (unsigned short port)
#define INB(port) cim_inb(port)
unsigned char cim_inb(unsigned short port);
-unsigned char cim_inb(unsigned short port)
+unsigned char
+cim_inb(unsigned short port)
{
- unsigned char value;
- __asm__ volatile ("inb %1,%0":"=a" (value):"d"(port));
+ unsigned char value;
+ __asm__ volatile ("inb %1,%0":"=a" (value):"d"(port));
- return value;
+ return value;
}
/*-------------------------------------------
@@ -707,9 +718,10 @@ unsigned char cim_inb(unsigned short port)
#define OUTB(port) cim_outb(port)
void cim_outb(unsigned short port, unsigned char data);
-void cim_outb(unsigned short port, unsigned char data)
+void
+cim_outb(unsigned short port, unsigned char data)
{
- __asm__ volatile ("outb %0,%1"::"a" (data), "d"(port));
+ __asm__ volatile ("outb %0,%1"::"a" (data), "d"(port));
}
#endif
diff --git a/src/gfx/disp_gu3.c b/src/gfx/disp_gu3.c
deleted file mode 100644
index 8fdbb27..0000000
--- a/src/gfx/disp_gu3.c
+++ /dev/null
@@ -1,2603 +0,0 @@
-/* Copyright (c) 2005 Advanced Micro Devices, 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 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.
- *
- * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- */
-
-/*
- * This file contains routines for the second generation display controller.
- * */
-
-void gu3_enable_compression(void); /* private routine definition */
-void gu3_disable_compression(void); /* private routine definition */
-int gfx_set_display_control(int sync_polarities); /* private routine definition */
-void gfx_reset_video(void);
-int gu3_set_specified_mode(DISPLAYMODE * pMode, int bpp);
-
- /*---------------------------------------------------------------------------
- * WARNING!!!! INACCURATE DELAY MECHANISM
- *
- * In an effort to keep the code self contained and operating system
- * independent, the delay loop just performs reads of a display controller
- * register. This time will vary for faster processors. The delay can always
- * be longer than intended, only effecting the time of the mode switch
- * (obviously want it to still be under a second). Problems with the hardware
- * only arise if the delay is not long enough.
- *----------------------------------------------------------------------------
- */
-
-#define CSTL_READS_PER_MILLISECOND 15000L
-
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_delay_milliseconds(unsigned long milliseconds)
-#else
-void
-gfx_delay_milliseconds(unsigned long milliseconds)
-#endif
-{
- /* ASSUME 300 MHZ 20 CLOCKS PER READ */
-
- unsigned long loop;
-
- loop = milliseconds * CSTL_READS_PER_MILLISECOND;
- while (loop-- > 0) {
- READ_REG32(DC3_UNLOCK);
- }
-}
-
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_delay_microseconds(unsigned long microseconds)
-#else
-void
-gfx_delay_microseconds(unsigned long microseconds)
-#endif
-{
- /* ASSUME 300 MHz, 2 CLOCKS PER INCREMENT */
-
- unsigned long loop_count = microseconds * 15;
-
- while (loop_count-- > 0) {
- READ_REG32(DC3_UNLOCK);
- }
-}
-
-/*----------------------------------------------------------------------------
- * GFX_SET_DISPLAY_BPP
- *
- * This routine programs the bpp in the display controller.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_display_bpp(unsigned short bpp)
-#else
-int
-gfx_set_display_bpp(unsigned short bpp)
-#endif
-{
- unsigned long dcfg, lock;
-
- dcfg =
- READ_REG32(DC3_DISPLAY_CFG) & ~(DC3_DCFG_DISP_MODE_MASK |
- DC3_DCFG_16BPP_MODE_MASK);
- lock = READ_REG32(DC3_UNLOCK);
-
- switch (bpp) {
- case 12:
- dcfg |= (DC3_DCFG_DISP_MODE_16BPP | DC3_DCFG_12BPP);
- break;
- case 15:
- dcfg |= (DC3_DCFG_DISP_MODE_16BPP | DC3_DCFG_15BPP);
- break;
- case 16:
- dcfg |= (DC3_DCFG_DISP_MODE_16BPP | DC3_DCFG_16BPP);
- break;
- case 32:
- dcfg |= (DC3_DCFG_DISP_MODE_24BPP);
- break;
- case 8:
- dcfg |= (DC3_DCFG_DISP_MODE_8BPP);
- break;
- default:
- return GFX_STATUS_BAD_PARAMETER;
- }
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_DISPLAY_CFG, dcfg);
- WRITE_REG32(DC3_UNLOCK, lock);
-
- /* SET BPP IN GRAPHICS PIPELINE */
-
- gfx_set_bpp(bpp);
-
- return 0;
-}
-
-/*----------------------------------------------------------------------------
- * gu3_set_specified_mode (private routine)
- * This routine uses the parameters in the specified display mode structure
- * to program the display controller hardware.
- *----------------------------------------------------------------------------
- */
-int
-gu3_set_specified_mode(DISPLAYMODE * pMode, int bpp)
-{
- Q_WORD msr_value;
- unsigned long unlock, value;
- unsigned long acfg, gcfg, dcfg;
- unsigned long size, pitch;
- unsigned long bpp_mask, temp, dv_size;
-
- /* CHECK WHETHER TIMING CHANGE IS ALLOWED */
- /* Flag used for locking also overrides timing change restriction */
-
- if (gfx_timing_lock && !(pMode->flags & GFX_MODE_LOCK_TIMING))
- return GFX_STATUS_ERROR;
-
- /* CLEAR PANNING OFFSETS */
-
- DeltaX = 0;
- DeltaY = 0;
- panelLeft = 0;
- panelTop = 0;
-
- /* SET GLOBAL FLAG */
-
- if (pMode->flags & GFX_MODE_LOCK_TIMING)
- gfx_timing_lock = 1;
-
- /* CHECK FOR VALID BPP */
- /* As this function can be called directly from */
- /* gfx_set_display_timings, we must correct any */
- /* invalid bpp settings. */
-
- switch (bpp) {
- case 12:
- bpp_mask = 0x00000900;
- break;
- case 15:
- bpp_mask = 0x00000500;
- break;
- case 16:
- bpp_mask = 0x00000100;
- break;
- case 32:
- bpp_mask = 0x00000200;
- break;
- default:
- bpp_mask = 0x00000000;
- bpp = 8;
- break;
- }
-
- gbpp = bpp;
-
- /* DISABLE COMPRESSION */
-
- gu3_disable_compression();
-
- /* ALSO DISABLE VIDEO */
- /* Use private "reset video" routine to do all that is needed. */
- /* SC1200, for example, also disables the alpha blending regions. */
-
- gfx_reset_video();
-
- /* UNLOCK THE DISPLAY CONTROLLER REGISTERS */
-
- unlock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
-
- /* READ THE CURRENT REGISTER VALUES */
-
- gcfg = READ_REG32(DC3_GENERAL_CFG);
- dcfg = READ_REG32(DC3_DISPLAY_CFG);
-
- /* BLANK THE DISPLAY IN THE DISPLAY FILTER */
-
- gfx_set_crt_enable(0);
-
- /* DISABLE THE TIMING GENERATOR */
-
- dcfg &= ~(unsigned long)DC3_DCFG_TGEN;
- WRITE_REG32(DC3_DISPLAY_CFG, dcfg);
-
- /* DELAY: WAIT FOR PENDING MEMORY REQUESTS */
- /* This delay is used to make sure that all pending requests to the */
- /* memory controller have completed before disabling the FIFO load. */
-
- gfx_delay_milliseconds(1);
-
- /* DISABLE DISPLAY FIFO LOAD */
-
- gcfg &= ~(unsigned long)DC3_GCFG_DFLE;
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
-
- /* PRESERVE VIDEO INFORMATION */
-
- gcfg &= (unsigned long)(DC3_GCFG_YUVM | DC3_GCFG_VDSE);
- dcfg = 0;
-
- /* DISABLE VGA */
- /* VGA *MUST* be turned off before TGEN is enabled. If not, a condition
- * will result where VGA Enable is waiting for a VSync to be latched but
- * a VSync will not be generated until VGA is disabled.
- * */
-
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
-
- /* SET THE DOT CLOCK FREQUENCY */
- /* Mask off the divide by two bit (bit 31) */
-
- gfx_set_clock_frequency(pMode->frequency & 0x7FFFFFFF);
-
- /* DELAY: WAIT FOR THE PLL TO SETTLE */
- /* This allows the dot clock frequency that was just set to settle. */
-
- gfx_delay_milliseconds(1);
-
- /* SET THE GX DISPLAY CONTROLLER PARAMETERS */
-
- WRITE_REG32(DC3_FB_ST_OFFSET, 0);
- WRITE_REG32(DC3_CB_ST_OFFSET, 0);
- WRITE_REG32(DC3_CURS_ST_OFFSET, 0);
-
- /* SET LINE SIZE AND PITCH */
- /* 1. Flat Panels must use the mode width and not */
- /* the timing width to set the pitch. */
- /* 2. Mode sets will use a pitch that is aligned */
- /* on a 1K boundary to preserve legacy. The */
- /* pitch can be overridden by a subsequent call */
- /* to gfx_set_display_pitch. */
-
- if (PanelEnable)
- size = ModeWidth;
- else
- size = pMode->hactive;
-
- if (bpp > 8)
- size <<= 1;
- if (bpp > 16)
- size <<= 1;
-
- pitch = 1024;
- dv_size = DC3_DV_LINE_SIZE_1024;
-
- if (size > 1024) {
- pitch = 2048;
- dv_size = DC3_DV_LINE_SIZE_2048;
- }
-
- if (size > 2048) {
- pitch = 4096;
- dv_size = DC3_DV_LINE_SIZE_4096;
- }
-
- if (size > 4096) {
- pitch = 8192;
- dv_size = DC3_DV_LINE_SIZE_8192;
- }
-
- WRITE_REG32(DC3_GFX_PITCH, pitch >> 3);
-
- /* WRITE DIRTY/VALID CONTROL WITH LINE LENGTH */
-
- temp = READ_REG32(DC3_DV_CTL);
- WRITE_REG32(DC3_DV_CTL, (temp & ~DC3_DV_LINE_SIZE_MASK) | dv_size);
-
- if (PanelEnable) {
- size = pMode->hactive;
- if (bpp > 8)
- size <<= 1;
- if (bpp > 16)
- size <<= 1;
- }
-
- WRITE_REG32(DC3_LINE_SIZE, ((size >> 3)));
-
- /* ALWAYS ENABLE VIDEO AND GRAPHICS DATA */
- /* These bits are relics from a previous design and */
- /* should always be enabled. */
-
- dcfg |= (unsigned long)(DC3_DCFG_VDEN | DC3_DCFG_GDEN);
-
- /* SET PIXEL FORMAT */
-
- dcfg |= bpp_mask;
-
- /* ENABLE TIMING GENERATOR, TIM. REG. UPDATES, PALETTE BYPASS */
- /* AND VERT. INT. SELECT */
-
- dcfg |=
- (unsigned long)(DC3_DCFG_TGEN | DC3_DCFG_TRUP | DC3_DCFG_PALB |
- DC3_DCFG_VISL);
-
- /* SET FIFO PRIORITIES AND DISPLAY FIFO LOAD ENABLE */
-
- gcfg |= 0x0000BA01;
- dcfg |= 0x000EA000;
- acfg = 0x001A0000;
-
- /* SET THE DISPLAY CHARACTERISTICS FOR HIGH BANDWIDTH CASES */
-
- gfx_msr_read(RC_ID_VG, DC3_VG_SPARE_MSR, &msr_value);
- msr_value.low &=
- ~(VG_SPARE_DISABLE_CFIFO_HGO | VG_SPARE_VFIFO_ARB_SELECT |
- VG_SPARE_LOAD_WM_LPEN_MASK | VG_SPARE_WM_LPEN_OVRD |
- VG_SPARE_DISABLE_INIT_VID_PRI | VG_SPARE_DISABLE_VFIFO_WM);
- msr_value.low |= VG_SPARE_DISABLE_CFIFO_HGO | VG_SPARE_VFIFO_ARB_SELECT;
- gfx_msr_write(RC_ID_VG, DC3_VG_SPARE_MSR, &msr_value);
- WRITE_REG32(DC3_ARB_CFG, acfg);
-
- /* ENABLE FLAT PANEL CENTERING */
- /* For panel modes having a resolution smaller than the */
- /* panel resolution, turn on data centering. */
-
- if (PanelEnable && ModeWidth < PanelWidth)
- dcfg |= DC3_DCFG_DCEN;
-
- /* SET THE GRAPHICS SCALE */
- /* We do not support graphics scaling, but we need to ensure that the */
- /* scale is set correctly none the less. */
-
- WRITE_REG32(DC3_GFX_SCALE, 0x40004000);
- WRITE_REG32(DC3_IRQ_CTL, 0);
-
- /* COMBINE AND SET TIMING VALUES */
-
- value = (unsigned long)(pMode->hactive - 1) |
- (((unsigned long)(pMode->htotal - 1)) << 16);
- WRITE_REG32(DC3_H_ACTIVE_TIMING, value);
- value = (unsigned long)(pMode->hblankstart - 1) |
- (((unsigned long)(pMode->hblankend - 1)) << 16);
- WRITE_REG32(DC3_H_BLANK_TIMING, value);
- value = (unsigned long)(pMode->hsyncstart - 1) |
- (((unsigned long)(pMode->hsyncend - 1)) << 16);
- WRITE_REG32(DC3_H_SYNC_TIMING, value);
- value = (unsigned long)(pMode->vactive - 1) |
- (((unsigned long)(pMode->vtotal - 1)) << 16);
- WRITE_REG32(DC3_V_ACTIVE_TIMING, value);
- value = (unsigned long)(pMode->vblankstart - 1) |
- (((unsigned long)(pMode->vblankend - 1)) << 16);
- WRITE_REG32(DC3_V_BLANK_TIMING, value);
- value = (unsigned long)(pMode->vsyncstart - 1) |
- (((unsigned long)(pMode->vsyncend - 1)) << 16);
- WRITE_REG32(DC3_V_SYNC_TIMING, value);
-
- WRITE_REG32(DC3_DISPLAY_CFG, dcfg);
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
-
- /* CONFIGURE DISPLAY OUTPUT FROM VIDEO PROCESSOR */
-
- gfx_set_display_control(((pMode->flags & GFX_MODE_NEG_HSYNC) ? 1 : 0) |
- ((pMode->flags & GFX_MODE_NEG_VSYNC) ? 2 : 0));
-
- /* RESTORE VALUE OF DC3_UNLOCK */
-
- WRITE_REG32(DC3_UNLOCK, unlock);
-
- /* RESET THE PITCH VALUES IN THE GP */
-
- gfx_reset_pitch((unsigned short)pitch);
-
- gfx_set_bpp((unsigned short)bpp);
-
- return GFX_STATUS_OK;
-}
-
- /*---------------------------------------------------------------------------
- * GFX_IS_DISPLAY_MODE_SUPPORTED
- *
- * This routine sets the specified display mode.
- *
- * Returns 1 if successful, 0 if mode could not be set.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_is_display_mode_supported(int xres, int yres, int bpp, int hz)
-#else
-int
-gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz)
-#endif
-{
- unsigned int mode;
- unsigned long hz_flag = 0, bpp_flag = 0;
-
- /* SET FLAGS TO MATCH REFRESH RATE */
- gfx_mode_hz_conversion
- /* SET BPP FLAGS TO LIMIT MODE SELECTION */
- gfx_mode_bpp_conversion
- /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */
- for (mode = 0; mode < NUM_RC_DISPLAY_MODES; mode++) {
- if ((DisplayParams[mode].hactive == (unsigned short)xres) &&
- (DisplayParams[mode].vactive == (unsigned short)yres) &&
- (DisplayParams[mode].flags & hz_flag) &&
- (DisplayParams[mode].flags & bpp_flag)) {
-
- /* CASTLE DOES NOT SUPPORT EMULATED VGA MODES */
-
- if ((DisplayParams[mode].flags & GFX_MODE_PIXEL_DOUBLE) ||
- (DisplayParams[mode].flags & GFX_MODE_LINE_DOUBLE))
- continue;
-
- /* SET THE DISPLAY CONTROLLER FOR THE SELECTED MODE */
-
- return (mode);
- }
- }
- return (-1);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_display_mode
- *
- * This routine sets the specified display mode.
- *
- * Returns 1 if successful, 0 if mode could not be set.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_display_mode(int xres, int yres, int bpp, int hz)
-#else
-int
-gfx_set_display_mode(int xres, int yres, int bpp, int hz)
-#endif
-{
- int mode;
-
- /* DISABLE FLAT PANEL */
- /* Flat Panel settings are enabled by the function gfx_set_fixed_timings
- * and disabled by gfx_set_display_mode.
- * */
-
- PanelEnable = 0;
-
- mode = gfx_is_display_mode_supported(xres, yres, bpp, hz);
- if (mode >= 0) {
- if (gu3_set_specified_mode(&DisplayParams[mode],
- bpp) == GFX_STATUS_OK)
- return (1);
- }
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * GFX_SET_DISPLAY_TIMINGS
- *
- * This routine sets the display controller mode using the specified timing
- * values (as opposed to using the tables internal to Durango).
- *
- * Returns GFX_STATUS_OK ON SUCCESS, GFX_STATUS_ERROR otherwise.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_display_timings(unsigned short bpp, unsigned short flags,
- unsigned short hactive, unsigned short hblankstart,
- unsigned short hsyncstart, unsigned short hsyncend,
- unsigned short hblankend, unsigned short htotal,
- unsigned short vactive, unsigned short vblankstart,
- unsigned short vsyncstart, unsigned short vsyncend,
- unsigned short vblankend, unsigned short vtotal, unsigned long frequency)
-#else
-int
-gfx_set_display_timings(unsigned short bpp, unsigned short flags,
- unsigned short hactive, unsigned short hblankstart,
- unsigned short hsyncstart, unsigned short hsyncend,
- unsigned short hblankend, unsigned short htotal,
- unsigned short vactive, unsigned short vblankstart,
- unsigned short vsyncstart, unsigned short vsyncend,
- unsigned short vblankend, unsigned short vtotal, unsigned long frequency)
-#endif
-{
- /* SET MODE STRUCTURE WITH SPECIFIED VALUES */
-
- gfx_display_mode.flags = 0;
- if (flags & 1)
- gfx_display_mode.flags |= GFX_MODE_NEG_HSYNC;
- if (flags & 2)
- gfx_display_mode.flags |= GFX_MODE_NEG_VSYNC;
- if (flags & 0x1000)
- gfx_display_mode.flags |= GFX_MODE_LOCK_TIMING;
- gfx_display_mode.hactive = hactive;
- gfx_display_mode.hblankstart = hblankstart;
- gfx_display_mode.hsyncstart = hsyncstart;
- gfx_display_mode.hsyncend = hsyncend;
- gfx_display_mode.hblankend = hblankend;
- gfx_display_mode.htotal = htotal;
- gfx_display_mode.vactive = vactive;
- gfx_display_mode.vblankstart = vblankstart;
- gfx_display_mode.vsyncstart = vsyncstart;
- gfx_display_mode.vsyncend = vsyncend;
- gfx_display_mode.vblankend = vblankend;
- gfx_display_mode.vtotal = vtotal;
- gfx_display_mode.frequency = frequency;
-
- /* CALL ROUTINE TO SET MODE */
-
- return (gu3_set_specified_mode(&gfx_display_mode, bpp));
-}
-
-/*----------------------------------------------------------------------------
- * GFX_SET_VTOTAL
- *
- * This routine sets the display controller vertical total to
- * "vtotal". As a side effect it also sets vertical blank end.
- * It should be used when only this value needs to be changed,
- * due to speed considerations.
- *
- * Note: it is the caller's responsibility to make sure that
- * a legal vtotal is used, i.e. that "vtotal" is greater than or
- * equal to vsync end.
- *
- * Always returns 0.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_vtotal(unsigned short vtotal)
-#else
-int
-gfx_set_vtotal(unsigned short vtotal)
-#endif
-{
- unsigned long unlock, dcfg, vactive, vblank;
-
- /* UNLOCK THE DISPLAY CONTROLLER REGISTERS */
-
- unlock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
-
- /* READ THE CURRENT RC VALUES */
-
- dcfg = READ_REG32(DC3_DISPLAY_CFG);
- vactive = READ_REG32(DC3_V_ACTIVE_TIMING);
- vblank = READ_REG32(DC3_V_BLANK_TIMING);
-
- /* DISABLE TIMING REGISTER UPDATES */
-
- WRITE_REG32(DC3_DISPLAY_CFG, dcfg & ~(unsigned long)DC3_DCFG_TRUP);
-
- /* WRITE NEW TIMING VALUES */
-
- WRITE_REG32(DC3_V_ACTIVE_TIMING,
- (vactive & DC3_VAT_VA_MASK) | (unsigned long)(vtotal - 1) << 16);
- WRITE_REG32(DC3_V_BLANK_TIMING,
- (vblank & DC3_VBT_VBS_MASK) | (unsigned long)(vtotal - 1) << 16);
-
- /* RESTORE OLD RC VALUES */
-
- WRITE_REG32(DC3_DISPLAY_CFG, dcfg);
- WRITE_REG32(DC3_UNLOCK, unlock);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_pitch
- *
- * This routine sets the pitch of the frame buffer to the specified value.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_pitch(unsigned short pitch)
-#else
-void
-gfx_set_display_pitch(unsigned short pitch)
-#endif
-{
- unsigned long value = 0;
- unsigned long lock = READ_REG32(DC3_UNLOCK);
-
- value = READ_REG32(DC3_GFX_PITCH) & 0xFFFF0000;
- value |= (pitch >> 3);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GFX_PITCH, value);
-
- /* SET RENDERING PITCHES TO MATCH */
-
- gfx_reset_pitch(pitch);
-
- /* SET THE FRAME DIRTY MODE */
- /* Non-standard pitches, i.e. pitches that */
- /* are not 1K, 2K or 4K must mark the entire */
- /* frame as dirty when writing to the frame */
- /* buffer. */
-
- value = READ_REG32(DC3_GENERAL_CFG);
-
- if (pitch == 1024 || pitch == 2048 || pitch == 4096 || pitch == 8192)
- value &= ~(unsigned long)(DC3_GCFG_FDTY);
- else
- value |= (unsigned long)(DC3_GCFG_FDTY);
-
- WRITE_REG32(DC3_GENERAL_CFG, value);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_offset
- *
- * This routine sets the start address of the frame buffer. It is
- * typically used to pan across a virtual desktop (frame buffer larger than
- * the displayed screen) or to flip the display between multiple buffers.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_offset(unsigned long offset)
-#else
-void
-gfx_set_display_offset(unsigned long offset)
-#endif
-{
- /* UPDATE FRAME BUFFER OFFSET */
- unsigned long lock;
-
- lock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
-
- /* START ADDRESS EFFECTS DISPLAY COMPRESSION */
- /* Disable compression for non-zero start addresss values. */
- /* Enable compression if offset is zero and comression is intended to */
- /* be enabled from a previous call to "gfx_set_compression_enable". */
- /* Compression should be disabled BEFORE the offset is changed */
- /* and enabled AFTER the offset is changed. */
-
- if (offset == 0) {
- WRITE_REG32(DC3_FB_ST_OFFSET, offset);
- if (gfx_compression_enabled) {
- /* WAIT FOR THE OFFSET TO BE LATCHED */
- gfx_wait_vertical_blank();
- gu3_enable_compression();
- }
- } else {
- /* ONLY DISABLE COMPRESSION ONCE */
-
- if (gfx_compression_active)
- gu3_disable_compression();
-
- WRITE_REG32(DC3_FB_ST_OFFSET, offset);
- }
-
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_palette_entry
- *
- * This routine sets an palette entry in the display controller.
- * A 32-bit X:R:G:B value.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_display_palette_entry(unsigned long index, unsigned long palette)
-#else
-int
-gfx_set_display_palette_entry(unsigned long index, unsigned long palette)
-#endif
-{
- if (index > 0xFF)
- return GFX_STATUS_BAD_PARAMETER;
-
- WRITE_REG32(DC3_PAL_ADDRESS, index);
- WRITE_REG32(DC3_PAL_DATA, palette);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_palette
- *
- * This routine sets the entire palette in the display controller.
- * A pointer is provided to a 256 entry table of 32-bit X:R:G:B values.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_display_palette(unsigned long *palette)
-#else
-int
-gfx_set_display_palette(unsigned long *palette)
-#endif
-{
- unsigned long i;
-
- WRITE_REG32(DC3_PAL_ADDRESS, 0);
-
- if (palette) {
- for (i = 0; i < 256; i++) {
- WRITE_REG32(DC3_PAL_DATA, palette[i]);
- }
- }
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_cursor_enable
- *
- * This routine enables or disables the hardware cursor.
- *
- * WARNING: The cursor start offset must be set by setting the cursor
- * position before calling this routine to assure that memory reads do not
- * go past the end of graphics memory (this can hang GXm).
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_cursor_enable(int enable)
-#else
-void
-gfx_set_cursor_enable(int enable)
-#endif
-{
- unsigned long unlock, gcfg;
-
- /* SET OR CLEAR CURSOR ENABLE BIT */
-
- unlock = READ_REG32(DC3_UNLOCK);
- gcfg = READ_REG32(DC3_GENERAL_CFG);
- if (enable)
- gcfg |= DC3_GCFG_CURE;
- else
- gcfg &= ~(DC3_GCFG_CURE);
-
- /* WRITE NEW REGISTER VALUE */
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
- WRITE_REG32(DC3_UNLOCK, unlock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_cursor_colors
- *
- * This routine sets the colors of the hardware cursor.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor)
-#else
-void
-gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor)
-#endif
-{
- /* SET CURSOR COLORS */
-
- WRITE_REG32(DC3_PAL_ADDRESS, 0x100);
- WRITE_REG32(DC3_PAL_DATA, bkcolor);
- WRITE_REG32(DC3_PAL_DATA, fgcolor);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_cursor_position
- *
- * This routine sets the position of the hardware cusror. The starting
- * offset of the cursor buffer must be specified so that the routine can
- * properly clip scanlines if the cursor is off the top of the screen.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_cursor_position(unsigned long memoffset,
- unsigned short xpos, unsigned short ypos,
- unsigned short xhotspot, unsigned short yhotspot)
-#else
-void
-gfx_set_cursor_position(unsigned long memoffset,
- unsigned short xpos, unsigned short ypos,
- unsigned short xhotspot, unsigned short yhotspot)
-#endif
-{
- unsigned long unlock;
-
- short x = (short)xpos - (short)xhotspot;
- short y = (short)ypos - (short)yhotspot;
- short xoffset = 0;
- short yoffset = 0;
-
- if (x < -63)
- return;
- if (y < -63)
- return;
-
- if (PanelEnable) {
- if ((ModeWidth > PanelWidth) || (ModeHeight > PanelHeight)) {
- gfx_enable_panning(xpos, ypos);
- x = x - (unsigned short)panelLeft;
- y = y - (unsigned short)panelTop;
- }
- }
-
- /* ADJUST OFFSETS */
- /* Cursor movement and panning work as follows: The cursor position */
- /* refers to where the hotspot of the cursor is located. However, for */
- /* non-zero hotspots, the cursor buffer actually begins before the */
- /* specified position. */
-
- if (x < 0) {
- xoffset = -x;
- x = 0;
- }
- if (y < 0) {
- yoffset = -y;
- y = 0;
- }
- memoffset += (unsigned long)yoffset << 4;
-
- /* SET CURSOR POSITION */
-
- unlock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_CURS_ST_OFFSET, memoffset);
- WRITE_REG32(DC3_CURSOR_X, (unsigned long)x |
- (((unsigned long)xoffset) << 11));
- WRITE_REG32(DC3_CURSOR_Y, (unsigned long)y |
- (((unsigned long)yoffset) << 11));
- WRITE_REG32(DC3_UNLOCK, unlock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_cursor_shape32
- *
- * This routine loads 32x32 cursor data into the cursor buffer in graphics
- * memory.
- * As the Castle cursor is actually 64x64, we must pad the outside of the
- * cursor data with transparent pixels.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_cursor_shape32(unsigned long memoffset,
- unsigned long *andmask, unsigned long *xormask)
-#else
-void
-gfx_set_cursor_shape32(unsigned long memoffset,
- unsigned long *andmask, unsigned long *xormask)
-#endif
-{
- int i;
-
- for (i = 0; i < 32; i++) {
- /* EVEN QWORDS CONTAIN THE AND MASK */
-
- WRITE_FB32(memoffset, 0xFFFFFFFF);
- WRITE_FB32(memoffset + 4, andmask[i]);
-
- /* ODD QWORDS CONTAIN THE XOR MASK */
-
- WRITE_FB32(memoffset + 8, 0x00000000);
- WRITE_FB32(memoffset + 12, xormask[i]);
-
- memoffset += 16;
- }
-
- /* FILL THE LOWER HALF OF THE BUFFER WITH TRANSPARENT PIXELS */
-
- for (i = 0; i < 32; i++) {
- WRITE_FB32(memoffset, 0xFFFFFFFF);
- WRITE_FB32(memoffset + 4, 0xFFFFFFFF);
- WRITE_FB32(memoffset + 8, 0x00000000);
- WRITE_FB32(memoffset + 12, 0x00000000);
-
- memoffset += 16;
- }
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_cursor_shape64
- *
- * This routine loads 64x64 cursor data into the cursor buffer in graphics
- * memory.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_cursor_shape64(unsigned long memoffset,
- unsigned long *andmask, unsigned long *xormask)
-#else
-void
-gfx_set_cursor_shape64(unsigned long memoffset,
- unsigned long *andmask, unsigned long *xormask)
-#endif
-{
- int i;
-
- for (i = 0; i < 128; i += 2) {
- /* EVEN QWORDS CONTAIN THE AND MASK */
- /* We invert the dwords to prevent the calling */
- /* application from having to think in terms of Qwords. */
- /* The hardware data order is actually 63:0, or 31:0 of */
- /* the second dword followed by 31:0 of the first dword. */
-
- WRITE_FB32(memoffset, andmask[i + 1]);
- WRITE_FB32(memoffset + 4, andmask[i]);
-
- /* ODD QWORDS CONTAIN THE XOR MASK */
-
- WRITE_FB32(memoffset + 8, xormask[i + 1]);
- WRITE_FB32(memoffset + 12, xormask[i]);
-
- memoffset += 16;
- }
-}
-
-/*---------------------------------------------------------------------------
- * gu3_enable_compression
- *
- * This is a private routine to this module (not exposed in the Durango API).
- * It enables display compression.
- *---------------------------------------------------------------------------
- */
-void
-gu3_enable_compression(void)
-{
- unsigned long unlock, gcfg, temp;
-
- /* DO NOT ENABLE IF START ADDRESS IS NOT ZERO */
-
- if (READ_REG32(DC3_FB_ST_OFFSET) & 0x0FFFFFFF)
- return;
-
- /* SET GLOBAL INDICATOR */
-
- gfx_compression_active = 1;
-
- /* CLEAR DIRTY/VALID BITS IN MEMORY CONTROLLER */
- /* Software is required to do this before enabling compression. */
- /* Don't want controller to think that old lines are still valid. */
- /* Writing a 1 to bit 0 of the DV Control register will force the */
- /* hardware to clear all the valid bits. */
-
- unlock = READ_REG32(DC3_UNLOCK);
- temp = READ_REG32(DC3_DV_CTL);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_DV_CTL, temp | 0x00000001);
-
- /* TURN ON COMPRESSION CONTROL BITS */
-
- gcfg = READ_REG32(DC3_GENERAL_CFG);
- gcfg |= DC3_GCFG_CMPE | DC3_GCFG_DECE;
-
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
- WRITE_REG32(DC3_UNLOCK, unlock);
-}
-
-/*---------------------------------------------------------------------------
- * gu3_disable_compression
- *
- * This is a private routine to this module (not exposed in the Durango API).
- * It disables display compression.
- *---------------------------------------------------------------------------
- */
-void
-gu3_disable_compression(void)
-{
- unsigned long unlock, gcfg;
-
- /* SET GLOBAL INDICATOR */
-
- gfx_compression_active = 0;
-
- /* TURN OFF COMPRESSION CONTROL BITS */
-
- unlock = READ_REG32(DC3_UNLOCK);
- gcfg = READ_REG32(DC3_GENERAL_CFG);
- gcfg &= ~(DC3_GCFG_CMPE | DC3_GCFG_DECE);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
- WRITE_REG32(DC3_UNLOCK, unlock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_compression_enable
- *
- * This routine enables or disables display compression.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_compression_enable(int enable)
-#else
-int
-gfx_set_compression_enable(int enable)
-#endif
-{
- /* SET GLOBAL VARIABLE FOR INDENDED STATE */
- /* Compression can only be enabled for non-zero start address values. */
- /* Keep state to enable compression on start address changes. */
-
- gfx_compression_enabled = enable;
- if (enable)
- gu3_enable_compression();
- else
- gu3_disable_compression();
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_compression_offset
- *
- * This routine sets the base offset for the compression buffer.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_compression_offset(unsigned long offset)
-#else
-int
-gfx_set_compression_offset(unsigned long offset)
-#endif
-{
- unsigned long lock;
-
- /* MUST BE 16-BYTE ALIGNED FOR CASTLE */
-
- if (offset & 0x0F)
- return (1);
-
- /* SET REGISTER VALUE */
-
- lock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_CB_ST_OFFSET, offset & 0x0FFFFFFF);
- WRITE_REG32(DC3_UNLOCK, lock);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_compression_pitch
- *
- * This routine sets the pitch, in bytes, of the compression buffer.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_compression_pitch(unsigned short pitch)
-#else
-int
-gfx_set_compression_pitch(unsigned short pitch)
-#endif
-{
- unsigned long lock, line_delta;
-
- lock = READ_REG32(DC3_UNLOCK);
-
- /* SET REGISTER VALUE */
-
- line_delta = READ_REG32(DC3_GFX_PITCH) & 0x0000FFFF;
- line_delta |= (((unsigned long)pitch << 13) & 0xFFFF0000);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GFX_PITCH, line_delta);
- WRITE_REG32(DC3_UNLOCK, lock);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_compression_size
- *
- * This routine sets the line size of the compression buffer, which is the
- * maximum number of bytes allowed to store a compressed line.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_compression_size(unsigned short size)
-#else
-int
-gfx_set_compression_size(unsigned short size)
-#endif
-{
- unsigned long lock, buf_size;
-
- /* SUBTRACT 32 FROM SIZE */
- /* The display controller will actually write */
- /* 4 extra QWords. So, if we assume that "size" */
- /* refers to the allocated size, we must subtract */
- /* 32 bytes. */
-
- size -= 32;
-
- /* SET REGISTER VALUE */
-
- lock = READ_REG32(DC3_UNLOCK);
- buf_size = READ_REG32(DC3_LINE_SIZE) & ~DC3_LINE_SIZE_CBLS_MASK;
- buf_size |=
- ((((unsigned long)size >> 3) + 1) & 0x7F) << DC3_LINE_SIZE_CB_SHIFT;
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_LINE_SIZE, buf_size);
- WRITE_REG32(DC3_UNLOCK, lock);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_color_key (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_color_key". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_color_key(unsigned long key, unsigned long mask,
- int enable)
-#else
-void
-gfx_set_display_video_color_key(unsigned long key, unsigned long mask,
- int enable)
-#endif
-{
- unsigned long colorkey = 0;
- unsigned long lock;
-
- if (enable)
- colorkey = (key & 0xFFFFFF) | DC3_CLR_KEY_ENABLE;
-
- lock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
-
- WRITE_REG32(DC3_COLOR_KEY, colorkey);
- WRITE_REG32(DC3_COLOR_MASK, (mask & 0xFFFFFF));
-
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_format (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_format". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_format(unsigned long format)
-#else
-void
-gfx_set_display_video_format(unsigned long format)
-#endif
-{
- unsigned long gcfg, lock;
-
- lock = READ_REG32(DC3_UNLOCK);
- gcfg = READ_REG32(DC3_GENERAL_CFG);
-
- switch (format) {
- case VIDEO_FORMAT_Y0Y1Y2Y3:
- case VIDEO_FORMAT_Y3Y2Y1Y0:
- case VIDEO_FORMAT_Y1Y0Y3Y2:
- case VIDEO_FORMAT_Y1Y2Y3Y0:
- gcfg |= DC3_GCFG_YUVM;
- break;
-
- default:
- gcfg &= ~DC3_GCFG_YUVM;
- break;
- }
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_enable (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_enable". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_enable(int enable)
-#else
-void
-gfx_set_display_video_enable(int enable)
-#endif
-{
- unsigned long lock, gcfg, dcfg;
-
- /* READ CURRENT VALUES */
-
- lock = READ_REG32(DC3_UNLOCK);
- gcfg = READ_REG32(DC3_GENERAL_CFG);
- dcfg = READ_REG32(DC3_DISPLAY_CFG);
-
- /* SET OR CLEAR VIDEO ENABLE IN GENERAL_CFG */
-
- if (enable)
- gcfg |= DC3_GCFG_VIDE;
- else
- gcfg &= ~DC3_GCFG_VIDE;
-
- /* WRITE REGISTER */
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_GENERAL_CFG, gcfg);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_size (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_size". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_size(unsigned short width, unsigned short height)
-#else
-void
-gfx_set_display_video_size(unsigned short width, unsigned short height)
-#endif
-{
- unsigned long lock, value, yuv_420;
-
- /* READ CURRENT VALUES */
-
- lock = READ_REG32(DC3_UNLOCK);
- value = READ_REG32(DC3_LINE_SIZE) & ~DC3_LINE_SIZE_VLS_MASK;
- yuv_420 = READ_REG32(DC3_GENERAL_CFG) & DC3_GCFG_YUVM;
-
- /* LINE WIDTH IS 1/4 FOR 4:2:0 VIDEO */
- /* All data must be 32-byte aligned. */
-
- if (yuv_420) {
- width >>= 1;
- width = (width + 7) & 0xFFF8;
- } else {
- width <<= 1;
- width = (width + 31) & 0xFFE0;
- }
-
- /* ONLY THE LINE SIZE IS PROGRAMMED IN THE DISPLAY CONTROLLER */
- /* Shift by three less than the bit position to effect a divide by 8 */
-
- value |=
- ((unsigned long)width << (DC3_LINE_SIZE_VB_SHIFT -
- 3)) & DC3_LINE_SIZE_VLS_MASK;
-
- /* WRITE THE REGISTER */
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_LINE_SIZE, value);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_offset (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_offset". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_offset(unsigned long offset)
-#else
-void
-gfx_set_display_video_offset(unsigned long offset)
-#endif
-{
- unsigned long lock;
-
- lock = READ_REG32(DC3_UNLOCK);
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- offset &= 0x0FFFFFF0;
- WRITE_REG32(DC3_VID_Y_ST_OFFSET, offset);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_yuv_offsets (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by gfx_set_video_yuv_offsets. It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_yuv_offsets(unsigned long yoffset,
- unsigned long uoffset, unsigned long voffset)
-#else
-void
-gfx_set_display_video_yuv_offsets(unsigned long yoffset,
- unsigned long uoffset, unsigned long voffset)
-#endif
-{
- unsigned long lock;
-
- lock = READ_REG32(DC3_UNLOCK);
-
- yoffset &= 0x0FFFFFF0;
- uoffset &= 0x0FFFFFF8;
- voffset &= 0x0FFFFFF8;
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_VID_Y_ST_OFFSET, yoffset);
- WRITE_REG32(DC3_VID_U_ST_OFFSET, uoffset);
- WRITE_REG32(DC3_VID_V_ST_OFFSET, voffset);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_yuv_pitch (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by gfx_set_video_yuv_pitch. It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_set_display_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
-#else
-void
-gfx_set_display_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
-#endif
-{
- unsigned long lock, pitch;
-
- lock = READ_REG32(DC3_UNLOCK);
-
- pitch = ((uvpitch << 13) & 0xFFFF0000) | ((ypitch >> 3) & 0xFFFF);
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_VID_YUV_PITCH, pitch);
- WRITE_REG32(DC3_UNLOCK, lock);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_test_timing_active
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_test_timing_active(void)
-#else
-int
-gfx_test_timing_active(void)
-#endif
-{
- if (READ_REG32(DC3_DISPLAY_CFG) & DC3_DCFG_TGEN)
- return (1);
- else
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_test_vertical_active
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_test_vertical_active(void)
-#else
-int
-gfx_test_vertical_active(void)
-#endif
-{
- if (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)
- return (0);
-
- return (1);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_wait_vertical_blank
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_wait_vertical_blank(void)
-#else
-int
-gfx_wait_vertical_blank(void)
-#endif
-{
- if (gfx_test_timing_active()) {
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- }
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_enable_panning
- *
- * This routine enables the panning when the Mode is bigger than the panel
- * size.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_enable_panning(int x, int y)
-#else
-void
-gfx_enable_panning(int x, int y)
-#endif
-{
- unsigned long modeBytesPerPixel;
- unsigned long modeBytesPerScanline = 0;
- unsigned long startAddress = 0;
-
- modeBytesPerPixel = (gbpp + 7) / 8;
- modeBytesPerScanline = (READ_REG32(DC3_GFX_PITCH) & 0x0000FFFF) << 3;
-
- /* TEST FOR NO-WORK */
-
- if (x >= DeltaX && x < ((int)PanelWidth + DeltaX) &&
- y >= DeltaY && y < ((int)PanelHeight + DeltaY))
- return;
-
- /* ADJUST PANNING VARIABLES WHEN CURSOR EXCEEDS BOUNDARY */
- /* Test the boundary conditions for each coordinate and update */
- /* all variables and the starting offset accordingly. */
-
- if (x < DeltaX)
- DeltaX = x;
-
- else if (x >= (DeltaX + (int)PanelWidth))
- DeltaX = x - (int)PanelWidth + 1;
-
- if (y < DeltaY)
- DeltaY = y;
-
- else if (y >= (DeltaY + (int)PanelHeight))
- DeltaY = y - (int)PanelHeight + 1;
-
- /* CALCULATE THE START OFFSET */
-
- startAddress =
- (DeltaX * modeBytesPerPixel) + (DeltaY * modeBytesPerScanline);
-
- gfx_set_display_offset(startAddress);
-
- /* SET PANEL COORDINATES */
- /* Panel's x position must be DWORD aligned */
-
- panelTop = DeltaY;
- panelLeft = DeltaX * modeBytesPerPixel;
-
- if (panelLeft & 3)
- panelLeft = (panelLeft & 0xFFFFFFFC) + 4;
-
- panelLeft /= modeBytesPerPixel;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_fixed_timings
- *---------------------------------------------------------------------------
- */
-
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_fixed_timings(int panelResX, int panelResY, unsigned short width,
- unsigned short height, unsigned short bpp)
-#else
-int
-gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width,
- unsigned short height, unsigned short bpp)
-#endif
-{
- unsigned int mode;
-
- ModeWidth = width;
- ModeHeight = height;
- PanelWidth = (unsigned short)panelResX;
- PanelHeight = (unsigned short)panelResY;
- PanelEnable = 1;
-
- /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */
- for (mode = 0; mode < NUM_FIXED_TIMINGS_MODES; mode++) {
- if ((FixedParams[mode].xres == width) &&
- (FixedParams[mode].yres == height) &&
- (FixedParams[mode].panelresx == panelResX) &&
- (FixedParams[mode].panelresy == panelResY)) {
-
- /* SET THE 92xx FOR THE SELECTED MODE */
- FIXEDTIMINGS *fmode = &FixedParams[mode];
-
- gfx_set_display_timings(bpp, 3, fmode->hactive,
- fmode->hblankstart, fmode->hsyncstart, fmode->hsyncend,
- fmode->hblankend, fmode->htotal, fmode->vactive,
- fmode->vblankstart, fmode->vsyncstart, fmode->vsyncend,
- fmode->vblankend, fmode->vtotal, fmode->frequency);
-
- return (1);
- } /* end if() */
- } /* end for() */
-
- return (-1);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_panel_present
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_set_panel_present(int panelResX, int panelResY, unsigned short width,
- unsigned short height, unsigned short bpp)
-#else
-int
-gfx_set_panel_present(int panelResX, int panelResY, unsigned short width,
- unsigned short height, unsigned short bpp)
-#endif
-{
- /* SET VALID BPP */
- /* 16BPP is the default. */
-
- if (bpp != 8 && bpp != 12 && bpp != 15 && bpp != 16 && bpp != 32)
- bpp = 16;
-
- /* RECORD PANEL PARAMETERS */
- /* This routine does not touch any panel timings. It is used when custom
- * panel settings are set up in advance by the BIOS or an application,
- * but the application still requires access to other panel functionality
- * provided by Durango (i.e. panning).
- * */
- ModeWidth = width;
- ModeHeight = height;
- PanelWidth = (unsigned short)panelResX;
- PanelHeight = (unsigned short)panelResY;
- PanelEnable = 1;
- gbpp = bpp;
-
- /* PROGRAM THE BPP IN THE DISPLAY CONTROLLER */
-
- gfx_set_display_bpp(bpp);
-
- return (GFX_STATUS_OK);
-}
-
-/* THE FOLLOWING READ ROUTINES ARE ALWAYS INCLUDED: */
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_pitch
- *
- * This routine returns the current pitch of the frame buffer, in bytes.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_display_pitch(void)
-#else
-unsigned short
-gfx_get_display_pitch(void)
-#endif
-{
- return ((unsigned short)(READ_REG32(DC3_GFX_PITCH) & 0x0000FFFF) << 3);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_mode_frequency_supported
- *
- * This routine examines if the requested mode with pixel frequency is
- * supported.
- *
- * Returns >0 if successful , <0 if freq. could not be found and matched.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_mode_frequency_supported(int xres, int yres, int bpp,
- unsigned long frequency)
-#else
-int
-gfx_mode_frequency_supported(int xres, int yres, int bpp,
- unsigned long frequency)
-#endif
-{
- unsigned int index;
- unsigned long value;
- unsigned long bpp_flag = 0;
-
- gfx_mode_bpp_conversion_def(bpp)
-
- for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) {
- if ((DisplayParams[index].hactive == (unsigned int)xres) &&
- (DisplayParams[index].vactive == (unsigned int)yres) &&
- (DisplayParams[index].flags & bpp_flag) &&
- (DisplayParams[index].frequency == frequency)) {
- int hz = 0;
-
- value = DisplayParams[index].flags;
-
- if (value & GFX_MODE_56HZ)
- hz = 56;
- else if (value & GFX_MODE_60HZ)
- hz = 60;
- else if (value & GFX_MODE_70HZ)
- hz = 70;
- else if (value & GFX_MODE_72HZ)
- hz = 72;
- else if (value & GFX_MODE_75HZ)
- hz = 75;
- else if (value & GFX_MODE_85HZ)
- hz = 85;
- else if (value & GFX_MODE_90HZ)
- hz = 90;
- else if (value & GFX_MODE_100HZ)
- hz = 100;
- return (hz);
- }
- }
-
- return (-1);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_refreshrate_from_frequency
- *
- * This routine maps the frequency to close match refresh rate
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz,
- unsigned long frequency)
-#else
-int
-gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz,
- unsigned long frequency)
-#endif
-{
- unsigned int index, closematch = 0;
- unsigned long value;
- unsigned long bpp_flag = 0;
- long min, diff;
-
- *hz = 60;
-
- gfx_mode_bpp_conversion_def(bpp)
-
- /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */
- /* Search the table for the closest frequency (16.16 format). */
- min = 0x7fffffff;
- for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) {
- if ((DisplayParams[index].htotal == (unsigned int)xres) &&
- (DisplayParams[index].vtotal == (unsigned int)yres) &&
- (DisplayParams[index].flags & bpp_flag)) {
- diff = (long)frequency - (long)DisplayParams[index].frequency;
- if (diff < 0)
- diff = -diff;
-
- if (diff < min) {
- min = diff;
- closematch = index;
- }
- }
- }
-
- value = DisplayParams[closematch].flags;
-
- if (value & GFX_MODE_56HZ)
- *hz = 56;
- else if (value & GFX_MODE_60HZ)
- *hz = 60;
- else if (value & GFX_MODE_70HZ)
- *hz = 70;
- else if (value & GFX_MODE_72HZ)
- *hz = 72;
- else if (value & GFX_MODE_75HZ)
- *hz = 75;
- else if (value & GFX_MODE_85HZ)
- *hz = 85;
- else if (value & GFX_MODE_90HZ)
- *hz = 90;
- else if (value & GFX_MODE_100HZ)
- *hz = 100;
-
- return (1);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_refreshrate_from_mode
- *
- * This routine is identical to the gfx_get_refreshrate_from_frequency,
- * except that the active timing values are compared instead of the total
- * values. Some modes (such as 70Hz and 72Hz) may be confused in this routine
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
- unsigned long frequency)
-#else
-int
-gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
- unsigned long frequency)
-#endif
-{
- unsigned int index, closematch = 0;
- unsigned long value;
- unsigned long bpp_flag = 0;
- long min, diff;
-
- *hz = 60;
-
- gfx_mode_bpp_conversion_def(bpp)
-
- /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */
- /* Search the table for the closest frequency (16.16 format). */
- min = 0x7fffffff;
- for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) {
- if ((DisplayParams[index].hactive == (unsigned int)xres) &&
- (DisplayParams[index].vactive == (unsigned int)yres) &&
- (DisplayParams[index].flags & bpp_flag)) {
- diff = (long)frequency - (long)DisplayParams[index].frequency;
- if (diff < 0)
- diff = -diff;
-
- if (diff < min) {
- min = diff;
- closematch = index;
- }
- }
- }
-
- value = DisplayParams[closematch].flags;
-
- if (value & GFX_MODE_56HZ)
- *hz = 56;
- else if (value & GFX_MODE_60HZ)
- *hz = 60;
- else if (value & GFX_MODE_70HZ)
- *hz = 70;
- else if (value & GFX_MODE_72HZ)
- *hz = 72;
- else if (value & GFX_MODE_75HZ)
- *hz = 75;
- else if (value & GFX_MODE_85HZ)
- *hz = 85;
- else if (value & GFX_MODE_90HZ)
- *hz = 90;
- else if (value & GFX_MODE_100HZ)
- *hz = 100;
-
- return (1);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_frequency_from_refreshrate
- *
- * This routine maps the refresh rate to the closest matching PLL frequency.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
- int *frequency)
-#else
-int
-gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
- int *frequency)
-#endif
-{
- unsigned int index;
- int retval = -1;
- unsigned long hz_flag = 0;
- unsigned long bpp_flag = 0;
-
- *frequency = 0;
-
- gfx_mode_hz_conversion gfx_mode_bpp_conversion_def(bpp)
-
- /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */
- /* Search the table for the closest frequency (16.16 format). */
- for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) {
- if ((DisplayParams[index].hactive == (unsigned short)xres) &&
- (DisplayParams[index].vactive == (unsigned short)yres) &&
- (DisplayParams[index].flags & bpp_flag) &&
- (DisplayParams[index].flags & hz_flag)) {
- *frequency = (int)DisplayParams[index].frequency;
- retval = 1;
- }
- }
- return retval;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_max_supported_pixel_clock
- *
- * This routine returns the maximum recommended speed for the pixel clock. The
- * return value is an integer of the format xxxyyy, where xxx.yyy is the
- * maximum floating point pixel clock speed.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_max_supported_pixel_clock(void)
-#else
-unsigned long
-gfx_get_max_supported_pixel_clock(void)
-#endif
-{
- return 229500;
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_display_mode
- *
- * This routine gets the specified display mode.
- *
- * Returns >0 if successful and mode returned, <0 if mode could not be found.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_display_mode(int *xres, int *yres, int *bpp, int *hz)
-#else
-int
-gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz)
-#endif
-{
- unsigned int mode = 0;
- unsigned long pll_freq = 0, bpp_flag = 0;
-
- *xres = gfx_get_hactive();
- *yres = gfx_get_vactive();
- *bpp = gfx_get_display_bpp();
- pll_freq = gfx_get_clock_frequency();
-
- /* SET BPP FLAGS TO LIMIT MODE SELECTION */
- gfx_mode_bpp_conversion_def(bpp)
-
- for (mode = 0; mode < NUM_RC_DISPLAY_MODES; mode++) {
- if ((DisplayParams[mode].hactive == (unsigned int)*xres) &&
- (DisplayParams[mode].vactive == (unsigned int)*yres) &&
- (DisplayParams[mode].frequency == pll_freq) &&
- (DisplayParams[mode].flags & bpp_flag)) {
-
- pll_freq = DisplayParams[mode].flags;
-
- if (pll_freq & GFX_MODE_56HZ)
- *hz = 56;
- else if (pll_freq & GFX_MODE_60HZ)
- *hz = 60;
- else if (pll_freq & GFX_MODE_70HZ)
- *hz = 70;
- else if (pll_freq & GFX_MODE_72HZ)
- *hz = 72;
- else if (pll_freq & GFX_MODE_75HZ)
- *hz = 75;
- else if (pll_freq & GFX_MODE_85HZ)
- *hz = 85;
- else if (pll_freq & GFX_MODE_90HZ)
- *hz = 90;
- else if (pll_freq & GFX_MODE_100HZ)
- *hz = 100;
-
- return (1);
- }
- }
- return (-1);
-}
-
-/*----------------------------------------------------------------------------
- * GFX_GET_DISPLAY_DETAILS
- *
- * This routine gets the specified display mode.
- *
- * Returns 1 if successful, 0 if mode could not be get.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_display_details(unsigned int mode, int *xres, int *yres, int *hz)
-#else
-int
-gfx_get_display_details(unsigned int mode, int *xres, int *yres, int *hz)
-#endif
-{
- if (mode < NUM_RC_DISPLAY_MODES) {
- if (DisplayParams[mode].flags & GFX_MODE_56HZ)
- *hz = 56;
- else if (DisplayParams[mode].flags & GFX_MODE_60HZ)
- *hz = 60;
- else if (DisplayParams[mode].flags & GFX_MODE_70HZ)
- *hz = 70;
- else if (DisplayParams[mode].flags & GFX_MODE_72HZ)
- *hz = 72;
- else if (DisplayParams[mode].flags & GFX_MODE_75HZ)
- *hz = 75;
- else if (DisplayParams[mode].flags & GFX_MODE_85HZ)
- *hz = 85;
- else if (DisplayParams[mode].flags & GFX_MODE_90HZ)
- *hz = 90;
- else if (DisplayParams[mode].flags & GFX_MODE_100HZ)
- *hz = 100;
-
- *xres = DisplayParams[mode].hactive;
- *yres = DisplayParams[mode].vactive;
-
- if (DisplayParams[mode].flags & GFX_MODE_PIXEL_DOUBLE)
- *xres >>= 1;
- if (DisplayParams[mode].flags & GFX_MODE_LINE_DOUBLE)
- *yres >>= 1;
-
- return (1);
- }
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * GFX_GET_DISPLAY_MODE_COUNT
- *
- * This routine gets the number of available display modes.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_display_mode_count(void)
-#else
-int
-gfx_get_display_mode_count(void)
-#endif
-{
- return (NUM_RC_DISPLAY_MODES);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_frame_buffer_line_size
- *
- * Returns the current frame buffer line size, in bytes
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_frame_buffer_line_size(void)
-#else
-unsigned long
-gfx_get_frame_buffer_line_size(void)
-#endif
-{
- return ((READ_REG32(DC3_LINE_SIZE) & 0x3FF) << 3);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_hactive
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_hactive(void)
-#else
-unsigned short
-gfx_get_hactive(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_H_ACTIVE_TIMING) & 0x0FF8) + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_hsync_start
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_hsync_start(void)
-#else
-unsigned short
-gfx_get_hsync_start(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_H_SYNC_TIMING) & 0x0FF8) + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_hsync_end
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_hsync_end(void)
-#else
-unsigned short
-gfx_get_hsync_end(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_H_SYNC_TIMING) >> 16) & 0x0FF8)
- + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_htotal
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_htotal(void)
-#else
-unsigned short
-gfx_get_htotal(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_H_ACTIVE_TIMING) >> 16) &
- 0x0FF8) + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vactive
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vactive(void)
-#else
-unsigned short
-gfx_get_vactive(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_V_ACTIVE_TIMING) & 0x07FF) + 1));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vsync_end
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vsync_end(void)
-#else
-unsigned short
-gfx_get_vsync_end(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_V_SYNC_TIMING) >> 16) & 0x07FF)
- + 1));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vtotal
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vtotal(void)
-#else
-unsigned short
-gfx_get_vtotal(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_V_ACTIVE_TIMING) >> 16) &
- 0x07FF) + 1));
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_display_bpp
- *
- * This routine returns the current color depth of the active display.
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_display_bpp(void)
-#else
-unsigned short
-gfx_get_display_bpp(void)
-#endif
-{
- unsigned long dcfg = READ_REG32(DC3_DISPLAY_CFG);
-
- switch ((dcfg & DC3_DCFG_DISP_MODE_MASK) >> 8) {
- case 0:
- return (8);
- case 2:
- return (32);
-
- case 1:
-
- switch ((dcfg & DC3_DCFG_16BPP_MODE_MASK) >> 10) {
- case 0:
- return (16);
- case 1:
- return (15);
- case 2:
- return (12);
- default:
- return (0);
- }
- }
-
- /* INVALID SETTING */
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vline
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vline(void)
-#else
-unsigned short
-gfx_get_vline(void)
-#endif
-{
- unsigned long current_scan_line;
-
- /* Read similar value twice to ensure that the value is not transitioning
- * */
-
- do
- current_scan_line =
- (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_V_LINE_CNT);
- while (current_scan_line !=
- (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_V_LINE_CNT));
-
- return ((unsigned short)(current_scan_line >> 16));
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_display_offset
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_display_offset(void)
-#else
-unsigned long
-gfx_get_display_offset(void)
-#endif
-{
- return (READ_REG32(DC3_FB_ST_OFFSET) & 0x0FFFFFFF);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cursor_offset
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_cursor_offset(void)
-#else
-unsigned long
-gfx_get_cursor_offset(void)
-#endif
-{
- return (READ_REG32(DC3_CURS_ST_OFFSET) & 0x0FFFFFFF);
-}
-
-#if GFX_READ_ROUTINES
-
-/*************************************************************/
-/* READ ROUTINES | INCLUDED FOR DIAGNOSTIC PURPOSES ONLY */
-/*************************************************************/
-
-/*---------------------------------------------------------------------------
- * gfx_get_hblank_start
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_hblank_start(void)
-#else
-unsigned short
-gfx_get_hblank_start(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_H_BLANK_TIMING) & 0x0FF8) + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_hblank_end
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_hblank_end(void)
-#else
-unsigned short
-gfx_get_hblank_end(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_H_BLANK_TIMING) >> 16) & 0x0FF8)
- + 8));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vblank_start
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vblank_start(void)
-#else
-unsigned short
-gfx_get_vblank_start(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_V_BLANK_TIMING) & 0x07FF) + 1));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vsync_start
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vsync_start(void)
-#else
-unsigned short
-gfx_get_vsync_start(void)
-#endif
-{
- return ((unsigned short)((READ_REG32(DC3_V_SYNC_TIMING) & 0x07FF) + 1));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_vblank_end
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_vblank_end(void)
-#else
-unsigned short
-gfx_get_vblank_end(void)
-#endif
-{
- return ((unsigned short)(((READ_REG32(DC3_V_BLANK_TIMING) >> 16) & 0x07FF)
- + 1));
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_display_palette_entry
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_display_palette_entry(unsigned long index, unsigned long *palette)
-#else
-int
-gfx_get_display_palette_entry(unsigned long index, unsigned long *palette)
-#endif
-{
- if (index > 0xFF)
- return GFX_STATUS_BAD_PARAMETER;
-
- WRITE_REG32(DC3_PAL_ADDRESS, index);
- *palette = READ_REG32(DC3_PAL_DATA);
-
- return 0;
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_display_palette
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_get_display_palette(unsigned long *palette)
-#else
-void
-gfx_get_display_palette(unsigned long *palette)
-#endif
-{
- unsigned long i;
-
- WRITE_REG32(DC3_PAL_ADDRESS, 0);
- for (i = 0; i < 256; i++) {
- palette[i] = READ_REG32(DC3_PAL_DATA);
- }
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cursor_enable
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_cursor_enable(void)
-#else
-unsigned long
-gfx_get_cursor_enable(void)
-#endif
-{
- return (READ_REG32(DC3_GENERAL_CFG) & DC3_GCFG_CURE);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cursor_position
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_cursor_position(void)
-#else
-unsigned long
-gfx_get_cursor_position(void)
-#endif
-{
- return ((READ_REG32(DC3_CURSOR_X) & 0x07FF) |
- ((READ_REG32(DC3_CURSOR_Y) << 16) & 0x07FF0000));
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cursor_offset
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_cursor_clip(void)
-#else
-unsigned long
-gfx_get_cursor_clip(void)
-#endif
-{
- return (((READ_REG32(DC3_CURSOR_X) >> 11) & 0x03F) |
- ((READ_REG32(DC3_CURSOR_Y) << 5) & 0x3F0000));
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cursor_color
- *---------------------------------------------------------------------------- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_cursor_color(int color)
-#else
-unsigned long
-gfx_get_cursor_color(int color)
-#endif
-{
- if (color) {
- WRITE_REG32(DC3_PAL_ADDRESS, 0x101);
- } else {
- WRITE_REG32(DC3_PAL_ADDRESS, 0x100);
- }
- return READ_REG32(DC3_PAL_DATA);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_compression_enable
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_compression_enable(void)
-#else
-int
-gfx_get_compression_enable(void)
-#endif
-{
- if (READ_REG32(DC3_GENERAL_CFG) & DC3_GCFG_CMPE)
- return (1);
-
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_compression_offset
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_compression_offset(void)
-#else
-unsigned long
-gfx_get_compression_offset(void)
-#endif
-{
- return (READ_REG32(DC3_CB_ST_OFFSET) & 0x007FFFFF);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_compression_pitch
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_compression_pitch(void)
-#else
-unsigned short
-gfx_get_compression_pitch(void)
-#endif
-{
- unsigned short pitch;
-
- pitch = (unsigned short)(READ_REG32(DC3_GFX_PITCH) >> 16);
- return (pitch << 3);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_compression_size
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned short
-gu3_get_compression_size(void)
-#else
-unsigned short
-gfx_get_compression_size(void)
-#endif
-{
- unsigned short size;
-
- size =
- (unsigned short)((READ_REG32(DC3_LINE_SIZE) >> DC3_LINE_SIZE_CB_SHIFT)
- & 0x7F) - 1;
- return ((size << 3) + 32);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_valid_bit
- *----------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-int
-gu3_get_valid_bit(int line)
-#else
-int
-gfx_get_valid_bit(int line)
-#endif
-{
- unsigned long lock;
- unsigned long offset;
- int valid;
-
- lock = READ_REG32(DC3_UNLOCK);
- offset = READ_REG32(DC3_PHY_MEM_OFFSET) & 0xFF000000;
- offset |= line;
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_PHY_MEM_OFFSET, offset);
- WRITE_REG32(DC3_UNLOCK, lock);
- valid = (int)READ_REG32(DC3_DV_ACC) & 2;
-
- if (valid)
- return 1;
- return 0;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_offset (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_offset". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_display_video_offset(void)
-#else
-unsigned long
-gfx_get_display_video_offset(void)
-#endif
-{
- return (READ_REG32(DC3_VID_Y_ST_OFFSET) & 0x0FFFFFFF);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_yuv_offsets (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_yuv_offsets". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_get_display_video_yuv_offsets(unsigned long *yoffset,
- unsigned long *uoffset, unsigned long *voffset)
-#else
-void
-gfx_get_display_video_yuv_offsets(unsigned long *yoffset,
- unsigned long *uoffset, unsigned long *voffset)
-#endif
-{
- *yoffset = (READ_REG32(DC3_VID_Y_ST_OFFSET) & 0x0FFFFFFF);
- *uoffset = (READ_REG32(DC3_VID_U_ST_OFFSET) & 0x0FFFFFFF);
- *voffset = (READ_REG32(DC3_VID_V_ST_OFFSET) & 0x0FFFFFFF);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_yuv_pitch (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_yuv_pitch". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-void
-gu3_get_display_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
-#else
-void
-gfx_get_display_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
-#endif
-{
- unsigned long pitch = READ_REG32(DC3_VID_YUV_PITCH);
-
- *ypitch = ((pitch & 0xFFFF) << 3);
- *uvpitch = (pitch >> 13) & 0x7FFF8;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_size (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_size". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_display_video_size(void)
-#else
-unsigned long
-gfx_get_display_video_size(void)
-#endif
-{
- /* RETURN THE LINE SIZE, AS THIS IS ALL THAT IS AVAILABLE */
- /* Shift by three less to effect a multiply by 8. */
-
- return ((READ_REG32(DC3_LINE_SIZE) & DC3_LINE_SIZE_VLS_MASK) >>
- (DC3_LINE_SIZE_VB_SHIFT - 3));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_color_key (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_color_key". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_display_video_color_key(void)
-#else
-unsigned long
-gfx_get_display_video_color_key(void)
-#endif
-{
- return (READ_REG32(DC3_COLOR_KEY) & 0xFFFFFF);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_display_video_color_key_mask (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_get_video_color_key_mask". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-#if GFX_DISPLAY_DYNAMIC
-unsigned long
-gu3_get_display_video_color_key_mask(void)
-#else
-unsigned long
-gfx_get_display_video_color_key_mask(void)
-#endif
-{
- return (READ_REG32(DC3_COLOR_MASK) & 0xFFFFFF);
-}
-
-#endif /* GFX_READ_ROUTINES */
-
-/* END OF FILE */
diff --git a/src/gfx/durango.c b/src/gfx/durango.c
index 47c72d8..5f96ff1 100644
--- a/src/gfx/durango.c
+++ b/src/gfx/durango.c
@@ -51,13 +51,10 @@
#define GFX_DISPLAY_DYNAMIC 1 /* runtime selection */
#define GFX_DISPLAY_GU1 1 /* 1st generation display controller */
#define GFX_DISPLAY_GU2 1 /* 2nd generation display controller */
-#define GFX_DISPLAY_GU3 1 /* 3rd generation display controller */
#define GFX_INIT_DYNAMIC 1 /* runtime selection */
#define GFX_INIT_GU1 1 /* Geode family */
#define GFX_INIT_GU2 1 /* Redcloud */
-#define GFX_INIT_GU3 1 /* Castle */
-
#define GFX_MSR_DYNAMIC 1 /* runtime selection */
#define GFX_MSR_REDCLOUD 1 /* Redcloud */
@@ -69,7 +66,6 @@
#define GFX_VIDEO_CS5530 1 /* support for CS5530 */
#define GFX_VIDEO_SC1200 1 /* support for SC1200 */
#define GFX_VIDEO_REDCLOUD 1 /* support for Redcloud */
-#define GFX_VIDEO_CASTLE 1 /* support for Castle */
#define GFX_VIP_DYNAMIC 1 /* runtime selection */
#define GFX_VIP_SC1200 1 /* support for SC1200 */
diff --git a/src/gfx/gfx_disp.c b/src/gfx/gfx_disp.c
index 035cbab..6d32a35 100644
--- a/src/gfx/gfx_disp.c
+++ b/src/gfx/gfx_disp.c
@@ -856,10 +856,6 @@ FIXEDTIMINGS FixedParams[] = {
#include "disp_gu2.c"
#endif
-#if GFX_DISPLAY_GU3
-#include "disp_gu3.c"
-#endif
-
/*---------------------------------------------------------------------------
* gfx_reset_timing_lock
*
@@ -895,10 +891,6 @@ gfx_set_display_bpp(unsigned short bpp)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_set_display_bpp(bpp);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_set_display_bpp(bpp);
-#endif
return (retval);
}
@@ -921,10 +913,6 @@ gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_is_display_mode_supported(xres, yres, bpp, hz);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_is_display_mode_supported(xres, yres, bpp, hz);
-#endif
return (retval);
}
@@ -945,10 +933,6 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_set_display_mode(xres, yres, bpp, hz);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_set_display_mode(xres, yres, bpp, hz);
-#endif
return (retval);
}
@@ -981,13 +965,6 @@ gfx_set_display_timings(unsigned short bpp, unsigned short flags,
vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal,
frequency);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_set_display_timings(bpp, flags,
- hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal,
- vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal,
- frequency);
-#endif
return (retval);
}
@@ -1006,10 +983,6 @@ gfx_set_display_pitch(unsigned short pitch)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_pitch(pitch);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_pitch(pitch);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1027,10 +1000,6 @@ gfx_set_display_offset(unsigned long offset)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_offset(offset);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_offset(offset);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1050,10 +1019,6 @@ gfx_set_display_palette_entry(unsigned long index, unsigned long palette)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_display_palette_entry(index, palette);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_display_palette_entry(index, palette);
-#endif
return (status);
}
@@ -1074,10 +1039,6 @@ gfx_set_display_palette(unsigned long *palette)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_display_palette(palette);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_display_palette(palette);
-#endif
return (status);
}
@@ -1096,10 +1057,6 @@ gfx_set_cursor_enable(int enable)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_cursor_enable(enable);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_cursor_enable(enable);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1117,10 +1074,6 @@ gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_cursor_colors(bkcolor, fgcolor);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_cursor_colors(bkcolor, fgcolor);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1140,10 +1093,6 @@ gfx_set_cursor_position(unsigned long memoffset,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_cursor_position(memoffset, xpos, ypos, xhotspot, yhotspot);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_cursor_position(memoffset, xpos, ypos, xhotspot, yhotspot);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1162,10 +1111,6 @@ gfx_set_cursor_shape32(unsigned long memoffset,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_cursor_shape32(memoffset, andmask, xormask);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_cursor_shape32(memoffset, andmask, xormask);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1180,10 +1125,6 @@ gfx_set_cursor_shape64(unsigned long memoffset,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_cursor_shape64(memoffset, andmask, xormask);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_cursor_shape64(memoffset, andmask, xormask);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1257,10 +1198,6 @@ gfx_set_compression_enable(int enable)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_compression_enable(enable);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_compression_enable(enable);
-#endif
return (status);
}
@@ -1281,10 +1218,6 @@ gfx_set_compression_offset(unsigned long offset)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_compression_offset(offset);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_compression_offset(offset);
-#endif
return (status);
}
@@ -1305,10 +1238,6 @@ gfx_set_compression_pitch(unsigned short pitch)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_compression_pitch(pitch);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_compression_pitch(pitch);
-#endif
return (status);
}
@@ -1329,10 +1258,6 @@ gfx_set_compression_size(unsigned short size)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_set_compression_size(size);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_set_compression_size(size);
-#endif
return (status);
}
@@ -1363,27 +1288,6 @@ gfx_set_display_video_format(unsigned long format)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_format(format);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_format(format);
-#endif
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_display_video_color_key (PRIVATE ROUTINE - NOT PART OF API)
- *
- * This routine is called by "gfx_set_video_color_key". It abstracts the
- * version of the display controller from the video overlay routines.
- *---------------------------------------------------------------------------
- */
-void
-gfx_set_display_video_color_key(unsigned long key, unsigned long mask,
- int enable)
-{
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_color_key(key, mask, enable);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1404,10 +1308,6 @@ gfx_set_display_video_enable(int enable)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_enable(enable);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_enable(enable);
-#endif
return;
}
@@ -1429,10 +1329,6 @@ gfx_set_display_video_size(unsigned short width, unsigned short height)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_size(width, height);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_size(width, height);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1453,10 +1349,6 @@ gfx_set_display_video_offset(unsigned long offset)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_offset(offset);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_offset(offset);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1474,10 +1366,6 @@ gfx_set_display_video_yuv_offsets(unsigned long yoffset,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_yuv_offsets(yoffset, uoffset, voffset);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_yuv_offsets(yoffset, uoffset, voffset);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1494,10 +1382,6 @@ gfx_set_display_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_set_display_video_yuv_pitch(ypitch, uvpitch);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_set_display_video_yuv_pitch(ypitch, uvpitch);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1549,10 +1433,6 @@ gfx_test_timing_active(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_test_timing_active();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_test_timing_active();
-#endif
return (status);
}
@@ -1573,10 +1453,6 @@ gfx_test_vertical_active(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_test_vertical_active();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_test_vertical_active();
-#endif
return (status);
}
@@ -1597,10 +1473,6 @@ gfx_wait_vertical_blank(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_wait_vertical_blank();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_wait_vertical_blank();
-#endif
return (status);
}
@@ -1619,10 +1491,6 @@ gfx_delay_milliseconds(unsigned long milliseconds)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_delay_milliseconds(milliseconds);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_delay_milliseconds(milliseconds);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1640,10 +1508,6 @@ gfx_delay_microseconds(unsigned long microseconds)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_delay_microseconds(microseconds);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_delay_microseconds(microseconds);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1664,10 +1528,6 @@ gfx_enable_panning(int x, int y)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_enable_panning(x, y);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_enable_panning(x, y);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1710,11 +1570,6 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width,
status =
gu2_set_fixed_timings(panelResX, panelResY, width, height, bpp);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status =
- gu3_set_fixed_timings(panelResX, panelResY, width, height, bpp);
-#endif
return (status);
}
@@ -1738,11 +1593,6 @@ gfx_set_panel_present(int panelResX, int panelResY, unsigned short width,
status =
gu2_set_panel_present(panelResX, panelResY, width, height, bpp);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status =
- gu3_set_panel_present(panelResX, panelResY, width, height, bpp);
-#endif
return (status);
}
@@ -1763,10 +1613,6 @@ gfx_set_vtotal(unsigned short vtotal)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_set_vtotal(vtotal);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_set_vtotal(vtotal);
-#endif
return (retval);
}
@@ -1799,10 +1645,6 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
freq = gu2_mode_frequency_supported(xres, yres, bpp, frequency);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- freq = gu3_mode_frequency_supported(xres, yres, bpp, frequency);
-#endif
return (freq);
}
@@ -1822,10 +1664,6 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_get_refreshrate_from_frequency(xres, yres, bpp, hz, frequency);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_get_refreshrate_from_frequency(xres, yres, bpp, hz, frequency);
-#endif
return (1);
}
@@ -1846,10 +1684,6 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_get_refreshrate_from_mode(xres, yres, bpp, hz, frequency);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_get_refreshrate_from_mode(xres, yres, bpp, hz, frequency);
-#endif
return (1);
}
@@ -1876,12 +1710,6 @@ gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
gu2_get_frequency_from_refreshrate(xres, yres, bpp, hz,
frequency);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval =
- gu3_get_frequency_from_refreshrate(xres, yres, bpp, hz,
- frequency);
-#endif
return retval;
}
@@ -1903,10 +1731,6 @@ gfx_get_max_supported_pixel_clock(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_get_max_supported_pixel_clock();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_get_max_supported_pixel_clock();
-#endif
return (status);
}
@@ -1927,10 +1751,6 @@ gfx_get_display_pitch(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
pitch = gu2_get_display_pitch();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- pitch = gu3_get_display_pitch();
-#endif
return (pitch);
}
@@ -1952,10 +1772,6 @@ gfx_get_display_mode_count(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_get_display_mode_count();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_get_display_mode_count();
-#endif
return (retval);
}
@@ -1976,10 +1792,6 @@ gfx_get_frame_buffer_line_size(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_get_frame_buffer_line_size();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_get_frame_buffer_line_size();
-#endif
return (retval);
}
@@ -2002,10 +1814,6 @@ gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_get_display_mode(xres, yres, bpp, hz);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_get_display_mode(xres, yres, bpp, hz);
-#endif
return (retval);
}
@@ -2027,10 +1835,6 @@ gfx_get_display_details(unsigned int mode, int *xres, int *yres, int *hz)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
retval = gu2_get_display_details(mode, xres, yres, hz);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- retval = gu3_get_display_details(mode, xres, yres, hz);
-#endif
return (retval);
}
@@ -2051,10 +1855,6 @@ gfx_get_hactive(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
hactive = gu2_get_hactive();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- hactive = gu3_get_hactive();
-#endif
return (hactive);
}
@@ -2075,10 +1875,6 @@ gfx_get_hsync_start(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
hsync_start = gu2_get_hsync_start();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- hsync_start = gu3_get_hsync_start();
-#endif
return (hsync_start);
}
@@ -2099,10 +1895,6 @@ gfx_get_hsync_end(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
hsync_end = gu2_get_hsync_end();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- hsync_end = gu3_get_hsync_end();
-#endif
return (hsync_end);
}
@@ -2123,10 +1915,6 @@ gfx_get_htotal(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
htotal = gu2_get_htotal();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- htotal = gu3_get_htotal();
-#endif
return (htotal);
}
@@ -2147,10 +1935,6 @@ gfx_get_vactive(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vactive = gu2_get_vactive();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vactive = gu3_get_vactive();
-#endif
return (vactive);
}
@@ -2171,10 +1955,6 @@ gfx_get_vsync_end(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vsync_end = gu2_get_vsync_end();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vsync_end = gu3_get_vsync_end();
-#endif
return (vsync_end);
}
@@ -2195,10 +1975,6 @@ gfx_get_vtotal(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vtotal = gu2_get_vtotal();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vtotal = gu3_get_vtotal();
-#endif
return (vtotal);
}
@@ -2219,10 +1995,6 @@ gfx_get_display_bpp(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
bpp = gu2_get_display_bpp();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- bpp = gu3_get_display_bpp();
-#endif
return (bpp);
}
@@ -2243,10 +2015,6 @@ gfx_get_vline(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vline = gu2_get_vline();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vline = gu3_get_vline();
-#endif
return (vline);
}
@@ -2267,10 +2035,6 @@ gfx_get_display_offset(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
offset = gu2_get_display_offset();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- offset = gu3_get_display_offset();
-#endif
return (offset);
}
@@ -2291,10 +2055,6 @@ gfx_get_cursor_offset(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
base = gu2_get_cursor_offset();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- base = gu3_get_cursor_offset();
-#endif
return (base);
}
@@ -2321,10 +2081,6 @@ gfx_get_hblank_start(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
hblank_start = gu2_get_hblank_start();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- hblank_start = gu3_get_hblank_start();
-#endif
return (hblank_start);
}
@@ -2345,10 +2101,6 @@ gfx_get_hblank_end(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
hblank_end = gu2_get_hblank_end();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- hblank_end = gu3_get_hblank_end();
-#endif
return (hblank_end);
}
@@ -2369,10 +2121,6 @@ gfx_get_vblank_start(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vblank_start = gu2_get_vblank_start();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vblank_start = gu3_get_vblank_start();
-#endif
return (vblank_start);
}
@@ -2393,10 +2141,6 @@ gfx_get_vsync_start(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vsync_start = gu2_get_vsync_start();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vsync_start = gu3_get_vsync_start();
-#endif
return (vsync_start);
}
@@ -2417,10 +2161,6 @@ gfx_get_vblank_end(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
vblank_end = gu2_get_vblank_end();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- vblank_end = gu3_get_vblank_end();
-#endif
return (vblank_end);
}
@@ -2441,10 +2181,6 @@ gfx_get_display_palette_entry(unsigned long index, unsigned long *palette)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
status = gu2_get_display_palette_entry(index, palette);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- status = gu3_get_display_palette_entry(index, palette);
-#endif
return status;
}
@@ -2464,10 +2200,6 @@ gfx_get_display_palette(unsigned long *palette)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_get_display_palette(palette);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_get_display_palette(palette);
-#endif
}
/*---------------------------------------------------------------------------
@@ -2487,10 +2219,6 @@ gfx_get_cursor_enable(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
enable = gu2_get_cursor_enable();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- enable = gu3_get_cursor_enable();
-#endif
return (enable);
}
@@ -2511,10 +2239,6 @@ gfx_get_cursor_position(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
position = gu2_get_cursor_position();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- position = gu3_get_cursor_position();
-#endif
return (position);
}
@@ -2535,10 +2259,6 @@ gfx_get_cursor_clip(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
offset = gu2_get_cursor_clip();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- offset = gu3_get_cursor_clip();
-#endif
return (offset);
}
@@ -2559,10 +2279,6 @@ gfx_get_cursor_color(int index)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
color = gu2_get_cursor_color(index);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- color = gu3_get_cursor_color(index);
-#endif
return (color);
}
@@ -2650,10 +2366,6 @@ gfx_get_compression_enable(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
enable = gu2_get_compression_enable();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- enable = gu3_get_compression_enable();
-#endif
return (enable);
}
@@ -2674,10 +2386,6 @@ gfx_get_compression_offset(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
offset = gu2_get_compression_offset();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- offset = gu3_get_compression_offset();
-#endif
return (offset);
}
@@ -2698,10 +2406,6 @@ gfx_get_compression_pitch(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
pitch = gu2_get_compression_pitch();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- pitch = gu3_get_compression_pitch();
-#endif
return (pitch);
}
@@ -2722,10 +2426,6 @@ gfx_get_compression_size(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
size = gu2_get_compression_size();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- size = gu3_get_compression_size();
-#endif
return (size);
}
@@ -2762,10 +2462,6 @@ gfx_get_valid_bit(int line)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
valid = gu2_get_valid_bit(line);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- valid = gu3_get_valid_bit(line);
-#endif
return (valid);
}
@@ -2777,11 +2473,6 @@ unsigned long
gfx_get_display_video_color_key(void)
{
unsigned long value = 0;
-
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- value = gu3_get_display_video_color_key();
-#endif
return (value);
}
@@ -2802,10 +2493,6 @@ gfx_get_display_video_offset(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
offset = gu2_get_display_video_offset();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- offset = gu3_get_display_video_offset();
-#endif
return (offset);
}
@@ -2821,10 +2508,6 @@ gfx_get_display_video_yuv_offsets(unsigned long *yoffset,
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_get_display_video_yuv_offsets(yoffset, uoffset, voffset);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_get_display_video_yuv_offsets(yoffset, uoffset, voffset);
-#endif
}
/*---------------------------------------------------------------------------
@@ -2838,10 +2521,6 @@ gfx_get_display_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
gu2_get_display_video_yuv_pitch(ypitch, uvpitch);
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- gu3_get_display_video_yuv_pitch(ypitch, uvpitch);
-#endif
}
/*---------------------------------------------------------------------------
@@ -2895,10 +2574,6 @@ gfx_get_display_video_size(void)
if (gfx_display_type & GFX_DISPLAY_TYPE_GU2)
size = gu2_get_display_video_size();
#endif
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- size = gu3_get_display_video_size();
-#endif
return (size);
}
@@ -2910,16 +2585,9 @@ unsigned long
gfx_get_display_video_color_key_mask(void)
{
unsigned long mask = 0;
-
-#if GFX_DISPLAY_GU3
- if (gfx_display_type & GFX_DISPLAY_TYPE_GU3)
- mask = gu3_get_display_video_color_key_mask();
-#endif
return (mask);
}
#endif /* GFX_READ_ROUTINES */
#endif /* GFX_DISPLAY_DYNAMIC */
-
-/* END OF FILE */
diff --git a/src/gfx/gfx_init.c b/src/gfx/gfx_init.c
index 73a8c80..469c70f 100644
--- a/src/gfx/gfx_init.c
+++ b/src/gfx/gfx_init.c
@@ -46,8 +46,6 @@
#define PCI_VENDOR_DEVICE_GXM 0x00011078
#define PCI_VENDOR_DEVICE_REDCLOUD 0x0028100B
#define REDCLOUD_VIDEO_PCI_VENDOR_DEVICE 0x0030100B
-#define PCI_VENDOR_DEVICE_CASTLE 0x20801022
-#define CASTLE_VIDEO_PCI_VENDOR_DEVICE 0x20811022
#define GXM_CONFIG_GCR 0xB8
#define GXM_CONFIG_CCR3 0xC3
@@ -78,12 +76,6 @@ ChipType gfx_detect_chip(void);
#include "init_gu2.c"
#endif
-/* INCLUDE SUPPORT FOR THIRD GENERATION, IF SPECIFIED. */
-
-#if GFX_INIT_GU3
-#include "init_gu3.c"
-#endif
-
/* THE FOLLOWING ROUTINES ARE NEVER DYNAMIC */
/* They are used to set the variables for future dynamic */
/* function calls. */
@@ -364,8 +356,12 @@ gfx_detect_cpu(void)
((msr_value.low & 0x0F) << 16); /* MINOR */
/* READ THE CORE FREQUENCY */
+ /* I can't find GX implementations that need
+ * this - we're trying to avoid virtual reads
+ * anyway, so bail on it
+ */
- gfx_cpu_frequency = gfx_get_core_freq();
+ /* gfx_cpu_frequency = gfx_get_core_freq(); */
/* SET THE GP SCRATCH AREA */
/* Color bitmap BLTs use the last 16K of frame buffer space */
@@ -374,100 +370,7 @@ gfx_detect_cpu(void)
}
}
}
-#endif
-
-#if GFX_INIT_GU3
-
- value = gfx_pci_config_read(0x80000800);
-
- if (value == PCI_VENDOR_DEVICE_CASTLE) {
- Q_WORD msr_value;
- int valid, i;
-
- /* CHECK FOR SOFT VG */
- /* If SoftVG is not present, the base addresses for all devices */
-
- /* will not be allocated. Essentially, it is as if no Redcloud */
- /* video hardware is present. */
-
- value = gfx_pci_config_read(0x80000900);
-
- if (value == CASTLE_VIDEO_PCI_VENDOR_DEVICE) {
- valid = 1;
-
- /* BAR0 - BAR3 HOLD THE PERIPHERAL BASE ADDRESSES */
-
- for (i = 0; i < 4; i++) {
- value = gfx_pci_config_read(0x80000910 + (i << 2));
- if (value == 0x00000000 || value == 0xFFFFFFFF) {
- valid = 0;
- break;
- }
- }
-
- if (valid) {
- /* REDCLOUD INTEGRATED VIDEO */
-
-#if GFX_VIDEO_DYNAMIC
- gfx_video_type = GFX_VIDEO_TYPE_CASTLE;
-#endif
-
- /* CURRENTLY, ALWAYS GPIO FOR I2C ACCESS */
-
-#if GFX_I2C_DYNAMIC
- gfx_i2c_type = GFX_I2C_TYPE_GPIO;
-#endif
-
- /* THIRD-GENERATION DISPLAY CONTROLLER */
-
-#if GFX_DISPLAY_DYNAMIC
- gfx_display_type = GFX_DISPLAY_TYPE_GU3;
-#endif
-
- /* SECOND-GENERATION GRAPHICS UNIT */
-
-#if GFX_2DACCEL_DYNAMIC
- gfx_2daccel_type = GFX_2DACCEL_TYPE_GU2;
-#endif
-
- /* THIRD-GENERATION INITIALIZATION */
-#if GFX_INIT_DYNAMIC
- gfx_init_type = GFX_INIT_TYPE_GU3;
-#endif
-
- /* MBUS MSR ACCESSES */
-
-#if GFX_MSR_DYNAMIC
- gfx_msr_type = GFX_MSR_TYPE_REDCLOUD;
-#endif
-
- /* READ VERSION */
-
- gfx_msr_init();
-
- gfx_msr_read(RC_ID_MCP, MCP_RC_REVID, &msr_value);
-
- version = GFX_CPU_CASTLE | ((msr_value.low & 0xF0) << 4) | /* MAJOR */
- ((msr_value.low & 0x0F) << 16); /* MINOR */
-
- /* READ THE CORE FREQUENCY */
-
- gfx_cpu_frequency = gfx_get_core_freq();
-
- /* SET THE GP SCRATCH AREA */
- /* Color bitmap BLTs use the last 16K of frame buffer space */
-
- gfx_gx2_scratch_base = gfx_get_frame_buffer_size() - 0x4000;
-
- /* CAP AT 16MB */
-
- if (gfx_gx2_scratch_base > 0xFFC000)
- gfx_gx2_scratch_base = 0xFFC000;
- }
-
- }
- }
#endif
if (!version) {
@@ -521,8 +424,6 @@ gfx_detect_video(void)
version = GFX_VID_SC1200;
else if ((gfx_cpu_version & 0xFF) == GFX_CPU_REDCLOUD)
version = GFX_VID_REDCLOUD;
- else if ((gfx_cpu_version & 0xFF) == GFX_CPU_CASTLE)
- version = GFX_VID_CASTLE;
gfx_vid_version = version;
return (version);
}
@@ -581,10 +482,7 @@ gfx_get_core_freq(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
freq = gu2_get_core_freq();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- freq = gu3_get_core_freq();
-#endif
+
return freq;
}
@@ -605,10 +503,6 @@ gfx_get_cpu_register_base(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
base = gu2_get_cpu_register_base();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- base = gu3_get_cpu_register_base();
-#endif
return (base);
}
@@ -626,10 +520,6 @@ gfx_get_graphics_register_base(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
base = gu2_get_graphics_register_base();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- base = gu3_get_graphics_register_base();
-#endif
return (base);
}
@@ -651,10 +541,6 @@ gfx_get_frame_buffer_base(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
base = gu2_get_frame_buffer_base();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- base = gu3_get_frame_buffer_base();
-#endif
return (base);
}
@@ -676,10 +562,6 @@ gfx_get_frame_buffer_size(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
size = gu2_get_frame_buffer_size();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- size = gu3_get_frame_buffer_size();
-#endif
return size;
}
@@ -701,10 +583,6 @@ gfx_get_vid_register_base(void)
if (gfx_init_type & GFX_INIT_TYPE_GU2)
base = gu2_get_vid_register_base();
#endif
-#if GFX_INIT_GU3
- if (gfx_init_type & GFX_INIT_TYPE_GU3)
- base = gu3_get_vid_register_base();
-#endif
return (base);
}
diff --git a/src/gfx/gfx_regs.h b/src/gfx/gfx_regs.h
index 8d062f7..2326f61 100644
--- a/src/gfx/gfx_regs.h
+++ b/src/gfx/gfx_regs.h
@@ -1274,381 +1274,3 @@
#define MCP_DOTPLL_M 0x00001E00
#define MCP_DOTPLL_LOCK 0x02000000
#define MCP_DOTPLL_BYPASS 0x00008000
-
-/*---------------------------------------------------*/
-/* THIRD GENERATION DISPLAY CONTROLLER (CASTLE) */
-/*---------------------------------------------------*/
-
-#define DC3_VG_SPARE_MSR 0x2011
-
-#define DC3_UNLOCK 0x00000000 /* Unlock register */
-#define DC3_GENERAL_CFG 0x00000004 /* Config registers */
-#define DC3_DISPLAY_CFG 0x00000008
-#define DC3_ARB_CFG 0x0000000C
-
-#define DC3_FB_ST_OFFSET 0x00000010 /* Frame buffer start offset */
-#define DC3_CB_ST_OFFSET 0x00000014 /* Compression start offset */
-#define DC3_CURS_ST_OFFSET 0x00000018 /* Cursor buffer start
- * offset */
-#define DC3_VID_Y_ST_OFFSET 0x00000020 /* Video Y Buffer start
- * offset */
-#define DC3_VID_U_ST_OFFSET 0x00000024 /* Video U Buffer start
- * offset */
-#define DC3_VID_V_ST_OFFSET 0x00000028 /* Video V Buffer start
- * offset */
-#define DC3_LINE_SIZE 0x00000030 /* Video, CB, and FB line
- * sizes */
-#define DC3_GFX_PITCH 0x00000034 /* FB and DB skip counts */
-#define DC3_VID_YUV_PITCH 0x00000038 /* Y, U and V buffer skip
- * counts */
-
-#define DC3_H_ACTIVE_TIMING 0x00000040 /* Horizontal timings */
-#define DC3_H_BLANK_TIMING 0x00000044
-#define DC3_H_SYNC_TIMING 0x00000048
-#define DC3_V_ACTIVE_TIMING 0x00000050 /* Vertical Timings */
-#define DC3_V_BLANK_TIMING 0x00000054
-#define DC3_V_SYNC_TIMING 0x00000058
-
-#define DC3_CURSOR_X 0x00000060 /* Cursor X position */
-#define DC3_CURSOR_Y 0x00000064 /* Cursor Y Position */
-#define DC3_LINE_CNT_STATUS 0x0000006C /* Icon Y Position */
-
-#define DC3_PAL_ADDRESS 0x00000070 /* Palette Address */
-#define DC3_PAL_DATA 0x00000074 /* Palette Data */
-#define DC3_DFIFO_DIAG 0x00000078 /* Display FIFO diagnostic */
-#define DC3_CFIFO_DIAG 0x0000007C /* Compression FIFO
- * diagnostic */
-
-#define DC3_VID_DS_DELTA 0x00000080 /* Vertical Downscaling
- * fraction */
-
-#define DC3_PHY_MEM_OFFSET 0x00000084 /* VG Base Address Register */
-#define DC3_DV_CTL 0x00000088 /* Dirty-Valid Control
- * Register */
-#define DC3_DV_ACC 0x0000008C /* Dirty-Valid RAM Access */
-
-#define DC3_GFX_SCALE 0x00000090
-#define DC3_IRQ_CTL 0x00000094
-
-#define DC3_COLOR_KEY 0x000000B8 /* Graphics color key */
-#define DC3_COLOR_MASK 0x000000BC /* Graphics color key mask */
-#define DC3_COLOR_KEY_X 0x000000C0 /* Color Key X Region */
-#define DC3_COLOR_KEY_Y 0x000000C4 /* Color Key Y Region */
-
-/* UNLOCK VALUE */
-
-#define DC3_UNLOCK_VALUE 0x00004758 /* used to unlock DC regs */
-
-/* VG SPARE MSR FIELDS */
-
-#define VG_SPARE_DISABLE_CFIFO_HGO 0x00000800
-#define VG_SPARE_VFIFO_ARB_SELECT 0x00000400
-#define VG_SPARE_WM_LPEN_OVRD 0x00000200
-#define VG_SPARE_LOAD_WM_LPEN_MASK 0x00000100
-#define VG_SPARE_DISABLE_INIT_VID_PRI 0x00000080
-#define VG_SPARE_DISABLE_VFIFO_WM 0x00000040
-#define VG_SPARE_DISABLE_CWD_CHECK 0x00000020
-#define VG_SPARE_PIX8_PAN_FIX 0x00000010
-#define VG_SPARE_FIRST_REQ_MASK 0x00000020
-
-/* VG MBUS DEVICE SMI MSR FIELDS */
-
-#define DC3_VG_BL_MASK 0x00000001
-#define DC3_MISC_MASK 0x00000002
-#define DC3_ISR0_MASK 0x00000004
-#define DC3_VGA_BL_MASK 0x00000008
-#define DC3_CRTCIO_MSK 0x00000010
-#define DC3_VG_BLANK_SMI 0x00000001
-#define DC3_MISC_SMI 0x00000002
-#define DC3_ISR0_SMI 0x00000004
-#define DC3_VGA_BLANK_SMI 0x00000008
-#define DC3_CRTCIO_SMI 0x00000010
-
-/* DC3_GENERAL_CFG BIT FIELDS */
-
-#define DC3_GCFG_DBUG 0x80000000
-#define DC3_GCFG_DBSL 0x40000000
-#define DC3_GCFG_CFRW 0x20000000
-#define DC3_GCFG_DIAG 0x10000000
-#define DC3_GCFG_SGFR 0x04000000
-#define DC3_GCFG_SGRE 0x02000000
-#define DC3_GCFG_SIGE 0x01000000
-#define DC3_GCFG_YUVM 0x00100000
-#define DC3_GCFG_VDSE 0x00080000
-#define DC3_GCFG_VGAFT 0x00040000
-#define DC3_GCFG_FDTY 0x00020000
-#define DC3_GCFG_STFM 0x00010000
-#define DC3_GCFG_DFHPEL_MASK 0x0000F000
-#define DC3_GCFG_DFHPSL_MASK 0x00000F00
-#define DC3_GCFG_VGAE 0x00000080
-#define DC3_GCFG_DECE 0x00000040
-#define DC3_GCFG_CMPE 0x00000020
-#define DC3_GCFG_VIDE 0x00000008
-#define DC3_GCFG_CURE 0x00000002
-#define DC3_GCFG_DFLE 0x00000001
-
-/* DC3_DISPLAY_CFG BIT FIELDS */
-
-#define DC3_DCFG_VISL 0x08000000
-#define DC3_DCFG_FRLK 0x04000000
-#define DC3_DCFG_PALB 0x02000000
-#define DC3_DCFG_PIX_PAN_MASK 0x00F00000
-#define DC3_DCFG_DCEN 0x00080000
-#define DC3_DCFG_16BPP_MODE_MASK 0x00000C00
-#define DC3_DCFG_16BPP 0x00000000
-#define DC3_DCFG_15BPP 0x00000400
-#define DC3_DCFG_12BPP 0x00000800
-#define DC3_DCFG_DISP_MODE_MASK 0x00000300
-#define DC3_DCFG_DISP_MODE_8BPP 0x00000000
-#define DC3_DCFG_DISP_MODE_16BPP 0x00000100
-#define DC3_DCFG_DISP_MODE_24BPP 0x00000200
-#define DC3_DCFG_SCLE 0x00000080
-#define DC3_DCFG_TRUP 0x00000040
-#define DC3_DCFG_VIEN 0x00000020
-#define DC3_DCFG_VDEN 0x00000010
-#define DC3_DCFG_GDEN 0x00000008
-#define DC3_DCFG_VCKE 0x00000004
-#define DC3_DCFG_PCKE 0x00000002
-#define DC3_DCFG_TGEN 0x00000001
-
-/* DC3_LINE_CNT BIT FIELDS */
-
-#define DC3_LNCNT_DNA 0x80000000
-#define DC3_LNCNT_VNA 0x40000000
-#define DC3_LNCNT_VSA 0x20000000
-#define DC3_LNCNT_VINT 0x10000000
-#define DC3_LNCNT_FLIP 0x08000000
-#define DC3_LNCNT_V_LINE_CNT 0x07FF0000
-#define DC3_LNCNT_VFLIP 0x00008000
-#define DC3_LNCNT_SIGC 0x00004000
-#define DC3_LNCNT_SS_LINE_CMP 0x000007FF
-
-/* DC3_FB_ST_OFFSET BIT FIELDS */
-
-#define DC3_FB_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_CB_ST_OFFSET BIT FIELDS */
-
-#define DC3_CB_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_CURS_ST_OFFSET BIT FIELDS */
-
-#define DC3_CURS_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_ICON_ST_OFFSET BIT FIELDS */
-
-#define DC3_ICON_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_VID_Y_ST_OFFSET BIT FIELDS */
-
-#define DC3_VID_Y_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_VID_U_ST_OFFSET BIT FIELDS */
-
-#define DC3_VID_U_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_VID_V_ST_OFFSET BIT FIELDS */
-
-#define DC3_VID_V_ST_OFFSET_MASK 0x0FFFFFFF
-
-/* DC3_LINE_SIZE BIT FIELDS */
-
-#define DC3_LINE_SIZE_VLS_MASK 0x3FF00000
-#define DC3_LINE_SIZE_CBLS_MASK 0x0007F000
-#define DC3_LINE_SIZE_FBLS_MASK 0x000003FF
-#define DC3_LINE_SIZE_CB_SHIFT 12
-#define DC3_LINE_SIZE_VB_SHIFT 20
-
-/* DC3_GFX_PITCH BIT FIELDS */
-
-#define DC3_GFX_PITCH_CBP_MASK 0xFFFF0000
-#define DC3_GFX_PITCH_FBP_MASK 0x0000FFFF
-
-/* DC3_VID_YUV_PITCH BIT FIELDS */
-
-#define DC3_YUV_PITCH_UVP_MASK 0xFFFF0000
-#define DC3_YUV_PITCH_YBP_MASK 0x0000FFFF
-
-/* DC3_H_ACTIVE_TIMING BIT FIELDS */
-
-#define DC3_HAT_HT_MASK 0x0FF80000
-#define DC3_HAT_HA_MASK 0x00000FF8
-
-/* DC3_H_BLANK_TIMING BIT FIELDS */
-
-#define DC3_HBT_HBE_MASK 0x0FF80000
-#define DC3_HBT_HBS_MASK 0x00000FF8
-
-/* DC3_H_SYNC_TIMING BIT FIELDS */
-
-#define DC3_HST_HSE_MASK 0x0FF80000
-#define DC3_HST_HSS_MASK 0x00000FF8
-
-/* DC3_V_ACTIVE_TIMING BIT FIELDS */
-
-#define DC3_VAT_VT_MASK 0x07FF0000
-#define DC3_VAT_VA_MASK 0x000007FF
-
-/* DC3_V_BLANK_TIMING BIT FIELDS */
-
-#define DC3_VBT_VBE_MASK 0x07FF0000
-#define DC3_VBT_VBS_MASK 0x000007FF
-
-/* DC3_V_SYNC_TIMING BIT FIELDS */
-
-#define DC3_VST_VSE_MASK 0x07FF0000
-#define DC3_VST_VSS_MASK 0x000007FF
-
-/* DC3_DV_CTL BIT DEFINITIONS */
-
-#define DC3_DV_LINE_SIZE_MASK 0x00000C00
-#define DC3_DV_LINE_SIZE_1024 0x00000000
-#define DC3_DV_LINE_SIZE_2048 0x00000400
-#define DC3_DV_LINE_SIZE_4096 0x00000800
-#define DC3_DV_LINE_SIZE_8192 0x00000C00
-
-#define DC3_CLR_KEY_DATA_MASK 0x00FFFFFF
-#define DC3_CLR_KEY_ENABLE 0x01000000
-#define DC3_CLR_KEY_INVERT 0x02000000
-
-/* VGA DEFINITIONS */
-
-#define DC3_SEQUENCER_INDEX 0x03C4
-#define DC3_SEQUENCER_DATA 0x03C5
-#define DC3_SEQUENCER_RESET 0x00
-#define DC3_SEQUENCER_CLK_MODE 0x01
-
-#define DC3_RESET_VGA_DISP_ENABLE 0x03
-#define DC3_CLK_MODE_SCREEN_OFF 0x20
-
-/*---------------------------------------------------*/
-/* CASTLE DISPLAY FILTER */
-/*---------------------------------------------------*/
-
-/* CASTLE VIDEO REGISTER DEFINITIONS */
-
-#define CASTLE_VIDEO_CONFIG 0x000
-#define CASTLE_DISPLAY_CONFIG 0x008
-#define CASTLE_VIDEO_X_POS 0x010
-#define CASTLE_VIDEO_Y_POS 0x018
-#define CASTLE_VIDEO_SCALER 0x020
-#define CASTLE_VIDEO_COLOR_KEY 0x028
-#define CASTLE_VIDEO_COLOR_MASK 0x030
-#define CASTLE_PALETTE_ADDRESS 0x038
-#define CASTLE_PALETTE_DATA 0x040
-#define CASTLE_VID_MISC 0x050
-#define CASTLE_VIDEO_YSCALE 0x060
-#define CASTLE_VIDEO_XSCALE 0x068
-#define CASTLE_VIDEO_DOWNSCALER_CONTROL 0x078
-#define CASTLE_VID_CRC 0x088
-#define CASTLE_VID_CRC32 0x090
-#define CASTLE_VID_ALPHA_CONTROL 0x098
-#define CASTLE_CURSOR_COLOR_KEY 0x0A0
-#define CASTLE_CURSOR_COLOR_MASK 0x0A8
-#define CASTLE_CURSOR_COLOR_1 0x0B0
-#define CASTLE_CURSOR_COLOR_2 0x0B8
-#define CASTLE_ALPHA_XPOS_1 0x0C0
-#define CASTLE_ALPHA_YPOS_1 0x0C8
-#define CASTLE_ALPHA_COLOR_1 0x0D0
-#define CASTLE_ALPHA_CONTROL_1 0x0D8
-#define CASTLE_ALPHA_XPOS_2 0x0E0
-#define CASTLE_ALPHA_YPOS_2 0x0E8
-#define CASTLE_ALPHA_COLOR_2 0x0F0
-#define CASTLE_ALPHA_CONTROL_2 0x0F8
-#define CASTLE_ALPHA_XPOS_3 0x100
-#define CASTLE_ALPHA_YPOS_3 0x108
-#define CASTLE_ALPHA_COLOR_3 0x110
-#define CASTLE_ALPHA_CONTROL_3 0x118
-#define CASTLE_VIDEO_REQUEST 0x120
-#define CASTLE_ALPHA_WATCH 0x128
-#define CASTLE_VIDEO_TEST_MODE 0x210
-#define CASTLE_POWER_MANAGEMENT 0x410
-#define CASTLE_COEFFICIENT_BASE 0x1000
-
-/* DISPLAY FILTER POWER MANAGEMENT DEFINITIONS */
-
-#define CASTLE_PM_PANEL_POWER_ON 0x01000000
-
-/* DISPLAY FILTER MSRS */
-
-#define CASTLE_MBD_MSR_DIAG_DF 0x2010
-#define CASTLE_DIAG_32BIT_CRC 0x80000000
-
-/* "CASTLE_VIDEO_CONFIG" BIT DEFINITIONS */
-
-#define CASTLE_VCFG_VID_EN 0x00000001
-#define CASTLE_VCFG_VID_INP_FORMAT 0x0000000C
-#define CASTLE_VCFG_SC_BYP 0x00000020
-#define CASTLE_VCFG_LINE_SIZE_LOWER_MASK 0x0000FF00
-#define CASTLE_VCFG_INIT_READ_MASK 0x01FF0000
-#define CASTLE_VCFG_LINE_SIZE_BIT9 0x04000000
-#define CASTLE_VCFG_LINE_SIZE_UPPER 0x08000000
-#define CASTLE_VCFG_4_2_0_MODE 0x10000000
-#define CASTLE_VCFG_UYVY_FORMAT 0x00000000
-#define CASTLE_VCFG_Y2YU_FORMAT 0x00000004
-#define CASTLE_VCFG_YUYV_FORMAT 0x00000008
-#define CASTLE_VCFG_YVYU_FORMAT 0x0000000C
-
-/* "CASTLE_DISPLAY_CONFIG" BIT DEFINITIONS */
-
-#define CASTLE_DCFG_DIS_EN 0x00000001
-#define CASTLE_DCFG_HSYNC_EN 0x00000002
-#define CASTLE_DCFG_VSYNC_EN 0x00000004
-#define CASTLE_DCFG_DAC_BL_EN 0x00000008
-#define CASTLE_DCFG_CRT_HSYNC_POL 0x00000100
-#define CASTLE_DCFG_CRT_VSYNC_POL 0x00000200
-#define CASTLE_DCFG_CRT_SYNC_SKW_MASK 0x0001C000
-#define CASTLE_DCFG_CRT_SYNC_SKW_INIT 0x00010000
-#define CASTLE_DCFG_PWR_SEQ_DLY_MASK 0x000E0000
-#define CASTLE_DCFG_PWR_SEQ_DLY_INIT 0x00080000
-#define CASTLE_DCFG_VG_CK 0x00100000
-#define CASTLE_DCFG_GV_PAL_BYP 0x00200000
-#define CASTLE_DAC_VREF 0x04000000
-
-/* "CASTLE_VID_MISC" BIT DEFINITIONS */
-
-#define CASTLE_GAMMA_BYPASS_BOTH 0x00000001
-#define CASTLE_DAC_POWER_DOWN 0x00000400
-#define CASTLE_ANALOG_POWER_DOWN 0x00000800
-
-/* VIDEO DE-INTERLACING AND ALPHA CONTROL */
-
-#define CASTLE_NO_CK_OUTSIDE_ALPHA 0x00000100
-#define CASTLE_CSC_VIDEO_YUV_TO_RGB 0x00000400
-#define CASTLE_CSC_GRAPHICS_RGB_TO_YUV 0x00000800
-#define CASTLE_VIDEO_INPUT_IS_RGB 0x00002000
-#define CASTLE_ALPHA1_PRIORITY_POS 16
-#define CASTLE_ALPHA1_PRIORITY_MASK 0x00030000
-#define CASTLE_ALPHA2_PRIORITY_POS 18
-#define CASTLE_ALPHA2_PRIORITY_MASK 0x000C0000
-#define CASTLE_ALPHA3_PRIORITY_POS 20
-#define CASTLE_ALPHA3_PRIORITY_MASK 0x00300000
-
-/* VIDEO CURSOR COLOR KEY DEFINITIONS */
-
-#define CASTLE_CURSOR_COLOR_KEY_ENABLE 0x20000000
-#define CASTLE_CURSOR_COLOR_KEY_OFFSET_POS 24
-#define CASTLE_CURSOR_COLOR_BITS 23
-#define CASTLE_COLOR_MASK 0x00FFFFFF /* 24 significant
- * bits */
-
-/* ALPHA COLOR BIT DEFINITION (REGISTERS 0x68, 0x78, AND 0x88) */
-
-#define CASTLE_ALPHA_COLOR_ENABLE 0x01000000
-
-/* ALPHA CONTROL BIT DEFINITIONS (REGISTERS 0x6C, 0x7C, AND 0x8C) */
-
-#define CASTLE_ACTRL_WIN_ENABLE 0x00010000
-#define CASTLE_ACTRL_LOAD_ALPHA 0x00020000
-
-/* CASTLE_VIDEO_SCALER DEFINITIONS */
-
-#define CASTLE_SCALE_128_PHASES 0x00002000
-
-/* VIDEO REQUEST DEFINITIONS (REGISTER 0x90) */
-
-#define CASTLE_VIDEO_Y_REQUEST_POS 0
-#define CASTLE_VIDEO_X_REQUEST_POS 16
-#define CASTLE_VIDEO_REQUEST_MASK 0x000007FF
-
-/* END OF FILE */
diff --git a/src/gfx/gfx_rtns.h b/src/gfx/gfx_rtns.h
index ad759f4..d7e001e 100644
--- a/src/gfx/gfx_rtns.h
+++ b/src/gfx/gfx_rtns.h
@@ -69,12 +69,10 @@ extern "C"
extern int gfx_display_type;
#define GFX_DISPLAY_TYPE_GU1 0x0001
#define GFX_DISPLAY_TYPE_GU2 0x0002
-#define GFX_DISPLAY_TYPE_GU3 0x0004
extern int gfx_init_type;
#define GFX_INIT_TYPE_GU1 0x0001
#define GFX_INIT_TYPE_GU2 0x0002
-#define GFX_INIT_TYPE_GU3 0x0004
extern int gfx_msr_type;
#define GFX_MSR_TYPE_REDCLOUD 0x0001
@@ -87,7 +85,6 @@ extern "C"
#define GFX_VIDEO_TYPE_CS5530 0x0001
#define GFX_VIDEO_TYPE_SC1200 0x0002
#define GFX_VIDEO_TYPE_REDCLOUD 0x0004
-#define GFX_VIDEO_TYPE_CASTLE 0x0008
extern int gfx_vip_type;
#define GFX_VIP_TYPE_SC1200 0x0001
diff --git a/src/gfx/gfx_type.h b/src/gfx/gfx_type.h
index fbedd62..33b6cab 100644
--- a/src/gfx/gfx_type.h
+++ b/src/gfx/gfx_type.h
@@ -304,13 +304,11 @@ typedef struct
#define GFX_CPU_GXLV 1
#define GFX_CPU_SC1200 2
#define GFX_CPU_REDCLOUD 3
-#define GFX_CPU_CASTLE 4
#define GFX_CPU_PYRAMID 0x20801
#define GFX_VID_CS5530 1
#define GFX_VID_SC1200 2
#define GFX_VID_REDCLOUD 3
-#define GFX_VID_CASTLE 4
/* CHIP NAME AND REVISION */
diff --git a/src/gfx/gfx_vid.c b/src/gfx/gfx_vid.c
index ec1acbc..41fef74 100644
--- a/src/gfx/gfx_vid.c
+++ b/src/gfx/gfx_vid.c
@@ -165,12 +165,6 @@ int gfx_set_screen_enable(int enable); /* forward declaration
#include "vid_rdcl.c"
#endif
-/* INLUDE SUPPORT FOR CASTLE, IF SPECIFIED. */
-
-#if GFX_VIDEO_CASTLE
-#include "vid_cstl.c"
-#endif
-
/*---------------------------------------------------------------------------
* gfx_select_alpha_region
*
@@ -216,10 +210,6 @@ gfx_reset_video(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_reset_video();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_reset_video();
-#endif
}
/*---------------------------------------------------------------------------
@@ -245,10 +235,6 @@ gfx_set_display_control(int sync_polarities)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_display_control(sync_polarities);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_display_control(sync_polarities);
-#endif
return (status);
}
@@ -271,10 +257,6 @@ gfx_set_clock_frequency(unsigned long frequency)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_set_clock_frequency(frequency);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_set_clock_frequency(frequency);
-#endif
}
/*----------------------------------------------------------------------------
@@ -298,10 +280,6 @@ gfx_set_crt_enable(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_crt_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_crt_enable(enable);
-#endif
return (status);
}
@@ -326,10 +304,6 @@ gfx_set_video_enable(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_enable(enable);
-#endif
return (status);
}
@@ -373,10 +347,6 @@ gfx_set_video_format(unsigned long format)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_format(format);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_format(format);
-#endif
return (status);
}
@@ -401,10 +371,6 @@ gfx_set_video_size(unsigned short width, unsigned short height)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_size(width, height);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_size(width, height);
-#endif
return (status);
}
@@ -421,10 +387,6 @@ gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_yuv_pitch(ypitch, uvpitch);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_yuv_pitch(ypitch, uvpitch);
-#endif
return (status);
}
@@ -449,10 +411,6 @@ gfx_set_video_offset(unsigned long offset)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_offset(offset);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_offset(offset);
-#endif
return (status);
}
@@ -470,10 +428,6 @@ gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_yuv_offsets(yoffset, uoffset, voffset);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_yuv_offsets(yoffset, uoffset, voffset);
-#endif
return (status);
}
@@ -499,10 +453,6 @@ gfx_set_video_scale(unsigned short srcw, unsigned short srch,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_scale(srcw, srch, dstw, dsth);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_scale(srcw, srch, dstw, dsth);
-#endif
return (status);
}
@@ -638,10 +588,6 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_window(x, y, w, h);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_window(x, y, w, h);
-#endif
return (status);
}
@@ -666,10 +612,6 @@ gfx_set_video_left_crop(unsigned short x)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_left_crop(x);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_left_crop(x);
-#endif
return (status);
}
@@ -694,10 +636,6 @@ gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_color_key(key, mask, graphics);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_color_key(key, mask, graphics);
-#endif
return (status);
}
@@ -746,10 +684,6 @@ gfx_set_video_palette(unsigned long *palette)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_palette(palette);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_palette(palette);
-#endif
return (status);
}
@@ -791,10 +725,6 @@ gfx_set_video_palette_entry(unsigned long index, unsigned long palette)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_palette_entry(index, palette);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_palette_entry(index, palette);
-#endif
return (status);
}
@@ -852,10 +782,6 @@ gfx_set_video_request(short x, short y)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_request(x, y);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_request(x, y);
-#endif
return (status);
}
@@ -1040,11 +966,6 @@ gfx_set_video_cursor(unsigned long key, unsigned long mask,
redcloud_set_video_cursor(key, mask, select_color2, color1,
color2);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status =
- castle_set_video_cursor(key, mask, select_color2, color1, color2);
-#endif
return (status);
}
@@ -1061,10 +982,6 @@ gfx_set_video_cursor_enable(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_cursor_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_video_cursor_enable(enable);
-#endif
return (status);
}
@@ -1085,10 +1002,6 @@ gfx_set_alpha_enable(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_enable(enable);
-#endif
return (status);
}
@@ -1110,10 +1023,6 @@ gfx_set_alpha_window(short x, short y,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_window(x, y, width, height);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_window(x, y, width, height);
-#endif
return (status);
}
@@ -1134,10 +1043,6 @@ gfx_set_alpha_value(unsigned char alpha, char delta)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_value(alpha, delta);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_value(alpha, delta);
-#endif
return (status);
}
@@ -1158,10 +1063,6 @@ gfx_set_alpha_priority(int priority)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_priority(priority);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_priority(priority);
-#endif
return (status);
}
@@ -1182,10 +1083,6 @@ gfx_set_alpha_color(unsigned long color)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_color(color);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_color(color);
-#endif
return (status);
}
@@ -1206,10 +1103,6 @@ gfx_set_alpha_color_enable(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_color_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_alpha_color_enable(enable);
-#endif
return (status);
}
@@ -1230,10 +1123,6 @@ gfx_set_no_ck_outside_alpha(int enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_no_ck_outside_alpha(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_set_no_ck_outside_alpha(enable);
-#endif
return (status);
}
@@ -1314,10 +1203,6 @@ gfx_get_clock_frequency(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
frequency = redcloud_get_clock_frequency();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- frequency = castle_get_clock_frequency();
-#endif
return (frequency);
}
@@ -1389,10 +1274,6 @@ gfx_get_sync_polarities(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
polarities = redcloud_get_sync_polarities();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- polarities = castle_get_sync_polarities();
-#endif
return (polarities);
}
@@ -1417,10 +1298,6 @@ gfx_get_video_palette_entry(unsigned long index, unsigned long *palette)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_get_video_palette_entry(index, palette);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_get_video_palette_entry(index, palette);
-#endif
return (status);
}
@@ -1445,10 +1322,6 @@ gfx_get_video_enable(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
enable = redcloud_get_video_enable();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- enable = castle_get_video_enable();
-#endif
return (enable);
}
@@ -1473,10 +1346,6 @@ gfx_get_video_format(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
format = redcloud_get_video_format();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- format = castle_get_video_format();
-#endif
return (format);
}
@@ -1501,10 +1370,6 @@ gfx_get_video_src_size(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_src_size();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- size = castle_get_video_src_size();
-#endif
return (size);
}
@@ -1529,10 +1394,6 @@ gfx_get_video_line_size(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_line_size();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- size = castle_get_video_line_size();
-#endif
return (size);
}
@@ -1557,10 +1418,6 @@ gfx_get_video_xclip(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_xclip();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- size = castle_get_video_xclip();
-#endif
return (size);
}
@@ -1585,10 +1442,6 @@ gfx_get_video_offset(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
offset = redcloud_get_video_offset();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- offset = castle_get_video_offset();
-#endif
return (offset);
}
@@ -1604,10 +1457,6 @@ gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_yuv_offsets(yoffset, uoffset, voffset);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_video_yuv_offsets(yoffset, uoffset, voffset);
-#endif
}
/*----------------------------------------------------------------------------
@@ -1621,10 +1470,6 @@ gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_yuv_pitch(ypitch, uvpitch);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_video_yuv_pitch(ypitch, uvpitch);
-#endif
}
/*---------------------------------------------------------------------------
@@ -1775,10 +1620,6 @@ gfx_get_video_dst_size(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_dst_size();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- size = castle_get_video_dst_size();
-#endif
return (size);
}
@@ -1803,10 +1644,6 @@ gfx_get_video_position(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
position = redcloud_get_video_position();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- position = castle_get_video_position();
-#endif
return (position);
}
@@ -1831,10 +1668,6 @@ gfx_get_video_color_key(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
key = redcloud_get_video_color_key();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- key = castle_get_video_color_key();
-#endif
return (key);
}
@@ -1859,10 +1692,6 @@ gfx_get_video_color_key_mask(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
mask = redcloud_get_video_color_key_mask();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- mask = castle_get_video_color_key_mask();
-#endif
return (mask);
}
@@ -1887,10 +1716,6 @@ gfx_get_video_color_key_src(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
src = redcloud_get_video_color_key_src();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- src = castle_get_video_color_key_src();
-#endif
return (src);
}
@@ -1935,10 +1760,6 @@ gfx_get_video_request(short *x, short *y)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_get_video_request(x, y);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- status = castle_get_video_request(x, y);
-#endif
return (status);
}
@@ -2108,11 +1929,6 @@ gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
redcloud_get_video_cursor(key, mask, select_color2, color1,
color2);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- enable =
- castle_get_video_cursor(key, mask, select_color2, color1, color2);
-#endif
return (enable);
}
@@ -2137,10 +1953,6 @@ gfx_read_crc(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_crc();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- crc = castle_read_crc();
-#endif
return (crc);
}
@@ -2157,10 +1969,6 @@ gfx_read_crc32(void)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_crc32();
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- crc = castle_read_crc32();
-#endif
return (crc);
}
@@ -2178,10 +1986,6 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_window_crc(source, x, y, width, height, crc32);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- crc = castle_read_window_crc(source, x, y, width, height, crc32);
-#endif
return (crc);
}
@@ -2216,10 +2020,6 @@ gfx_get_alpha_enable(int *enable)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_enable(enable);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_alpha_enable(enable);
-#endif
return;
}
@@ -2239,10 +2039,6 @@ gfx_get_alpha_size(unsigned short *x, unsigned short *y,
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_size(x, y, width, height);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_alpha_size(x, y, width, height);
-#endif
return;
}
@@ -2261,10 +2057,6 @@ gfx_get_alpha_value(unsigned char *alpha, char *delta)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_value(alpha, delta);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_alpha_value(alpha, delta);
-#endif
return;
}
@@ -2283,10 +2075,6 @@ gfx_get_alpha_priority(int *priority)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_priority(priority);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_alpha_priority(priority);
-#endif
return;
}
@@ -2305,10 +2093,6 @@ gfx_get_alpha_color(unsigned long *color)
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_color(color);
#endif
-#if GFX_VIDEO_CASTLE
- if (gfx_video_type == GFX_VIDEO_TYPE_CASTLE)
- castle_get_alpha_color(color);
-#endif
return;
}
diff --git a/src/gfx/init_gu3.c b/src/gfx/init_gu3.c
deleted file mode 100644
index daf1513..0000000
--- a/src/gfx/init_gu3.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Copyright (c) 2005 Advanced Micro Devices, 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 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.
- *
- * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * */
-
-/*
- * This file contains routines used in Redcloud initialization.
- * */
-
-/*----------------------------------------------------------------------------
- * gfx_get_core_freq
- *
- * Returns the core clock frequency of a GX3.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_core_freq(void)
-#else
-unsigned long
-gfx_get_core_freq(void)
-#endif
-{
- unsigned long value;
-
- /* CPU SPEED IS REPORTED BY A VSM IN VSA II */
- /* Virtual Register Class = 0x12 (Sysinfo) */
- /* CPU Speed Register = 0x01 */
-
- OUTW(0xAC1C, 0xFC53);
- OUTW(0xAC1C, 0x1201);
-
- value = (unsigned long)(INW(0xAC1E));
-
- return (value);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_cpu_register_base
- *
- * This routine returns the base address for display controller registers.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_cpu_register_base(void)
-#else
-unsigned long
-gfx_get_cpu_register_base(void)
-#endif
-{
- return gfx_pci_config_read(0x80000918);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_graphics_register_base
- *
- * This routine returns the base address for the graphics acceleration.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_graphics_register_base(void)
-#else
-unsigned long
-gfx_get_graphics_register_base(void)
-#endif
-{
- return gfx_pci_config_read(0x80000914);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_frame_buffer_base
- *
- * This routine returns the base address for graphics memory.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_frame_buffer_base(void)
-#else
-unsigned long
-gfx_get_frame_buffer_base(void)
-#endif
-{
- return gfx_pci_config_read(0x80000910);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_frame_buffer_size
- *
- * This routine returns the total size of graphics memory, in bytes.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_frame_buffer_size(void)
-#else
-unsigned long
-gfx_get_frame_buffer_size(void)
-#endif
-{
- unsigned long value;
-
- /* FRAME BUFFER SIZE IS REPORTED BY A VSM IN VSA II */
- /* Virtual Register Class = 0x02 */
- /* VG_MEM_SIZE (1MB units) = 0x00 */
-
- OUTW(0xAC1C, 0xFC53);
- OUTW(0xAC1C, 0x0200);
-
- value = (unsigned long)(INW(0xAC1E)) & 0xFEl;
-
- /* LIMIT FRAME BUFFER SIZE TO 16MB TO MATCH LEGACY */
-
- if ((value << 20) > 0x1000000)
- return 0x1000000;
-
- return (value << 20);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_vid_register_base
- *
- * This routine returns the base address for the video hardware.
- *----------------------------------------------------------------------------
- */
-#if GFX_INIT_DYNAMIC
-unsigned long
-gu3_get_vid_register_base(void)
-#else
-unsigned long
-gfx_get_vid_register_base(void)
-#endif
-{
- return gfx_pci_config_read(0x8000091C);
-}
-
-/* END OF FILE */
diff --git a/src/gfx/vid_cstl.c b/src/gfx/vid_cstl.c
deleted file mode 100644
index 5b642cc..0000000
--- a/src/gfx/vid_cstl.c
+++ /dev/null
@@ -1,2571 +0,0 @@
-/* Copyright (c) 2005 Advanced Micro Devices, 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 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.
- *
- * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- * */
-
-/* DEFAULT FILTER COEFFICIENTS */
-
-long DurangoVideoFilter[][2] = {
- {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */
- {0x10008008, 0x00000008}, /* -8, 4096, 8, 0 */
- {0x10008010, 0x80010011}, /* -16, 4096, 17, -1 */
- {0x10008019, 0x8001001A}, /* -25, 4096, 26, -1 */
- {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */
- {0x0FFF8029, 0x8003002D}, /* -41, 4095, 45, -3 */
- {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */
- {0x0FFC8038, 0x80040040}, /* -56, 4092, 64, -4 */
- {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */
- {0x0FF88047, 0x80050054}, /* -71, 4088, 84, -5 */
- {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */
- {0x0FF48055, 0x80070068}, /* -85, 4084, 104, -7 */
- {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */
- {0x0FEE8063, 0x8008007D}, /* -99, 4078, 125, -8 */
- {0x0FEA8069, 0x80090088}, /* -105, 4074, 136, -9 */
- {0x0FE78070, 0x800A0093}, /* -112, 4071, 147, -10 */
- {0x0FE28076, 0x800A009E}, /* -118, 4066, 158, -10 */
- {0x0FDD807C, 0x800B00AA}, /* -124, 4061, 170, -11 */
- {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */
- {0x0FD48088, 0x800D00C1}, /* -136, 4052, 193, -13 */
- {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */
- {0x0FC88093, 0x800E00D9}, /* -147, 4040, 217, -14 */
- {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */
- {0x0FBD809E, 0x801000F1}, /* -158, 4029, 241, -16 */
- {0x0FB680A3, 0x801000FD}, /* -163, 4022, 253, -16 */
- {0x0FAF80A8, 0x8011010A}, /* -168, 4015, 266, -17 */
- {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */
- {0x0FA180B2, 0x80130124}, /* -178, 4001, 292, -19 */
- {0x0F9980B6, 0x80140131}, /* -182, 3993, 305, -20 */
- {0x0F9280BB, 0x8015013E}, /* -187, 3986, 318, -21 */
- {0x0F8880BF, 0x8015014C}, /* -191, 3976, 332, -21 */
- {0x0F8080C3, 0x80160159}, /* -195, 3968, 345, -22 */
- {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */
- {0x0F6E80CB, 0x80180175}, /* -203, 3950, 373, -24 */
- {0x0F6580CF, 0x80190183}, /* -207, 3941, 387, -25 */
- {0x0F5C80D3, 0x801A0191}, /* -211, 3932, 401, -26 */
- {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */
- {0x0F4880DA, 0x801C01AE}, /* -218, 3912, 430, -28 */
- {0x0F3D80DD, 0x801D01BD}, /* -221, 3901, 445, -29 */
- {0x0F3280E0, 0x801E01CC}, /* -224, 3890, 460, -30 */
- {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */
- {0x0F1C80E6, 0x802001EA}, /* -230, 3868, 490, -32 */
- {0x0F1180E9, 0x802101F9}, /* -233, 3857, 505, -33 */
- {0x0F0480EB, 0x80210208}, /* -235, 3844, 520, -33 */
- {0x0EFA80EF, 0x80230218}, /* -239, 3834, 536, -35 */
- {0x0EEC80F0, 0x80230227}, /* -240, 3820, 551, -35 */
- {0x0EE080F3, 0x80240237}, /* -243, 3808, 567, -36 */
- {0x0ED380F5, 0x80250247}, /* -245, 3795, 583, -37 */
- {0x0EC780F7, 0x80270257}, /* -247, 3783, 599, -39 */
- {0x0EB980F9, 0x80280268}, /* -249, 3769, 616, -40 */
- {0x0EAC80FB, 0x80290278}, /* -251, 3756, 632, -41 */
- {0x0E9E80FD, 0x802A0289}, /* -253, 3742, 649, -42 */
- {0x0E9080FE, 0x802B0299}, /* -254, 3728, 665, -43 */
- {0x0E838100, 0x802D02AA}, /* -256, 3715, 682, -45 */
- {0x0E758102, 0x802E02BB}, /* -258, 3701, 699, -46 */
- {0x0E668103, 0x802F02CC}, /* -259, 3686, 716, -47 */
- {0x0E568104, 0x803002DE}, /* -260, 3670, 734, -48 */
- {0x0E498106, 0x803202EF}, /* -262, 3657, 751, -50 */
- {0x0E398107, 0x80330301}, /* -263, 3641, 769, -51 */
- {0x0E298108, 0x80340313}, /* -264, 3625, 787, -52 */
- {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */
- {0x0E0B810A, 0x80370336}, /* -266, 3595, 822, -55 */
- {0x0DFA810A, 0x80380348}, /* -266, 3578, 840, -56 */
- {0x0DEA810B, 0x803A035B}, /* -267, 3562, 859, -58 */
- {0x0DDA810C, 0x803B036D}, /* -268, 3546, 877, -59 */
- {0x0DCA810C, 0x803D037F}, /* -268, 3530, 895, -61 */
- {0x0DB7810B, 0x803E0392}, /* -267, 3511, 914, -62 */
- {0x0DA7810C, 0x804003A5}, /* -268, 3495, 933, -64 */
- {0x0D95810C, 0x804103B8}, /* -268, 3477, 952, -65 */
- {0x0D85810C, 0x804303CA}, /* -268, 3461, 970, -67 */
- {0x0D73810C, 0x804403DD}, /* -268, 3443, 989, -68 */
- {0x0D61810C, 0x804603F1}, /* -268, 3425, 1009, -70 */
- {0x0D50810C, 0x80480404}, /* -268, 3408, 1028, -72 */
- {0x0D3E810C, 0x80490417}, /* -268, 3390, 1047, -73 */
- {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */
- {0x0D1B810C, 0x804D043E}, /* -268, 3355, 1086, -77 */
- {0x0D07810B, 0x804E0452}, /* -267, 3335, 1106, -78 */
- {0x0CF5810B, 0x80500466}, /* -267, 3317, 1126, -80 */
- {0x0CE2810A, 0x8052047A}, /* -266, 3298, 1146, -82 */
- {0x0CCF810A, 0x8053048E}, /* -266, 3279, 1166, -83 */
- {0x0CBC8109, 0x805504A2}, /* -265, 3260, 1186, -85 */
- {0x0CA98108, 0x805704B6}, /* -264, 3241, 1206, -87 */
- {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */
- {0x0C838107, 0x805B04DF}, /* -263, 3203, 1247, -91 */
- {0x0C6F8106, 0x805C04F3}, /* -262, 3183, 1267, -92 */
- {0x0C5B8105, 0x805E0508}, /* -261, 3163, 1288, -94 */
- {0x0C478104, 0x8060051D}, /* -260, 3143, 1309, -96 */
- {0x0C348103, 0x80620531}, /* -259, 3124, 1329, -98 */
- {0x0C1F8102, 0x80640547}, /* -258, 3103, 1351, -100 */
- {0x0C0C8101, 0x8066055B}, /* -257, 3084, 1371, -102 */
- {0x0BF88100, 0x80680570}, /* -256, 3064, 1392, -104 */
- {0x0BE380FE, 0x806A0585}, /* -254, 3043, 1413, -106 */
- {0x0BCF80FD, 0x806C059A}, /* -253, 3023, 1434, -108 */
- {0x0BBA80FC, 0x806E05B0}, /* -252, 3002, 1456, -110 */
- {0x0BA480F9, 0x807005C5}, /* -249, 2980, 1477, -112 */
- {0x0B8F80F8, 0x807205DB}, /* -248, 2959, 1499, -114 */
- {0x0B7A80F6, 0x807405F0}, /* -246, 2938, 1520, -116 */
- {0x0B6580F5, 0x80760606}, /* -245, 2917, 1542, -118 */
- {0x0B4F80F3, 0x8077061B}, /* -243, 2895, 1563, -119 */
- {0x0B3A80F2, 0x80790631}, /* -242, 2874, 1585, -121 */
- {0x0B2480F0, 0x807B0647}, /* -240, 2852, 1607, -123 */
- {0x0B0F80EE, 0x807D065C}, /* -238, 2831, 1628, -125 */
- {0x0AF980ED, 0x807F0673}, /* -237, 2809, 1651, -127 */
- {0x0AE480EB, 0x80810688}, /* -235, 2788, 1672, -129 */
- {0x0ACE80E9, 0x8084069F}, /* -233, 2766, 1695, -132 */
- {0x0AB980E7, 0x808606B4}, /* -231, 2745, 1716, -134 */
- {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */
- {0x0A8D80E4, 0x808A06E1}, /* -228, 2701, 1761, -138 */
- {0x0A7780E2, 0x808C06F7}, /* -226, 2679, 1783, -140 */
- {0x0A6180E0, 0x808E070D}, /* -224, 2657, 1805, -142 */
- {0x0A4B80DE, 0x80910724}, /* -222, 2635, 1828, -145 */
- {0x0A3580DC, 0x8093073A}, /* -220, 2613, 1850, -147 */
- {0x0A1F80DA, 0x80950750}, /* -218, 2591, 1872, -149 */
- {0x0A0880D8, 0x80970767}, /* -216, 2568, 1895, -151 */
- {0x09F280D6, 0x8099077D}, /* -214, 2546, 1917, -153 */
- {0x09DD80D4, 0x809C0793}, /* -212, 2525, 1939, -156 */
- {0x09C680D2, 0x809E07AA}, /* -210, 2502, 1962, -158 */
- {0x09B080D0, 0x80A007C0}, /* -208, 2480, 1984, -160 */
- {0x099980CE, 0x80A207D7}, /* -206, 2457, 2007, -162 */
- {0x098380CB, 0x80A507ED}, /* -203, 2435, 2029, -165 */
- {0x096C80C9, 0x80A70804}, /* -201, 2412, 2052, -167 */
- {0x095680C7, 0x80A9081A}, /* -199, 2390, 2074, -169 */
- {0x094080C5, 0x80AB0830}, /* -197, 2368, 2096, -171 */
- {0x092980C3, 0x80AE0848}, /* -195, 2345, 2120, -174 */
- {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */
- {0x08FC80BE, 0x80B20874}, /* -190, 2300, 2164, -178 */
- {0x08E580BC, 0x80B4088B}, /* -188, 2277, 2187, -180 */
- {0x08D080BB, 0x80B708A2}, /* -187, 2256, 2210, -183 */
- {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */
- {0x08A380B7, 0x80BB08CF}, /* -183, 2211, 2255, -187 */
- {0x088B80B4, 0x80BC08E5}, /* -180, 2187, 2277, -188 */
- {0x087480B2, 0x80BE08FC}, /* -178, 2164, 2300, -190 */
- {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */
- {0x084880AE, 0x80C30929}, /* -174, 2120, 2345, -195 */
- {0x083080AB, 0x80C50940}, /* -171, 2096, 2368, -197 */
- {0x081A80A9, 0x80C70956}, /* -169, 2074, 2390, -199 */
- {0x080480A7, 0x80C9096C}, /* -167, 2052, 2412, -201 */
- {0x07ED80A5, 0x80CB0983}, /* -165, 2029, 2435, -203 */
- {0x07D780A2, 0x80CE0999}, /* -162, 2007, 2457, -206 */
- {0x07C080A0, 0x80D009B0}, /* -160, 1984, 2480, -208 */
- {0x07AA809E, 0x80D209C6}, /* -158, 1962, 2502, -210 */
- {0x0793809C, 0x80D409DD}, /* -156, 1939, 2525, -212 */
- {0x077D8099, 0x80D609F2}, /* -153, 1917, 2546, -214 */
- {0x07668097, 0x80D80A09}, /* -151, 1894, 2569, -216 */
- {0x074F8095, 0x80DA0A20}, /* -149, 1871, 2592, -218 */
- {0x073A8093, 0x80DC0A35}, /* -147, 1850, 2613, -220 */
- {0x07238091, 0x80DE0A4C}, /* -145, 1827, 2636, -222 */
- {0x070C808E, 0x80E00A62}, /* -142, 1804, 2658, -224 */
- {0x06F7808C, 0x80E20A77}, /* -140, 1783, 2679, -226 */
- {0x06E0808A, 0x80E40A8E}, /* -138, 1760, 2702, -228 */
- {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */
- {0x06B48086, 0x80E70AB9}, /* -134, 1716, 2745, -231 */
- {0x069E8084, 0x80E90ACF}, /* -132, 1694, 2767, -233 */
- {0x06878081, 0x80EB0AE5}, /* -129, 1671, 2789, -235 */
- {0x0672807F, 0x80ED0AFA}, /* -127, 1650, 2810, -237 */
- {0x065C807D, 0x80EE0B0F}, /* -125, 1628, 2831, -238 */
- {0x0646807B, 0x80F00B25}, /* -123, 1606, 2853, -240 */
- {0x06308079, 0x80F20B3B}, /* -121, 1584, 2875, -242 */
- {0x061A8077, 0x80F30B50}, /* -119, 1562, 2896, -243 */
- {0x06068076, 0x80F50B65}, /* -118, 1542, 2917, -245 */
- {0x05F08074, 0x80F60B7A}, /* -116, 1520, 2938, -246 */
- {0x05DB8072, 0x80F80B8F}, /* -114, 1499, 2959, -248 */
- {0x05C58070, 0x80F90BA4}, /* -112, 1477, 2980, -249 */
- {0x05B1806E, 0x80FC0BB9}, /* -110, 1457, 3001, -252 */
- {0x059B806C, 0x80FD0BCE}, /* -108, 1435, 3022, -253 */
- {0x0586806A, 0x80FE0BE2}, /* -106, 1414, 3042, -254 */
- {0x05718068, 0x81000BF7}, /* -104, 1393, 3063, -256 */
- {0x055C8066, 0x81010C0B}, /* -102, 1372, 3083, -257 */
- {0x05478064, 0x81020C1F}, /* -100, 1351, 3103, -258 */
- {0x05328062, 0x81030C33}, /* -98, 1330, 3123, -259 */
- {0x051D8060, 0x81040C47}, /* -96, 1309, 3143, -260 */
- {0x0508805E, 0x81050C5B}, /* -94, 1288, 3163, -261 */
- {0x04F3805C, 0x81060C6F}, /* -92, 1267, 3183, -262 */
- {0x04E0805B, 0x81070C82}, /* -91, 1248, 3202, -263 */
- {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */
- {0x04B68057, 0x81080CA9}, /* -87, 1206, 3241, -264 */
- {0x04A28055, 0x81090CBC}, /* -85, 1186, 3260, -265 */
- {0x048E8053, 0x810A0CCF}, /* -83, 1166, 3279, -266 */
- {0x047A8052, 0x810A0CE2}, /* -82, 1146, 3298, -266 */
- {0x04668050, 0x810B0CF5}, /* -80, 1126, 3317, -267 */
- {0x0451804E, 0x810B0D08}, /* -78, 1105, 3336, -267 */
- {0x043E804D, 0x810C0D1B}, /* -77, 1086, 3355, -268 */
- {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */
- {0x04178049, 0x810C0D3E}, /* -73, 1047, 3390, -268 */
- {0x04038048, 0x810C0D51}, /* -72, 1027, 3409, -268 */
- {0x03F08046, 0x810C0D62}, /* -70, 1008, 3426, -268 */
- {0x03DD8044, 0x810C0D73}, /* -68, 989, 3443, -268 */
- {0x03CA8043, 0x810C0D85}, /* -67, 970, 3461, -268 */
- {0x03B78041, 0x810C0D96}, /* -65, 951, 3478, -268 */
- {0x03A48040, 0x810C0DA8}, /* -64, 932, 3496, -268 */
- {0x0391803E, 0x810B0DB8}, /* -62, 913, 3512, -267 */
- {0x0380803D, 0x810C0DC9}, /* -61, 896, 3529, -268 */
- {0x036D803B, 0x810C0DDA}, /* -59, 877, 3546, -268 */
- {0x035B803A, 0x810B0DEA}, /* -58, 859, 3562, -267 */
- {0x03488038, 0x810A0DFA}, /* -56, 840, 3578, -266 */
- {0x03368037, 0x810A0E0B}, /* -55, 822, 3595, -266 */
- {0x03248036, 0x81090E1B}, /* -54, 804, 3611, -265 */
- {0x03128034, 0x81080E2A}, /* -52, 786, 3626, -264 */
- {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */
- {0x02EF8032, 0x81060E49}, /* -50, 751, 3657, -262 */
- {0x02DE8030, 0x81040E56}, /* -48, 734, 3670, -260 */
- {0x02CC802F, 0x81030E66}, /* -47, 716, 3686, -259 */
- {0x02BB802E, 0x81020E75}, /* -46, 699, 3701, -258 */
- {0x02AA802D, 0x81000E83}, /* -45, 682, 3715, -256 */
- {0x0299802B, 0x80FE0E90}, /* -43, 665, 3728, -254 */
- {0x0288802A, 0x80FD0E9F}, /* -42, 648, 3743, -253 */
- {0x02778029, 0x80FB0EAD}, /* -41, 631, 3757, -251 */
- {0x02678028, 0x80F90EBA}, /* -40, 615, 3770, -249 */
- {0x02568027, 0x80F70EC8}, /* -39, 598, 3784, -247 */
- {0x02468025, 0x80F50ED4}, /* -37, 582, 3796, -245 */
- {0x02368024, 0x80F30EE1}, /* -36, 566, 3809, -243 */
- {0x02268023, 0x80F00EED}, /* -35, 550, 3821, -240 */
- {0x02188023, 0x80EF0EFA}, /* -35, 536, 3834, -239 */
- {0x02078021, 0x80EB0F05}, /* -33, 519, 3845, -235 */
- {0x01F98021, 0x80E90F11}, /* -33, 505, 3857, -233 */
- {0x01EA8020, 0x80E60F1C}, /* -32, 490, 3868, -230 */
- {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */
- {0x01CD801E, 0x80E00F31}, /* -30, 461, 3889, -224 */
- {0x01BE801D, 0x80DD0F3C}, /* -29, 446, 3900, -221 */
- {0x01AF801C, 0x80DA0F47}, /* -28, 431, 3911, -218 */
- {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */
- {0x0192801A, 0x80D30F5B}, /* -26, 402, 3931, -211 */
- {0x01848019, 0x80CF0F64}, /* -25, 388, 3940, -207 */
- {0x01768018, 0x80CB0F6D}, /* -24, 374, 3949, -203 */
- {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */
- {0x015A8016, 0x80C30F7F}, /* -22, 346, 3967, -195 */
- {0x014D8015, 0x80BF0F87}, /* -21, 333, 3975, -191 */
- {0x013F8015, 0x80BB0F91}, /* -21, 319, 3985, -187 */
- {0x01328014, 0x80B60F98}, /* -20, 306, 3992, -182 */
- {0x01258013, 0x80B20FA0}, /* -19, 293, 4000, -178 */
- {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */
- {0x010B8011, 0x80A80FAE}, /* -17, 267, 4014, -168 */
- {0x00FE8010, 0x80A30FB5}, /* -16, 254, 4021, -163 */
- {0x00F28010, 0x809E0FBC}, /* -16, 242, 4028, -158 */
- {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */
- {0x00DA800E, 0x80930FC7}, /* -14, 218, 4039, -147 */
- {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */
- {0x00C2800D, 0x80880FD3}, /* -13, 194, 4051, -136 */
- {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */
- {0x00AB800B, 0x807C0FDC}, /* -11, 171, 4060, -124 */
- {0x009F800A, 0x80760FE1}, /* -10, 159, 4065, -118 */
- {0x0094800A, 0x80700FE6}, /* -10, 148, 4070, -112 */
- {0x00898009, 0x80690FE9}, /* -9, 137, 4073, -105 */
- {0x007E8008, 0x80630FED}, /* -8, 126, 4077, -99 */
- {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */
- {0x00698007, 0x80550FF3}, /* -7, 105, 4083, -85 */
- {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */
- {0x00558005, 0x80470FF7}, /* -5, 85, 4087, -71 */
- {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */
- {0x00418004, 0x80380FFB}, /* -4, 65, 4091, -56 */
- {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */
- {0x002E8003, 0x80290FFE}, /* -3, 46, 4094, -41 */
- {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */
- {0x001A8001, 0x80191000}, /* -1, 26, 4096, -25 */
- {0x00118001, 0x80101000}, /* -1, 17, 4096, -16 */
- {0x00080000, 0x80081000}, /* 0, 8, 4096, -8 */
-};
-
-/* CASTLE PLL TABLE */
-
-typedef struct tagCASTLEPLL
-{
- long frequency; /* 16.16 fixed point frequency */
- unsigned long pll_value; /* MCP DotPLL Register Upper 32(0x0015) */
-} CASTLEPLLENTRY;
-
-CASTLEPLLENTRY CASTLE_PLLtable[] = {
- {0x00192CCC, 0x0000215D}, /* 25.1750 */
- {0x001C526E, 0x0000216C}, /* 28.3220 */
- {0x001C8F5C, 0x0000218D}, /* 28.5600 */
- {0x001F8000, 0x00003147}, /* 31.5000 */
- {0x00240000, 0x00000057}, /* 36.0000 */
- {0x0025E395, 0x0000219A}, /* 37.8890 */
- {0x00280000, 0x00000045}, /* 40.0000 */
- {0x002B29BA, 0x00000089}, /* 43.1630 */
- {0x002CE666, 0x000010E7}, /* 44.9000 */
- {0x002DB851, 0x00002136}, /* 45.7200 */
- {0x00318000, 0x00003207}, /* 49.5000 */
- {0x00320000, 0x00002187}, /* 50.0000 */
- {0x00384000, 0x00004286}, /* 56.2500 */
- {0x003C10A3, 0x000010E5}, /* 60.0650 */
- {0x00410000, 0x00004214}, /* 65.0000 */
- {0x00442DD2, 0x00001105}, /* 68.1790 */
- {0x004B0000, 0x00003183}, /* 75.0000 */
- {0x004EC000, 0x00004284}, /* 78.7500 */
- {0x00519999, 0x00001104}, /* 81.6000 */
- {0x005E8000, 0x00006363}, /* 94.5000 */
- {0x00618560, 0x00005303}, /* 97.5200 */
- {0x00630000, 0x00002523}, /* 99.0000 */
- {0x00640000, 0x000000D1}, /* 100.0000 */
- {0x00642FDF, 0x00002183}, /* 100.1870 */
- {0x00656B85, 0x00002122}, /* 101.4200 */
- {0x006C0000, 0x00001081}, /* 108.0000 */
- {0x00708000, 0x000013E3}, /* 112.5000 */
- {0x00714F1A, 0x00006201}, /* 113.3090 */
- {0x0077A666, 0x00000041}, /* 119.6500 */
- {0x00806666, 0x00000072}, /* 128.4000 */
- {0x00821999, 0x00006382}, /* 130.1000 */
- {0x00858000, 0x00002182}, /* 133.5000 */
- {0x00870000, 0x000041B1}, /* 135.0000 */
- {0x00906147, 0x00000051}, /* 144.3800 */
- {0x009D8000, 0x000062D1}, /* 157.5000 */
- {0x00A20000, 0x000031A1}, /* 162.0000 */
- {0x00A933F7, 0x00000061}, /* 169.2030 */
- {0x00AF8000, 0x00002151}, /* 175.5000 */
- {0x00BD0000, 0x000052E1}, /* 189.0000 */
- {0x00BEF5C2, 0x00000071}, /* 190.9600 */
- {0x00C60000, 0x00003201}, /* 198.0000 */
- {0x00CA8000, 0x00004291}, /* 202.5000 */
- {0x00E58000, 0x00004170}, /* 229.5000 */
-};
-
-#define NUM_CASTLE_FREQUENCIES sizeof(CASTLE_PLLtable)/sizeof(CASTLEPLLENTRY)
-
-/*---------------------------------------------------------------------------
- * gfx_reset_video (PRIVATE ROUTINE: NOT PART OF DURANGO API)
- *
- * This routine is used to disable all components of video overlay before
- * performing a mode switch.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_reset_video(void)
-#else
-void
-gfx_reset_video(void)
-#endif
-{
- gfx_set_video_enable(0);
- gfx_select_alpha_region(1);
- gfx_set_alpha_enable(0);
- gfx_select_alpha_region(2);
- gfx_set_alpha_enable(0);
-
- /* SET REGION 0 AFTER RESET */
-
- gfx_select_alpha_region(0);
- gfx_set_alpha_enable(0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_display_control (PRIVATE ROUTINE: NOT PART OF DURANGO API)
- *
- * This routine configures the display output.
- *
- * "sync_polarities" is used to set the polarities of the sync pulses
- * according to the following mask:
- *
- * Bit 0: If set to 1, negative horizontal polarity is programmed,
- * otherwise positive horizontal polarity is programmed.
- * Bit 1: If set to 1, negative vertical polarity is programmed,
- * otherwise positive vertical polarity is programmed.
- *
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_display_control(int sync_polarities)
-#else
-int
-gfx_set_display_control(int sync_polarities)
-#endif
-{
- unsigned long power;
- unsigned long dcfg;
-
- /* CONFIGURE DISPLAY OUTPUT FROM VIDEO PROCESSOR */
-
- dcfg = READ_VID32(CASTLE_DISPLAY_CONFIG);
- dcfg &= ~(CASTLE_DCFG_CRT_SYNC_SKW_MASK | CASTLE_DCFG_PWR_SEQ_DLY_MASK |
- CASTLE_DCFG_CRT_HSYNC_POL | CASTLE_DCFG_CRT_VSYNC_POL);
-
- dcfg |= (CASTLE_DCFG_CRT_SYNC_SKW_INIT |
- CASTLE_DCFG_PWR_SEQ_DLY_INIT | CASTLE_DCFG_GV_PAL_BYP);
-
- if (PanelEnable) {
- power = READ_VID32(CASTLE_POWER_MANAGEMENT);
- power |= CASTLE_PM_PANEL_POWER_ON;
- WRITE_VID32(CASTLE_POWER_MANAGEMENT, power);
- }
-
- /* SET APPROPRIATE SYNC POLARITIES */
-
- if (sync_polarities & 0x1)
- dcfg |= CASTLE_DCFG_CRT_HSYNC_POL;
- if (sync_polarities & 0x2)
- dcfg |= CASTLE_DCFG_CRT_VSYNC_POL;
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG, dcfg);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_clock_frequency
- *
- * This routine sets the clock frequency, specified as a 16.16 fixed point
- * value (0x00318000 = 49.5 MHz). It will set the closest frequency found
- * in the lookup table.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_set_clock_frequency(unsigned long frequency)
-#else
-void
-gfx_set_clock_frequency(unsigned long frequency)
-#endif
-{
- Q_WORD msr_value;
- unsigned int i, index = 0;
- unsigned long value;
- unsigned long unlock;
- long timeout;
- long min, diff;
-
- /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */
- /* Search the table for the closest frequency (16.16 format). */
-
- value = CASTLE_PLLtable[0].pll_value;
- min = (long)CASTLE_PLLtable[0].frequency - frequency;
- if (min < 0L)
- min = -min;
- for (i = 1; i < NUM_CASTLE_FREQUENCIES; i++) {
- diff = (long)CASTLE_PLLtable[i].frequency - frequency;
- if (diff < 0L)
- diff = -diff;
- if (diff < min) {
- min = diff;
- index = i;
- }
- }
-
- /* VERIFY THAT WE ARE NOT WRITING WHAT IS ALREADY IN THE REGISTERS */
- /* The Dot PLL reset bit is tied to VDD for flat panels. This can */
- /* cause a brief drop in flat panel power, which can cause serious */
- /* glitches on some panels. */
-
- gfx_msr_read(RC_ID_MCP, MCP_DOTPLL, &msr_value);
-
- if ((msr_value.low & MCP_DOTPLL_LOCK) &&
- ((msr_value.low & MCP_DOTPLL_HALFPIX) == 0) &&
- (msr_value.high == CASTLE_PLLtable[index].pll_value)) {
- return;
- }
-
- /* PROGRAM THE SETTINGS WITH THE RESET BIT SET */
- /* Clear the bypass bit to ensure that the programmed */
- /* M, N and P values are being used. */
-
- msr_value.high = CASTLE_PLLtable[index].pll_value;
- msr_value.low |= 0x00000001;
- msr_value.low &= ~MCP_DOTPLL_BYPASS;
- gfx_msr_write(RC_ID_MCP, MCP_DOTPLL, &msr_value);
-
- /* WAIT FOR THE LOCK BIT */
- /* The official word from LEDA is that the PLL may take up to 100 */
- /* us to lock and the lock bit is unreliable. We thus add a long */
- /* delay followed by a timed-out poll */
-
- unlock = READ_REG32(DC3_UNLOCK);
- for (timeout = 0; timeout < 1280; timeout++)
- WRITE_REG32(DC3_UNLOCK, unlock);
-
- for (timeout = 0; timeout < 1000; timeout++) {
- gfx_msr_read(RC_ID_MCP, MCP_DOTPLL, &msr_value);
- if (msr_value.low & MCP_DOTPLL_LOCK)
- break;
- }
-
- /* CLEAR THE RESET BIT */
-
- msr_value.low &= 0xFFFFFFFE;
- gfx_msr_write(RC_ID_MCP, MCP_DOTPLL, &msr_value);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_crt_enable
- *
- * This routine enables or disables the CRT output from the video processor.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_crt_enable(int enable)
-#else
-int
-gfx_set_crt_enable(int enable)
-#endif
-{
- unsigned long config, misc;
-
- config = READ_VID32(CASTLE_DISPLAY_CONFIG);
- misc = READ_VID32(CASTLE_VID_MISC);
-
- switch (enable) {
- case CRT_DISABLE: /* DISABLE EVERYTHING */
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG,
- config & ~(CASTLE_DCFG_DIS_EN | CASTLE_DCFG_HSYNC_EN |
- CASTLE_DCFG_VSYNC_EN | CASTLE_DCFG_DAC_BL_EN));
- WRITE_VID32(CASTLE_VID_MISC, misc | CASTLE_DAC_POWER_DOWN);
- break;
-
- case CRT_ENABLE: /* ENABLE CRT DISPLAY, INCLUDING DISPLAY LOGIC */
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG,
- config | CASTLE_DCFG_DIS_EN | CASTLE_DCFG_HSYNC_EN |
- CASTLE_DCFG_VSYNC_EN | CASTLE_DCFG_DAC_BL_EN);
- WRITE_VID32(CASTLE_VID_MISC,
- misc & ~CASTLE_DAC_POWER_DOWN & ~CASTLE_ANALOG_POWER_DOWN);
- break;
-
- case CRT_STANDBY: /* HSYNC:OFF VSYNC:ON */
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG,
- (config & ~(CASTLE_DCFG_DIS_EN | CASTLE_DCFG_HSYNC_EN |
- CASTLE_DCFG_DAC_BL_EN)) | CASTLE_DCFG_VSYNC_EN);
- WRITE_VID32(CASTLE_VID_MISC, misc | CASTLE_DAC_POWER_DOWN);
- break;
-
- case CRT_SUSPEND: /* HSYNC:ON VSYNC:OFF */
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG,
- (config & ~(CASTLE_DCFG_DIS_EN | CASTLE_DCFG_VSYNC_EN |
- CASTLE_DCFG_DAC_BL_EN)) | CASTLE_DCFG_HSYNC_EN);
- WRITE_VID32(CASTLE_VID_MISC, misc | CASTLE_DAC_POWER_DOWN);
- break;
-
- default:
- return (GFX_STATUS_BAD_PARAMETER);
- }
- return (GFX_STATUS_OK);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_enable
- *
- * This routine enables or disables the video overlay functionality.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_enable(int enable)
-#else
-int
-gfx_set_video_enable(int enable)
-#endif
-{
- unsigned long vcfg;
-
- /* WAIT FOR VERTICAL BLANK TO START */
- /* Otherwise a glitch can be observed. */
-
- if (gfx_test_timing_active()) {
- if (!gfx_test_vertical_active()) {
- while (!gfx_test_vertical_active()) ;
- }
- while (gfx_test_vertical_active()) ;
- }
-
- vcfg = READ_VID32(CASTLE_VIDEO_CONFIG);
- if (enable) {
- /* ENABLE VIDEO OVERLAY FROM DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_enable(1);
-
- /* ENABLE DISPLAY FILTER VIDEO OVERLAY */
-
- vcfg |= CASTLE_VCFG_VID_EN;
- WRITE_VID32(CASTLE_VIDEO_CONFIG, vcfg);
- } else {
- /* DISABLE DISPLAY FILTER VIDEO OVERLAY */
-
- vcfg &= ~CASTLE_VCFG_VID_EN;
- WRITE_VID32(CASTLE_VIDEO_CONFIG, vcfg);
-
- /* DISABLE VIDEO OVERLAY FROM DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_enable(0);
- }
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_format
- *
- * Sets input video format type, to one of the YUV formats or to RGB.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_format(unsigned long format)
-#else
-int
-gfx_set_video_format(unsigned long format)
-#endif
-{
- unsigned long ctrl, vcfg = 0;
-
- /* SET THE DISPLAY FILTER VIDEO INPUT FORMAT */
-
- vcfg = READ_VID32(CASTLE_VIDEO_CONFIG);
- ctrl = READ_VID32(CASTLE_VID_ALPHA_CONTROL);
- ctrl &=
- ~(CASTLE_VIDEO_INPUT_IS_RGB | CASTLE_CSC_VIDEO_YUV_TO_RGB |
- CASTLE_CSC_GRAPHICS_RGB_TO_YUV);
- vcfg &= ~(CASTLE_VCFG_VID_INP_FORMAT | CASTLE_VCFG_4_2_0_MODE);
- switch (format) {
- case VIDEO_FORMAT_UYVY:
- vcfg |= CASTLE_VCFG_UYVY_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- break;
- case VIDEO_FORMAT_YUYV:
- vcfg |= CASTLE_VCFG_YUYV_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- break;
- case VIDEO_FORMAT_Y2YU:
- vcfg |= CASTLE_VCFG_Y2YU_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- break;
- case VIDEO_FORMAT_YVYU:
- vcfg |= CASTLE_VCFG_YVYU_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- break;
- case VIDEO_FORMAT_Y0Y1Y2Y3:
- vcfg |= CASTLE_VCFG_UYVY_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- vcfg |= CASTLE_VCFG_4_2_0_MODE;
- break;
- case VIDEO_FORMAT_Y3Y2Y1Y0:
- vcfg |= CASTLE_VCFG_Y2YU_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- vcfg |= CASTLE_VCFG_4_2_0_MODE;
- break;
- case VIDEO_FORMAT_Y1Y0Y3Y2:
- vcfg |= CASTLE_VCFG_YUYV_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- vcfg |= CASTLE_VCFG_4_2_0_MODE;
- break;
- case VIDEO_FORMAT_Y1Y2Y3Y0:
- vcfg |= CASTLE_VCFG_YVYU_FORMAT;
- ctrl |= CASTLE_CSC_VIDEO_YUV_TO_RGB;
- vcfg |= CASTLE_VCFG_4_2_0_MODE;
- break;
- case VIDEO_FORMAT_RGB:
- ctrl |= CASTLE_VIDEO_INPUT_IS_RGB;
- vcfg |= CASTLE_VCFG_UYVY_FORMAT;
- break;
- case VIDEO_FORMAT_P2M_P2L_P1M_P1L:
- ctrl |= CASTLE_VIDEO_INPUT_IS_RGB;
- vcfg |= CASTLE_VCFG_Y2YU_FORMAT;
- break;
- case VIDEO_FORMAT_P1M_P1L_P2M_P2L:
- ctrl |= CASTLE_VIDEO_INPUT_IS_RGB;
- vcfg |= CASTLE_VCFG_YUYV_FORMAT;
- break;
- case VIDEO_FORMAT_P1M_P2L_P2M_P1L:
- ctrl |= CASTLE_VIDEO_INPUT_IS_RGB;
- vcfg |= CASTLE_VCFG_YVYU_FORMAT;
- break;
- default:
- return GFX_STATUS_BAD_PARAMETER;
- }
- WRITE_VID32(CASTLE_VIDEO_CONFIG, vcfg);
- WRITE_VID32(CASTLE_VID_ALPHA_CONTROL, ctrl);
-
- /* SET THE VIDEO FORMAT IN THE DISPLAY CONTROLLER */
- /* Use private routine to abstract display controller. */
-
- gfx_set_display_video_format(format);
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_size
- *
- * This routine specifies the size of the source data. It is used only
- * to determine how much data to transfer per frame, and is not used to
- * calculate the scaling value (that is handled by a separate routine).
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_size(unsigned short width, unsigned short height)
-#else
-int
-gfx_set_video_size(unsigned short width, unsigned short height)
-#endif
-{
- unsigned long size, vcfg, vid_420, pitch, scale;
-
- /* SET THE DISPLAY FILTER VIDEO LINE SIZE */
- /* Match the DC hardware alignment requirement. The line size must */
- /* always be 32-byte aligned. However, we can manage smaller */
- /* alignments by decreasing the pitch and clipping the video window. */
- /* The VG will fetch extra data for each line, but the decreased */
- /* pitch will ensure that it always begins fetching at the start of */
- /* the video line. */
-
- vcfg = READ_VID32(CASTLE_VIDEO_CONFIG);
-
- vid_420 = vcfg & CASTLE_VCFG_4_2_0_MODE;
-
- vcfg &=
- ~(CASTLE_VCFG_LINE_SIZE_LOWER_MASK | CASTLE_VCFG_LINE_SIZE_UPPER |
- CASTLE_VCFG_LINE_SIZE_BIT9);
-
- size = ((width >> 1) + 7) & 0xFFF8;
- pitch = ((width << 1) + 7) & 0xFFF8;
-
- vcfg |= (size & 0x00FF) << 8;
- if (size & 0x0100)
- vcfg |= CASTLE_VCFG_LINE_SIZE_UPPER;
- if (size & 0x0200)
- vcfg |= CASTLE_VCFG_LINE_SIZE_BIT9;
- WRITE_VID32(CASTLE_VIDEO_CONFIG, vcfg);
-
- /* WRITE THE VIDEO HEIGHT */
-
- scale = READ_VID32(CASTLE_VIDEO_SCALER);
- scale = (scale & ~0x7FF) | height;
- WRITE_VID32(CASTLE_VIDEO_SCALER, scale);
-
- /* SET VIDEO BUFFER LINE SIZE IN DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_size(width, height);
-
- /* SET VIDEO PITCH */
- /* We are only maintaining legacy for 4:2:2 video formats. */
- /* 4:2:0 video in previous chips was inadequate for most */
- /* common video formats. */
-
- if (!vid_420)
- gfx_set_video_yuv_pitch(pitch, pitch << 1);
-
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_offset
- *
- * This routine sets the starting offset for the video buffer when only
- * one offset needs to be specified.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_offset(unsigned long offset)
-#else
-int
-gfx_set_video_offset(unsigned long offset)
-#endif
-{
- /* SAVE VALUE FOR FUTURE CLIPPING OF THE TOP OF THE VIDEO WINDOW */
-
- gfx_vid_offset = offset;
-
- /* SET VIDEO BUFFER OFFSET IN DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_offset(offset);
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_yuv_offsets
- *
- * This routine sets the starting offset for the video buffer when displaying
- * 4:2:0 video.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
- unsigned long voffset)
-#else
-int
-gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
- unsigned long voffset)
-#endif
-{
- /* SAVE VALUE FOR FUTURE CLIPPING OF THE TOP OF THE VIDEO WINDOW */
-
- gfx_vid_offset = yoffset;
- gfx_vid_uoffset = uoffset;
- gfx_vid_voffset = voffset;
-
- /* SET VIDEO BUFFER OFFSET IN DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_yuv_offsets(yoffset, uoffset, voffset);
-
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_set_video_yuv_pitch
- *
- * This routine sets the byte offset between consecutive scanlines of YUV video data
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
-#else
-int
-gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
-#endif
-{
- /* SET VIDEO PITCH IN DISPLAY CONTROLLER */
- /* Use private routine to abstract the display controller. */
-
- gfx_set_display_video_yuv_pitch(ypitch, uvpitch);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_scale
- *
- * This routine sets the scale factor for the video overlay window. The
- * size of the source and destination regions are specified in pixels.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_scale(unsigned short srcw, unsigned short srch,
- unsigned short dstw, unsigned short dsth)
-#else
-int
-gfx_set_video_scale(unsigned short srcw, unsigned short srch,
- unsigned short dstw, unsigned short dsth)
-#endif
-{
- unsigned long xscale, yscale, i;
- unsigned long scale;
- unsigned long temp;
-
- /* SAVE PARAMETERS */
- /* These are needed for clipping the video window later. Zero */
- /* values indicate that the corresponding scale value should */
- /* not be changed. */
-
- if (dstw != 0) {
- gfx_vid_srcw = srcw;
- gfx_vid_dstw = dstw;
- }
- if (dsth != 0) {
- gfx_vid_srch = srch;
- gfx_vid_dsth = dsth;
- }
-
- /* CALCULATE DISPLAY FILTER SCALE FACTORS */
- /* Zero width and height indicate don't care conditions */
-
- if (dstw != 0) {
- if (dstw <= srcw)
- xscale = 0x10000;
- else
- xscale = (0x10000 * (unsigned long)srcw) / (unsigned long)dstw;
-
- WRITE_VID32(CASTLE_VIDEO_XSCALE, xscale);
- }
- if (dsth != 0) {
- if (dsth <= srch)
- yscale = 0x10000;
- else
- yscale = (0x10000 * (unsigned long)srch) / (unsigned long)dsth;
-
- WRITE_VID32(CASTLE_VIDEO_YSCALE, yscale);
- }
-
- /* ENABLE OR DISABLE FILTERING */
-
- temp = READ_VID32(CASTLE_VIDEO_CONFIG);
- if (READ_VID32(CASTLE_VIDEO_XSCALE) == 0x10000 &&
- READ_VID32(CASTLE_VIDEO_YSCALE) == 0x10000) {
- WRITE_VID32(CASTLE_VIDEO_CONFIG, (temp | CASTLE_VCFG_SC_BYP));
- } else {
- scale = READ_VID32(CASTLE_VIDEO_SCALER);
-
- WRITE_VID32(CASTLE_VIDEO_SCALER, scale & ~CASTLE_SCALE_128_PHASES);
- WRITE_VID32(CASTLE_VIDEO_CONFIG, (temp & ~CASTLE_VCFG_SC_BYP));
-
- /* PROGRAM THE COEFFICIENTS */
-
- for (i = 0; i < 256; i++) {
- WRITE_VID32((CASTLE_COEFFICIENT_BASE + (i << 3)),
- DurangoVideoFilter[i][0]);
- WRITE_VID32((CASTLE_COEFFICIENT_BASE + (i << 3) + 4),
- DurangoVideoFilter[i][1]);
- }
- }
- /* CALL ROUTINE TO UPDATE WINDOW POSITION */
- /* This is required because the scale values affect the number of */
- /* source data pixels that need to be clipped, as well as the */
- /* amount of data that needs to be transferred. */
-
- gfx_set_video_window(gfx_vid_xpos, gfx_vid_ypos, gfx_vid_width,
- gfx_vid_height);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_window
- *
- * This routine sets the position and size of the video overlay window. The
- * x and y positions are specified in screen relative coordinates, and may be
- * negative.
- * The size of destination region is specified in pixels. The line size
- * indicates the number of bytes of source data per scanline.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_window(short x, short y, unsigned short w, unsigned short h)
-#else
-int
-gfx_set_video_window(short x, short y, unsigned short w, unsigned short h)
-#endif
-{
- unsigned long hadjust, vadjust;
- unsigned long xstart, ystart, xend, yend;
- unsigned long lock;
-
- lock = READ_REG32(DC3_UNLOCK);
-
- /* SAVE PARAMETERS */
- /* These are needed to call this routine if the scale value changes. */
-
- gfx_vid_xpos = x;
- gfx_vid_ypos = y;
- gfx_vid_width = w;
- gfx_vid_height = h;
-
- /* GET ADJUSTMENT VALUES */
- /* Use routines to abstract version of display controller. */
-
- hadjust = gfx_get_htotal() - gfx_get_hsync_end() - 14l;
- vadjust = gfx_get_vtotal() - gfx_get_vsync_end() + 1l;
-
- /* LEFT CLIPPING */
-
- if (x < 0) {
- gfx_set_video_left_crop((unsigned short)(-x));
- xstart = hadjust;
- } else {
- gfx_set_video_left_crop(0);
- xstart = (unsigned long)x + hadjust;
- }
-
- /* HORIZONTAL END */
- /* End positions in register are non-inclusive (one more than the actual
- * end) */
-
- if ((x + w) < gfx_get_hactive())
- xend = (unsigned long)x + (unsigned long)w + hadjust;
-
- /* RIGHT-CLIPPING */
- else
- xend = (unsigned long)gfx_get_hactive() + hadjust;
-
- /* VERTICAL START */
-
- ystart = (unsigned long)y + vadjust;
-
- /* VERTICAL END */
-
- if ((y + h) < gfx_get_vactive())
- yend = (unsigned long)y + (unsigned long)h + vadjust;
-
- /* BOTTOM-CLIPPING */
- else
- yend = (unsigned long)gfx_get_vactive() + vadjust;
-
- /* SET VIDEO POSITION */
-
- WRITE_VID32(CASTLE_VIDEO_X_POS, (xend << 16) | xstart);
- WRITE_VID32(CASTLE_VIDEO_Y_POS, (yend << 16) | ystart);
-
- /* SET COLOR KEY REGION */
-
- WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE);
- WRITE_REG32(DC3_COLOR_KEY_X,
- ((xend - hadjust) << 16) | (xstart - hadjust));
- WRITE_REG32(DC3_COLOR_KEY_Y,
- ((yend - vadjust) << 16) | (ystart - vadjust));
- WRITE_REG32(DC3_UNLOCK, lock);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_left_crop
- *
- * This routine sets the number of pixels which will be cropped from the
- * beginning of each video line. The video window will begin to display only
- * from the pixel following the cropped pixels, and the cropped pixels
- * will be ignored.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_left_crop(unsigned short x)
-#else
-int
-gfx_set_video_left_crop(unsigned short x)
-#endif
-{
- unsigned long vcfg, initread;
-
- vcfg = READ_VID32(CASTLE_VIDEO_CONFIG) & ~CASTLE_VCFG_INIT_READ_MASK;
-
- /* CLIPPING ON LEFT */
- /* Adjust initial read for scale, checking for divide by zero. All video */
- /* formats must be clipped on a 4-pixel boundary */
-
- if (gfx_vid_dstw) {
- initread = (unsigned long)x *gfx_vid_srcw / gfx_vid_dstw;
- } else
- initread = 0;
-
- /* SET INITIAL READ ADDRESS */
-
- vcfg = vcfg | ((initread << 14) & CASTLE_VCFG_INIT_READ_MASK);
- WRITE_VID32(CASTLE_VIDEO_CONFIG, vcfg);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_color_key
- *
- * This routine specifies the color key value and mask for the video overlay
- * hardware. To disable color key, the color and mask should both be set to
- * zero. The hardware uses the color key in the following equation:
- *
- * ((source data) & (color key mask)) == ((color key) & (color key mask))
- *
- * If "graphics" is set to TRUE, the source data is graphics, and color key
- * is an RGB value. If "graphics" is set to FALSE, the source data is video,
- * and the color key is an RGB value that is compared to the video data after
- * it has gone through color space conversion (CSC).
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_color_key(unsigned long key, unsigned long mask,
- int graphics)
-#else
-int
-gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics)
-#endif
-{
- unsigned long dcfg;
-
- /* ENABLE OR DISABLE COLOR KEY LOGIC IN THE DISPLAY CONTROLLER */
- /* When chroma key is enabled, the color key logic should be */
- /* disabled in the VG to allow for per-pixel alpha blending. */
-
- gfx_set_display_video_color_key(key, mask, graphics);
-
- dcfg = READ_VID32(CASTLE_DISPLAY_CONFIG);
-
- if (graphics)
- dcfg &= ~CASTLE_DCFG_VG_CK;
- else
- dcfg |= CASTLE_DCFG_VG_CK;
-
- WRITE_VID32(CASTLE_DISPLAY_CONFIG, dcfg);
- WRITE_VID32(CASTLE_VIDEO_COLOR_KEY, key & 0xFFFFFF);
- WRITE_VID32(CASTLE_VIDEO_COLOR_MASK, mask & 0xFFFFFF);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_palette
- *
- * This routine loads the video hardware palette. If a NULL pointer is
- * specified, the palette is bypassed (for Castle, this means loading the
- * palette with identity values).
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_palette(unsigned long *palette)
-#else
-int
-gfx_set_video_palette(unsigned long *palette)
-#endif
-{
- unsigned long i, entry;
-
- /* LOAD CASTLE VIDEO PALETTE */
-
- WRITE_VID32(CASTLE_PALETTE_ADDRESS, 0);
- for (i = 0; i < 256; i++) {
- if (palette)
- entry = palette[i];
- else
- entry = i | (i << 8) | (i << 16);
- WRITE_VID32(CASTLE_PALETTE_DATA, entry);
- }
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_palette_entry
- *
- * This routine loads a single entry of the video hardware palette.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_palette_entry(unsigned long index, unsigned long palette)
-#else
-int
-gfx_set_video_palette_entry(unsigned long index, unsigned long palette)
-#endif
-{
- if (index > 0xFF)
- return GFX_STATUS_BAD_PARAMETER;
-
- /* SET A SINGLE ENTRY */
-
- WRITE_VID32(CASTLE_PALETTE_ADDRESS, index);
- WRITE_VID32(CASTLE_PALETTE_DATA, palette);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_request()
- *
- * This routine sets the horizontal (pixel) and vertical (line) video request
- * values.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_request(short x, short y)
-#else
-int
-gfx_set_video_request(short x, short y)
-#endif
-{
- /* SET DISPLAY FILTER VIDEO REQUEST */
-
- x += gfx_get_htotal() - gfx_get_hsync_end() - 2;
- y += gfx_get_vtotal() - gfx_get_vsync_end() + 1;
-
- if ((x < 0) || (x > CASTLE_VIDEO_REQUEST_MASK) ||
- (y < 0) || (y > CASTLE_VIDEO_REQUEST_MASK))
- return GFX_STATUS_BAD_PARAMETER;
-
- WRITE_VID32(CASTLE_VIDEO_REQUEST,
- ((unsigned long)x << CASTLE_VIDEO_X_REQUEST_POS) | ((unsigned long)y
- << CASTLE_VIDEO_Y_REQUEST_POS));
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_cursor()
- *
- * This routine configures the video hardware cursor.
- * If the "mask"ed bits in the graphics pixel match "key", then either
- * "color1"or "color2" will be used for this pixel, according to the value of
- * bit number "select_color2" of the graphics pixel.
- *
- * key - 24 bit RGB value
- * mask - 24 bit mask
- * color1, color2 - RGB or YUV, depending on the current color space
- * conversion select_color2 - value between 0 to 23
- *
- * To disable match, a "mask" and "key" value of 0xffffff should be set,
- * because the graphics pixels incoming to the video processor have maximum 16
- * bits set (0xF8FCF8).
- *
- * This feature is useful for disabling alpha blending of the cursor.
- * Otherwise cursor image would be blurred (or completely invisible if video
- * alpha is maximum value).
- * Note: the cursor pixel replacements take place both inside and outside the
- * video overlay window.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_cursor(unsigned long key, unsigned long mask,
- unsigned short select_color2, unsigned long color1, unsigned long color2)
-#else
-int
-gfx_set_video_cursor(unsigned long key, unsigned long mask,
- unsigned short select_color2, unsigned long color1, unsigned long color2)
-#endif
-{
- if (select_color2 > CASTLE_CURSOR_COLOR_BITS)
- return GFX_STATUS_BAD_PARAMETER;
- key =
- (key & CASTLE_COLOR_MASK) | ((unsigned long)select_color2 <<
- CASTLE_CURSOR_COLOR_KEY_OFFSET_POS);
- WRITE_VID32(CASTLE_CURSOR_COLOR_KEY, key);
- WRITE_VID32(CASTLE_CURSOR_COLOR_MASK, mask);
- WRITE_VID32(CASTLE_CURSOR_COLOR_1, color1);
- WRITE_VID32(CASTLE_CURSOR_COLOR_2, color2);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_video_cursor_enable()
- *
- * This routine enables or disables the cursor color key mechanism.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_video_cursor_enable(int enable)
-#else
-int
-gfx_set_video_cursor_enable(int enable)
-#endif
-{
- unsigned long temp = READ_VID32(CASTLE_CURSOR_COLOR_KEY);
-
- if (enable)
- temp |= CASTLE_CURSOR_COLOR_KEY_ENABLE;
- else
- temp &= ~CASTLE_CURSOR_COLOR_KEY_ENABLE;
-
- WRITE_VID32(CASTLE_CURSOR_COLOR_KEY, temp);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_enable
- *
- * This routine enables or disables the currently selected alpha region.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_enable(int enable)
-#else
-int
-gfx_set_alpha_enable(int enable)
-#endif
-{
- unsigned long address = 0, value = 0;
-
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- address = CASTLE_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 5);
- value = READ_VID32(address);
- if (enable)
- value |= CASTLE_ACTRL_WIN_ENABLE;
- else
- value &= ~(CASTLE_ACTRL_WIN_ENABLE);
- WRITE_VID32(address, value);
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_window
- *
- * This routine sets the size of the currently selected alpha region.
- * Note: "x" and "y" are signed to enable using negative values needed for
- * implementing workarounds of hardware issues.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_window(short x, short y,
- unsigned short width, unsigned short height)
-#else
-int
-gfx_set_alpha_window(short x, short y,
- unsigned short width, unsigned short height)
-#endif
-{
- unsigned long address = 0;
-
- /* CHECK FOR CLIPPING */
-
- if ((x + width) > gfx_get_hactive())
- width = gfx_get_hactive() - x;
- if ((y + height) > gfx_get_vactive())
- height = gfx_get_vactive() - y;
-
- /* ADJUST POSITIONS */
-
- x += gfx_get_htotal() - gfx_get_hsync_end() - 2;
- y += gfx_get_vtotal() - gfx_get_vsync_end() + 1;
-
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- address = CASTLE_ALPHA_XPOS_1 + ((unsigned long)gfx_alpha_select << 5);
-
- /* END POSITIONS IN REGISTERS ARE NON-INCLUSIVE (ONE MORE THAN ACTUAL END)
- * */
-
- WRITE_VID32(address, (unsigned long)x |
- ((unsigned long)(x + width) << 16));
- WRITE_VID32(address + 8, (unsigned long)y |
- ((unsigned long)(y + height) << 16));
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_value
- *
- * This routine sets the alpha value for the currently selected alpha
- * region. It also specifies an increment/decrement value for fading.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_value(unsigned char alpha, char delta)
-#else
-int
-gfx_set_alpha_value(unsigned char alpha, char delta)
-#endif
-{
- unsigned long address = 0, value = 0;
-
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- address = CASTLE_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 5);
- value = READ_VID32(address);
- value &= CASTLE_ACTRL_WIN_ENABLE; /* keep only enable bit */
- value |= (unsigned long)alpha;
- value |= (((unsigned long)delta) & 0xff) << 8;
- value |= CASTLE_ACTRL_LOAD_ALPHA;
- WRITE_VID32(address, value);
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_priority
- *
- * This routine sets the priority of the currently selected alpha region.
- * A higher value indicates a higher priority.
- * Note: Priority of enabled alpha windows must be different.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_priority(int priority)
-#else
-int
-gfx_set_alpha_priority(int priority)
-#endif
-{
- unsigned long pos = 0, value = 0;
-
- if (priority > 3)
- return (GFX_STATUS_BAD_PARAMETER);
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- value = READ_VID32(CASTLE_VID_ALPHA_CONTROL);
- pos = 16 + (gfx_alpha_select << 1);
- value &= ~(0x03l << pos);
- value |= (unsigned long)priority << pos;
- WRITE_VID32(CASTLE_VID_ALPHA_CONTROL, value);
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_color
- *
- * This routine sets the color to be displayed inside the currently selected
- * alpha window when there is a color key match (when the alpha color
- * mechanism is enabled).
- * "color" is an RGB value (for RGB blending) or a YUV value (for YUV
- * blending).
- * In Interlaced YUV blending mode, Y/2 value should be used.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_color(unsigned long color)
-#else
-int
-gfx_set_alpha_color(unsigned long color)
-#endif
-{
- unsigned long address = 0;
-
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- address = CASTLE_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 5);
- WRITE_VID32(address, color);
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_alpha_color_enable
- *
- * Enable or disable the color mechanism in the alpha window.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_alpha_color_enable(int enable)
-#else
-int
-gfx_set_alpha_color_enable(int enable)
-#endif
-{
- unsigned long color;
- unsigned long address = 0;
-
- if (gfx_alpha_select > 2)
- return (GFX_STATUS_UNSUPPORTED);
- address = CASTLE_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 5);
- color = READ_VID32(address);
- if (enable)
- color |= CASTLE_ALPHA_COLOR_ENABLE;
- else
- color &= ~CASTLE_ALPHA_COLOR_ENABLE;
- WRITE_VID32(address, color);
- return (GFX_STATUS_OK);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_set_no_ck_outside_alpha
- *
- * This function affects where inside the video window color key or chroma
- * key comparison is done:
- * If enable is TRUE, color/chroma key comparison is performed only inside
- * the enabled alpha windows. Outside the (enabled) alpha windows, only video
- * is displayed if color key is used, and only graphics is displayed if chroma
- * key is used.
- * If enable is FALSE, color/chroma key comparison is performed in all the
- * video window area.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_set_no_ck_outside_alpha(int enable)
-#else
-int
-gfx_set_no_ck_outside_alpha(int enable)
-#endif
-{
- unsigned long value;
-
- value = READ_VID32(CASTLE_VID_ALPHA_CONTROL);
- if (enable)
- WRITE_VID32(CASTLE_VID_ALPHA_CONTROL,
- value | CASTLE_NO_CK_OUTSIDE_ALPHA);
- else
- WRITE_VID32(CASTLE_VID_ALPHA_CONTROL,
- value & ~CASTLE_NO_CK_OUTSIDE_ALPHA);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_clock_frequency
- *
- * This routine returns the current clock frequency in 16.16 format.
- * It reads the current register value and finds the match in the table.
- * If no match is found, this routine returns 0.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_clock_frequency(void)
-#else
-unsigned long
-gfx_get_clock_frequency(void)
-#endif
-{
- Q_WORD msr_value;
- unsigned int index;
- unsigned long value, mask = 0x00001FFF;
-
- /* READ PLL SETTING */
-
- gfx_msr_read(RC_ID_MCP, MCP_DOTPLL, &msr_value);
- value = msr_value.high & mask;
-
- /* SEARCH FOR A MATCH */
-
- for (index = 0; index < NUM_CASTLE_FREQUENCIES; index++) {
- if ((CASTLE_PLLtable[index].pll_value & mask) == value)
- return (CASTLE_PLLtable[index].frequency);
- }
- return (0);
-}
-
-/*************************************************************/
-/* READ ROUTINES | INCLUDED FOR DIAGNOSTIC PURPOSES ONLY */
-/*************************************************************/
-
-#if GFX_READ_ROUTINES
-
-/*---------------------------------------------------------------------------
- * gfx_get_sync_polarities
- *
- * This routine returns the polarities of the sync pulses:
- * Bit 0: Set if negative horizontal polarity.
- * Bit 1: Set if negative vertical polarity.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_sync_polarities(void)
-#else
-int
-gfx_get_sync_polarities(void)
-#endif
-{
- int polarities = 0;
-
- if (READ_VID32(CASTLE_DISPLAY_CONFIG) & CASTLE_DCFG_CRT_HSYNC_POL)
- polarities |= 1;
- if (READ_VID32(CASTLE_DISPLAY_CONFIG) & CASTLE_DCFG_CRT_VSYNC_POL)
- polarities |= 2;
- return (polarities);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_palette_entry
- *
- * This routine returns a single palette entry.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_palette_entry(unsigned long index, unsigned long *palette)
-#else
-int
-gfx_get_video_palette_entry(unsigned long index, unsigned long *palette)
-#endif
-{
- if (index > 0xFF)
- return GFX_STATUS_BAD_PARAMETER;
-
- /* READ A SINGLE ENTRY */
-
- WRITE_VID32(CASTLE_PALETTE_ADDRESS, index);
- *palette = READ_VID32(CASTLE_PALETTE_DATA);
-
- return (GFX_STATUS_OK);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_enable
- *
- * This routine returns the value "one" if video overlay is currently enabled,
- * otherwise it returns the value "zero".
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_enable(void)
-#else
-int
-gfx_get_video_enable(void)
-#endif
-{
- if (READ_VID32(CASTLE_VIDEO_CONFIG) & CASTLE_VCFG_VID_EN)
- return (1);
- return (0);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_format
- *
- * This routine returns the current video overlay format.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_format(void)
-#else
-int
-gfx_get_video_format(void)
-#endif
-{
- unsigned long ctrl, vcfg;
-
- ctrl = READ_VID32(CASTLE_VID_ALPHA_CONTROL);
- vcfg = READ_VID32(CASTLE_VIDEO_CONFIG);
-
- if (ctrl & CASTLE_VIDEO_INPUT_IS_RGB) {
- switch (vcfg & CASTLE_VCFG_VID_INP_FORMAT) {
- case CASTLE_VCFG_UYVY_FORMAT:
- return VIDEO_FORMAT_RGB;
- case CASTLE_VCFG_Y2YU_FORMAT:
- return VIDEO_FORMAT_P2M_P2L_P1M_P1L;
- case CASTLE_VCFG_YUYV_FORMAT:
- return VIDEO_FORMAT_P1M_P1L_P2M_P2L;
- case CASTLE_VCFG_YVYU_FORMAT:
- return VIDEO_FORMAT_P1M_P2L_P2M_P1L;
- }
- }
-
- if (vcfg & CASTLE_VCFG_4_2_0_MODE) {
- switch (vcfg & CASTLE_VCFG_VID_INP_FORMAT) {
- case CASTLE_VCFG_UYVY_FORMAT:
- return VIDEO_FORMAT_Y0Y1Y2Y3;
- case CASTLE_VCFG_Y2YU_FORMAT:
- return VIDEO_FORMAT_Y3Y2Y1Y0;
- case CASTLE_VCFG_YUYV_FORMAT:
- return VIDEO_FORMAT_Y1Y0Y3Y2;
- case CASTLE_VCFG_YVYU_FORMAT:
- return VIDEO_FORMAT_Y1Y2Y3Y0;
- }
- } else {
- switch (vcfg & CASTLE_VCFG_VID_INP_FORMAT) {
- case CASTLE_VCFG_UYVY_FORMAT:
- return VIDEO_FORMAT_UYVY;
- case CASTLE_VCFG_Y2YU_FORMAT:
- return VIDEO_FORMAT_Y2YU;
- case CASTLE_VCFG_YUYV_FORMAT:
- return VIDEO_FORMAT_YUYV;
- case CASTLE_VCFG_YVYU_FORMAT:
- return VIDEO_FORMAT_YVYU;
- }
- }
- return (GFX_STATUS_ERROR);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_src_size
- *
- * This routine returns the size of the source video overlay buffer. The
- * return value is (height << 16) | width.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_src_size(void)
-#else
-unsigned long
-gfx_get_video_src_size(void)
-#endif
-{
- unsigned long width, height;
-
- /* DETERMINE SOURCE WIDTH FROM THE DISPLAY FILTER VIDEO LINE SIZE */
-
- width = (READ_VID32(CASTLE_VIDEO_CONFIG) >> 7) & 0x000001FE;
- if (READ_VID32(CASTLE_VIDEO_CONFIG) & CASTLE_VCFG_LINE_SIZE_UPPER)
- width += 512l;
- if (READ_VID32(CASTLE_VIDEO_CONFIG) & CASTLE_VCFG_LINE_SIZE_BIT9)
- width += 1024l;
-
- /* DETERMINE SOURCE HEIGHT FROM THE DISPLAY FILTER SCALE REGISTER */
-
- height = READ_VID32(CASTLE_VIDEO_SCALER) & 0x7FF;
-
- return ((height << 16) | width);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_line_size
- *
- * This routine returns the line size of the source video overlay buffer, in
- * pixels.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_line_size(void)
-#else
-unsigned long
-gfx_get_video_line_size(void)
-#endif
-{
- unsigned long width = 0;
-
- /* DETERMINE SOURCE WIDTH FROM THE CASTLE VIDEO LINE SIZE */
-
- width = (READ_VID32(CASTLE_VIDEO_CONFIG) >> 7) & 0x000001FE;
- if (READ_VID32(CASTLE_VIDEO_CONFIG) & CASTLE_VCFG_LINE_SIZE_UPPER)
- width += 512l;
- return (width);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_xclip
- *
- * This routine returns the number of bytes clipped on the left side of a
- * video overlay line (skipped at beginning).
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_xclip(void)
-#else
-unsigned long
-gfx_get_video_xclip(void)
-#endif
-{
- unsigned long clip = 0;
-
- /* DETERMINE SOURCE WIDTH FROM THE CASTLE VIDEO LINE SIZE */
-
- clip = ((READ_VID32(CASTLE_VIDEO_CONFIG) >> 16) & 0x001FF) << 3;
- return (clip);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_offset
- *
- * This routine returns the current offset for the video overlay buffer.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_offset(void)
-#else
-unsigned long
-gfx_get_video_offset(void)
-#endif
-{
- return (gfx_get_display_video_offset());
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_yuv_offsets
- *
- * This routine returns the current offsets for the video overlay buffer when in 4:2:0.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset,
- unsigned long *voffset)
-#else
-void
-gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset,
- unsigned long *voffset)
-#endif
-{
- gfx_get_display_video_yuv_offsets(yoffset, uoffset, voffset);
-}
-
-/*----------------------------------------------------------------------------
- * gfx_get_video_yuv_pitch
- *
- * This routine returns the current pitch values for the video overlay buffer.
- *----------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
-#else
-void
-gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
-#endif
-{
- gfx_get_display_video_yuv_pitch(ypitch, uvpitch);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_dst_size
- *
- * This routine returns the size of the displayed video overlay window.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_dst_size(void)
-#else
-unsigned long
-gfx_get_video_dst_size(void)
-#endif
-{
- unsigned long xsize, ysize;
-
- xsize = READ_VID32(CASTLE_VIDEO_X_POS);
- xsize = ((xsize >> 16) & 0x7FF) - (xsize & 0x7FF);
- ysize = READ_VID32(CASTLE_VIDEO_Y_POS);
- ysize = ((ysize >> 16) & 0x7FF) - (ysize & 0x7FF);
- return ((ysize << 16) | xsize);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_position
- *
- * This routine returns the position of the video overlay window. The
- * return value is (ypos << 16) | xpos.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_position(void)
-#else
-unsigned long
-gfx_get_video_position(void)
-#endif
-{
- unsigned long hadjust, vadjust;
- unsigned long xpos, ypos;
-
- /* READ HARDWARE POSITION */
-
- xpos = READ_VID32(CASTLE_VIDEO_X_POS) & 0x000007FF;
- ypos = READ_VID32(CASTLE_VIDEO_Y_POS) & 0x000007FF;
-
- /* GET ADJUSTMENT VALUES */
- /* Use routines to abstract version of display controller. */
-
- hadjust =
- (unsigned long)gfx_get_htotal() - (unsigned long)gfx_get_hsync_end() -
- 14l;
- vadjust =
- (unsigned long)gfx_get_vtotal() - (unsigned long)gfx_get_vsync_end() +
- 1l;
- xpos -= hadjust;
- ypos -= vadjust;
- return ((ypos << 16) | (xpos & 0x0000FFFF));
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_color_key
- *
- * This routine returns the current video color key value.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_color_key(void)
-#else
-unsigned long
-gfx_get_video_color_key(void)
-#endif
-{
- if (READ_VID32(CASTLE_DISPLAY_CONFIG) & CASTLE_DCFG_VG_CK)
- return (READ_VID32(CASTLE_VIDEO_COLOR_KEY));
- else
- return (gfx_get_display_video_color_key());
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_color_key_mask
- *
- * This routine returns the current video color mask value.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_get_video_color_key_mask(void)
-#else
-unsigned long
-gfx_get_video_color_key_mask(void)
-#endif
-{
- if (READ_VID32(CASTLE_DISPLAY_CONFIG) & CASTLE_DCFG_VG_CK)
- return (READ_VID32(CASTLE_VIDEO_COLOR_MASK));
- else
- return (gfx_get_display_video_color_key_mask());
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_color_key_src
- *
- * This routine returns 0 for video data compare, 1 for graphics data.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_color_key_src(void)
-#else
-int
-gfx_get_video_color_key_src(void)
-#endif
-{
- if (READ_VID32(CASTLE_DISPLAY_CONFIG) & CASTLE_DCFG_VG_CK)
- return (0);
- return (1);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_request
- *
- * This routine returns the horizontal (pixel) and vertical (lines) video
- * request values.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_request(short *x, short *y)
-#else
-int
-gfx_get_video_request(short *x, short *y)
-#endif
-{
- unsigned long request = 0;
-
- request = (READ_VID32(CASTLE_VIDEO_REQUEST));
- *x = (short)((request >> CASTLE_VIDEO_X_REQUEST_POS) &
- CASTLE_VIDEO_REQUEST_MASK);
- *y = (short)((request >> CASTLE_VIDEO_Y_REQUEST_POS) &
- CASTLE_VIDEO_REQUEST_MASK);
-
- *x -= gfx_get_htotal() - gfx_get_hsync_end() - 2;
- *y -= gfx_get_vtotal() - gfx_get_vsync_end() + 1;
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_video_cursor()
- *
- * This routine configures the video hardware cursor.
- * If the "mask"ed bits in the graphics pixel match "key", then either
- * "color1" or "color2" will be used for this pixel, according to the value of
- * the bit in offset "select_color2".
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-int
-castle_get_video_cursor(unsigned long *key, unsigned long *mask,
- unsigned short *select_color2, unsigned long *color1,
- unsigned short *color2)
-#else
-int
-gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
- unsigned short *select_color2, unsigned long *color1,
- unsigned short *color2)
-#endif
-{
- *select_color2 =
- (unsigned short)(READ_VID32(CASTLE_CURSOR_COLOR_KEY) >>
- CASTLE_CURSOR_COLOR_KEY_OFFSET_POS);
- *key = READ_VID32(CASTLE_CURSOR_COLOR_KEY) & CASTLE_COLOR_MASK;
- *mask = READ_VID32(CASTLE_CURSOR_COLOR_MASK) & CASTLE_COLOR_MASK;
- *color1 = READ_VID32(CASTLE_CURSOR_COLOR_1) & CASTLE_COLOR_MASK;
- *color2 =
- (unsigned short)(READ_VID32(CASTLE_CURSOR_COLOR_2) &
- CASTLE_COLOR_MASK);
- return (0);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_read_crc
- *
- * This routine returns the hardware CRC value, which is used for automated
- * testing. The value is like a checksum, but will change if pixels move
- * locations.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_read_crc(void)
-#else
-unsigned long
-gfx_read_crc(void)
-#endif
-{
- Q_WORD msr_value;
- unsigned long crc = 0xFFFFFFFF;
-
- /* DISABLE 32-BIT CRCS */
- /* For GX1.x, this is a reserved bit, and is assumed to be a benign
- * access */
-
- gfx_msr_read(RC_ID_DF, CASTLE_MBD_MSR_DIAG_DF, &msr_value);
- msr_value.low &= ~CASTLE_DIAG_32BIT_CRC;
- gfx_msr_write(RC_ID_DF, CASTLE_MBD_MSR_DIAG_DF, &msr_value);
-
- if (gfx_test_timing_active()) {
- /* WAIT UNTIL ACTIVE DISPLAY */
-
- while (!gfx_test_vertical_active()) ;
-
- /* RESET CRC DURING ACTIVE DISPLAY */
-
- WRITE_VID32(CASTLE_VID_CRC, 0);
- WRITE_VID32(CASTLE_VID_CRC, 1);
-
- /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */
-
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
- crc = READ_VID32(CASTLE_VID_CRC) >> 8;
- }
- return (crc);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_read_crc32
- *
- * This routine returns the 32-bit hardware CRC value, which is used for
- * automated testing. The value is like a checksum, but will change if pixels
- * move
- * locations.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_read_crc32(void)
-#else
-unsigned long
-gfx_read_crc32(void)
-#endif
-{
- Q_WORD msr_value;
- unsigned long crc = 0xFFFFFFFF;
-
- /* ENABLE 32-BIT CRCS */
- /* For GX1.x, this is a reserved bit, and is assumed to be a benign
- * access */
-
- gfx_msr_read(RC_ID_DF, CASTLE_MBD_MSR_DIAG_DF, &msr_value);
- msr_value.low |= CASTLE_DIAG_32BIT_CRC;
- gfx_msr_write(RC_ID_DF, CASTLE_MBD_MSR_DIAG_DF, &msr_value);
-
- if (gfx_test_timing_active()) {
- /* WAIT UNTIL ACTIVE DISPLAY */
-
- while (!gfx_test_vertical_active()) ;
-
- /* RESET CRC DURING ACTIVE DISPLAY */
-
- WRITE_VID32(CASTLE_VID_CRC, 0);
- WRITE_VID32(CASTLE_VID_CRC, 1);
-
- /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */
-
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
- crc = READ_VID32(CASTLE_VID_CRC32);
- }
- return (crc);
-}
-
-/*---------------------------------------------------------------------------
- * gfx_read_window_crc
- *
- * This routine returns the hardware CRC value for a subsection of the display
- * This value is used to debug whole-screen CRC failures.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-unsigned long
-castle_read_window_crc(int source, unsigned short x, unsigned short y,
- unsigned short width, unsigned short height, int crc32)
-#else
-unsigned long
-gfx_read_window_crc(int source, unsigned short x, unsigned short y,
- unsigned short width, unsigned short height, int crc32)
-#endif
-{
- Q_WORD msr_value;
- unsigned long xpos, ypos, crc = 0;
- unsigned long old_fmt = 0;
- unsigned int vsync_active_base, vsync_inactive_base, hsync_active_base;
- unsigned int vsync_active_shift, vsync_inactive_shift, hsync_active_shift;
- unsigned int vsync_bit, hsync_bit, sync_polarities = 0;
-
- /* CONFIGURE DISPLAY FILTER TO LOAD DATA ONTO LOWER 32-BITS */
-
- msr_value.high = 0;
- msr_value.low =
- (source == CRC_SOURCE_GFX_DATA) ? (RCDF_MBD_DIAG_EN0 | 0x0000000F)
- : (RCDF_MBD_DIAG_EN0 | 0x0000000B);
- gfx_msr_write(RC_ID_DF, MBD_MSR_DIAG, &msr_value);
-
- /* CONFIGURE DISPLAY FILTER FOR APPROPRIATE OUTPUT */
-
- if (source != CRC_SOURCE_GFX_DATA) {
- gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msr_value);
- old_fmt = msr_value.low;
- msr_value.low &= ~(RCDF_CONFIG_FMT_MASK);
- msr_value.low |=
- ((source ==
- CRC_SOURCE_FP_DATA) ? RCDF_CONFIG_FMT_FP :
- RCDF_CONFIG_FMT_CRT);
- gfx_msr_write(RC_ID_DF, MBD_MSR_CONFIG, &msr_value);
- }
-
- /* CONFIGURE MCP TO LOAD REGB DATA ONTO UPPER 32-BITS */
-
- msr_value.low = MCP_MBD_DIAG_EN1 | 0x00050000;
- gfx_msr_write(RC_ID_MCP, MBD_MSR_DIAG, &msr_value);
-
- /* ENABLE HW CLOCK GATING AND SET MCP CLOCK TO DOT CLOCK */
-
- msr_value.low = 1l;
- gfx_msr_write(RC_ID_MCP, MBD_MSR_PM, &msr_value);
- msr_value.low = 0;
- gfx_msr_write(RC_ID_MCP, MCP_DBGCLKCTL, &msr_value);
- msr_value.low = 3;
- gfx_msr_write(RC_ID_MCP, MCP_DBGCLKCTL, &msr_value);
-
- /* DISABLE MCP ACTIONS */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x00000000;
- gfx_msr_write(RC_ID_MCP, MCP_DIAGCTL, &msr_value);
-
- /* SET APPROPRIATE BASE ADDRESS */
- /* M-Sets use normal diag bits, while N-Sets use inverted diag bits */
- /* We thus use the M-sets when polling for a high signal and the N */
- /* sets when polling for a low signal. */
-
- if (source != CRC_SOURCE_GFX_DATA) {
- sync_polarities = gfx_get_sync_polarities();
- vsync_bit = 29;
- hsync_bit = 30;
- } else {
- vsync_bit = 25;
- hsync_bit = 26;
- }
-
- if (sync_polarities & 1) {
- hsync_active_base = MCP_SETM0CTL;
- hsync_active_shift = 2;
- } else {
- hsync_active_base = MCP_SETN0CTL;
- hsync_active_shift = 1;
- }
- if (sync_polarities & 2) {
- vsync_active_base = MCP_SETM0CTL;
- vsync_inactive_base = MCP_SETN0CTL;
- vsync_active_shift = 2;
- vsync_inactive_shift = 1;
- } else {
- vsync_active_base = MCP_SETN0CTL;
- vsync_inactive_base = MCP_SETM0CTL;
- vsync_active_shift = 1;
- vsync_inactive_shift = 2;
- }
-
- /* SET STATE TRANSITIONS */
-
- /* STATE 0-1 TRANSITION (SET 0) */
- /* XState = 00 and VSync Inactive */
- /* Note: DF VSync = Diag Bus Bit 29 */
- /* VG VSync = Diag Bus Bit 25 */
-
- msr_value.low = 0x000000A0;
- msr_value.high = 0x00008000 | ((unsigned long)vsync_bit << 16) |
- ((unsigned long)vsync_bit << 21) | ((unsigned long)vsync_bit << 26);
- gfx_msr_write(RC_ID_MCP, vsync_inactive_base, &msr_value);
-
- /* STATE 1-2 TRANSITION (SET 4) */
- /* XState = 01 and VSync Active */
-
- msr_value.low = 0x000000C0;
- gfx_msr_write(RC_ID_MCP, vsync_active_base + 4, &msr_value);
-
- /* STATE 2-3 TRANSITION (SET 1) */
- /* XState = 10 and VSync Inactive */
-
- msr_value.low = 0x00000120;
- gfx_msr_write(RC_ID_MCP, vsync_inactive_base + 1, &msr_value);
-
- /* HORIZONTAL COUNTER (SET 5) */
- /* XState = 10 and HSync Active */
- /* Notes: DF HSync = Diag Bus Bit 30 */
- /* VG HSync = Diag Bus Bit 26 */
-
- msr_value.high = 0x00008000 | ((unsigned long)hsync_bit << 16) |
- ((unsigned long)hsync_bit << 21) | ((unsigned long)hsync_bit << 26);
- msr_value.low = 0x00000120;
- gfx_msr_write(RC_ID_MCP, hsync_active_base + 5, &msr_value);
-
- /* HORIZONTAL COUNTER RESET (SET 4) */
- /* XState = 10 and H. Counter = limit */
- /* Note: H. Counter is lower 16-bits of */
- /* RegB. */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x00000128;
- gfx_msr_write(RC_ID_MCP, vsync_inactive_base + 4, &msr_value);
-
- /* CRC TRIGGER (SET 0) */
- /* Cmp0 <= xpos < Cmp1 */
- /* Cmp2 <= ypos < Cmp2 */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x10C20120;
- gfx_msr_write(RC_ID_MCP, vsync_active_base, &msr_value);
-
- /* SET COMPARATOR VALUES */
- /* Note: The VG data outputs from the DF are delayed by one pixel clock. */
- /* In this mode, we thus add one to horizontal comparator limits. */
-
- /* COMPARATOR 0 */
- /* Lower limit = xpos + (h_blank_pixels - 1) - 3 */
- /* Notes: */
- /* 1. 3 is the pipeline delay for MCP register */
- /* data to access the diag bus */
- /* 2. h_blank_pixels = HTOTAL - HSYNC_END */
-
- xpos = (unsigned long)x + ((unsigned long)gfx_get_htotal() -
- (unsigned long)gfx_get_hsync_end() - 1l) - 3l;
- if (source == CRC_SOURCE_GFX_DATA)
- xpos++;
- msr_value.high = 0x00000000;
- msr_value.low = xpos;
- gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0, &msr_value);
-
- /* COMPARATOR 1 */
- /* Upper limit = xpos + width + (h_blank_pixels - 1) - 3 */
-
- msr_value.low = xpos + (unsigned long)width;
- gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 2, &msr_value);
-
- /* COMPARATOR 2 */
- /* Lower limit = ypos + v_blank_pixels */
- /* Notes: */
- /* 1. v_blank_pixels = VTOTAL - VSYNC_END */
-
- ypos =
- (unsigned long)y + (unsigned long)gfx_get_vtotal() -
- (unsigned long)gfx_get_vsync_end();
- msr_value.low = ypos << 16;
- gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 4, &msr_value);
-
- /* COMPARATOR 3 */
- /* Upper limit = ypos + height + v_blank_pixels */
-
- msr_value.low = (ypos + (unsigned long)height) << 16;
- gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 6, &msr_value);
-
- /* SET COMPARATOR MASKS */
-
- /* COMPARATORS 0 AND 1 REFER TO LOWER 16 BITS OF REGB */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x0000FFFF;
- gfx_msr_write(RC_ID_MCP, MCP_CMPMASK0, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_CMPMASK0 + 2, &msr_value);
-
- /* COMPARATORS 2 AND 3 REFER TO UPPER 16 BITS OF REGB */
-
- msr_value.low = 0xFFFF0000;
- gfx_msr_write(RC_ID_MCP, MCP_CMPMASK0 + 4, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_CMPMASK0 + 6, &msr_value);
-
- /* SET REGA MASK TO CRC ONLY 24 BITS OF DATA */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x00FFFFFF;
- gfx_msr_write(RC_ID_MCP, MCP_REGAMASK, &msr_value);
-
- /* SET REGB VALUE */
- /* Lower 16 bits use HTOTAL - SYNC TIME - 1 to set the counter rollover
- * limit. */
- /* Upper 16 bits use 0xFFFF to remove auto-clear behavior. */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0xFFFF0000 |
- ((gfx_get_htotal() - (gfx_get_hsync_end() - gfx_get_hsync_start()) -
- 1) & 0xFFFF);
- gfx_msr_write(RC_ID_MCP, MCP_REGBVAL, &msr_value);
-
- /* PROGRAM ACTIONS */
-
- /* GOTO STATE 01 */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x00000008 | (1l << vsync_inactive_shift);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 14, &msr_value);
-
- /* GOTO STATE 10 */
-
- msr_value.low = 0x00080000 | (1l << (vsync_active_shift + 16));
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 15, &msr_value);
-
- /* GOTO STATE 11 */
-
- msr_value.low = 0x00000080 | (1l << (vsync_inactive_shift + 4));
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 16, &msr_value);
-
- /* CLEAR REGB (COUNTERS) */
- /* RegB is cleared upon transitioning to state 10 */
- /* RegA is not cleared as the initial value must be 0x00000001 */
-
- msr_value.low = 0x00080000 | (1l << (vsync_active_shift + 16));
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0, &msr_value);
-
- /* CRC INTO REGA */
- /* INCREMENT H. COUNTER */
- /* cmp0 <= xpos < cmp1 */
- /* cmp2 <= ypos < cmp3 */
- /* XState = 10 */
-
- msr_value.low = 0x00000008 | (1l << vsync_active_shift) |
- 0x00800000 | (1l << (hsync_active_shift + 20));
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 1, &msr_value);
-
- /* INCREMENT V. COUNTER */
- /* V. Counter is incremented when the H. Counter */
- /* rolls over. */
-
- msr_value.low = 0x00080000 | (1l << (vsync_inactive_shift + 16));
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 2, &msr_value);
-
- /* CLEAR ALL OTHER ACTIONS */
- /* This prevents side-effects from previous accesses to the MCP */
- /* debug logic. */
- msr_value.low = 0x00000000;
- msr_value.high = 0x00000000;
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 3, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 4, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 5, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 6, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 7, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 8, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 9, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 10, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 11, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 12, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 13, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 17, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 18, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 19, &msr_value);
- gfx_msr_write(RC_ID_MCP, MCP_ACTION0 + 20, &msr_value);
-
- /* SET REGA CRC VALUE TO 1 OR 0 */
-
- if (!crc32)
- msr_value.low = 0x00000001;
- gfx_msr_write(RC_ID_MCP, MCP_REGA, &msr_value);
-
- /* SET XSTATE TO 0 */
-
- msr_value.low = 0;
- msr_value.high = 0;
- gfx_msr_write(RC_ID_MCP, MCP_XSTATE, &msr_value);
-
- /* CONFIGURE DIAG CONTROL */
- /* Set all four comparators to watch the upper diag bus. */
- /* Set REGA action1 to legacy CRC or 32-bit CRC. */
- /* Set REGB action1 to increment lower 16 bits and clear at limit. */
- /* Set REGB action2 to increment upper 16 bits. */
- /* Enable all actions. */
-
- if (crc32)
- msr_value.low = 0x9A820055;
- else
- msr_value.low = 0x9A840055;
- msr_value.high = 0x00000000;
- gfx_msr_write(RC_ID_MCP, MCP_DIAGCTL, &msr_value);
-
- /* DELAY TWO FRAMES */
-
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
- while (gfx_test_vertical_active()) ;
- while (!gfx_test_vertical_active()) ;
-
- /* VERIFY THAT XSTATE = 11 */
-
- gfx_msr_read(RC_ID_MCP, MCP_XSTATE, &msr_value);
- if ((msr_value.low & 3) == 3) {
- gfx_msr_read(RC_ID_MCP, MCP_REGA, &msr_value);
-
- crc = msr_value.low;
- if (!crc32)
- crc &= 0xFFFFFF;
- }
-
- /* DISABLE MCP AND DF DIAG BUS OUTPUTS */
-
- msr_value.low = 0x00000000;
- msr_value.high = 0x00000000;
- gfx_msr_write(RC_ID_DF, MBD_MSR_DIAG, &msr_value);
- gfx_msr_write(RC_ID_MCP, MBD_MSR_DIAG, &msr_value);
-
- /* DISABLE MCP ACTIONS */
-
- msr_value.high = 0x00000000;
- msr_value.low = 0x00000000;
- gfx_msr_write(RC_ID_MCP, MCP_DIAGCTL, &msr_value);
-
- /* RESTORE PREVIOUS OUTPUT FORMAT */
-
- if (source != CRC_SOURCE_GFX_DATA) {
- gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msr_value);
- msr_value.low = old_fmt;
- gfx_msr_write(RC_ID_DF, MBD_MSR_CONFIG, &msr_value);
- }
- return crc;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_alpha_enable
- *
- * This routine returns 1 if the selected alpha window is currently
- * enabled, or 0 if it is currently disabled.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_alpha_enable(int *enable)
-#else
-void
-gfx_get_alpha_enable(int *enable)
-#endif
-{
- unsigned long value = 0;
-
- *enable = 0;
- if (gfx_alpha_select <= 2) {
- value =
- READ_VID32(CASTLE_ALPHA_CONTROL_1 +
- ((unsigned long)gfx_alpha_select << 5));
- if (value & CASTLE_ACTRL_WIN_ENABLE)
- *enable = 1;
- }
- return;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_alpha_size
- *
- * This routine returns the size of the currently selected alpha region.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_alpha_size(unsigned short *x, unsigned short *y,
- unsigned short *width, unsigned short *height)
-#else
-void
-gfx_get_alpha_size(unsigned short *x, unsigned short *y,
- unsigned short *width, unsigned short *height)
-#endif
-{
- unsigned long value = 0;
-
- *x = 0;
- *y = 0;
- *width = 0;
- *height = 0;
- if (gfx_alpha_select <= 2) {
- value =
- READ_VID32(CASTLE_ALPHA_XPOS_1 +
- ((unsigned long)gfx_alpha_select << 5));
- *x = (unsigned short)(value & 0x000007FF);
- *width = (unsigned short)((value >> 16) & 0x000007FF) - *x;
- value =
- READ_VID32(CASTLE_ALPHA_YPOS_1 +
- ((unsigned long)gfx_alpha_select << 5));
- *y = (unsigned short)(value & 0x000007FF);
- *height = (unsigned short)((value >> 16) & 0x000007FF) - *y;
- }
- *x -= gfx_get_htotal() - gfx_get_hsync_end() - 2;
- *y -= gfx_get_vtotal() - gfx_get_vsync_end() + 1;
- return;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_alpha_value
- *
- * This routine returns the alpha value and increment/decrement value of
- * the currently selected alpha region.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_alpha_value(unsigned char *alpha, char *delta)
-#else
-void
-gfx_get_alpha_value(unsigned char *alpha, char *delta)
-#endif
-{
- unsigned long value = 0;
-
- *alpha = 0;
- *delta = 0;
- if (gfx_alpha_select <= 2) {
- value =
- READ_VID32(CASTLE_ALPHA_CONTROL_1 +
- ((unsigned long)gfx_alpha_select << 5));
- *alpha = (unsigned char)(value & 0x00FF);
- *delta = (char)((value >> 8) & 0x00FF);
- }
- return;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_alpha_priority
- *
- * This routine returns the priority of the currently selected alpha region.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_alpha_priority(int *priority)
-#else
-void
-gfx_get_alpha_priority(int *priority)
-#endif
-{
- unsigned long pos = 0, value = 0;
-
- *priority = 0;
- if (gfx_alpha_select <= 2) {
- value = READ_VID32(CASTLE_VID_ALPHA_CONTROL);
- pos = 16 + (gfx_alpha_select << 1);
- *priority = (int)((value >> pos) & 3);
- }
- return;
-}
-
-/*---------------------------------------------------------------------------
- * gfx_get_alpha_color
- *
- * This routine returns the color register value for the currently selected
- * alpha region. Bit 24 is set if the color register is enabled.
- *---------------------------------------------------------------------------
- */
-#if GFX_VIDEO_DYNAMIC
-void
-castle_get_alpha_color(unsigned long *color)
-#else
-void
-gfx_get_alpha_color(unsigned long *color)
-#endif
-{
- *color = 0;
- if (gfx_alpha_select <= 2) {
- *color =
- READ_VID32(CASTLE_ALPHA_COLOR_1 +
- ((unsigned long)gfx_alpha_select << 5));
- }
- return;
-}
-
-#endif /* GFX_READ_ROUTINES */
-
-/* END OF FILE */